!function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=t(require("global/window"),require("global/document")):"function"==typeofdefine&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,function(v,h){v=v&&v.hasOwnProperty("default")?v.default:v,h=h&&h.hasOwnProperty("default")?h.default:h;vard="7.6.0";functionp(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}functiona(e,t){return(a=Object.setPrototypeOf||function(e,t){returne.__proto__=t,e})(e,t)}functions(e,t,i){return(s=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnDate.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,i){varn=[null];n.push.apply(n,t);varr=new(Function.bind.apply(e,n));returni&&a(r,i.prototype),r}).apply(null,arguments)}functionf(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}functiont(e,t){returnt=t||e.slice(0),e.raw=t,e}varu=[],e=function(s,o){returnfunction(e,t,i){varn=o.levels[t],r=newRegExp("^("+n+")$");if("log"!==e&&i.unshift(e.toUpperCase()+":"),i.unshift(s+":"),u&&u.push([].concat(i)),v.console){vara=v.console[e];a||"debug"!==e||(a=v.console.info||v.console.log),a&&n&&r.test(e)&&a[Array.isArray(i)?"apply":"call"](v.console,i)}}};varm=functiont(i){functionn(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];r("log",a,t)}varr,a="info";returnr=e(i,n),n.createLogger=function(e){returnt(i+": "+e)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:a},n.level=function(e){if("string"==typeofe){if(!n.levels.hasOwnProperty(e))thrownewError('"'+e+'" in not a valid log level');a=e}returna},(n.history=function(){returnu?[].concat(u):[]}).filter=function(t){return(u||[]).filter(function(e){returnnewRegExp(".*"+t+".*").test(e[0])})},n.history.clear=function(){u&&(u.length=0)},n.history.disable=function(){null!==u&&(u.length=0,u=null)},n.history.enable=function(){null===u&&(u=[])},n.error=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returnr("error",a,t)},n.warn=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returnr("warn",a,t)},n.debug=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returnr("debug",a,t)},n}("VIDEOJS"),g=m.createLogger;vary=function(e){for(vart="",i=0;i<arguments.length;i++)t+=e[i].replace(/\n\r?\s*/g,"")+(arguments[i+1]||"");returnt},i=Object.prototype.toString,o=function(e){returnb(e)?Object.keys(e):[]};functionr(t,i){o(t).forEach(function(e){returni(t[e],e)})}function_(i){for(vare=arguments.length,t=newArray(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];returnObject.assign?Object.assign.apply(Object,[i].concat(t)):(t.forEach(function(e){e&&r(e,function(e,t){i[t]=e})}),i)}functionb(e){return!!e&&"object"==typeofe}functionl(e){returnb(e)&&"[object Object]"===i.call(e)&&e.constructor===Object}functionn(e,t){if(!e||!t)return"";if("function"!=typeofv.getComputedStyle)return"";vari=v.getComputedStyle(e);returni?i[t]:""}functionc(){vare=t(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]);returnc=function(){returne},e}functionT(e){return"string"==typeofe&&/\S/.test(e)}functionS(e){if(/\s/.test(e))thrownewError("class has illegal whitespace characters")}functionk(){returnh===v.document}functionw(e){returnb(e)&&1===e.nodeType}functionC(){try{returnv.parent!==v.self}catch(e){return!0}}functionE(n){returnfunction(e,t){if(!T(e))returnh[n](null);T(t)&&(t=h.querySelector(t));vari=w(t)?t:h;returni[n]&&i[n](e)}}functionA(e,i,t,n){void0===e&&(e="div"),voi
/*! @name m3u8-parser @version 4.3.0 @license Apache-2.0 */functionws(){return(ws=Object.assign||function(e){for(vart=1;t<arguments.length;t++){vari=arguments[t];for(varnini)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}returne}).apply(this,arguments)}functionCs(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}functionEs(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}functionAs(e){for(vart,i=e.split(newRegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),n={},r=i.length;r--;)""!==i[r]&&((t=/([^=]*)=(.*)/.exec(i[r]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),n[t[0]]=t[1]);returnn}functionPs(e){return!!e&&"object"==typeofe}functionLs(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returnt.reduce(function(t,i){returnObject.keys(i).forEach(function(e){Array.isArray(t[e])&&Array.isArray(i[e])?t[e]=t[e].concat(i[e]):Ps(t[e])&&Ps(i[e])?t[e]=Ls(t[e],i[e]):t[e]=i[e]}),t},{})}functionIs(e){returne.reduce(function(e,t){returne.concat(t)},[])}functionOs(e){if(!e.length)return[];for(vart=[],i=0;i<e.length;i++)t.push(e[i]);returnt}varxs=function(){functione(){this.listeners={}}vart=e.prototype;returnt.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;vari=this.listeners[e].indexOf(t);returnthis.listeners[e].splice(i,1),-1<i},t.trigger=function(e,t){vari,n,r,a=this.listeners[e];if(a)if(2===arguments.length)for(n=a.length,i=0;i<n;++i)a[i].call(this,t);elsefor(r=Array.prototype.slice.call(arguments,1),n=a.length,i=0;i<n;++i)a[i].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(t){this.on("data",function(e){t.push(e)})},e}(),Us=function(t){functione(){vare;return(e=t.call(this)||this).buffer="",e}returnCs(e,t),e.prototype.push=function(e){vart;for(this.buffer+=e,t=this.buffer.indexOf("\n");-1<t;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},e}(xs),Ds=function(t){functione(){vare;return(e=t.call(this)||this).customParsers=[],e.tagMappers=[],e}Cs(e,t);vari=e.prototype;returni.push=function(n){varu,l,c=this;0!==(n=n.trim()).length&&("#"===n[0]?this.tagMappers.reduce(function(e,t){vari=t(n);returni===n?e:e.concat([i])},[n]).forEach(function(e){for(vart=0;t<c.customParsers.length;t++)if(c.customParsers[t].call(c,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),u=/^#EXTM3U/.exec(e))c.trigger("data",{type:"tag",tagType:"m3u"});else{if(u=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))returnl={type:"tag",tagType:"inf"},u[1]&&(l.duration=parseFloat(u[1])),u[2]&&(l.title=u[2]),voidc.trigger("data",l);if(u=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))returnl={type:"tag",tagType:"targetduration"},u[1]&&(l.duration=parseInt(u[1],10)),voidc.trigger("data",l);if(u=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))returnl={type:"tag",tagType:"totalduration"},u[1]&&(l.duration=parseInt(u[1],10)),voidc.trigger("data",l);if(u=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))returnl={type:"tag",tagType:"version"},u[1]&&(l.version=parseInt(u[1],10)),voidc.trigger("data",l);if(u=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))returnl={type:"tag",tagType:"media-sequence"},u[1]&&(l.number=parseInt(u[1],10)),voidc.trigger("data",l);if(u=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))returnl={type:"tag",tagType:"discontinuity-sequence"},u[1]&&(l.number=parseInt(u[1],10)),voidc.trigger("data",l);if(u=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))returnl={type:"tag",tagType:"playlist-type"},u[1]&&(l.playlistType=u[1]),voidc.trigger("data",l);if(u=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))returnl={type:"tag",tagType:"byterange"},u[1]&&(l.length=parseInt(u[1],10)),u[2]&&(l.offset=parseInt(u[2],10)),voidc.trigger("data",l);if(u=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))returnl={type:"tag",tagType:"allow-cache"},u[1]&&(l.allowed=!/NO/.
/**
*@videojs/http-streaming
*@version1.10.3
*@copyright2019Brightcove,Inc
*@licenseApache-2.0
*/
varIc=function(e,t,i){returnt&&Oc(e.prototype,t),i&&Oc(e,i),e};functionOc(e,t){for(vari=0;i<t.length;i++){varn=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}functionxc(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}functionUc(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functionDc(r,a){["AUDIO","SUBTITLES"].forEach(function(e){for(vartinr.mediaGroups[e])for(variinr.mediaGroups[e][t]){varn=r.mediaGroups[e][t][i];a(n,e,t,i)}})}functionRc(e,t){vari=Fc(e,{}),n=i.playlists[t.uri];if(!n)returnnull;if(n.segments&&t.segments&&n.segments.length===t.segments.length&&n.endList===t.endList&&n.mediaSequence===t.mediaSequence)returnnull;varr=Fc(n,t);n.segments&&(r.segments=function(e,t,i){varn=t.slice();i=i||0;for(varr=Math.min(e.length,t.length+i),a=i;a<r;a++)n[a-i]=Fc(e[a],n[a-i]);returnn}(n.segments,t.segments,t.mediaSequence-n.mediaSequence)),r.segments.forEach(function(e){!function(e,t){e.resolvedUri||(e.resolvedUri=Ac(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Ac(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Ac(t,e.map.uri))}(e,r.resolvedUri)});for(vara=0;a<i.playlists.length;a++)i.playlists[a].uri===t.uri&&(i.playlists[a]=r);returni.playlists[t.uri]=r,i}functionMc(e){for(vart=e.playlists.length;t--;){vari=e.playlists[t];(e.playlists[i.uri]=i).resolvedUri=Ac(e.uri,i.uri),i.id=t,i.attributes||(i.attributes={},Vc.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}}functionBc(t){Dc(t,function(e){e.uri&&(e.resolvedUri=Ac(t.uri,e.uri))})}functionNc(e,t){vari=e.segments[e.segments.length-1];returnt&&i&&i.duration?1e3*i.duration:500*(e.targetDuration||10)}varjc=function(e,t){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnfunction(e,t){vari=[],n=!0,r=!1,a=void0;try{for(vars,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){r=!0,a=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throwa}}returni}(e,t);thrownewTypeError("Invalid attempt to destructure non-iterable instance")},Fc=bs.mergeOptions,Vc=bs.log,Hc=(xc(qc,bs.EventTarget),Ic(qc,[{key:"playlistRequestError",value:function(e,t,i){this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[t],status:e.status,message:"HLS playlist request error at URL: "+t+".",responseText:e.responseText,code:500<=e.status?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(e,t){vari=this;this.request=null,this.state="HAVE_METADATA";varn=newRs;this.customTagParsers.forEach(function(e){returnn.addParser(e)}),this.customTagMappers.forEach(function(e){returnn.addTagMapper(e)}),n.push(e.responseText),n.end(),n.manifest.uri=t,n.manifest.attributes=n.manifest.attributes||{};varr=Rc(this.master,n.manifest);this.targetDuration=n.manifest.targetDuration,r?(this.master=r,this.media_=this.master.playlists[n.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(v.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=v.setTimeout(function(){i.trigger("mediaupdatetimeout")},Nc(this.media(),!!r))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),v.clearTimeout(this.mediaUpdateTimeout),v.clearTimeout(this.finalRenditionTimeout)}},{key:"stopRequest",value:function(){if(this.request){vare=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(i,e){varn=this;if(!i)returnthis.media_;if("HAVE_NOTHING"===this.state)thrownewError("Cannot switch media playlist from "+this.state);if("string"==typeofi){if(!this.master.playlists[i])thrownewError("Unknown playlist URI: "+i);i=this.master.playlist