<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(function(){var t=[],e=void 0,i=videojs.getComponent("MenuItem"),s=videojs.getComponent("MenuButton");videojs.registerComponent("QualitySwitcherItem",videojs.extend(i,{constructor:function(t,s){this.playlist=s.playlist,this.switcher=s.switcher,i.call(this,t,{selected:this.playlist===e,label:void 0===this.playlist?"auto":this.playlist.replace("/index.m3u8","")}),this.on(t,"quality-changed",this.update)},update:function(){this.selected(this.player().getQuality()===this.playlist)},handleClick:function(t){this.player().setQuality(this.playlist),this.switcher.unpressButton()},createEl:function(t,e,s){return i.prototype.createEl.call(this,t,{innerHTML:this.options_.label},s)}}));var l=videojs.getComponent("QualitySwitcherItem");videojs.registerComponent("QualitySwitcher",videojs.extend(s,{constructor:function(t,e){s.call(this,t,e),this.on(t,"click",this.playerClicked)},playerClicked:function(t){this.buttonPressed_&amp;&amp;(this.unpressButton(),this.player().paused()?this.player().play():this.player().pause())},createItems:function(){var e=[];e.push(new l(this.player(),{playlist:void 0,switcher:this}));for(var i=0;i&lt;t.length;i++)e.push(new l(this.player(),{playlist:t[i],switcher:this}));return e},handleClick:function(){var t=this;this.buttonPressed_?this.unpressButton():(this.off(t.player(),"click",this.playerClicked),this.pressButton()),setTimeout(function(){t.on(t.player(),"click",t.playerClicked)},0)},pressButton:function(){s.prototype.pressButton.call(this),this.player().addClass("vjs-menu-open")},unpressButton:function(){s.prototype.unpressButton.call(this),this.player().removeClass("vjs-menu-open")},buildCSSClass:function(){var e=" vjs-quality-selector vjs-icon-cog "+s.prototype.buildCSSClass.call(this);return 0===t.length&amp;&amp;(e+=" vjs-hidden "),e}})),videojs.plugin("QualitySwitcher",function(i){var s=this;s.setQuality=function(t){if(e!=t){e=t,s.trigger("quality-changed",{quality:t}),s.pause();var i=s.tech_.sourceHandler_.sourceBuffer,l=i.timestampOffset,n=s.currentTime();s.currentTime(n-l-.1),i.remove(0,9999999999999),s.currentTime(n),s.play()}},s.getQuality=function(){return e},s.on("ready",function(){s.getChild("controlBar").addChild("QualitySwitcher")}),s.one("loadedmetadata",function(){var t=s.tech_.hls.selectPlaylist;s.tech_.hls.selectPlaylist=function(){return null==e?t.call(this):s.tech_.hls.playlists.master.playlists[e]}}),s.on("loadedmetadata",function(){var e,i=s.tech_.hls.playlists.master.playlists;for(e in t=[],i)i.hasOwnProperty(e)&amp;&amp;isNaN(e)&amp;&amp;t.push(e);s.getChild("controlBar").getChild("QualitySwitcher").update()})})})();</pre></body></html>