summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-04-10 21:49:10 -0500
committerOmar Roth <omarroth@hotmail.com>2018-04-10 21:49:10 -0500
commit20c0bff96d2a3785be712e1ee14b872d8eeff532 (patch)
tree45c6ced7846e9309b3dfe9544db4896d760706a2
parent2a4b643539eeb72ad1ff3ec0191bfcb3efa68d96 (diff)
downloadinvidious-20c0bff96d2a3785be712e1ee14b872d8eeff532.tar.gz
invidious-20c0bff96d2a3785be712e1ee14b872d8eeff532.tar.bz2
invidious-20c0bff96d2a3785be712e1ee14b872d8eeff532.zip
Remove unsupported formats from quality selector
-rw-r--r--src/views/watch.ecr9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/views/watch.ecr b/src/views/watch.ecr
index 696ce56f..766dda77 100644
--- a/src/views/watch.ecr
+++ b/src/views/watch.ecr
@@ -103,6 +103,15 @@ function toggle_comments(target) {
body.style.display = '';
}
};
+
+var currentSources = player.currentSources();
+for ( var i = 0; i < currentSources.length; i++ ) {
+ if (player.canPlayType(currentSources[i]["type"].split(";")[0]) === "") {
+ currentSources.splice(i);
+ }
+}
+
+player.src(currentSources);
</script>
<div class="h-box">