vendor: 4,471 bytes, lines 1-2
1/*! For license information please see playerlite.v1.min.js.LICENSE.txt */ 2!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.HLSPlayer=t():e.HLSPlayer=t()}(this,()=>(()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function r(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,o,a){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return i(c,"_invoke",function(n,r,i){var o,a,s,u=0,c=i||[],d=!1,v={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,a=0,s=e,v.n=n,l}};function h(n,r){for(a=n,s=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],h=v.p,f=o[2];n>3?(i=f===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,v.v=r,v.n=o[1]):h<f&&(i=n<3||o[0]>r||r>f)&&(o[4]=n,o[5]=r,v.n=f,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,c,f){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,f),a=c,s=f;(t=a<2?e:s)||!d;){o||(a?a<3?(a>1&&(v.n=-1),h(a,s)):v.n=s:v.v=s);try{if(u=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(d=v.n<0)?s:n.call(r,v))!==l)break}catch(t){o=e,a=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,o,a),!0),c}var l={};function u(){}function c(){}function d(){}t=Object.getPrototypeOf;var v=[][o]?t(t([][o]())):(i(t={},o,function(){return this}),t),h=d.prototype=u.prototype=Object.create(v);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,i(e,a,"GeneratorFunction")),e.prototype=Object.create(h),e}return c.prototype=d,i(h,"constructor",d),i(d,"constructor",c),c.displayName="GeneratorFunction",i(d,a,"GeneratorFunction"),i(h),i(h,a,"Generator"),i(h,o,function(){return this}),i(h,"toString",function(){return"[object Generator]"}),(r=function(){return{w:s,m:f}})()}function i(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}i=function(e,t,n,r){function a(t,n){i(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},i(e,t,n,r)}function o(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,l,"next",e)}function l(e){o(a,r,i,s,l,"throw",e)}s(void 0)})}}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function l(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,n||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}
2(t,"string");return"symbol"==e(n)?n:n+""}var c=function(){return e=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"checkSrcPrefix",function(){n.config.src.startsWith("//")&&(n.config.src="https:"+n.config.src)}),l(this,"isBannerFn",function(){return n.config.autoplay&&n.config.muted}),l(this,"hlsAttachSource",a(r().m(function e(){var t;return r().w(function(e){for(;;)switch(e.n){case 0:return n.supportType=2,n.vd.playsinline=!0,n.vd.webkitPlaysinline=!0,n.vd.controls=!1,e.n=1,n.parseMasterPlaylist(n.config.src);case 1:t=e.v,n.updatePlayLevelUrl(t),n.vd.src=n.config.src,n.vd.addEventListener("loadedmetadata",function(){n.duration=n.vd.duration,n.vd.currentTime=0});case 2:return e.a(2)}},e)}))),l(this,"onVideoWaiting",function(){n.loadingLayer.style.display="flex",n.isDefined(n.bigPlayButton)&&(n.bigPlayButton.style.display="none"),n.addClass(n.playPauseBtn,"paused")}),l(this,"onVideoLoadeddata",function(){if(n.updateTimeDisplay(),n.loadingLayer.style.display="none",n.bigPlayButton&&(n.bigPlayButton.style.display="block"),n.config.playEndMask)try{var e=document.querySelector("#endMask");n.removeClass(e,"active")}catch(e){}}),l(this,"onVideoPlay",a(r().m(function e(){var t;return r().w(function(e){for(;;)switch(e.n){case 0:if(n.posterLayer.style.display="none",n.config.playEndMask)try{t=document.querySelector("#endMask"),n.removeClass(t,"active")}catch(e){}n.isMob&&n.config.controls&&(n.showControlsTimer&&clearTimeout(n.showControlsTimer),n.showControlsTimer=setTimeout(function(){n.removeClass(n.vdContainer,"controls")},2e3));case 1:return e.a(2)}},e)}))),l(this,"onVideoPlaying",function(){n.addClass(n.playPauseBtn,"paused"),n.isDefined(n.bigPlayButton)&&(n.bigPlayButton.style.display="none"),n.loadingLayer.style.display="none",n.config.playing()}),l(this,"onVideoSeeking",function(){}),l(this,"onVideoSeeked",function(){n.loadingLayer.style.display="none",n.config.seeked()}),l(this,"onVideoVolumechange",function(){n.vd.muted||0===n.vd.volume?n.volumeContainer&&n.addClass(n.volumeContainer,"muted"):n.volumeContainer&&n.removeClass(n.volumeContainer,"muted")}),l(this,"onVideoCanplay",function(){n.isMob&&n.vd.paused&&n.bigPlayButton&&(n.bigPlayButton.style.display="block"),n.config.canplay()}),l(this,"onVideoError",function(e){n.config.error("video error:",e)}),l(this,"onVideoEnded",function(){if(n.updateTimeDisplay(),n.config.loop)n.vd.currentTime=0,n.vd.play();else if(n.vd.pause(),n.loadingLayer.style.display="none",n.loadingLayer.setAttribute("on","false"),n.posterLayer.style.display="block",n.config.playEndMask){var e=document.querySelector("#endMask");n.addClass(e,"active")}n.isMob&&n.config.controls&&(n.showControlsTimer&&clearTimeout(n.showControlsTimer),n.addClass(n.vdContainer,"controls")),n.config.ended()}),l(this,"onVideoPause",function(){n.removeClass(n.playPauseBtn,"paused"),n.isDefined(n.bigPlayButton)&&(n.bigPlayButton.style.display="block"),n.loadingLayer.style.display="none",n.config.controls&&(n.showControlsTimer&&clearTimeout(n.showControlsTimer),n.addClass(n.vdContainer,"controls")),n.config.pause()}),l(this,"onVideoTimeupdate",function(){var e=n.currentPosTime()/n.duration*100;n.progress.style.width=e>100?100:e+"%",n.updateTimeDisplay(),n.config.timeupdate()}),l(this,"isDefined",function(e){return null!=e}),l(this,"createPlayer",function(){n.addClass(n.vdContainer,"vd-container"),n.config.controls&&n.addClass(n.vdContainer,"controls"),n.createVideo(),n.createControls(),n.createPosterLayer(),n.createLoading(),n.config.bigPlayButton&&n.createBigPlayButton(),n.config.playEndMask&&n.createPlayEndMask(),n.isDefined(n.posterLayer)&&n.vdContainer.appendChild(n.posterLayer),n.isDefined(n.bigPlayButton)&&n.vdContainer.appendChild(n.bigPlayButton),n.config.controls&&(n.vdContainer.addEventListener("mouseenter",n.onVdContainerMouseEnter),n.vdContainer.addEventListener("mouseleave",n.onVdContainerMouseLeave)),n.addEvents(),n.config.ready()}),l(this,"onVdContainerMouseEnter",function(){n.showControlsTimer&&clearTimeout(n.showControlsTimer),n.addClass(n.vdContainer,"controls")}),l(this,"onVdContainerMouseLeave",function(){n.showControlsTimer=setTimeout(function(){n.vd.paused||n.removeClass(n.vdContainer,"controls")},2e3)}),l(this,"createVideo",function(){n.vd=n.createElement("video"),n.c
2onfig.autoplay&&(n.vd.autoplay=n.config.autoplay),n.vd.loop=n.config.loop,n.vd.playsinline=!0,n.vd.webkitPlaysinline=!0,n.vd.muted=n.config.muted,n.controls=!1,n.vd.setAttribute("playsinline",""),n.vd.setAttribute("webkit-playsinline",""),n.vdContainer.appendChild(n.vd),n.config.autoplay&&n.vd.play()}),l(this,"attachVideoSource",function(){return new Promise(function(){var e=a(r().m(function e(t,i){return r().w(function(e){for(;;)switch(e.n){case 0:n.isMob&&n.isNativeHLSsupported()?(n.hlsAttachSource(),t()):(n.hlsLightAttachSource(),t());case 1:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}()).catch(function(){})}),l(this,"createControls",function(){n.controls=n.createElement("div","vd-controls"),n.config.playPrevButton&&n.createPrevButton(),n.createPlayButton(),n.config.playNextButton&&n.createNextButton(),n.createVolume(),n.createTimeControl(),n.createProgressBar(),n.createControlSpace(),n.createFullscreenButton(),n.config.controls&&n.vdContainer.appendChild(n.controls)}),l(this,"createPosterLayer",function(){n.posterLayer=n.createElement("div","poster-layer");var e=n.config.poster;e&&(n.posterLayer.style.backgroundImage="url(".concat(e,")"),n.posterLayer.style.display="block",n.posterLayer.style.backgroundSize="cover"),n.posterLayer.addEventListener("click",function(){n.vd.paused?n.vd.play():n.vd.pause()})}),l(this,"createLoading",function(){n.loadingLayer=n.createElement("div","loading-layer");var e=n.createElement("div","loading-spinner");n.loadingLayer.appendChild(e),n.vdContainer.appendChild(n.loadingLayer)}),l(this,"createBigPlayButton",function(){n.bigPlayButton=n.createElement("button","big-play-button",{"aria-label":"play"}),n.bigPlayButton.addEventListener("click",function(){try{n.vd.paused?n.vd.play():n.vd.pause()}catch(e){}})}),l(this,"createPrevButton",function(){n.prevBtn=n.createElement("button","play-prev",{"aria-label":"prev"}),n.prevBtn.addEventListener("click",function(){n.config.playPrev()}),n.controls.appendChild(n.prevBtn)}),l(this,"createNextButton",function(){n.nextBtn=n.createElement("button","play-next",{"aria-label":"next"}),n.nextBtn.addEventListener("click",function(){n.config.playNext()}),n.controls.appendChild(n.nextBtn)}),l(this,"createPlayButton",function(){n.playPauseBtn=n.createElement("button","play-btn",{"aria-label":"play/pause"}),n.playPauseBtn.addEventListener("click",function(){n.vd.paused?n.vd.play():n.vd.pause()}),n.controls.appendChild(n.playPauseBtn)}),l(this,"throttle",function(e,t){var n=null;return function(){n||(e.apply(this,arguments),n=setTimeout(function(){n=null},t))}}),l(this,"createVolume",function(){n.volumeContainer=n.createElement("div","volume-container");var e=n.createElement("button","volume-btn",{"aria-label":"mute/unmute"});n.config.muted&&n.addClass(n.volumeContainer,"muted"),n.volumeContainer.appendChild(e);var t=n.createElement("div","volume-bar-container"),r=n.createElement("div","custom-volume-bar"),i=n.createElement("div","custom-volume-level",{"aria-label":"volume level"});r.appendChild(i),t.appendChild(r),n.volumeContainer.appendChild(t),e.addEventListener("click",function(){n.vd.muted?(n.vd.muted=!1,o(),n.removeClass(n.volumeContainer,"muted")):(n.vd.muted=!0,o(),n.addClass(n.volumeContainer,"muted"))});var o=function(){var e=n.vd.muted?0:n.vd.volume;i.style.width="".concat(100*e,"%")};o(),t.addEventListener("click",function(r){var i=t.getBoundingClientRect(),a=(r.clientX-i.left)/i.width;n.vd.volume=a,n.vd.muted=!1,n.removeClass(e,"muted"),o()}),n.handleProgressInteraction(t,function(t){n.vd.volume=t,n.vd.muted=!1,n.removeClass(e,"muted"),o()}),n.controls.appendChild(n.volumeContainer)}),l(this,"createTimeControl",function(){n.timeControl=n.createElement("span","time-control"),n.controls.appendChild(n.timeControl)}),l(this,"updateTimeDisplay",function(){var e=n.formatTime(n.currentPosTime()>n.duration?n.duration:n.currentPosTime()),t=n.formatTime(n.duration);n.timeControl.textContent="".concat(e," / ").concat(t)}),l(this,"createProgressBar",function(){n.progressBarContainer=n.createElement("div","progress-bar-container");var e=n.createElement("div","progress-bar");n.progress=n.createElement("div","progress"),e.appendChild(n.progress),n.progressBarContainer.appendChild(e),e.addEventListener("click",function(t){var r=e.getBoundingClientRect(),i=(t.clientX-r.left)/r.width,o=i*n.duration;n.currentTime(o),n.progress.style.width="".concat(100*i,"%!important")}),n.handleProgressInteraction(e,function(e){var t=e*n.duration;n.currentTime(t),n.progress.style.width="".concat(100*e,"%!important")}),n.controls.appendChild(n.progressBarContainer)}),l(this,"createFullscreenButton",function(){n.fullscreenBtn=n.createElement("button","fullscreen-btn",{"aria-label":"fullscreen/toggle"}),n.fullscreenBtn.addEventListener("click",function(){n.vd.requestFullscreen?n.vd.requestFullscreen():n.vd.webkitRequestFullscreen?n.vd.webkitRequestFullscreen():n.vd.msRequestFullscreen&&n.vd.msRequestFullscreen()}),n.controls.appendChild(n.fullscreenBtn)}),l(this,"createControlSpace",function(){var e=n.createElement("span","control-space");n.controls.appendChild(e)}),l(this,"handleProgressInteraction",function(e,t){var r=!1,i=null;e.addEventListener("mousedown",function(e){r=!0,e.preventDefault(),document.addEventListener("mousemove",o),document.addEventListener("mouseup",a)});var o=n.throttle(function(n){if(r){var s=e.getBoundingClientRect();n.clientX>=s.left&&n.clientX<=s.right?(cancelAnimationFrame(i),i=requestAnimationFrame(function(){var e=Math.min(Math.max(n.clientX-s.left,0),s.width)/s.width;t(e)})):(r=!1,document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",a))}},16),a=function(){r&&(r=!1,document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",a))}}),l(this,"createElement",function(e,t,r){var i=document.createElement(e);
2if(t&&(n.addClass(i,t),r))for(var o in r)r.hasOwnProperty(o)&&i.setAttribute(o,r[o]);return i}),l(this,"hasClass",function(e,t){return e&&e.classList.contains(t)}),l(this,"addClass",function(e,t){e&&t&&!e.classList.contains(t)&&e.classList.add(t)}),l(this,"removeClass",function(e,t){e&&t&&e.classList.remove(t)}),this.duration=0,this.version="2.0.5",this.config={autoplay:!1,loop:!1,poster:"",src:"",hlsUrl:"",bigPlayButton:!0,playNextButton:!1,playPrevButton:!1,controls:!0,muted:!1,playEndMask:!1,reportInterval:1e4,posterRatio:0,qualityLevel:null,error:function(){},playing:function(){},pause:function(){},canplay:function(){},ready:function(){},ended:function(){},seeked:function(){},timeupdate:function(){},playNext:function(){},playPrev:function(){}},this.vdContainer=null,this.isMob=this.isMobile(),this.vd=null,this.controls=null,this.posterLayer=null,this.loadingLayer=null,this.bigPlayButton=null,this.prevBtn=null,this.nextBtn=null,this.playPauseBtn=null,this.volumeContainer=null,this.timeControl=null,this.progressBarContainer=null,this.fullscreenBtn=null,this.progress=null,this.showControlsTimer=null,this.attachedSource=!1,this.supportType=2,this.init(t)},n=[{key:"init",value:(h=a(r().m(function e(t){return r().w(function(e){for(;;)switch(e.n){case 0:if(t.videoElement){e.n=1;break}return this.config.error("no video element."),e.a(2);case 1:if(this.vdContainer=t.videoElement,Object.assign(this.config,t),this.checkSrcPrefix(),this.createPlayer(),this.attachedSource){e.n=2;break}return this.attachedSource=!0,e.n=2,this.attachVideoSource();case 2:return e.a(2)}},e,this)})),function(e){return h.apply(this,arguments)})},{key:"hlsLightAttachSource",value:(v=a(r().m(function e(){var t,n=this;return r().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,"undefined"!=typeof Hls){e.n=2;break}if(this.config.hlsUrl){e.n=1;break}throw new Error("Hls is not defined and no hlsUrl provided");case 1:return e.n=2,this.loadScript(this.config.hlsUrl);case 2:return e.n=3,this.parseMasterPlaylist(this.config.src);case 3:t=e.v,this.updatePlayLevelUrl(t),this.supportType=3,this.hls=new Hls({enableSoftwareAES:!0,forceKeyFrameOnDiscontinuity:!0,maxBufferLength:8,maxMaxBufferLength:15,maxBufferSize:41943040,maxBufferHole:1,highBufferWatchdogPeriod:1e3,manifestLoadingMaxRetry:3,fragLoadingMaxRetry:3,fragLoadingRetryDelay:1e3,stopLoadOnEndOfStream:!0,isLive:!1,autoStartLoad:!0,enableWorker:!0,lowLatencyMode:!1}),this.hls.loadSource(this.config.src),this.hls.attachMedia(this.vd),this.hls.on(Hls.Events.MANIFEST_PARSED,function(e,t){this.hls.levels[3]&&(this.hls.currentLevel=3),this.hls.config.startLevel=3,this.hls.config.autoLevelEnabled=!1}),this.hls.on(Hls.Events.LEVEL_SWITCH,function(e,t){t.level!==targetLevel&&(this.hls.currentLevel=targetLevel)}),this.vd.addEventListener("loadedmetadata",function(){n.duration=n.vd.duration,n.vd.currentTime=0}),this.hls.on(Hls.Events.ERROR,function(e,t){if(t.fatal)switch(t.type){case Hls.ErrorTypes.NETWORK_ERROR:break;case Hls.ErrorTypes.MEDIA_ERROR:n.hls.recoverMediaError()}}),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,this,[[0,4]])})),function(){return v.apply(this,arguments)})},{key:"updatePlayLevelUrl",value:function(e){if(e.length&&this.config.qualityLevel)if(3==this.config.qualityLevel){var t=e[e.length-1].url;t&&(this.config.src=this.replacePlaylistUrl(this.config.src,t))}else if(1==this.config.qualityLevel){var n=e[0].url;n&&(this.config.src=this.replacePlaylistUrl(this.config.src,n))}}},{key:"replacePlaylistUrl",value:function(e,t){return e.replace(/\/playlist([^/]*)?\.m3u8/,"/".concat(t))}},{key:"currentTime",value:(d=a(r().m(function e(t){return r().w(function(e){for(;;)switch(e.n){case 0:(this.hls||this.isNativeHLSsupported())&&this.vd&&(this.vd.currentTime=t);case 1:return e.a(2)}},e,this)})),function(e){return d.apply(this,arguments)})},{key:"addEvents",value:function(){var e=this;this.vd&&(this.vd.addEventListener("waiting",this.onVideoWaiting),this.vd.addEventListener("loadeddata",this.onVideoLoadeddata),this.vd.addEventListener("play",this.onVideoPlay),this.vd.addEventListener("playing",this.onVideoPlaying),this.vd.addEventListener("canplay",this.onVideoCanplay),this.vd.addEventListener("error",this.onVideoError),this.vd.addEventListener("ended",this.onVideoEnded),this.vd.addEventListener("pause",this.onVideoPause),this.vd.addEventListener("timeupdate",this.onVideoTimeupdate),this.vd.addEventListener("seeking",this.onVideoSeeking),this.vd.addEventListener("seeked",this.onVideoSeeked),this.vd.addEventListener("volumechange",this.onVideoVolumechange),this.vd.addEventListener("loadstart",function(){}
2),this.vd.addEventListener("click",function(){e.config.autoplay&&e.config.muted&&!e.config.controls||(e.vd.paused?e.vd.play():e.vd.pause())}))}},{key:"sha256",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64;if(!crypto||!crypto.subtle)return Promise.resolve(this.simpleHash(e,n));var r=(new TextEncoder).encode(e);return crypto.subtle.digest("SHA-256",r).then(function(e){return Array.from(new Uint8Array(e)).map(function(e){return e.toString(16).padStart(2,"0")}).join("").substring(0,n)}).catch(function(r){return t.simpleHash(e,n)})}},{key:"simpleHash",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n&=n;var i=Math.abs(n).toString(16).padStart(16,"0");return(i+i).substring(0,t)}},{key:"getUrlData",value:function(e){var t=e.split("/"),n=t.length;return{videoId:n>=3?t[n-2]:0,typeId:n>=3?t[n-3].substr(0,t[n-3].length-6):0}}},{key:"computedWaitTime",value:function(e){var t=[];return e.forEach(function(e){e.end&&e.start&&t.push(e.end-e.start)}),t.join(",")}},{key:"currentPosTime",value:function(){return this.vd?Math.ceil(this.vd.currentTime):0}},{key:"src",value:(c=a(r().m(function e(t){return r().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:return e.p=1,this.duration=0,this.config.src=t,e.n=2,this.attachVideoSource();case 2:this.config.autoplay&&this.vd.play(),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,this,[[1,3]])})),function(e){return c.apply(this,arguments)})},{key:"createPlayEndMask",value:function(){if(!document.querySelector(".play-end-mask")){var e=this.createElement("div","play-end-mask");e.id="endMask",this.vdContainer&&this.vdContainer.appendChild(e)}}},{key:"resetConfig",value:function(){this.duration=0,this.showControlsTimer&&(clearTimeout(this.showControlsTimer),this.showControlsTimer=null)}},{key:"destroy",value:function(){this.resetConfig(),this.config={autoplay:!1,loop:!1,poster:"",src:"",bigPlayButton:!0,playNextButton:!1,playPrevButton:!1,controls:!0,error:function(){},playing:function(){},pause:function(){},canplay:function(){},ready:function(){},ended:function(){},seeked:function(){},timeupdate:function(){},playNext:function(){},playPrev:function(){}},this.vd&&(this.vd.removeEventListener("ended",this.onVideoEnded),this.vd.removeEventListener("pause",this.onVideoPause),this.vd.removeEventListener("play",this.onVideoPlay),this.vd.removeEventListener("timeupdate",this.onVideoTimeupdate),this.vd.removeEventListener("waiting",this.onVideoWaiting),this.vd.removeEventListener("loadeddata",this.onVideoLoadeddata),this.vd.removeEventListener("canplay",this.onVideoCanplay),this.vd.removeEventListener("error",this.onVideoError),this.vd.removeEventListener("seeking",this.onVideoSeeking),this.vd.removeEventListener("seeked",this.onVideoSeeked),this.vd.removeEventListener("playing",this.onVideoPlaying),this.vd.src="",this.vd=null),this.vdContainer&&(this.vdContainer.innerHTML="",this.vdContainer.removeAttribute("controls"),this.vdContainer.removeEventListener("mouseenter",this.onVdContainerMouseEnter),this.vdContainer.removeEventListener("mouseleave",this.onVdContainerMouseLeave),this.vdContainer=null),this.posterLayer=null,this.loadingLayer=null,this.bigPlayButton=null,this.prevBtn=null,this.nextBtn=null,this.playPauseBtn=null,this.volumeContainer=null,this.timeControl=null,this.progressBarContainer=null,this.fullscreenBtn=null,this.progress=null}},{key:"loadScript",value:function(e){return new Promise(function(t,n){var r=document.createElement("script");r.src=e,r.onload=t,r.onerror=function(){return n(new Error("Failed to load script: ".concat(e)))},document.body.appendChild(r)}).catch(function(){})}},{key:"fetchM3u8",value:(u=a(r().m(function e(t){var n;return r().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,fetch(t);case 1:if((n=e.v).ok){e.n=2;break}throw new Error("HTTP ".concat(n.status));case 2:return e.a(2,n.text())}},e)})),function(e){return u.apply(this,arguments)})},{key:"parseMasterPlaylist",value:(o=a(r().m(function e(t){var n,i,o,a,s,l;return r().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.fetchM3u8(t);case 1:for(n=e.v,i=[],o=n.split("\n"),a=0;a<o.length;a++)o[a].startsWith("#EXT-X-STREAM-INF")&&(s=this.parseAttributes(o[a]),(l=o[a+1])&&!l.startsWith("#")&&l.trim()&&(i.push({bandwidth:parseInt(s.BANDWIDTH||0),resolution:s.RESOLUTION||"0x0",url:l.trim()}),a++));return e.a(2,i)}},e,this)})),function(e){return o.apply(this,arguments)})},{key:"parseAttributes",value:function(e){return e.split(/[:,]/).slice(1).reduce(function(e,n){var r=t(n.split("="),2),i=r[0],o=r[1];return i&&o&&(e[i.trim()]=o.replace(/"/g,"")),e},{})}},{key:"isMobile",value:function(){var e=navigator.userAgent||navigator.vendor;return/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile|tablet|ipad|playbook|silk/i.test(e)}},{key:"muted",value:function(e){if(void 0===e)return this.vd.muted;this.vd.muted=e}},{key:"unmute",value:function(){this.vd.muted=!1}},{key:"isNativeHLSsupported",value:function(){return""!==this.vd.canPlayType("application/vnd.apple.mpegurl")||""!==this.vd.canPlayType("audio/mpegurl")}},{key:"formatTime",value:function(e){var t=Math.floor(e/60),n=Math.floor(e%60);return"".concat(t.toString().padStart(2,"0"),":").concat(n.toString().padStart(2,"0"))}}],n&&s(e.prototype,n),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,i,o,u,c,d,v,h}();return window.EPlayer=c,{}})());
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.