From 294c48d1196bba1365c4c1296fe0a77ff565fed7 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 4acca28..b89f34d 100644 --- a/src/js/components/QualitySelector.js +++ b/src/js/components/QualitySelector.js @@ -73,6 +73,10 @@ module.exports = function(videojs) { createItems() { 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, {