74 lines
476 KiB
JavaScript
74 lines
476 KiB
JavaScript
|
/**
|
||
|
* @license
|
||
|
* Video.js 7.4.1 <http://videojs.com/>
|
||
|
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
|
||
|
* Available under Apache License Version 2.0
|
||
|
* <https://github.com/videojs/video.js/blob/master/LICENSE>
|
||
|
*
|
||
|
* Includes vtt.js <https://github.com/mozilla/vtt.js>
|
||
|
* Available under Apache License Version 2.0
|
||
|
* <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
|
||
|
*/(function(B,A){typeof exports=="object"&&typeof module!="undefined"?module.exports=A(require("global/document"),require("global/window")):typeof define=="function"&&define.amd?define(["global/document","global/window"],A):B.videojs=A(B.document,B.window)})(this,function(B,A){B=B&&B.hasOwnProperty("default")?B.default:B,A=A&&A.hasOwnProperty("default")?A.default:A;var ms="7.4.1";function F(i,r){i.prototype=Object.create(r.prototype),(i.prototype.constructor=i).__proto__=r}function gs(i,r){return(gs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(i,r)}function ys(i,r,e){return(ys=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,n,a){var s=[null];s.push.apply(s,n);var o=new(Function.bind.apply(t,s));return a&&gs(o,a.prototype),o}).apply(null,arguments)}function V(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Jn(i,r){return r||(r=i.slice(0)),i.raw=r,i}var Vt=[],ih=function(i,r){return function(e,t,n){var a=r.levels[t],s=new RegExp("^("+a+")$");if(e!=="log"&&n.unshift(e.toUpperCase()+":"),n.unshift(i+":"),Vt&&Vt.push([].concat(n)),A.console){var o=A.console[e];o||e!=="debug"||(o=A.console.info||A.console.log),o&&a&&s.test(e)&&o[Array.isArray(n)?"apply":"call"](A.console,n)}}},Z=function i(r){var e,t="info",n=function(){for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];e("log",t,s)};return e=ih(r,n),n.createLogger=function(a){return i(r+": "+a)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:t},n.level=function(a){if(typeof a=="string"){if(!n.levels.hasOwnProperty(a))throw new Error('"'+a+'" in not a valid log level');t=a}return t},(n.history=function(){return Vt?[].concat(Vt):[]}).filter=function(a){return(Vt||[]).filter(function(s){return new RegExp(".*"+a+".*").test(s[0])})},n.history.clear=function(){Vt&&(Vt.length=0)},n.history.disable=function(){Vt!==null&&(Vt.length=0,Vt=null)},n.history.enable=function(){Vt===null&&(Vt=[])},n.error=function(){for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return e("error",t,s)},n.warn=function(){for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return e("warn",t,s)},n.debug=function(){for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return e("debug",t,s)},n}("VIDEOJS"),vs=Z.createLogger,Zn=function(i){for(var r="",e=0;e<arguments.length;e++)r+=i[e].replace(/\n\r?\s*/g,"")+(arguments[e+1]||"");return r},nh=Object.prototype.toString,_s=function(i){return ve(i)?Object.keys(i):[]};function Ve(i,r){_s(i).forEach(function(e){return r(i[e],e)})}function ct(i){for(var r=arguments.length,e=new Array(1<r?r-1:0),t=1;t<r;t++)e[t-1]=arguments[t];return Object.assign?Object.assign.apply(Object,[i].concat(e)):(e.forEach(function(n){n&&Ve(n,function(a,s){i[s]=a})}),i)}function ve(i){return!!i&&typeof i=="object"}function di(i){return ve(i)&&nh.call(i)==="[object Object]"&&i.constructor===Object}function tr(i,r){if(!i||!r||typeof A.getComputedStyle!="function")return"";var e=A.getComputedStyle(i);return e?e[r]:""}function bs(){var i=Jn([`Setting attributes in the second argument of createEl()
|
||
|
has been deprecated. Use the third argument instead.
|
||
|
createEl(type, properties, attributes). Attempting to set `," to ","."]);return bs=function(){return i},i}function Ts(i){return typeof i=="string"&&/\S/.test(i)}function Ss(i){if(/\s/.test(i))throw new Error("class has illegal whitespace characters")}function He(){return B===A.document}function pi(i){return ve(i)&&i.nodeType===1}function ks(){try{return A.parent!==A.self}catch(i){return!0}}function ws(i){return function(r,e){if(!Ts(r))return B[i](null);Ts(e)&&(e=B.querySelector(e));var t=pi(e)?e:B;return t[i]&&t[i](r)}}function yt(i,r,e,t){i===void 0&&(i="div"),r===void 0&&(r={}),e===void 0&&(e={});var n=B.createElement(i);return Object.getOwnPropertyNames(r).forEach(function(a){var s=r[a];a.indexOf("aria-")!==-1||a==="role"||a==="type"?(Z.warn(Zn(bs(),a,s)),n.setAttribute(a,s)):a==="textContent"?qe(n,s):n[a]=s}),Object.getOwnPropertyNames(e).forEach(function(a){n.setAttribute(a,e[a])}),t&&nr(n,t),n}function qe(i,r){return typeof i.textContent=="undefined"?i.innerText=r:i.textContent=r,i}function Ji(i,r){r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)}function Ce(i,r){return Ss(r),i.classList?i.classList.contains(r):(e=r,new RegExp("(^|\\s)"+e+"($|\\s)")).test(i.className);var e}function Ee(i,r){return i.classList?i.classList.add(r):Ce(i,r)||(i.className=(i.className+" "+r).trim()),i}function fi(i,r){return i.classList?i.classList.remove(r):(Ss(r),i.className=i.className.split(/\s+/).filter(function(e){return e!==r}).join(" ")),i}function Cs(i,r,e){var t=Ce(i,r);if(typeof e=="function"&&(e=e(i,r)),typeof e!="boolean"&&(e=!t),e!==t)return e?Ee(i,r):fi(i,r),i}function Es(i,r){Object.getOwnPropertyNames(r).forEach(function(e){var t=r[e];t===null||typeof t=="undefined"||t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?"":t)})}function oe(i){var r={},e=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(i&&i.attributes&&0<i.attributes.length)for(var t=i.attributes,n=t.length-1;0<=n;n--){var a=t[n].name,s=t[n].value;typeof i[a]!="boolean"&&e.indexOf(","+a+",")===-1||(s=s!==null),r[a]=s}return r}function As(i,r){return i.getAttribute(r)}function mi(i,r,e){i.setAttribute(r,e)}function Zi(i,r){i.removeAttribute(r)}function Ls(){B.body.focus(),B.onselectstart=function(){return!1}}function Os(){B.onselectstart=function(){return!0}}function gi(i){if(i&&i.getBoundingClientRect&&i.parentNode){var r=i.getBoundingClientRect(),e={};return["bottom","height","left","right","top","width"].forEach(function(t){r[t]!==void 0&&(e[t]=r[t])}),e.height||(e.height=parseFloat(tr(i,"height"))),e.width||(e.width=parseFloat(tr(i,"width"))),e}}function Ps(i){var r;if(i.getBoundingClientRect&&i.parentNode&&(r=i.getBoundingClientRect()),!r)return{left:0,top:0};var e=B.documentElement,t=B.body,n=e.clientLeft||t.clientLeft||0,a=A.pageXOffset||t.scrollLeft,s=r.left+a-n,o=e.clientTop||t.clientTop||0,u=A.pageYOffset||t.scrollTop,c=r.top+u-o;return{left:Math.round(s),top:Math.round(c)}}function er(i,r){var e={},t=Ps(i),n=i.offsetWidth,a=i.offsetHeight,s=t.top,o=t.left,u=r.pageY,c=r.pageX;return r.changedTouches&&(c=r.changedTouches[0].pageX,u=r.changedTouches[0].pageY),e.y=Math.max(0,Math.min(1,(s-u+a)/a)),e.x=Math.max(0,Math.min(1,(c-o)/n)),e}function Us(i){return ve(i)&&i.nodeType===3}function ir(i){for(;i.firstChild;)i.removeChild(i.firstChild);return i}function Is(i){return typeof i=="function"&&(i=i()),(Array.isArray(i)?i:[i]).map(function(r){return typeof r=="function"&&(r=r()),pi(r)||Us(r)?r:typeof r=="string"&&/\S/.test(r)?B.createTextNode(r):void 0}).filter(function(r){return r})}function nr(i,r){return Is(r).forEach(function(e){return i.appendChild(e)}),i}function xs(i,r){return nr(ir(i),r)}function ze(i){return i.button===void 0&&i.buttons===void 0||i.button===0&&i.buttons===void 0||i.button===0&&i.buttons===1}var _e=ws("querySelector"),Ds=ws("querySelectorAll"),Rs=Object.freeze({isReal:He,isEl:pi,isInFrame:ks,createEl:yt,textContent:qe,prependTo:Ji,hasClass:Ce,addClass:Ee,removeClass:fi,toggleClass:Cs,setAttributes:Es,getAttributes:oe,getAttribute:As,setAttribute:mi,removeAttribute:Zi,blockTextSelect
|
||
|
`),function(e){var t,n=e.indexOf(":"),a=ki(e.slice(0,n)).toLowerCase(),s=ki(e.slice(n+1));typeof r[a]=="undefined"?r[a]=s:(t=r[a],Object.prototype.toString.call(t)==="[object Array]"?r[a].push(s):r[a]=[r[a],s])}),r},Dh=function(){for(var i={},r=0;r<arguments.length;r++){var e=arguments[r];for(var t in e)Rh.call(e,t)&&(i[t]=e[t])}return i},Rh=Object.prototype.hasOwnProperty,po=Te;function fo(i,r,e){var t=i;return Ch(r)?(e=r,typeof i=="string"&&(t={uri:i})):t=Dh(r,{uri:i}),t.callback=e,t}function Te(i,r,e){return mo(r=fo(i,r,e))}function mo(i){if(typeof i.callback=="undefined")throw new Error("callback argument missing");var r=!1,e=function(S,C,E){r||(r=!0,i.callback(S,C,E))};function t(S){return clearTimeout(u),S instanceof Error||(S=new Error(""+(S||"Unknown XMLHttpRequest Error"))),S.statusCode=0,e(S,T)}function n(){if(!s){var S;clearTimeout(u),S=i.useXDR&&o.status===void 0?200:o.status===1223?204:o.status;var C=T,E=null;return S!==0?(C={body:function(){var U=void 0;if(U=o.response?o.response:o.responseText||function(I){if(I.responseType==="document")return I.responseXML;var x=I.responseXML&&I.responseXML.documentElement.nodeName==="parsererror";return I.responseType!==""||x?null:I.responseXML}(o),b)try{U=JSON.parse(U)}catch(I){}return U}(),statusCode:S,method:d,headers:{},url:c,rawRequest:o},o.getAllResponseHeaders&&(C.headers=xh(o.getAllResponseHeaders()))):E=new Error("Internal XMLHttpRequest Error"),e(E,C,C.body)}}var a,s,o=i.xhr||null;o||(o=i.cors||i.useXDR?new Te.XDomainRequest:new Te.XMLHttpRequest);var u,c=o.url=i.uri||i.url,d=o.method=i.method||"GET",p=i.body||i.data,g=o.headers=i.headers||{},y=!!i.sync,b=!1,T={body:void 0,headers:{},statusCode:0,method:d,url:c,rawRequest:o};if("json"in i&&i.json!==!1&&(b=!0,g.accept||g.Accept||(g.Accept="application/json"),d!=="GET"&&d!=="HEAD"&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),p=JSON.stringify(i.json===!0?p:i.json))),o.onreadystatechange=function(){o.readyState===4&&setTimeout(n,0)},o.onload=n,o.onerror=t,o.onprogress=function(){},o.onabort=function(){s=!0},o.ontimeout=t,o.open(d,c,!y,i.username,i.password),y||(o.withCredentials=!!i.withCredentials),!y&&0<i.timeout&&(u=setTimeout(function(){if(!s){s=!0,o.abort("timeout");var S=new Error("XMLHttpRequest timeout");S.code="ETIMEDOUT",t(S)}},i.timeout)),o.setRequestHeader)for(a in g)g.hasOwnProperty(a)&&o.setRequestHeader(a,g[a]);else if(i.headers&&!function(S){for(var C in S)if(S.hasOwnProperty(C))return!1;return!0}(i.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in i&&(o.responseType=i.responseType),"beforeSend"in i&&typeof i.beforeSend=="function"&&i.beforeSend(o),o.send(p||null),o}Te.XMLHttpRequest=A.XMLHttpRequest||function(){},Te.XDomainRequest="withCredentials"in new Te.XMLHttpRequest?Te.XMLHttpRequest:A.XDomainRequest,function(i,r){for(var e=0;e<i.length;e++)r(i[e])}(["get","put","post","patch","head","delete"],function(i){Te[i==="delete"?"del":i]=function(r,e,t){return(e=fo(r,e,t)).method=i.toUpperCase(),mo(e)}});var go=function(i,r){var e=new A.WebVTT.Parser(A,A.vttjs,A.WebVTT.StringDecoder()),t=[];e.oncue=function(n){r.addCue(n)},e.onparsingerror=function(n){t.push(n)},e.onflush=function(){r.trigger({type:"loadeddata",target:r})},e.parse(i),0<t.length&&(A.console&&A.console.groupCollapsed&&A.console.groupCollapsed("Text Track parsing errors for "+r.src),t.forEach(function(n){return Z.error(n)}),A.console&&A.console.groupEnd&&A.console.groupEnd()),e.flush()},wi=function(i){function r(t){var n;if(t===void 0&&(t={}),!t.tech)throw new Error("A tech was not provided.");var a=ot(t,{kind:kh[t.kind]||"subtitles",language:t.language||t.srclang||""}),s=oo[a.mode]||"disabled",o=a.default;a.kind!=="metadata"&&a.kind!=="chapters"||(s="hidden"),(n=i.call(this,a)||this).tech_=a.tech,n.cues_=[],n.activeCues_=[];var u=new so(n.cues_),c=new so(n.activeCues_),d=!1,p=$(V(V(n)),function(){this.activeCues=this.activeCues,d&&(this.trigger("cuechange"),d=!1)});return s!=="disabled"&&n.tech_.ready(function(){n.tech_.on("timeupdate",p)},!0),Object.
|
||
|
`;)++c;var d=u.substr(0,c);return u[c]==="\r"&&++c,u[c]===`
|
||
|
`&&++c,r.buffer=u.substr(c),d}function t(u){u.match(/X-TIMESTAMP-MAP/)?Ai(u,function(c,d){switch(c){case"X-TIMESTAMP-MAP":p=d,g=new Ei,Ai(p,function(y,b){switch(y){case"MPEGT":g.integer(y+"S",b);break;case"LOCA":g.set(y+"L",Ar(b))}},/[^\d]:/,/,/),r.ontimestampmap&&r.ontimestampmap({MPEGTS:g.get("MPEGTS"),LOCAL:g.get("LOCAL")})}var p,g},/=/):Ai(u,function(c,d){switch(c){case"Region":(function(p){var g=new Ei;if(Ai(p,function(b,T){switch(b){case"id":g.set(b,T);break;case"width":g.percent(b,T);break;case"lines":g.integer(b,T);break;case"regionanchor":case"viewportanchor":var S=T.split(",");if(S.length!==2)break;var C=new Ei;if(C.percent("x",S[0]),C.percent("y",S[1]),!C.has("x")||!C.has("y"))break;g.set(b+"X",C.get("x")),g.set(b+"Y",C.get("y"));break;case"scroll":g.alt(b,T,["up"])}},/=/,/\s/),g.has("id")){var y=new(r.vttjs.VTTRegion||r.window.VTTRegion);y.width=g.get("width",100),y.lines=g.get("lines",3),y.regionAnchorX=g.get("regionanchorX",0),y.regionAnchorY=g.get("regionanchorY",100),y.viewportAnchorX=g.get("viewportanchorX",0),y.viewportAnchorY=g.get("viewportanchorY",100),y.scroll=g.get("scroll",""),r.onregion&&r.onregion(y),r.regionList.push({id:g.get("id"),region:y})}})(d)}},/:/)}i&&(r.buffer+=r.decoder.decode(i,{stream:!0}));try{var n;if(r.state==="INITIAL"){if(!/\r\n|\n/.test(r.buffer))return this;var a=(n=e()).match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new $t($t.Errors.BadSignature);r.state="HEADER"}for(var s=!1;r.buffer;){if(!/\r\n|\n/.test(r.buffer))return this;switch(s?s=!1:n=e(),r.state){case"HEADER":/:/.test(n)?t(n):n||(r.state="ID");continue;case"NOTE":n||(r.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(n)){r.state="NOTE";break}if(!n)continue;if(r.cue=new(r.vttjs.VTTCue||r.window.VTTCue)(0,0,""),r.state="CUE",n.indexOf("-->")===-1){r.cue.id=n;continue}case"CUE":try{Mh(n,r.cue,r.regionList)}catch(u){r.reportOrThrowError(u),r.cue=null,r.state="BADCUE";continue}r.state="CUETEXT";continue;case"CUETEXT":var o=n.indexOf("-->")!==-1;if(!n||o&&(s=!0)){r.oncue&&r.oncue(r.cue),r.cue=null,r.state="ID";continue}r.cue.text&&(r.cue.text+=`
|
||
|
`),r.cue.text+=n;continue;case"BADCUE":n||(r.state="ID");continue}}}catch(u){r.reportOrThrowError(u),r.state==="CUETEXT"&&r.cue&&r.oncue&&r.oncue(r.cue),r.cue=null,r.state=r.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var i=this;try{if(i.buffer+=i.decoder.decode(),(i.cue||i.state==="HEADER")&&(i.buffer+=`
|
||
|
|
||
|
`,i.parse()),i.state==="INITIAL")throw new $t($t.Errors.BadSignature)}catch(r){i.reportOrThrowError(r)}return i.onflush&&i.onflush(),this}};var Hh=Li,qh={"":1,lr:1,rl:1},zh={start:1,middle:1,end:1,left:1,right:1};function Or(i){return typeof i=="string"&&!!zh[i.toLowerCase()]&&i.toLowerCase()}function So(i,r,e){this.hasBeenReset=!1;var t="",n=!1,a=i,s=r,o=e,u=null,c="",d=!0,p="auto",g="start",y=50,b="middle",T=50,S="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return t},set:function(C){t=""+C}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(C){n=!!C}},startTime:{enumerable:!0,get:function(){return a},set:function(C){if(typeof C!="number")throw new TypeError("Start time must be set to a number.");a=C,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(C){if(typeof C!="number")throw new TypeError("End time must be set to a number.");s=C,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(C){o=""+C,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(C){u=C,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(C){var E,U=typeof(E=C)=="string"&&!!qh[E.toLowerCase()]&&E.toLowerCase();if(U===!1)throw new SyntaxError("An invalid or illegal string was specified.");c=U,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(C){d=!!C,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(C){if(typeof C!="number"&&C!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");p=C,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return g},set:function(C){var E=Or(C);if(!E)throw new SyntaxError("An invalid or illegal string was specified.");g=E,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return y},set:function(C){if(C<0||100<C)throw new Error("Position must be between 0 and 100.");y=C,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return b},set:function(C){var E=Or(C);if(!E)throw new SyntaxError("An invalid or illegal string was specified.");b=E,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return T},set:function(C){if(C<0||100<C)throw new Error("Size must be between 0 and 100.");T=C,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return S},set:function(C){var E=Or(C);if(!E)throw new SyntaxError("An invalid or illegal string was specified.");S=E,this.hasBeenReset=!0}}}),this.displayState=void 0}So.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Wh=So,Gh={"":!0,up:!0};function Oi(i){return typeof i=="number"&&0<=i&&i<=100}var Xh=function(){var i=100,r=3,e=0,t=100,n=0,a=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return i},set:function(o){if(!Oi(o))throw new Error("Width must be between 0 and 100.");i=o}},lines:{enumerable:!0,get:function(){return r},set:function(o){if(typeof o!="number")throw new TypeError("Lines must be set to a number.");r=o}},regionAnchorY:{enumerable:!0,get:function(){return t},set:function(o){if(!Oi(o))throw new Error("RegionAnchorX must be between 0 and 100.");t=o}},regionAnchorX:{enumerable:!0,get:function(){return e},set:function(o){if(!Oi(o))throw new Error("RegionAnchorY must be between 0 and 100.");e=o}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(o){if(!Oi(o))throw new Error("ViewportAnchorY must be between 0 and 100.");a=o}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(o){if(!Oi(o))throw new Error("ViewportAnchorX must be between 0 and 100.");n=o}},scroll:{enumerable:!0,get:function(){return s},set:function(o){var u,c=typeof(u=o)=="string"&&!!Gh[u.toLowerCase()]&&u.toLowerCase();if(c===!1)throw new SyntaxError("An invalid or illegal string was specified.");s=c}}})},Pi=Cr(function(i){var r=i.exports={WebVTT:Hh,VTTCue:Wh,VTTRegion:Xh};A.vttjs=r,A.WebVTT=r.WebVTT;var e=r.VTTCue,t=r.VTTRegion,n=A.VTTCue,a=A.VTTRegion;r.shim=function(){A.VTTCue=e,A.VTTRegion=t},r.restore=
|
||
|
<span aria-hidden="true" class="vjs-icon-placeholder"></span>
|
||
|
<span class="vjs-control-text"> `+this.localize("Captions")+`</span>
|
||
|
`),a+="</span>",i.prototype.createEl.call(this,e,ct({innerHTML:a},t),n)},r}(Ii);D.registerComponent("SubsCapsMenuItem",jo);var $r=function(i){function r(t,n){var a;return n===void 0&&(n={}),(a=i.call(this,t,n)||this).label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(a.player_.language_)&&(a.label_="captions"),a.menuButton_.controlText(ft(a.label_)),a}F(r,i);var e=r.prototype;return e.buildCSSClass=function(){return"vjs-subs-caps-button "+i.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+i.prototype.buildWrapperCSSClass.call(this)},e.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Xr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=i.prototype.createItems.call(this,t,jo)},r}(Ze);$r.prototype.kinds_=["captions","subtitles"],$r.prototype.controlText_="Subtitles",D.registerComponent("SubsCapsButton",$r);var Fo=function(i){function r(t,n){var a,s=n.track,o=t.audioTracks();n.label=s.label||s.language||"Unknown",n.selected=s.enabled,(a=i.call(this,t,n)||this).track=s,a.addClass("vjs-"+s.kind+"-menu-item");var u=function(){for(var c=arguments.length,d=new Array(c),p=0;p<c;p++)d[p]=arguments[p];a.handleTracksChange.apply(V(V(a)),d)};return o.addEventListener("change",u),a.on("dispose",function(){o.removeEventListener("change",u)}),a}F(r,i);var e=r.prototype;return e.createEl=function(t,n,a){var s='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return this.options_.track.kind==="main-desc"&&(s+=`
|
||
|
<span aria-hidden="true" class="vjs-icon-placeholder"></span>
|
||
|
<span class="vjs-control-text"> `+this.localize("Descriptions")+`</span>
|
||
|
`),s+="</span>",i.prototype.createEl.call(this,t,ct({innerHTML:s},n),a)},e.handleClick=function(t){var n=this.player_.audioTracks();i.prototype.handleClick.call(this,t);for(var a=0;a<n.length;a++){var s=n[a];s.enabled=s===this.track}},e.handleTracksChange=function(t){this.selected(this.track.enabled)},r}(Ui);D.registerComponent("AudioTrackMenuItem",Fo);var Vo=function(i){function r(t,n){return n===void 0&&(n={}),n.tracks=t.audioTracks(),i.call(this,t,n)||this}F(r,i);var e=r.prototype;return e.buildCSSClass=function(){return"vjs-audio-button "+i.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-audio-button "+i.prototype.buildWrapperCSSClass.call(this)},e.createItems=function(t){t===void 0&&(t=[]),this.hideThreshold_=1;for(var n=this.player_.audioTracks(),a=0;a<n.length;a++){var s=n[a];t.push(new Fo(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return t},r}(qr);Vo.prototype.controlText_="Audio Track",D.registerComponent("AudioTrackButton",Vo);var Kr=function(i){function r(t,n){var a,s=n.rate,o=parseFloat(s,10);return n.label=s,n.selected=o===1,n.selectable=!0,n.multiSelectable=!1,(a=i.call(this,t,n)||this).label=s,a.rate=o,a.on(t,"ratechange",a.update),a}F(r,i);var e=r.prototype;return e.handleClick=function(t){i.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},e.update=function(t){this.selected(this.player().playbackRate()===this.rate)},r}(Ui);Kr.prototype.contentElType="button",D.registerComponent("PlaybackRateMenuItem",Kr);var Ho=function(i){function r(t,n){var a;return(a=i.call(this,t,n)||this).updateVisibility(),a.updateLabel(),a.on(t,"loadstart",a.updateVisibility),a.on(t,"ratechange",a.updateLabel),a}F(r,i);var e=r.prototype;return e.createEl=function(){var t=i.prototype.createEl.call(this);return this.labelEl_=yt("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},e.dispose=function(){this.labelEl_=null,i.prototype.dispose.call(this)},e.buildCSSClass=function(){return"vjs-playback-rate "+i.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-playback-rate "+i.prototype.buildWrapperCSSClass.call(this)},e.createMenu=function(){var t=new Vr(this.player()),n=this.playbackRates();if(n)for(var a=n.length-1;0<=a;a--)t.addChild(new Kr(this.player(),{rate:n[a]+"x"}));return t},e.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},e.handleClick=function(t){for(var n=this.player().playbackRate(),a=this.playbackRates(),s=a[0],o=0;o<a.length;o++)if(a[o]>n){s=a[o];break}this.player().playbackRate(s)},e.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},e.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length},e.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},e.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},r}(Hr);Ho.prototype.controlText_="Playback Rate",D.registerComponent("PlaybackRateMenuButton",Ho);var qo=function(i){function r(){return i.apply(this,arguments)||this}F(r,i);var e=r.prototype;return e.buildCSSClass=function(){return"vjs-spacer "+i.prototype.buildCSSClass.call(this)},e.createEl=function(){return i.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},r}(D);D.registerComponent("Spacer",qo);var cd=function(i){function r(){return i.apply(this,arguments)||this}F(r,i);var e=r.prototype;return e.buildCSSClass=function(){return"vjs-custom-control-spacer "+i.prototype.buildCSSClass.call(this)},e.createEl=function(){var t=i.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML="\xA0",t},r}(qo);D.registerComponent("CustomControlSpacer",cd);var zo=function(i){function r(){return i.apply(this,arguments)||this}return F(r,i),r.prototype.createEl=function(){return i.prototype.creat
|
||
|
This may prevent text tracks from loading.`]);return ru=function(){return i},i}var j=function(i){function r(t,n){var a;a=i.call(this,t,n)||this;var s=t.source,o=!1;if(s&&(a.el_.currentSrc!==s.src||t.tag&&t.tag.initNetworkState_===3)?a.setSource(s):a.handleLateInit_(a.el_),t.enableSourceset&&a.setupSourcesetHandling_(),a.el_.hasChildNodes()){for(var u=a.el_.childNodes,c=u.length,d=[];c--;){var p=u[c];p.nodeName.toLowerCase()==="track"&&(a.featuresNativeTextTracks?(a.remoteTextTrackEls().addTrackElement_(p),a.remoteTextTracks().addTrack(p.track),a.textTracks().addTrack(p.track),o||a.el_.hasAttribute("crossorigin")||!un(p.src)||(o=!0)):d.push(p))}for(var g=0;g<d.length;g++)a.el_.removeChild(d[g])}return a.proxyNativeTracks_(),a.featuresNativeTextTracks&&o&&Z.warn(Zn(ru())),a.restoreMetadataTracksInIOSNativePlayer_(),(en||mr||$s)&&t.nativeControlsForTouch===!0&&a.setControls(!0),a.proxyWebkitFullscreen_(),a.triggerReady(),a}F(r,i);var e=r.prototype;return e.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),r.disposeMediaElement(this.el_),this.options_=null,i.prototype.dispose.call(this)},e.setupSourcesetHandling_=function(){gd(this)},e.restoreMetadataTracksInIOSNativePlayer_=function(){var t,n=this.textTracks(),a=function(){t=[];for(var o=0;o<n.length;o++){var u=n[o];u.kind==="metadata"&&t.push({track:u,storedMode:u.mode})}};a(),n.addEventListener("change",a),this.on("dispose",function(){return n.removeEventListener("change",a)});var s=function o(){for(var u=0;u<t.length;u++){var c=t[u];c.track.mode==="disabled"&&c.track.mode!==c.storedMode&&(c.track.mode=c.storedMode)}n.removeEventListener("change",o)};this.on("webkitbeginfullscreen",function(){n.removeEventListener("change",a),n.removeEventListener("change",s),n.addEventListener("change",s)}),this.on("webkitendfullscreen",function(){n.removeEventListener("change",a),n.addEventListener("change",a),n.removeEventListener("change",s)})},e.overrideNative_=function(t,n){var a=this;if(n===this["featuresNative"+t+"Tracks"]){var s=t.toLowerCase();this[s+"TracksListeners_"]&&Object.keys(this[s+"TracksListeners_"]).forEach(function(o){a.el()[s+"Tracks"].removeEventListener(o,a[s+"TracksListeners_"][o])}),this["featuresNative"+t+"Tracks"]=!n,this[s+"TracksListeners_"]=null,this.proxyNativeTracksForType_(s)}},e.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},e.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},e.proxyNativeTracksForType_=function(t){var n=this,a=Ht[t],s=this.el()[a.getterName],o=this[a.getterName]();if(this["featuresNative"+a.capitalName+"Tracks"]&&s&&s.addEventListener){var u={change:function(d){o.trigger({type:"change",target:o,currentTarget:o,srcElement:o})},addtrack:function(d){o.addTrack(d.track)},removetrack:function(d){o.removeTrack(d.track)}},c=function(){for(var d=[],p=0;p<o.length;p++){for(var g=!1,y=0;y<s.length;y++)if(s[y]===o[p]){g=!0;break}g||d.push(o[p])}for(;d.length;)o.removeTrack(d.shift())};this[a.getterName+"Listeners_"]=u,Object.keys(u).forEach(function(d){var p=u[d];s.addEventListener(d,p),n.on("dispose",function(g){return s.removeEventListener(d,p)})}),this.on("loadstart",c),this.on("dispose",function(d){return n.off("loadstart",c)})}},e.proxyNativeTracks_=function(){var t=this;Ht.names.forEach(function(n){t.proxyNativeTracksForType_(n)})},e.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var n=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(n,t),r.disposeMediaElement(t),t=n}else{t=B.createElement("video");var a=ot({},this.options_.tag&&oe(this.options_.tag));en&&this.options_.nativeControlsForTouch===!0||delete a.controls,Es(t,ct(a,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}typeof this.options_.preload!="undefined"&&mi(t,"preload",this.options_.preload);for(var s=["loop","muted","playsinline","autoplay"],o=0;o<s.length;o++){var u=s[o],c=this.options_[u];typeof c!="undefined"&&(c?mi(t,u,u):Zi(t,u),t[u]=c)}return t},e.handleLateInit_=function(t){if
|
||
|
Using the tech directly can be dangerous. I hope you know what you're doing.
|
||
|
See https://github.com/videojs/video.js/issues/2617 for more info.
|
||
|
`]);return su=function(){return i},i}j.patchCanPlayType=function(){4<=gr&&!Ks&&!be&&(j.TEST_VID.constructor.prototype.canPlayType=function(i){return i&&yd.test(i)?"maybe":au.call(this,i)})},j.unpatchCanPlayType=function(){var i=j.TEST_VID.constructor.prototype.canPlayType;return j.TEST_VID.constructor.prototype.canPlayType=au,i},j.patchCanPlayType(),j.disposeMediaElement=function(i){if(i){for(i.parentNode&&i.parentNode.removeChild(i);i.hasChildNodes();)i.removeChild(i.firstChild);i.removeAttribute("src"),typeof i.load=="function"&&function(){try{i.load()}catch(r){}}()}},j.resetMediaElement=function(i){if(i){for(var r=i.querySelectorAll("source"),e=r.length;e--;)i.removeChild(r[e]);i.removeAttribute("src"),typeof i.load=="function"&&function(){try{i.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(i){j.prototype[i]=function(){return this.el_[i]||this.el_.hasAttribute(i)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(i){j.prototype["set"+ft(i)]=function(r){(this.el_[i]=r)?this.el_.setAttribute(i,i):this.el_.removeAttribute(i)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(i){j.prototype[i]=function(){return this.el_[i]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(i){j.prototype["set"+ft(i)]=function(r){this.el_[i]=r}}),["pause","load","play"].forEach(function(i){j.prototype[i]=function(){var r=this.el_[i](),e=window.localStorage.getItem("refreshCount");if(i==="play"){var t=this;r!==void 0&&window.localStorage&&r.then(function(){window.localStorage.setItem("refreshCount",0)}).catch(function(n){if(console.log("playError:",n),e++,window.localStorage.setItem("refreshCount",e),n.code==0)if(e<2)location.reload();else{var a=document.getElementById("playErrorMessage");a&&(document.getElementById("playErrorMessage").style.display=""),t.el_.muted=!0,t.el_[i]()}})}return r}}),st.withSourceHandlers(j),j.nativeSourceHandler={},j.nativeSourceHandler.canPlayType=function(i){try{return j.TEST_VID.canPlayType(i)}catch(r){return""}},j.nativeSourceHandler.canHandleSource=function(i,r){if(i.type)return j.nativeSourceHandler.canPlayType(i.type);if(i.src){var e=wr(i.src);return j.nativeSourceHandler.canPlayType("video/"+e)}return""},j.nativeSourceHandler.handleSource=function(i,r,e){r.setSrc(i.src)},j.nativeSourceHandler.dispose=function(){},j.registerSourceHandler(j.nativeSourceHandler),st.registerTech("Html5",j);var ou=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ea={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},ia=["tiny","xsmall","small","medium","large","xlarge","huge"],mn={};ia.forEach(function(i){var r=i.charAt(0)==="x"?"x-"+i.substring(1):i;mn[i]="vjs-layout-"+r});var vd={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},_t=function(i){function r(t,n,a){var s;if(t.id=t.id||n.id||"vjs_video_"+Ae(),(n=ct(r.getTagSettings(t),n)).initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language)if(typeof t.closest=="function"){var o=t.closest("[lang]");o&&o.getAttribute&&(n.language=o.getAttribute("lang"))}else for(var u=t;u&&u.nodeType===1;){if(oe(u).hasOwnProperty("lang")){n.language=u.getAttribute("lang");break}u=u.parentNode}if((s=i.call(this,null,n,a)||this).log=vs(s.id_),s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=t,s.tagAttributes=t&&oe(t),s.language(s.options_.language),n.languages){var c={};Object.getOwnPropertyNames(n.languages).forEach(function(y){c[y.toLowerCase()]=n.languages[y]}),s.languages_
|
||
|
.`+a+` {
|
||
|
width: `+t+`px;
|
||
|
height: `+n+`px;
|
||
|
}
|
||
|
|
||
|
.`+a+`.vjs-fluid {
|
||
|
|
||
|
}
|
||
|
`)}else{var u=typeof this.width_=="number"?this.width_:this.options_.width,c=typeof this.height_=="number"?this.height_:this.options_.height,d=this.tech_&&this.tech_.el();d&&(0<=u&&(d.width=u),0<=c&&(d.height=c))}},e.loadTech_=function(t,n){var a=this;this.tech_&&this.unloadTech_();var s=ft(t),o=t.charAt(0).toLowerCase()+t.slice(1);s!=="Html5"&&this.tag&&(st.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=s,this.isReady_=!1;var u={source:n,autoplay:typeof this.autoplay()!="string"&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+o+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Rt.names.forEach(function(d){var p=Rt[d];u[p.getterName]=a[p.privateName]}),ct(u,this.options_[s]),ct(u,this.options_[o]),ct(u,this.options_[t.toLowerCase()]),this.tag&&(u.tag=this.tag),n&&n.src===this.cache_.src&&0<this.cache_.currentTime&&(u.startTime=this.cache_.currentTime);var c=st.getTech(t);if(!c)throw new Error("No Tech named '"+s+"' exists! '"+s+"' should be registered using videojs.registerTech()'");this.tech_=new c(u),this.tech_.ready($(this,this.handleTechReady_),!0),gh(this.textTracksJson_||[],this.tech_),ou.forEach(function(d){a.on(a.tech_,d,a["handleTech"+ft(d)+"_"])}),Object.keys(ea).forEach(function(d){a.on(a.tech_,d,function(p){a.tech_.playbackRate()===0&&a.tech_.seeking()?a.queuedCallbacks_.push({callback:a["handleTech"+ea[d]+"_"].bind(a),event:p}):a["handleTech"+ea[d]+"_"](p)})}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||s==="Html5"&&this.tag||Ji(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.unloadTech_=function(){var t=this;Rt.names.forEach(function(n){var a=Rt[n];t[a.privateName]=t[a.getterName]()}),this.textTracksJson_=mh(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},e.tech=function(t){return t===void 0&&Z.warn(Zn(su())),this.tech_},e.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},e.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDouble
|
||
|
.video-js {
|
||
|
width: 300px;
|
||
|
height: 150px;
|
||
|
}
|
||
|
|
||
|
.vjs-fluid {
|
||
|
|
||
|
}
|
||
|
`)}}or(1,O),O.VERSION=ms,O.options=_t.prototype.options_,O.getPlayers=function(){return _t.players},O.getPlayer=function(i){var r,e=_t.players;if(typeof i=="string"){var t=cu(i),n=e[t];if(n)return n;r=_e("#"+t)}else r=i;if(pi(r)){var a=r,s=a.player,o=a.playerId;if(s||e[o])return s||e[o]}},O.getAllPlayers=function(){return Object.keys(_t.players).map(function(i){return _t.players[i]}).filter(Boolean)},O.players=_t.players,O.getComponent=D.getComponent,O.registerComponent=function(i,r){st.isTech(r)&&Z.warn("The "+i+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),D.registerComponent.call(D,i,r)},O.getTech=st.getTech,O.registerTech=st.registerTech,O.use=function(i,r){Ie[i]=Ie[i]||[],Ie[i].push(r)},Object.defineProperty(O,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(O.middleware,"TERMINATOR",{value:cn,writeable:!1,enumerable:!0}),O.browser=dh,O.TOUCH_ENABLED=en,O.extend=function(i,r){r===void 0&&(r={});var e=function(){i.apply(this,arguments)},t={};for(var n in typeof r=="object"?(r.constructor!==Object.prototype.constructor&&(e=r.constructor),t=r):typeof r=="function"&&(e=r),function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),s&&(a.super_=s)}(e,i),t)t.hasOwnProperty(n)&&(e.prototype[n]=t[n]);return e},O.mergeOptions=ot,O.bind=$,O.registerPlugin=ae.registerPlugin,O.deregisterPlugin=ae.deregisterPlugin,O.plugin=function(i,r){return Z.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),ae.registerPlugin(i,r)},O.getPlugins=ae.getPlugins,O.getPlugin=ae.getPlugin,O.getPluginVersion=ae.getPluginVersion,O.addLanguage=function(i,r){var e;return i=(""+i).toLowerCase(),O.options.languages=ot(O.options.languages,((e={})[i]=r,e)),O.options.languages[i]},O.log=Z,O.createLogger=vs,O.createTimeRange=O.createTimeRanges=Ue,O.formatTime=Qe,O.setFormatTime=function(i){Dr=i},O.resetFormatTime=function(){Dr=Oo},O.parseUrl=kr,O.isCrossOrigin=un,O.EventTarget=Pt,O.on=Yt,O.one=_i,O.off=Dt,O.trigger=We,O.xhr=po,O.TextTrack=wi,O.AudioTrack=yo,O.VideoTrack=vo,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(i){O[i]=function(){return Z.warn("videojs."+i+"() is deprecated; use videojs.dom."+i+"() instead"),Rs[i].apply(null,arguments)}}),O.computedStyle=tr,O.dom=Rs,O.url=wh;var hu=Cr(function(i,r){var e,t,n,a,s;e=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,t=/^([^\/?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(o,u,c){if(c=c||{},o=o.trim(),!(u=u.trim())){if(!c.alwaysNormalize)return o;var d=s.parseURL(o);if(!d)throw new Error("Error trying to parse base URL.");return d.path=s.normalizePath(d.path),s.buildURLFromParts(d)}var p=s.parseURL(u);if(!p)throw new Error("Error trying to parse relative URL.");if(p.scheme)return c.alwaysNormalize?(p.path=s.normalizePath(p.path),s.buildURLFromParts(p)):u;var g=s.parseURL(o);if(!g)throw new Error("Error trying to parse base URL.");if(!g.netLoc&&g.path&&g.path[0]!=="/"){var y=t.exec(g.path);g.netLoc=y[1],g.path=y[2]}g.netLoc&&!g.path&&(g.path="/");var b={scheme:g.scheme,netLoc:p.netLoc,path:null,params:p.params,query:p.query,fragment:p.fragment};if(!p.netLoc&&(b.netLoc=g.netLoc,p.path[0]!=="/"))if(p.path){var T=g.path,S=T.substring(0,T.lastIndexOf("/")+1)+p.path;b.path=s.normalizePath(S)}else b.path=g.path,p.params||(b.params=g.params,p.query||(b.query=g.query));return b.path===null&&(b.path=c.alwaysNormalize?s.normalizePath(p.path):p.path),s.buildURLFromParts(b)},parseURL:function(o){var u=e.exec(o);return u?{scheme:u[1]||"",netLoc:u[2]||"",path:u[3]||"",params:u[4]||"",query:u[5]||"",fragment:u[6]||""}:null},normalizePath:function(o){for(o=o.split("").reverse().join("").replace(n,"");o.l
|
||
|
`);-1<t;t=this.buffer.indexOf(`
|
||
|
`))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},r}(sa),Di=function(i){for(var r=i.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),e={},t=r.length,n=void 0;t--;)r[t]!==""&&((n=/([^=]*)=(.*)/.exec(r[t]).slice(1))[0]=n[0].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^['"](.*)['"]$/g,"$1"),e[n[0]]=n[1]);return e},Td=function(i){function r(){Tn(this,r);var e=aa(this,i.call(this));return e.customParsers=[],e}return ra(r,i),r.prototype.push=function(e){var t=void 0,n=void 0;if((e=e.replace(/^[\u0000\s]+|[\u0000\s]+$/g,"")).length!==0)if(e[0]==="#"){for(var a=0;a<this.customParsers.length;a++)if(this.customParsers[a].call(this,e))return;if(e.indexOf("#EXT")===0)if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))this.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void this.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"totalduration"},t[1]&&(n.duration=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void this.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"byterange"},t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),void this.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var s=Di(t[1]);if(s.URI&&(n.uri=s.URI),s.BYTERANGE){var o=s.BYTERANGE.split("@"),u=o[0],c=o[1];n.byterange={},u&&(n.byterange.length=parseInt(u,10)),c&&(n.byterange.offset=parseInt(c,10))}}this.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=Di(t[1]),n.attributes.RESOLUTION){var d=n.attributes.RESOLUTION.split("x"),p={};d[0]&&(p.width=parseInt(d[0],10)),d[1]&&(p.height=parseInt(d[1],10)),n.attributes.RESOLUTION=p}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}this.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=Di(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))this.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=Di(t[1]),n.attributes.IV&&(n.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new U
|
||
|
`)},r.prototype.addParser=function(e){this.parseStream.addParser(e)},r}(sa),pu=function(i){return!!i&&typeof i=="object"},Mt=function i(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return e.reduce(function(n,a){return Object.keys(a).forEach(function(s){Array.isArray(n[s])&&Array.isArray(a[s])?n[s]=n[s].concat(a[s]):pu(n[s])&&pu(a[s])?n[s]=i(n[s],a[s]):n[s]=a[s]}),n},{})},Sn=function(i){return i.reduce(function(r,e){return r.concat(e)},[])},fu=function(i){if(!i.length)return[];for(var r=[],e=0;e<i.length;e++)r.push(i[e]);return r},mu=function(i){var r;return(r=i.reduce(function(e,t){var n,a=t.attributes.id+(t.attributes.lang||"");return e[a]?(t.segments[0].discontinuity=!0,(n=e[a].segments).push.apply(n,t.segments),t.attributes.contentProtection&&(e[a].attributes.contentProtection=t.attributes.contentProtection)):e[a]=t,e},{}),Object.keys(r).map(function(e){return r[e]})).map(function(e){var t,n;return e.discontinuityStarts=(t=e.segments,n="discontinuity",t.reduce(function(a,s,o){return s[n]&&a.push(o),a},[])),e})},Sd=function(i){var r,e=i.attributes,t=i.segments,n={attributes:(r={NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth},r["PROGRAM-ID"]=1,r),uri:"",endList:(e.type||"static")==="static",timeline:e.periodIndex,resolvedUri:"",targetDuration:e.duration,segments:t,mediaSequence:t.length?t[0].number:1};return e.contentProtection&&(n.contentProtection=e.contentProtection),n};typeof window!="undefined"||typeof global!="undefined"&&global;var oa,gu=(function(i,r){var e,t,n,a,s;e=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,t=/^([^\/?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(o,u,c){if(c=c||{},o=o.trim(),!(u=u.trim())){if(!c.alwaysNormalize)return o;var d=s.parseURL(o);if(!d)throw new Error("Error trying to parse base URL.");return d.path=s.normalizePath(d.path),s.buildURLFromParts(d)}var p=s.parseURL(u);if(!p)throw new Error("Error trying to parse relative URL.");if(p.scheme)return c.alwaysNormalize?(p.path=s.normalizePath(p.path),s.buildURLFromParts(p)):u;var g=s.parseURL(o);if(!g)throw new Error("Error trying to parse base URL.");if(!g.netLoc&&g.path&&g.path[0]!=="/"){var y=t.exec(g.path);g.netLoc=y[1],g.path=y[2]}g.netLoc&&!g.path&&(g.path="/");var b={scheme:g.scheme,netLoc:p.netLoc,path:null,params:p.params,query:p.query,fragment:p.fragment};if(!p.netLoc&&(b.netLoc=g.netLoc,p.path[0]!=="/"))if(p.path){var T=g.path,S=T.substring(0,T.lastIndexOf("/")+1)+p.path;b.path=s.normalizePath(S)}else b.path=g.path,p.params||(b.params=g.params,p.query||(b.query=g.query));return b.path===null&&(b.path=c.alwaysNormalize?s.normalizePath(p.path):p.path),s.buildURLFromParts(b)},parseURL:function(o){var u=e.exec(o);return u?{scheme:u[1]||"",netLoc:u[2]||"",path:u[3]||"",params:u[4]||"",query:u[5]||"",fragment:u[6]||""}:null},normalizePath:function(o){for(o=o.split("").reverse().join("").replace(n,"");o.length!==(o=o.replace(a,"")).length;);return o.split("").reverse().join("")},buildURLFromParts:function(o){return o.scheme+o.netLoc+o.path+o.params+o.query+o.fragment}},i.exports=s}(oa={exports:{}},oa.exports),oa.exports),ua=function(i,r){return/^[a-z]+:/i.test(r)?r:(/\/\//i.test(i)||(i=gu.buildAbsoluteURL(A.location.href,i)),gu.buildAbsoluteURL(i,r))},Ri=function(i){var r=i.baseUrl,e=r===void 0?"":r,t=i.source,n=t===void 0?"":t,a=i.range,s=a===void 0?"":a,o={uri:n,resolvedUri:ua(e||"",n)};if(s){var u=s.split("-"),c=parseInt(u[0],10),d=parseInt(u[1],10);o.byterange={length:d-c,offset:c}}return o},yu=function(i,r){for(var e,t,n,a,s,o,u,c,d,p,g,y,b=i.type,T=b===void 0?"static":b,S=i.minimumUpdatePeriod,C=S===void 0?0:S,E=i.media,U=E===void 0?"":E,I=i.sourceDuration,x=i.timescale,q=x===void 0?1:x,H=i.startNumber,R=H===void 0?1:H,G=i.periodIndex,ut=[],z=-1,et=0;et<r.length;et++){var rt=r[et],lt=rt.d,mt=rt.r||0,J=rt.t||0;z<0&&(z=J),J&&z<J&&(z=J);var vt=void 0;if(mt<0){var gt=et+1;vt=gt===r.length?T==="dynamic"&&0<C&&0<U.indexOf("$Number$")?(t
|
||
|
`).replace(/^\n+|\n+$/g,"");r.length&&this.trigger("data",{startPts:this.startPts_,endPts:i,text:r,stream:this.name_})},ht.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Re(),this.nonDisplayed_=Re(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},ht.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},ht.prototype.isSpecialCharacter=function(i,r){return i===this.EXT_&&48<=r&&r<=63},ht.prototype.isExtCharacter=function(i,r){return(i===this.EXT_+1||i===this.EXT_+2)&&32<=r&&r<=63},ht.prototype.isMidRowCode=function(i,r){return i===this.EXT_&&32<=r&&r<=47},ht.prototype.isOffsetControlCode=function(i,r){return i===this.OFFSET_&&33<=r&&r<=35},ht.prototype.isPAC=function(i,r){return i>=this.BASE_&&i<this.BASE_+8&&64<=r&&r<=127},ht.prototype.isColorPAC=function(i){return 64<=i&&i<=79||96<=i&&i<=127},ht.prototype.isNormalChar=function(i){return 32<=i&&i<=127},ht.prototype.setRollUp=function(i,r){if(this.mode_!=="rollUp"&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(i),this.nonDisplayed_=Re(),this.displayed_=Re()),r!==void 0&&r!==this.row_)for(var e=0;e<this.rollUpRows_;e++)this.displayed_[r-e]=this.displayed_[this.row_-e],this.displayed_[this.row_-e]="";r===void 0&&(r=this.row_),this.topRow_=r-this.rollUpRows_+1},ht.prototype.addFormatting=function(i,r){this.formatting_=this.formatting_.concat(r);var e=r.reduce(function(t,n){return t+"<"+n+">"},"");this[this.mode_](i,e)},ht.prototype.clearFormatting=function(i){if(this.formatting_.length){var r=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[],this[this.mode_](i,r)}},ht.prototype.popOn=function(i,r){var e=this.nonDisplayed_[this.row_];e+=r,this.nonDisplayed_[this.row_]=e},ht.prototype.rollUp=function(i,r){var e=this.displayed_[this.row_];e+=r,this.displayed_[this.row_]=e},ht.prototype.shiftRowsUp_=function(){var i;for(i=0;i<this.topRow_;i++)this.displayed_[i]="";for(i=this.row_+1;i<15;i++)this.displayed_[i]="";for(i=this.topRow_;i<this.row_;i++)this.displayed_[i]=this.displayed_[i+1];this.displayed_[this.row_]=""},ht.prototype.paintOn=function(i,r){var e=this.displayed_[this.row_];e+=r,this.displayed_[this.row_]=e};var _a={CaptionStream:De,Cea608Stream:ht},Tt={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},ba=function(i,r){var e=1;for(r<i&&(e=-1);4294967296<Math.abs(r-i);)i+=8589934592*e;return i},dl=function i(r){var e,t;i.prototype.init.call(this),this.type_=r,this.push=function(n){n.type===this.type_&&(t===void 0&&(t=n.dts),n.dts=ba(n.dts,t),n.pts=ba(n.pts,t),e=n.dts,this.trigger("data",n))},this.flush=function(){t=e,this.trigger("done")},this.discontinuity=function(){e=t=void 0}};dl.prototype=new At;var Ta,op=dl,up=ba,pl=function(i,r,e){var t,n="";for(t=r;t<e;t++)n+="%"+("00"+i[t].toString(16)).slice(-2);return n},An=function(i,r,e){return decodeURIComponent(pl(i,r,e))},Ln=function(i){return i[0]<<21|i[1]<<14|i[2]<<7|i[3]},fl={TXXX:function(i){var r;if(i.data[0]===3){for(r=1;r<i.data.length;r++)if(i.data[r]===0){i.description=An(i.data,1,r),i.value=An(i.data,r+1,i.data.length).replace(/\0*$/,"");break}i.data=i.value}},WXXX:function(i){var r;if(i.data[0]===3){for(r=1;r<i.data.length;r++)if(i.data[r]===0){i.description=An(i.data,1,r),i.url=An(i.data,r+1,i.data.length);break}}},PRIV:function(i){var r,e;for(r=0;r<i.data.length;r++)if(i.data[r]===0){i.owner=(e=i.data,unescape(pl(e,0,r)));break}i.privateData=i.data.s
|
||
|
`+Object.keys(t).filter(function(a){return a!=="type"&&a!=="boxes"}).map(function(a){var s=e+" "+a+": ",o=t[a];if(o instanceof Uint8Array||o instanceof Uint32Array){var u=Array.prototype.slice.call(new Uint8Array(o.buffer,o.byteOffset,o.byteLength)).map(function(c){return" "+("00"+c.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return u?u.length===1?s+"<"+u.join("").slice(1)+">":s+`<
|
||
|
`+u.map(function(c){return e+" "+c}).join(`
|
||
|
`)+`
|
||
|
`+e+" >":s+"<>"}return s+JSON.stringify(o,null,2).split(`
|
||
|
`).map(function(c,d){return d===0?c:e+" "+c}).join(`
|
||
|
`)}).join(`
|
||
|
`)+(t.boxes?`
|
||
|
`+Tl(t.boxes,r+1):"")}).join(`
|
||
|
`)},parseTfdt:ri.tfdt,parseHdlr:ri.hdlr,parseTfhd:ri.tfhd,parseTrun:ri.trun},yp=np,vp=_a.CaptionStream,_p=function(i,r){for(var e=i,t=0;t<r.length;t++){var n=r[t];if(e<n.size)return n;e-=n.size}return null},bp=function(i,r){var e=Qt.findBox(i,["moof","traf"]),t=Qt.findBox(i,["mdat"]),n={},a=[];return t.forEach(function(s,o){var u=e[o];a.push({mdat:s,traf:u})}),a.forEach(function(s){var o,u,c,d,p,g,y,b,T=s.mdat,S=s.traf,C=Qt.findBox(S,["tfhd"]),E=Ia.parseTfhd(C[0]),U=E.trackId,I=Qt.findBox(S,["tfdt"]),x=0<I.length?Ia.parseTfdt(I[0]).baseMediaDecodeTime:0,q=Qt.findBox(S,["trun"]);r===U&&0<q.length&&(u=q,d=x,p=(c=E).defaultSampleDuration||0,g=c.defaultSampleSize||0,y=c.trackId,b=[],u.forEach(function(H){var R=Ia.parseTrun(H).samples;R.forEach(function(G){G.duration===void 0&&(G.duration=p),G.size===void 0&&(G.size=g),G.trackId=y,G.dts=d,G.compositionTimeOffset===void 0&&(G.compositionTimeOffset=0),G.pts=d+G.compositionTimeOffset,d+=G.duration}),b=b.concat(R)}),o=function(H,R,G){var ut,z,et,rt,lt=new DataView(H.buffer,H.byteOffset,H.byteLength),mt=[];for(z=0;z+4<H.length;z+=et)if(et=lt.getUint32(z),z+=4,!(et<=0))switch(31&H[z]){case 6:var J=H.subarray(z+1,z+1+et),vt=_p(z,R);ut={nalUnitType:"sei_rbsp",size:et,data:J,escapedRBSP:yp(J),trackId:G},vt?(ut.pts=vt.pts,ut.dts=vt.dts,rt=vt):(ut.pts=rt.pts,ut.dts=rt.dts),mt.push(ut)}return mt}(T,b,U),n[U]||(n[U]=[]),n[U]=n[U].concat(o))}),n},Tp={generator:ni,probe:Qt,Transmuxer:Ua.Transmuxer,AudioSegmentStream:Ua.AudioSegmentStream,VideoSegmentStream:Ua.VideoSegmentStream,CaptionParser:function(){var i,r,e,t,n,a=!1;this.isInitialized=function(){return a},this.init=function(){i=new vp,a=!0,i.on("data",function(s){s.startTime=s.startPts/t,s.endTime=s.endPts/t,n.captions.push(s),n.captionStreams[s.stream]=!0})},this.isNewInit=function(s,o){return!(s&&s.length===0||o&&typeof o=="object"&&Object.keys(o).length===0||e===s[0]&&t===o[e])},this.parse=function(s,o,u){var c,d,p,g;if(!this.isInitialized()||!o||!u)return null;if(this.isNewInit(o,u))e=o[0],t=u[e];else if(!e||!t)return r.push(s),null;for(;0<r.length;){var y=r.shift();this.parse(y,o,u)}return d=s,g=t,(c=(p=e)?{seiNals:bp(d,p)[p],timescale:g}:null)!==null&&c.seiNals?(this.pushNals(c.seiNals),this.flushStream(),n):null},this.pushNals=function(s){if(!this.isInitialized()||!s||s.length===0)return null;s.forEach(function(o){i.push(o)})},this.flushStream=function(){if(!this.isInitialized())return null;i.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;i.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){r=[],t=e=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}}.CaptionParser,kl=function(i){var r=31&i[1];return r<<=8,r|=i[2]},Dn=function(i){return!!(64&i[1])},Rn=function(i){var r=0;return 1<(48&i[3])>>>4&&(r+=i[4]+1),r},xa=function(i){switch(i){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Sp={parseType:function(i,r){var e=kl(i);return e===0?"pat":e===r?"pmt":r?"pes":null},parsePat:function(i){var r=Dn(i),e=4+Rn(i);return r&&(e+=i[e]+1),(31&i[e+10])<<8|i[e+11]},parsePmt:function(i){var r={},e=Dn(i),t=4+Rn(i);if(e&&(t+=i[t]+1),1&i[t+5]){var n;n=3+((15&i[t+1])<<8|i[t+2])-4;for(var a=12+((15&i[t+10])<<8|i[t+11]);a<n;){var s=t+a;r[(31&i[s+1])<<8|i[s+2]]=i[s],a+=5+((15&i[s+3])<<8|i[s+4])}return r}},parsePayloadUnitStartIndicator:Dn,parsePesType:function(i,r){switch(r[kl(i)]){case Tt.H264_STREAM_TYPE:return"video";case Tt.ADTS_STREAM_TYPE:return"audio";case Tt.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(i){if(!Dn(i))return null;var r=4+Rn(i);if(r>=i.byteLength)return null;var e,t=null;return 192&(e=i[r+7])&&((t={}).pts=(14&i[r+9])<<27|(255&i[r+10])<<20|(254&i[r+11])<<12|(255&i[r+12])<<5|(254&i[r+13])>>>3,
|
||
|
`;return e},jp=Object.freeze({createTransferableMessage:Fl,initSegmentId:jn,hexDump:Vl,tagDump:function(i){var r=i.bytes;return Vl(r)},textRanges:function(i){var r,e,t="",n=void 0;for(n=0;n<i.length;n++)t+=(e=n,(r=i).start(e)+"-"+r.end(e)+" ");return t}}),Hl=function(i,r,e,t){var n=void 0;if(r==="stream"){n=new Date(1e3*t+e.getTime());var a=i.toISOString(),s=e.toISOString(),o=n.toISOString();return s<=a&&a<=o}if(r==="player")return n=t+e,e<=i&&i<=n},ql=function(i,r,e){if(!e.segments||e.segments.length===0||r!=="player"&&r!=="stream")return null;for(var t=0,n=0;n<e.segments.length;n++){var a=e.segments[n],s=t+a.duration,o=void 0,u=void 0;u=r==="player"?(o=a.start,t):(o=a.dateTimeObject,a.dateTimeObject);var c=typeof a.start!="undefined"&&typeof a.end!="undefined"&&Hl(i,r,o,a.end-a.start),d=Hl(i,r,u,a.duration);if(c)return{segment:a,estimatedStart:u,type:"accurate"};if(d)return{segment:a,estimatedStart:u,type:"estimate"};t=s}return null},Fp=function(i){var r=i.playlist,e=i.time,t=e===void 0?void 0:e,n=i.callback;if(!n)throw new Error("getStreamTime: callback must be provided");if(!r||t===void 0)return n({message:"getStreamTime: playlist and time must be provided"});var a=ql(t,"player",r);if(!a)return n({message:"valid streamTime was not found"});if(a.type==="estimate")return n({message:"Accurate streamTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var s={mediaSeconds:t};return a.segment.dateTimeObject&&(s.programDateTime=a.segment.dateTimeObject.toISOString()),n(null,s)},Vp=function i(r){var e=r.streamTime,t=r.playlist,n=r.retryCount,a=n===void 0?2:n,s=r.seekTo,o=r.pauseAfterSeek,u=o===void 0||o,c=r.tech,d=r.callback;if(!d)throw new Error("seekToStreamTime: callback must be provided");if(typeof e=="undefined"||!t||!s)return d({message:"seekToStreamTime: streamTime, seekTo and playlist must be provided"});if(!t.endList&&!c.hasStarted_)return d({message:"player must be playing a live stream to start buffering"});if(!function(T){if(!T.segments||T.segments.length===0)return!1;for(var S=0;S<T.segments.length;S++)if(!T.segments[S].dateTimeObject)return!1;return!0}(t))return d({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri});var p=function(T,S){var C=void 0;try{C=new Date(T)}catch(E){return null}return ql(C,"stream",S)}(e,t);if(!p)return d({message:e+" was not found in the stream"});if(p.type==="estimate")return a===0?d({message:e+" is not buffered yet. Try again"}):i({streamTime:e,playlist:t,retryCount:a-1,seekTo:s,pauseAfterSeek:u,tech:c,callback:d});var g=p.segment,y=function(T,S){var C=void 0,E=void 0;try{C=new Date(T),E=new Date(S)}catch(I){}var U=C.getTime();return(E.getTime()-U)/1e3}(g.dateTimeObject,e),b=g.start+y;c.one("seeked",function(){return d(null,c.currentTime())}),u&&c.pause(),s(b)},Vi=1/30,zl=function(i,r){var e=[],t=void 0;if(i&&i.length)for(t=0;t<i.length;t++)r(i.start(t),i.end(t))&&e.push([i.start(t),i.end(t)]);return O.createTimeRanges(e)},Wl=function(i,r){return zl(i,function(e,t){return e-Vi<=r&&r<=t+Vi})},Gl=function(i,r){return zl(i,function(e){return r<=e-Vi})},ja=function(i){var r=[];if(!i||!i.length)return"";for(var e=0;e<i.length;e++)r.push(i.start(e)+" => "+i.end(e));return r.join(", ")},Xl=function(i){for(var r=[],e=0;e<i.length;e++)r.push({start:i.start(e),end:i.end(e)});return r},si=function(i,r,e){var t=void 0,n=void 0;if(e&&e.cues)for(t=e.cues.length;t--;)(n=e.cues[t]).startTime<=r&&n.endTime>=i&&e.removeCue(n)},Yl=function(i){return isNaN(i)||Math.abs(i)===1/0?Number.MAX_VALUE:i},Hp=function(i,r,e){var t=A.WebKitDataCue||A.VTTCue;if(r&&r.forEach(function(d){var p=d.stream;this.inbandTextTracks_[p].addCue(new t(d.startTime+this.timestampOffset,d.endTime+this.timestampOffset,d.text))},i),e){var n=Yl(i.mediaSource_.duration);if(e.forEach(function(d){var p=d.cueTime+this.timestampOffset;d.frames.forEach(function(g){var y,b=new t(p,p,g.value||g.url||g.data||"");b.frame=g,b.value=g,y=b,Object.defineProperties(y.frame,{id:{get:function(){return O.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),y.va
|
||
|
`).replace(/^\n+|\n+$/g,"");h.length&&this.trigger("data",{startPts:this.startPts_,endPts:l,text:h,stream:this.name_})},dt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=je(),this.nonDisplayed_=je(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},dt.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},dt.prototype.isSpecialCharacter=function(l,h){return l===this.EXT_&&48<=h&&h<=63},dt.prototype.isExtCharacter=function(l,h){return(l===this.EXT_+1||l===this.EXT_+2)&&32<=h&&h<=63},dt.prototype.isMidRowCode=function(l,h){return l===this.EXT_&&32<=h&&h<=47},dt.prototype.isOffsetControlCode=function(l,h){return l===this.OFFSET_&&33<=h&&h<=35},dt.prototype.isPAC=function(l,h){return l>=this.BASE_&&l<this.BASE_+8&&64<=h&&h<=127},dt.prototype.isColorPAC=function(l){return 64<=l&&l<=79||96<=l&&l<=127},dt.prototype.isNormalChar=function(l){return 32<=l&&l<=127},dt.prototype.setRollUp=function(l,h){if(this.mode_!=="rollUp"&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(l),this.nonDisplayed_=je(),this.displayed_=je()),h!==void 0&&h!==this.row_)for(var f=0;f<this.rollUpRows_;f++)this.displayed_[h-f]=this.displayed_[this.row_-f],this.displayed_[this.row_-f]="";h===void 0&&(h=this.row_),this.topRow_=h-this.rollUpRows_+1},dt.prototype.addFormatting=function(l,h){this.formatting_=this.formatting_.concat(h);var f=h.reduce(function(m,v){return m+"<"+v+">"},"");this[this.mode_](l,f)},dt.prototype.clearFormatting=function(l){if(this.formatting_.length){var h=this.formatting_.reverse().reduce(function(f,m){return f+"</"+m+">"},"");this.formatting_=[],this[this.mode_](l,h)}},dt.prototype.popOn=function(l,h){var f=this.nonDisplayed_[this.row_];f+=h,this.nonDisplayed_[this.row_]=f},dt.prototype.rollUp=function(l,h){var f=this.displayed_[this.row_];f+=h,this.displayed_[this.row_]=f},dt.prototype.shiftRowsUp_=function(){var l;for(l=0;l<this.topRow_;l++)this.displayed_[l]="";for(l=this.row_+1;l<15;l++)this.displayed_[l]="";for(l=this.topRow_;l<this.row_;l++)this.displayed_[l]=this.displayed_[l+1];this.displayed_[this.row_]=""},dt.prototype.paintOn=function(l,h){var f=this.displayed_[this.row_];f+=h,this.displayed_[this.row_]=f};var es={CaptionStream:Ne,Cea608Stream:dt},jt={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Hc=function(l,h){var f=1;for(h<l&&(f=-1);4294967296<Math.abs(h-l);)l+=8589934592*f;return l},qc=function l(h){var f,m;l.prototype.init.call(this),this.type_=h,this.push=function(v){v.type===this.type_&&(m===void 0&&(m=v.dts),v.dts=Hc(v.dts,m),v.pts=Hc(v.pts,m),f=v.dts,this.trigger("data",v))},this.flush=function(){m=f,this.trigger("done")},this.discontinuity=function(){f=m=void 0}};qc.prototype=new Ot;var is,Nf=qc,zc=function(l,h,f){var m,v="";for(m=h;m<f;m++)v+="%"+("00"+l[m].toString(16)).slice(-2);return v},Wn=function(l,h,f){return decodeURIComponent(zc(l,h,f))},Gn=function(l){return l[0]<<21|l[1]<<14|l[2]<<7|l[3]},Wc={TXXX:function(l){var h;if(l.data[0]===3){for(h=1;h<l.data.length;h++)if(l.data[h]===0){l.description=Wn(l.data,1,h),l.value=Wn(l.data,h+1,l.data.length).replace(/\0*$/,"");break}l.data=l.value}},WXXX:function(l){var h;if(l.data[0]===3){for(h=1;h<l.data.length;h++)if(l.data[h]===0){l.description=Wn(l.data,1,h),l.url=Wn(l.data,h+1,l.data.length);break}}},PRIV:function(l){var h,f;for(h=0;h<l.data.length;h++)if(l.data[h]===0){l.owner=(f=l.data,unescape(zc(f,0,h)));break}l.privateData=l.data.subarra
|
||
|
`+Object.keys(m).filter(function(_){return _!=="type"&&_!=="boxes"}).map(function(_){var k=f+" "+_+": ",w=m[_];if(w instanceof Uint8Array||w instanceof Uint32Array){var L=Array.prototype.slice.call(new Uint8Array(w.buffer,w.byteOffset,w.byteLength)).map(function(P){return" "+("00"+P.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return L?L.length===1?k+"<"+L.join("").slice(1)+">":k+`<
|
||
|
`+L.map(function(P){return f+" "+P}).join(`
|
||
|
`)+`
|
||
|
`+f+" >":k+"<>"}return k+JSON.stringify(w,null,2).split(`
|
||
|
`).map(function(P,M){return M===0?P:f+" "+P}).join(`
|
||
|
`)}).join(`
|
||
|
`)+(m.boxes?`
|
||
|
`+Qc(m.boxes,h+1):"")}).join(`
|
||
|
`)},parseTfdt:hi.tfdt,parseHdlr:hi.hdlr,parseTfhd:hi.tfhd,parseTrun:hi.trun},$f=Df,Kf=es.CaptionStream,Qf=function(l,h){for(var f=l,m=0;m<h.length;m++){var v=h[m];if(f<v.size)return v;f-=v.size}return null},Jf=function(l,h){var f=Be.findBox(l,["moof","traf"]),m=Be.findBox(l,["mdat"]),v={},_=[];return m.forEach(function(k,w){var L=f[w];_.push({mdat:k,traf:L})}),_.forEach(function(k){var w,L,P,M,N,W,Y,X,tt=k.mdat,Ft=k.traf,de=Be.findBox(Ft,["tfhd"]),pe=ps.parseTfhd(de[0]),fe=pe.trackId,pt=Be.findBox(Ft,["tfdt"]),me=0<pt.length?ps.parseTfdt(pt[0]).baseMediaDecodeTime:0,Ki=Be.findBox(Ft,["trun"]);h===fe&&0<Ki.length&&(L=Ki,M=me,N=(P=pe).defaultSampleDuration||0,W=P.defaultSampleSize||0,Y=P.trackId,X=[],L.forEach(function(ne){var Fe=ps.parseTrun(ne).samples;Fe.forEach(function(kt){kt.duration===void 0&&(kt.duration=N),kt.size===void 0&&(kt.size=W),kt.trackId=Y,kt.dts=M,kt.compositionTimeOffset===void 0&&(kt.compositionTimeOffset=0),kt.pts=M+kt.compositionTimeOffset,M+=kt.duration}),X=X.concat(Fe)}),w=function(ne,Fe,kt){var ge,ye,Qi,fs,em=new DataView(ne.buffer,ne.byteOffset,ne.byteLength),th=[];for(ye=0;ye+4<ne.length;ye+=Qi)if(Qi=em.getUint32(ye),ye+=4,!(Qi<=0))switch(31&ne[ye]){case 6:var eh=ne.subarray(ye+1,ye+1+Qi),Qn=Qf(ye,Fe);ge={nalUnitType:"sei_rbsp",size:Qi,data:eh,escapedRBSP:$f(eh),trackId:kt},Qn?(ge.pts=Qn.pts,ge.dts=Qn.dts,fs=Qn):(ge.pts=fs.pts,ge.dts=fs.dts),th.push(ge)}return th}(tt,X,fe),v[fe]||(v[fe]=[]),v[fe]=v[fe].concat(w))}),v},Zf={generator:li,probe:Be,Transmuxer:ds.Transmuxer,AudioSegmentStream:ds.AudioSegmentStream,VideoSegmentStream:ds.VideoSegmentStream,CaptionParser:function(){var l,h,f,m,v,_=!1;this.isInitialized=function(){return _},this.init=function(){l=new Kf,_=!0,l.on("data",function(k){k.startTime=k.startPts/m,k.endTime=k.endPts/m,v.captions.push(k),v.captionStreams[k.stream]=!0})},this.isNewInit=function(k,w){return!(k&&k.length===0||w&&typeof w=="object"&&Object.keys(w).length===0||f===k[0]&&m===w[f])},this.parse=function(k,w,L){var P,M,N,W;if(!this.isInitialized()||!w||!L)return null;if(this.isNewInit(w,L))f=w[0],m=L[f];else if(!f||!m)return h.push(k),null;for(;0<h.length;){var Y=h.shift();this.parse(Y,w,L)}return M=k,W=m,(P=(N=f)?{seiNals:Jf(M,N)[N],timescale:W}:null)!==null&&P.seiNals?(this.pushNals(P.seiNals),this.flushStream(),v):null},this.pushNals=function(k){if(!this.isInitialized()||!k||k.length===0)return null;k.forEach(function(w){l.push(w)})},this.flushStream=function(){if(!this.isInitialized())return null;l.flush()},this.clearParsedCaptions=function(){v.captions=[],v.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;l.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){h=[],m=f=null,v?this.clearParsedCaptions():v={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}},tm=function(){function l(h,f){for(var m=0;m<f.length;m++){var v=f[m];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(h,v.key,v)}}return function(h,f,m){return f&&l(h.prototype,f),m&&l(h,m),h}}(),Zc=function(){function l(h,f){(function(m,v){if(!(m instanceof v))throw new TypeError("Cannot call a class as a function")})(this,l),this.options=f||{},this.self=h,this.init()}return tm(l,[{key:"init",value:function(){var h,f;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Zf.Transmuxer(this.options),h=this.self,(f=this.transmuxer).on("data",function(m){var v=m.initSegment;m.initSegment={data:v.buffer,byteOffset:v.byteOffset,byteLength:v.byteLength};var _=m.data;m.data=_.buffer,h.postMessage({action:"data",segment:m,byteOffset:_.byteOffset,byteLength:_.byteLength},[m.data])}),f.captionStream&&f.captionStream.on("data",function(m){h.postMessage({action:"caption",data:m})}),f.on("done",function(m){h.postMessage({action:"done"})}),f.on("gopInfo",function(m){h.postMessage({action:"gopInfo",gopInfo:m})})}},{key:"push",value:function(h){var f=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.transmuxer.push(f)}},{key:"reset",value:funct
|
||
|
|
||
|
`.split("").map(function(i){return i.charCodeAt(0)})),tf=function(i){function r(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};Gt(this,r);var n=se(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.mediaSource_=null,n.subtitlesTrack_=null,n}return ce(r,Ya),Zt(r,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return O.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return O.createTimeRanges([[t,n]])}},{key:"initSegment",value:function(e){var t=1<arguments.length&&arguments[1]!==void 0&&arguments[1];if(!e)return null;var n=jn(e),a=this.initSegments_[n];if(t&&!a&&e.bytes){var s=mc.byteLength+e.bytes.byteLength,o=new Uint8Array(s);o.set(e.bytes),o.set(mc,e.bytes.byteLength),this.initSegments_[n]=a={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:o}}return a||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(e){return typeof e=="undefined"||(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}},{key:"remove",value:function(e,t){si(e,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var e=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t=this.skipEmptySegments_(t)){if(this.syncController_.timestampOffsetForTimeline(t.timeline)===null)return this.syncController_.one("timestampoffset",function(){e.state="READY",e.paused()||e.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(t)}}},{key:"skipEmptySegments_",value:function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var t=this.pendingSegment_,n=t.segment;if(typeof A.WebVTT!="function"&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var a=function(){e.handleSegment_()};return this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",a),void this.subtitlesTrack_.tech_.one("vttjserror",function(){e.subtitlesTrack_.tech_.off("vttjsloaded",a),e.error({message:"Error loading vtt.js"}),e.state="READY",e.pause(),e.trigger("error")})}n.requested=!0;try{this.parseVTTCues_(t)}catch(s){return this.error({message:s.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(t,this.syncController_.timelines[t.timeline],this.playlist_),t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");t.byteLength=t.bytes.byteLength,this.mediaSecondsLoaded+=n.duration,t.cues.length&&this.remove(t.cues[0].endTime,t.cues[t.cues.length-1].endTime),t.cues.forEach(function(s){e.subtitlesTrack_.addCue(s)}),this.handleUpdateEnd_()}else this.state="READY"}},{key:"parseVTTCues_",value:function(e){var t=void 0,n=!1;typeof A.TextDecoder=="function"?t=new A.TextDecoder("utf8"):(t=A.WebVTT.StringDecoder(),n=!0);var a=new A.WebVTT.Parser(A,A.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},a.oncue=e.cues.push.bind(e.cues),a.ontimestampmap=function(u){return e.timestampmap=u},a.onparsingerror=function(u){O.log.warn("Error encountered when parsing cues: "+u.message)},e.segment.map){var s=e.segment.map.bytes;n&&(s=fc(s)),a.parse(s)}var o=e.bytes;n&&(o=fc(o)),a.parse(o),a.flush()}},{key:"updateTimeMapping_",value:function(e,t,n){var a=e.segment;if(t)if(e.cues.length){var s=e.timestampmap,o=s.MPEGTS/9e4-s.LOCAL+t.mapping;if(e.cues.forEach(function(d){d.startTime+=o,d.endTime+=o}),!n.syncInfo){var u=e.cues[0].startTime,c=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaS
|