From 20c0bff96d2a3785be712e1ee14b872d8eeff532 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Tue, 10 Apr 2018 21:49:10 -0500 Subject: [PATCH] Remove unsupported formats from quality selector --- src/views/watch.ecr | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/views/watch.ecr b/src/views/watch.ecr index 696ce56f1..766dda771 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);