From ab84380b7df7ed63fd04a76075776cb59fed60d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milien=20Devos?= Date: Wed, 13 Apr 2022 21:01:08 +0000 Subject: [PATCH] Add the ability to hide quality options Related to https://github.com/iv-org/invidious/pull/3011 --- src/js/components/QualitySelector.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/components/QualitySelector.js b/src/js/components/QualitySelector.js index 32b92e1..c5b2ec1 100644 --- a/src/js/components/QualitySelector.js +++ b/src/js/components/QualitySelector.js @@ -76,6 +76,10 @@ module.exports = function(videojs) { createItems: function() { var player = this.player(), sources = player.currentSources(); + + sources = sources.filter(function(element) { + return element.hidequalityoption == undefined; + }); return _.map(sources, function(source) { return new QualityOption(player, {