shaka-player 4.2.11 → 4.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/appspot.yaml +39 -0
- package/CHANGELOG.md +25 -0
- package/CONTRIBUTORS +1 -0
- package/demo/custom.js +1 -1
- package/dist/demo.compiled.debug.js +2 -2
- package/dist/demo.compiled.debug.map +2 -2
- package/dist/demo.compiled.js +2 -2
- package/dist/demo.compiled.map +2 -2
- package/dist/deps.js +2 -2
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.d.ts +22 -0
- package/dist/shaka-player.compiled.debug.d.ts +22 -0
- package/dist/shaka-player.compiled.debug.js +216 -214
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +735 -734
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +22 -0
- package/dist/shaka-player.ui.debug.d.ts +22 -0
- package/dist/shaka-player.ui.debug.js +241 -238
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +916 -915
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/drm-config.md +9 -6
- package/externs/ima.js +34 -0
- package/lib/abr/simple_abr_manager.js +1 -1
- package/lib/cea/mp4_cea_parser.js +30 -14
- package/lib/dash/dash_parser.js +18 -3
- package/lib/hls/hls_parser.js +13 -2
- package/lib/media/drm_engine.js +14 -8
- package/lib/media/gap_jumping_controller.js +24 -2
- package/lib/media/media_source_engine.js +5 -3
- package/lib/media/playhead.js +11 -0
- package/lib/media/region_observer.js +19 -1
- package/lib/media/streaming_engine.js +7 -3
- package/lib/media/video_wrapper.js +6 -1
- package/lib/player.js +9 -4
- package/lib/polyfill/abort_controller.js +7 -0
- package/lib/text/vtt_text_parser.js +2 -1
- package/lib/util/manifest_parser_utils.js +1 -1
- package/lib/util/mp4_box_parsers.js +8 -3
- package/lib/util/stream_utils.js +1 -0
- package/package.json +2 -3
- package/test/cea/mp4_cea_parser_unit.js +26 -3
- package/test/dash/dash_parser_manifest_unit.js +120 -0
- package/test/hls/hls_parser_unit.js +150 -0
- package/test/media/region_observer_unit.js +2 -1
- package/test/test/assets/multiple-trun-init.mp4 +0 -0
- package/test/test/assets/multiple-trun-segment.mp4 +0 -0
- package/ui/resolution_selection.js +7 -1
|
@@ -16,17 +16,17 @@ ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(v
|
|
|
16
16
|
function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
|
|
18
18
|
function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.ih=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
|
|
19
|
-
function sa(a,b){a.i={xe:b,Fe:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function A(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a){a.m=0;a.j=2}function ua(a,b){a.g=b;a.m=0}function
|
|
19
|
+
function sa(a,b){a.i={xe:b,Fe:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function A(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a){a.m=0;a.j=2}function ua(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.xe;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
|
|
20
20
|
function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Fe?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function za(a,b){ra(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ba(a)}
|
|
21
21
|
function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Fe)throw b.xe;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
|
-
function
|
|
23
|
-
function
|
|
22
|
+
function Ca(a){this.next=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ba(a));return b};this.throw=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.s):(sa(a.g,b),b=Ba(a));return b};this.return=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}function Fa(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
|
|
23
|
+
function J(a){return Fa(new Ca(new ya(a)))}function Ia(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
24
24
|
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
25
25
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
|
|
26
26
|
b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.L(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
|
|
27
27
|
function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
28
|
-
b.prototype.J=function(g){var h=this.j();g.Hc(h.resolve,h.reject)};b.prototype.L=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(n,t){return"function"==typeof n?function(
|
|
29
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).Hc(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(
|
|
28
|
+
b.prototype.J=function(g){var h=this.j();g.Hc(h.resolve,h.reject)};b.prototype.L=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(n,t){return"function"==typeof n?function(y){try{l(n(y))}catch(x){m(x)}}:t}var l,m,p=new b(function(n,t){l=n;m=t});this.Hc(k(g,l),k(h,m));return p};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Hc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
29
|
+
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).Hc(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(y){return function(x){n[y]=x;t--;0==t&&l(n)}}var n=[],t=0;do n.push(void 0),t++,d(k.value).Hc(p(n.length-1),m),k=h.next();
|
|
30
30
|
while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
31
31
|
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ja(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
32
32
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(p){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ja(k,
|
|
@@ -52,7 +52,7 @@ function L(a,b){a=a.split(".");var c=Pa;a[0]in c||"undefined"==typeof c.execScri
|
|
|
52
52
|
Copyright 2016 Google LLC
|
|
53
53
|
SPDX-License-Identifier: Apache-2.0
|
|
54
54
|
*/
|
|
55
|
-
function Qa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Qa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ra(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Qa(2);this.j=new Qa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ra(this.h),Ra(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Ia.apply(1,arguments);Xa.has(a)||(Xa.add(a),Va.apply(Ta,ia(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;window.console&&(Va=function(){return console.warn.apply(console,ia(Ia.apply(0,arguments)))},Ua=function(){console.error.apply(console,ia(Ia.apply(0,arguments)))});function bb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function cb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function db(a,b,c){c||(c=bb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={
|
|
55
|
+
function Qa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Qa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ra(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Qa(2);this.j=new Qa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ra(this.h),Ra(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Ia.apply(1,arguments);Xa.has(a)||(Xa.add(a),Va.apply(Ta,ia(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;window.console&&(Va=function(){return console.warn.apply(console,ia(Ia.apply(0,arguments)))},Ua=function(){console.error.apply(console,ia(Ia.apply(0,arguments)))});function bb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function cb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function db(a,b,c){c||(c=bb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={kd:d.kd},e=a.next()){d.kd=e.value;e=b.findIndex(function(f){return function(g){return c(f.kd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
56
56
|
function eb(a,b,c){c||(c=bb);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function fb(a,b,c){this.startTime=a;this.direction=gb;this.endTime=b;this.payload=c;this.region=new hb;this.position=null;this.positionAlign=ib;this.size=0;this.textAlign=jb;this.writingMode=kb;this.lineInterpretation=lb;this.line=null;this.lineHeight="";this.lineAlign=mb;this.displayAlign=nb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=ob;this.fontStyle=pb;this.linePadding=this.letterSpacing=
|
|
57
57
|
this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}fb.prototype.clone=function(){var a=new fb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
58
58
|
function qb(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!eb(a.nestedCues,b.nestedCues,qb))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!eb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}L("shaka.text.Cue",fb);var ib="auto";
|
|
@@ -80,107 +80,107 @@ var Kb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
80
80
|
function Lb(a){var b;a instanceof Lb?(Mb(this,a.Ha),this.qb=a.qb,this.Ia=a.Ia,Nb(this,a.Kb),this.xa=a.xa,Ob(this,a.g.clone()),this.gb=a.gb):a&&(b=String(a).match(Kb))?(Mb(this,b[1]||"",!0),this.qb=Pb(b[2]||""),this.Ia=Pb(b[3]||"",!0),Nb(this,b[4]),this.xa=Pb(b[5]||"",!0),Ob(this,b[6]||"",!0),this.gb=Pb(b[7]||"")):this.g=new Qb(null)}q=Lb.prototype;q.Ha="";q.qb="";q.Ia="";q.Kb=null;q.xa="";q.gb="";
|
|
81
81
|
q.toString=function(){var a=[],b=this.Ha;b&&a.push(Rb(b,Sb,!0),":");if(b=this.Ia){a.push("//");var c=this.qb;c&&a.push(Rb(c,Sb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Kb;null!=b&&a.push(":",String(b))}if(b=this.xa)this.Ia&&"/"!=b.charAt(0)&&a.push("/"),a.push(Rb(b,"/"==b.charAt(0)?Tb:Ub,!0));(b=this.g.toString())&&a.push("?",b);(b=this.gb)&&a.push("#",Rb(b,Vb));return a.join("")};
|
|
82
82
|
q.resolve=function(a){var b=this.clone();"data"===b.Ha&&(b=new Lb);var c=!!a.Ha;c?Mb(b,a.Ha):c=!!a.qb;c?b.qb=a.qb:c=!!a.Ia;c?b.Ia=a.Ia:c=null!=a.Kb;var d=a.xa;if(c)Nb(b,a.Kb);else if(c=!!a.xa){if("/"!=d.charAt(0))if(this.Ia&&!this.xa)d="/"+d;else{var e=b.xa.lastIndexOf("/");-1!=e&&(d=b.xa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
83
|
-
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.xa=d:c=""!==a.g.toString();c?Ob(b,a.g.clone()):c=!!a.gb;c&&(b.gb=a.gb);return b};q.clone=function(){return new Lb(this)};function Mb(a,b,c){a.Ha=c?Pb(b,!0):b;a.Ha&&(a.Ha=a.Ha.replace(/:$/,""))}function Nb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Kb=b}else a.Kb=null}function Ob(a,b,c){b instanceof Qb?a.g=b:(c||(b=Rb(b,
|
|
84
|
-
function Pb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Rb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,
|
|
85
|
-
function
|
|
86
|
-
q.set=function(a,b){
|
|
87
|
-
function
|
|
88
|
-
var
|
|
89
|
-
O.prototype.tickNow=O.prototype.Nb;function
|
|
90
|
-
function
|
|
91
|
-
function
|
|
83
|
+
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.xa=d:c=""!==a.g.toString();c?Ob(b,a.g.clone()):c=!!a.gb;c&&(b.gb=a.gb);return b};q.clone=function(){return new Lb(this)};function Mb(a,b,c){a.Ha=c?Pb(b,!0):b;a.Ha&&(a.Ha=a.Ha.replace(/:$/,""))}function Nb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Kb=b}else a.Kb=null}function Ob(a,b,c){b instanceof Qb?a.g=b:(c||(b=Rb(b,Xb)),a.g=new Qb(b))}
|
|
84
|
+
function Pb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Rb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Yb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Yb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Sb=/[#\/\?@]/g,Ub=/[#\?:]/g,Tb=/[#\?]/g,Xb=/[#\?@]/g,Vb=/#/g;function Qb(a){this.g=a||null}
|
|
85
|
+
function Zb(a){if(!a.pa&&(a.pa={},a.Jc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=Qb.prototype;q.pa=null;q.Jc=null;q.add=function(a,b){Zb(this);this.g=null;var c=this.pa.hasOwnProperty(a)&&this.pa[a];c||(this.pa[a]=c=[]);c.push(b);this.Jc++;return this};
|
|
86
|
+
q.set=function(a,b){Zb(this);this.g=null;this.pa.hasOwnProperty(a)?this.pa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.pa)return"";var a=[],b;for(b in this.pa)for(var c=encodeURIComponent(b),d=this.pa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new Qb;a.g=this.g;if(this.pa){var b={},c;for(c in this.pa)b[c]=this.pa[c].concat();a.pa=b;a.Jc=this.Jc}return a};function $b(a,b){return a.concat(b)}function ac(){}function bc(a){return null!=a};function cc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Lb(d)});return a.map(function(d){return new Lb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce($b,[]).map(function(d){return d.toString()})}function dc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
87
|
+
function ec(a,b){if(1==b.length)return b[0];a=fc(a,b);if(null!=a)return a;throw new M(2,4,4025,b);}function fc(a,b){for(var c=r(gc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==hc?"":null}
|
|
88
|
+
var hc="text",jc={ua:"video",eb:"audio",X:hc,Wb:"image",xg:"application"},gc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function kc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}kc.prototype.resolve=function(){};kc.prototype.reject=function(){};function lc(a){this.h=a;this.g=void 0}lc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function mc(a){this.h=a;this.g=null}mc.prototype.R=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};mc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Nb=function(){this.stop();this.h();return this};O.prototype.R=function(a){var b=this;this.stop();this.g=(new mc(function(){b.h()})).R(a);return this};O.prototype.Fa=function(a){var b=this;this.stop();this.g=(new mc(function(){b.g.R(a);b.h()})).R(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};L("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Fa;O.prototype.tickAfter=O.prototype.R;
|
|
89
|
+
O.prototype.tickNow=O.prototype.Nb;function nc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function oc(a){return""!=pc().canPlayType(a)}function qc(){return rc("Xbox One")}function sc(){return rc("Tizen")}function tc(){return rc("Web0S")&&rc("Chrome/38.0.2125.122 Safari/537.36")}function uc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!sc()&&!rc("PC=EOS")&&!rc("VirginMedia")&&!vc()&&!rc("AFT")}function vc(){return rc("PlayStation 4")}
|
|
90
|
+
function wc(){if(!uc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function rc(a){return(navigator.userAgent||"").includes(a)}function pc(){if(xc)return xc;yc||(yc=new O(function(){xc=null}));(xc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(xc=document.createElement("video"));yc.R(1);return xc}var yc=null,xc=null;function zc(){}
|
|
91
|
+
function Ac(a){if(!a)return"";a=Db(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!vc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
92
92
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
93
|
-
function
|
|
94
|
-
function
|
|
95
|
-
function
|
|
96
|
-
|
|
93
|
+
function Bc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new M(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Gb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Cc.value()(d)}
|
|
94
|
+
function Dc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Db(a);if(239==c[0]&&187==c[1]&&191==c[2])return Ac(c);if(254==c[0]&&255==c[1])return Bc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Bc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Bc(a,!1);if(0==c[1]&&0==c[3])return Bc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Ac(a);throw new M(2,2,2003);}
|
|
95
|
+
function Ec(a){if(window.TextEncoder&&!vc()){var b=new TextEncoder;return Eb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Eb(b)}function Fc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}L("shaka.util.StringUtils",zc);zc.resetFromCharCode=function(){Cc.g=void 0};zc.toUTF16=Fc;zc.toUTF8=Ec;zc.fromBytesAutoDetect=Dc;zc.fromUTF16=Bc;
|
|
96
|
+
zc.fromUTF8=Ac;var Cc=new lc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Va:65536};0<b.Va;b={Va:b.Va},b.Va/=2)if(a(b.Va))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Va)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Va));return e}}(b);return null});function Ic(){}function Jc(a){a=Db(a);a=Cc.value()(a);return btoa(a)}function Kc(a,b){b=void 0==b?!0:b;a=Jc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Lc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Mc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
97
97
|
function Nc(a){var b=Db(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Oc(){for(var a=Ia.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Db(d),c),c+=d.byteLength;return b}L("shaka.util.Uint8ArrayUtils",Ic);Ic.concat=Oc;Ic.toHex=Nc;Ic.fromHex=Mc;Ic.fromBase64=Lc;Ic.toBase64=Kc;Ic.toStandardBase64=Jc;function Pc(){var a=this;this.o=Ib.get("muxjs")();this.h=this.g=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.o&&(this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Oc(b.initSegment,b.data))}),this.g.on("done",function(){var b={data:Oc.apply(Ic,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1}))}Pc.prototype.destroy=function(){this.g&&this.g.dispose();this.g=null;return Promise.resolve()};
|
|
98
98
|
function Qc(a,b){if(!Ib.get("muxjs")()||!Rc(a))return!1;if(b)return MediaSource.isTypeSupported(Sc(b,a));b=Sc("audio",a);a=Sc("video",a);return MediaSource.isTypeSupported(b)||MediaSource.isTypeSupported(a)}function Rc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
99
|
-
function Sc(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","audio"));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){var c="avc1.",d=a[1],e=Number(a[2]);c=("66"==d?c+"4200":"77"==d?c+"4d00":c+"6400")+(e>>4).toString(16);c+=(e&15).toString(16);b=b.replace(a[0],c)}return b}function Tc(a,b){a.l=!0;a.h=new
|
|
99
|
+
function Sc(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","audio"));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){var c="avc1.",d=a[1],e=Number(a[2]);c=("66"==d?c+"4200":"77"==d?c+"4d00":c+"6400")+(e>>4).toString(16);c+=(e&15).toString(16);b=b.replace(a[0],c)}return b}function Tc(a,b){a.l=!0;a.h=new kc;a.m=[];a.j=[];a.i=[];b=Db(b);a.g.push(b);a.g.flush();a.l&&a.h.reject(new M(2,3,3018));return a.h};function Uc(){}function Vc(a,b){b&&(a+='; codecs="'+b+'"');return a}function Wc(a,b,c){b=Vc(a,b);if(Rc(b)){if(Ib.get("muxjs")())return Sc(c,b)}else if("video/mp2t"!=a&&"audio"==c)return b.replace("video","audio");return b}
|
|
100
100
|
function Xc(a){var b=Yc(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
|
|
101
101
|
case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Zc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Yc(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}L("shaka.util.MimeUtils",Uc);Uc.getFullType=Vc;
|
|
102
102
|
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function $c(a){this.i=null;this.j=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.B="";this.o=new Map}function ad(a){return bd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}$c.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
103
|
-
function cd(a,b,c,d){var e,f,g,h;return
|
|
104
|
-
$c.prototype.remove=function(a,b){var c=this;return
|
|
103
|
+
function cd(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.i||!a.j)return k.return();if(null==c||null==d)return a.i.parseInit(Db(b)),k.return();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.i.parseMedia(Db(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.j.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);A(k)})}
|
|
104
|
+
$c.prototype.remove=function(a,b){var c=this;return J(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));A(d)})};function dd(a,b,c){a.l=b;a.m=c}function ed(a,b,c){a.B=b;if(b=a.o.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
|
|
105
105
|
function fd(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new fb(c.startTime,c.endTime,c.text)});return b}function gd(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())gd(a,d.value,c)}
|
|
106
106
|
function hd(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);gd(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.B&&a.j.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
107
107
|
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}L("shaka.text.TextEngine",$c);$c.prototype.destroy=$c.prototype.destroy;$c.findParser=function(a){return bd[a]};$c.unregisterParser=function(a){delete bd[a]};$c.registerParser=function(a,b){bd[a]=b};var bd={};function id(){}function jd(a,b){a=kd(a);b=kd(b);return a.split("-")[0]==b.split("-")[0]}function ld(a,b){a=kd(a);b=kd(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function md(a,b){a=kd(a);b=kd(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function kd(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=nd.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
|
|
108
|
-
function od(a,b){a=kd(a);b=kd(b);return b==a?4:ld(b,a)?3:md(b,a)?2:ld(a,b)?1:0}function
|
|
109
|
-
function
|
|
110
|
-
id.getLocaleForText=function(a){return kd(a.language||"und")};id.getBase=
|
|
108
|
+
function od(a,b){a=kd(a);b=kd(b);return b==a?4:ld(b,a)?3:md(b,a)?2:ld(a,b)?1:0}function sd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=nd.get(a)||a}function ud(a){return a.language?kd(a.language):a.audio&&a.audio.language?kd(a.audio.language):a.video&&a.video.language?kd(a.video.language):"und"}
|
|
109
|
+
function vd(a,b){a=kd(a);var c=new Set,d=r(b);for(b=d.next();!b.done;b=d.next())c.add(kd(b.value));d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,ld(b,a))return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,md(b,a))return b;c=r(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,ld(a,b))return b;return null}L("shaka.util.LanguageUtils",id);id.findClosestLocale=vd;id.getLocaleForVariant=ud;
|
|
110
|
+
id.getLocaleForText=function(a){return kd(a.language||"und")};id.getBase=sd;id.relatedness=od;id.areSiblings=function(a,b){var c=sd(a),d=sd(b);return a!=c&&b!=d&&c==d};id.normalize=kd;id.isSiblingOf=md;id.isParentOf=ld;id.areLanguageCompatible=jd;id.areLocaleCompatible=function(a,b){a=kd(a);b=kd(b);return a==b};
|
|
111
111
|
var nd=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
|
|
112
112
|
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
|
|
113
113
|
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
|
|
114
114
|
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
115
115
|
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
116
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function
|
|
117
|
-
function
|
|
118
|
-
function
|
|
119
|
-
function
|
|
120
|
-
function
|
|
121
|
-
function
|
|
122
|
-
function
|
|
123
|
-
function
|
|
124
|
-
f.codecs=g}if(
|
|
125
|
-
function
|
|
116
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function wd(){this.g={}}q=wd.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function xd(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function yd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=zd(f,b,c);f=Ad(f,d);b=Bd(f);b=Cd(b);var g=Dd(b,e);a.variants=a.variants.filter(function(h){return Ed(h)==g?!0:!1})}function Bd(a){var b=new wd;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Ed(c);b.push(d,c)}return b}
|
|
117
|
+
function Cd(a){var b=0,c=new Map,d=a.size();xd(a,function(e,f){f=r(f);for(var g=f.next();!g.done;g=f.next()){g=g.value;var h=g.video;if(h&&h.width&&h.height){h=h.width*h.height*(h.frameRate||1);c.has(h)||c.set(h,new wd);var k=c.get(h);k.push(e,g);k.size()===d&&(b=Math.max(b,h))}}});return b?c.get(b):a}
|
|
118
|
+
function zd(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={vd:d.vd},e=b.next())if(d.vd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.vd)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={gd:d.gd},b=c.next())if(d.gd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.gd)}}(d)),b.length){a=b;break}return a}
|
|
119
|
+
function Dd(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==Fd||c==Gd){if(a=Hd(a,c),1==a.size())return a.keys()[0]}else if(c==Id)break;return Jd(a)}function Hd(a,b){var c=0,d=new wd;xd(a,function(e,f){for(var g=0,h=0,k=r(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
|
|
120
|
+
function Jd(a){var b="",c=Infinity;xd(a,function(d,e){var f=0,g=0;e=r(e);for(var h=e.next();!h.done;h=e.next())f+=h.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Ed(a){var b="";a.video&&(b=Xc(a.video.codecs));var c="";a.audio&&(c=Xc(a.audio.codecs));return b+"-"+c}function Kd(a,b,c){a.variants=a.variants.filter(function(d){return Ld(d,b,c)})}
|
|
121
|
+
function Ld(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;if(0!=a.disabledUntilTime){if(a.disabledUntilTime>Date.now()/1E3)return!1;a.disabledUntilTime=0}return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
|
|
122
|
+
function Md(a,b,c){var d=!1;a=r(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Ld(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Nd(a,b){return J(function(c){if(1==c.g)return u(c,Od(b,0<b.offlineSessionIds.length),2);Pd(a,b);Qd(b);return u(c,Rd(b),0)})}
|
|
123
|
+
function Od(a,b){return J(function(c){if(1==c.g)return u(c,Sd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Td(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ec("video",g);f=Td(f);g=ec("audio",g);g=Ud(g);var h=Wc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;f=[f,g].join()}g=Wc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(g))return!1;e.codecs=f}if(f=d.audio){g=Ud(f.codecs);h=Wc(f.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;
|
|
124
|
+
f.codecs=g}if(qc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(Vd(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||Za(Vd(d));return e});A(c)})}
|
|
125
|
+
function Sd(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return J(function(y){if(d=a.some(function(x){return x.decodingInfos.length}))return y.return();e=navigator.mediaCapabilities;f=[];g=function(x,v){var w;return J(function(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(v),4);if(2!=D.g)return w=D.h,x.decodingInfos.push(w),ua(D,0);F(D);JSON.stringify(v);A(D)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Wd(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return u(y,Promise.all(f),
|
|
126
126
|
0)})}
|
|
127
|
-
function
|
|
128
|
-
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=
|
|
129
|
-
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),
|
|
127
|
+
function Wd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ec("video",g);f=Td(f);g=ec("audio",g);g=Wc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Td(f);f=Wc(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
128
|
+
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Ud(d.codecs),f=Wc(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
|
|
129
|
+
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),y=t.next();!y.done;y=t.next())n.add(y.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
130
130
|
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
|
|
131
|
-
function
|
|
132
|
-
function
|
|
133
|
-
function
|
|
134
|
-
function
|
|
131
|
+
function Ud(a){return sc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function Td(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Pd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Xd(d,a.audio)||c&&a&&a.video&&!Xd(c,a.video)?!1:!0})}
|
|
132
|
+
function Qd(a){a.textStreams=a.textStreams.filter(function(b){return ad(Vc(b.mimeType,b.codecs))})}function Rd(a){var b,c,d,e,f,g,h,k;return J(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;if(Yd.has(f)){l.A(5);break}g=Zd.get(f);if(!g){Yd.set(f,!1);l.A(5);break}return u(l,$d(g),7);case 7:h=l.h,Yd.set(f,h);case 5:(k=Yd.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,A(l)}})}
|
|
133
|
+
function $d(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function Xd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
134
|
+
function ae(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=r(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=r(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
135
135
|
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,
|
|
136
|
-
a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
|
|
137
|
-
function
|
|
136
|
+
a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null,a.hdr=c.hdr||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
|
|
137
|
+
function be(a){return{id:a.id,active:!1,type:hc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
|
|
138
138
|
originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
|
|
139
|
-
function
|
|
140
|
-
audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function
|
|
141
|
-
function
|
|
142
|
-
function
|
|
143
|
-
originalTextId:null,originalImageId:null}}function
|
|
144
|
-
function
|
|
145
|
-
function
|
|
146
|
-
|
|
147
|
-
function
|
|
148
|
-
var
|
|
139
|
+
function ce(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
|
|
140
|
+
audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function de(a){a.__shaka_id||(a.__shaka_id=ee++);return a.__shaka_id}
|
|
141
|
+
function fe(a){var b=ge(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function he(a){var b=ge(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
|
|
142
|
+
function ge(a){return{id:de(a),active:!1,type:"",bandwidth:0,language:kd(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
|
|
143
|
+
originalTextId:null,originalImageId:null}}function ie(a){return a.allowedByApplication&&a.allowedByKeySystem}function je(a){return a.filter(function(b){return ie(b)})}
|
|
144
|
+
function Ad(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;a=c.filter(function(g){return g<=b});return a.length?d.get(Math.max.apply(Math,ia(a))):d.get(Math.min.apply(Math,ia(c)))}
|
|
145
|
+
function ke(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=vd(kd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return kd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=le(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce($b,[]);return a.length?
|
|
146
|
+
le(e,a[0]):e}function le(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Vd(a){var b=[];a.audio&&b.push(me(a.audio));a.video&&b.push(me(a.video));return b.join(", ")}
|
|
147
|
+
function me(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
|
|
148
|
+
var ee=0,Fd="smooth",Gd="powerEfficient",Id="bandwidth",Yd=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Zd=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function ne(){var a=this;this.l=null;this.o=!1;this.i=new Sa;navigator.connection&&navigator.connection.addEventListener&&(this.u=function(){if(a.o&&a.g.useNetworkInformation){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}},navigator.connection.addEventListener("change",this.u));this.m=[];this.B=1;this.F=!1;this.u=this.h=this.j=this.g=this.s=null;this.D=new O(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}q=ne.prototype;
|
|
149
149
|
q.stop=function(){this.l=null;this.o=!1;this.m=[];this.B=1;this.j=this.s=null;this.h&&(this.h.disconnect(),this.h=null);this.D.stop()};q.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.u),this.u=null);this.D=null};q.init=function(a){this.l=a};
|
|
150
150
|
q.chooseVariant=function(){var a=Infinity,b=Infinity;this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientWidth*b,b*=this.j.clientHeight);a=oe(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(pe(this));this.m.length&&!a.length&&(a=oe(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.B)?1:Math.abs(this.B),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},
|
|
151
151
|
k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.s=Date.now();return c};q.enable=function(){this.o=!0};q.disable=function(){this.o=!1};
|
|
152
152
|
q.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.F){a=this.i;if(!(a.g>=a.i))break a;this.F=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(pe(this));a&&this.l(a)}};q.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(pe(this))};q.setVariants=function(a){this.m=a};q.playbackRateChanged=function(a){this.B=a};
|
|
153
153
|
q.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.R(qe)}),this.h.observe(this.j))};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function pe(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
|
|
154
|
-
function oe(a,b,c,d){a&&(b=b.filter(function(e){return
|
|
155
|
-
|
|
154
|
+
function oe(a,b,c,d){a&&(b=b.filter(function(e){return Ld(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}L("shaka.abr.SimpleAbrManager",ne);ne.prototype.configure=ne.prototype.configure;ne.prototype.setMediaElement=ne.prototype.setMediaElement;ne.prototype.playbackRateChanged=ne.prototype.playbackRateChanged;ne.prototype.setVariants=ne.prototype.setVariants;ne.prototype.getBandwidthEstimate=ne.prototype.getBandwidthEstimate;ne.prototype.segmentDownloaded=ne.prototype.segmentDownloaded;
|
|
155
|
+
ne.prototype.disable=ne.prototype.disable;ne.prototype.enable=ne.prototype.enable;ne.prototype.chooseVariant=ne.prototype.chooseVariant;ne.prototype.init=ne.prototype.init;ne.prototype.release=ne.prototype.release;ne.prototype.stop=ne.prototype.stop;var qe=1;function re(a,b){this.g=a;this.h=b}re.prototype.toString=function(){return"v"+this.g+"."+this.h};function se(){var a=new re(5,0),b=te,c=b.g,d=a.h-c.h;(0<(a.g-c.g||d)?b.i:b.h)(b.g,a,"AbrManager","Please use an AbrManager with setMediaElement function.")}function ue(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function ve(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var te=null;function we(a,b){this.h=a;this.g=new Set([a]);b=b||[];a=r(b);for(b=a.next();!b.done;b=a.next())this.add(b.value)}we.prototype.add=function(a){return xe(this.h,a)?(this.g.add(a),!0):!1};
|
|
156
156
|
function xe(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&ye(c,d)&&ze(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(a=a.video,b=b.video,c=!(ye(a,b)&&ze(a.roles,b.roles)));return c?!1:!0}we.prototype.values=function(){return this.g.values()};
|
|
157
157
|
function ye(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Yc(d)[0]});b=b.codecs.split(",").map(function(d){return Yc(d)[0]});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function ze(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Ae(a){this.g=a;this.h=new Be(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Ae.prototype.create=function(a){var b=this,c=a.filter(function(d){return xe(b.g,d)});return c.length?new we(c[0],c):this.h.create(a)};function Be(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
|
|
158
|
-
Be.prototype.create=function(a){var b=[];b=Ce(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=De(b,this.j);a.length&&(b=a);this.g&&(a=
|
|
158
|
+
Be.prototype.create=function(a){var b=[];b=Ce(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=De(b,this.j);a.length&&(b=a);this.g&&(a=Ad(b,this.g),a.length&&(b=a));this.h&&(a=Ee(b,this.h),a.length&&(b=a));a=new we(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,xe(a.h,c)&&a.add(c);return a};function Ce(a,b){b=kd(b);var c=vd(b,a.map(function(d){return ud(d)}));return c?a.filter(function(d){return c==ud(d)}):[]}
|
|
159
159
|
function De(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ee(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Fe(){this.g=Ge;this.h=(new Map).set(Ge,2).set(He,1)}function Ie(a,b,c){a.h.set(Ge,c).set(He,b)}var He=0,Ge=1;function Je(a,b){var c=Ke();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
160
|
-
function Le(a){var b,c;return
|
|
160
|
+
function Le(a){var b,c;return J(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new M(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new O(e)).R(c/1E3)}),2)}a.h*=a.m;A(d)})}function Ke(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Me(a,b){this.promise=a;this.i=b;this.g=!1}function Ne(a){return new Me(Promise.reject(a),function(){return Promise.resolve()})}function Oe(){var a=Promise.reject(new M(2,7,7001));a.catch(function(){});return new Me(a,function(){return Promise.resolve()})}function Pe(a){return new Me(Promise.resolve(a),function(){return Promise.resolve()})}function Qe(a){return new Me(a,function(){return a.catch(function(){})})}Me.prototype.abort=function(){this.g=!0;return this.i()};
|
|
161
161
|
function Re(a){return new Me(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Me.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
162
|
-
Me.prototype.aa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Se(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new
|
|
162
|
+
Me.prototype.aa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Se(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new kc,g=new M(2,7,7001);this.promise.then(c(!0),c(!1));return new Me(f,function(){return d()})};
|
|
163
163
|
function Se(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}L("shaka.util.AbortableOperation",Me);Me.prototype.chain=Me.prototype.aa;Me.prototype["finally"]=Me.prototype.finally;Me.all=Re;Me.prototype.abort=Me.prototype.abort;Me.notAbortable=Qe;Me.completed=Pe;Me.aborted=Oe;Me.failed=Ne;function Q(a,b){if(b)if(b instanceof Map)for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
164
164
|
function Te(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};L("shaka.util.FakeEvent",Q);
|
|
165
|
-
var Ue={
|
|
166
|
-
$g:"trackschanged",bh:"unloading",dh:"variantchanged"};function Ve(){this.ea=new
|
|
167
|
-
Ve.prototype.release=function(){this.ea=null};function We(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Xe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ye(){this.g=[]}function Ze(a,b){a.g.push(b.finally(function(){cb(a.g,b)}))}Ye.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function $e(a,b,c){Ve.call(this);this.i=!1;this.m=new Ye;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa($e,Ve);q=$e.prototype;q.
|
|
165
|
+
var Ue={zg:"abrstatuschanged",Ag:"adaptation",Bg:"buffering",Cg:"downloadfailed",Dg:"downloadheadersreceived",Eg:"drmsessionupdate",Gg:"emsg",Error:"error",Hg:"expirationupdated",Ig:"gapjumped",Jg:"loaded",Kg:"loading",Mg:"manifestparsed",Ng:"mediaqualitychanged",Metadata:"metadata",Og:"onstatechange",Pg:"onstateidle",Qg:"ratechange",Sg:"sessiondata",Tg:"stalldetected",Ug:"streaming",Vg:"textchanged",Wg:"texttrackvisibility",Xg:"timelineregionadded",Yg:"timelineregionenter",Zg:"timelineregionexit",
|
|
166
|
+
$g:"trackschanged",bh:"unloading",dh:"variantchanged"};function Ve(){this.ea=new wd;this.Rc=this}Ve.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};Ve.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};Ve.prototype.dispatchEvent=function(a){if(!this.ea)return!0;var b=this.ea.get(a.type)||[],c=this.ea.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Rc;a.currentTarget=this.Rc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
167
|
+
Ve.prototype.release=function(){this.ea=null};function We(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Xe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ye(){this.g=[]}function Ze(a,b){a.g.push(b.finally(function(){cb(a.g,b)}))}Ye.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function $e(a,b,c){Ve.call(this);this.i=!1;this.m=new Ye;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa($e,Ve);q=$e.prototype;q.de=function(a){this.o=a};function af(a,b,c,d){c=c||bf;var e=cf[a];if(!e||c>=e.priority)cf[a]={priority:c,$f:b,ag:void 0===d?!1:d}}q.bg=function(a){this.g.add(a)};q.sg=function(a){this.g.delete(a)};q.gf=function(){this.g.clear()};q.cg=function(a){this.h.add(a)};q.tg=function(a){this.h.delete(a)};q.hf=function(){this.h.clear()};
|
|
168
168
|
function df(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Ve.prototype.release.call(this);return this.m.destroy()};
|
|
169
169
|
q.request=function(a,b){var c=this,d=new ef;if(this.i){var e=Promise.reject(new M(2,7,7001));e.catch(function(){});return new ff(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?We(b.retryParameters):Ke();b.uris=We(b.uris);e=gf(this,a,b);var f=e.aa(function(){return hf(c,a,b,new Je(b.retryParameters,!1),0,null,d)}),g=f.aa(function(p){return jf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
170
|
-
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.aa(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.
|
|
171
|
-
function gf(a,b,c){var d=Pe(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={
|
|
172
|
-
function hf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Lb(c.uris[e]),k=h.Ha,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Mb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=cf[k])?k
|
|
173
|
-
if(!p)return w;var D=c.retryParameters.connectionTimeout;D&&(n=new O(function(){
|
|
170
|
+
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.aa(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.Of||!c.l||t.fromCache||"HEAD"==b.method||a!=kf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new ff(m.promise,function(){return m.abort()},d);Ze(this.m,e);return e};
|
|
171
|
+
function gf(a,b,c){var d=Pe(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={qd:e.qd},f=a.next())e.qd=f.value,d=d.aa(function(g){return function(){c.body&&(c.body=Eb(c.body));return g.qd(b,c)}}(e));return d.aa(void 0,function(g){if(g instanceof M&&7001==g.code)throw g;throw new M(2,1,1006,g);})}
|
|
172
|
+
function hf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Lb(c.uris[e]),k=h.Ha,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Mb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=cf[k])?k.$f:null;if(!m)return Ne(new M(2,1,1E3,h));var p=k.ag,n=null,t=null,y=!1,x=!1,v;return Qe(Le(d)).aa(function(){if(a.i)return Oe();v=Date.now();var w=m(c.uris[e],c,b,function(B,G,E){n&&n.stop();t&&t.R(z/1E3);a.l&&b==kf&&(a.l(B,G),l=!0,g.g=E)},function(B){a.j&&a.j(B,c,b);x=!0});
|
|
173
|
+
if(!p)return w;var D=c.retryParameters.connectionTimeout;D&&(n=new O(function(){y=!0;w.abort()}),n.R(D/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new O(function(){y=!0;w.abort()}));return w}).aa(function(w){n&&n.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-v);var D={response:w,Of:l};!x&&a.j&&a.j(w.headers,c,b);return D},function(w){n&&n.stop();t&&t.stop();if(a.s){var D=null,z=0;w instanceof M&&(D=w,1001==w.code&&(z=w.data[1]));a.s(c,D,z,y)}if(a.i)return Oe();y&&(w=new M(1,1,1003,
|
|
174
174
|
c.uris[e],b));if(w instanceof M){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new Q("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,hf(a,b,c,d,e,w,g)}throw w;})}
|
|
175
|
-
function jf(a,b,c){var d=Pe(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={
|
|
176
|
-
$e.defaultRetryParameters=function(){return Ke()};$e.prototype.clearAllResponseFilters=$e.prototype.hf;$e.prototype.unregisterResponseFilter=$e.prototype.
|
|
177
|
-
$e.NumBytesRemainingClass=ef;function ff(a,b,c){Me.call(this,a,b);this.h=c}pa(ff,Me);$e.PendingRequest=ff;var kf=1;$e.RequestType={MANIFEST:0,SEGMENT:kf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var bf=3;$e.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:bf};var cf={};function lf(a){this.g=!1;this.h=new
|
|
175
|
+
function jf(a,b,c){var d=Pe(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={rd:e.rd},f=a.next())e.rd=f.value,d=d.aa(function(g){return function(){var h=c.response;h.data&&(h.data=Eb(h.data));return g.rd(b,h)}}(e));return d.aa(function(){return c},function(g){var h=2;if(g instanceof M){if(7001==g.code)throw g;h=g.severity}throw new M(h,1,1007,g);})}L("shaka.net.NetworkingEngine",$e);$e.prototype.request=$e.prototype.request;$e.prototype.destroy=$e.prototype.destroy;$e.makeRequest=df;
|
|
176
|
+
$e.defaultRetryParameters=function(){return Ke()};$e.prototype.clearAllResponseFilters=$e.prototype.hf;$e.prototype.unregisterResponseFilter=$e.prototype.tg;$e.prototype.registerResponseFilter=$e.prototype.cg;$e.prototype.clearAllRequestFilters=$e.prototype.gf;$e.prototype.unregisterRequestFilter=$e.prototype.sg;$e.prototype.registerRequestFilter=$e.prototype.bg;$e.unregisterScheme=function(a){delete cf[a]};$e.registerScheme=af;$e.prototype.setForceHTTPS=$e.prototype.de;function ef(){this.g=0}
|
|
177
|
+
$e.NumBytesRemainingClass=ef;function ff(a,b,c){Me.call(this,a,b);this.h=c}pa(ff,Me);$e.PendingRequest=ff;var kf=1;$e.RequestType={MANIFEST:0,SEGMENT:kf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var bf=3;$e.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:bf};var cf={};function lf(a){this.g=!1;this.h=new kc;this.i=a}lf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function mf(a,b){if(a.g){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function nf(){this.g=new wd}q=nf.prototype;q.release=function(){this.ob();this.g=null};q.C=function(a,b,c,d){this.g&&(a=new of(a,b,c,d),this.g.push(b,a))};q.ia=function(a,b,c,d){function e(g){f.yc(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};q.yc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.yc(),this.g.remove(b,e))}};
|
|
178
178
|
q.ob=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.yc();this.g.g={}}};L("shaka.util.EventManager",nf);nf.prototype.removeAll=nf.prototype.ob;nf.prototype.unlisten=nf.prototype.yc;nf.prototype.listenOnce=nf.prototype.ia;nf.prototype.listen=nf.prototype.C;nf.prototype.release=nf.prototype.release;function of(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=pf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
179
179
|
of.prototype.yc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function pf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return qf(a)?b:b.capture||!1}
|
|
180
|
-
function qf(a){var b=rf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}rf=b}return b||!1}var rf=void 0;function sf(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function tf(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function uf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function vf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function wf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function xf(a,b){this.S=Gb(a);this.h=b==yf;this.g=0}q=xf.prototype;q.oa=function(){return this.g<this.S.byteLength};q.ba=function(){return this.g};q.
|
|
180
|
+
function qf(a){var b=rf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}rf=b}return b||!1}var rf=void 0;function sf(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function tf(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function uf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function vf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function wf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function xf(a,b){this.S=Gb(a);this.h=b==yf;this.g=0}q=xf.prototype;q.oa=function(){return this.g<this.S.byteLength};q.ba=function(){return this.g};q.xf=function(){return this.S.byteLength};q.Sa=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw zf();}};q.Vd=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw zf();}};q.N=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw zf();}};
|
|
181
181
|
q.Le=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw zf();}};q.Lb=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw zf();}if(2097151<b)throw new M(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.$a=function(a){if(this.g+a>this.S.byteLength)throw zf();var b=Db(this.S,this.g,a);this.g+=a;return b};
|
|
182
|
-
q.skip=function(a){if(this.g+a>this.S.byteLength)throw zf();this.g+=a};q.
|
|
183
|
-
xf.prototype.skip=xf.prototype.skip;xf.prototype.readBytes=xf.prototype.$a;xf.prototype.readUint64=xf.prototype.Lb;xf.prototype.readInt32=xf.prototype.Le;xf.prototype.readUint32=xf.prototype.N;xf.prototype.readUint16=xf.prototype.
|
|
182
|
+
q.skip=function(a){if(this.g+a>this.S.byteLength)throw zf();this.g+=a};q.ig=function(a){if(this.g<a)throw zf();this.g-=a};q.seek=function(a){if(0>a||a>this.S.byteLength)throw zf();this.g=a};q.rc=function(){for(var a=this.g;this.oa()&&0!=this.S.getUint8(this.g);)this.g+=1;a=Db(this.S,a,this.g-a);this.g+=1;return Ac(a)};function zf(){return new M(2,3,3E3)}L("shaka.util.DataViewReader",xf);xf.prototype.readTerminatedString=xf.prototype.rc;xf.prototype.seek=xf.prototype.seek;xf.prototype.rewind=xf.prototype.ig;
|
|
183
|
+
xf.prototype.skip=xf.prototype.skip;xf.prototype.readBytes=xf.prototype.$a;xf.prototype.readUint64=xf.prototype.Lb;xf.prototype.readInt32=xf.prototype.Le;xf.prototype.readUint32=xf.prototype.N;xf.prototype.readUint16=xf.prototype.Vd;xf.prototype.readUint8=xf.prototype.Sa;xf.prototype.getLength=xf.prototype.xf;xf.prototype.getPosition=xf.prototype.ba;xf.prototype.hasMoreData=xf.prototype.oa;var yf=1;xf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:yf};function Af(){this.i=[];this.h=[];this.g=!1}q=Af.prototype;q.box=function(a,b){a=Bf(a);this.i[a]=Cf;this.h[a]=b;return this};q.U=function(a,b){a=Bf(a);this.i[a]=Df;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new xf(a,0);for(this.g=!1;a.oa()&&!this.g;)this.Zc(0,a,b,c)};
|
|
184
184
|
q.Zc=function(a,b,c,d){var e=b.ba();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.ba()+8>b.S.byteLength){this.g=!0;return}f=b.Lb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Df){if(d&&b.ba()+4>b.S.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.ba(),b=0<d?b.$a(d):new Uint8Array(0),b=new xf(b,0),k({parser:this,partialOkay:c||
|
|
185
185
|
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ba(),b.S.byteLength-b.ba()))}};function Ef(a){for(var b=Ff(a);a.reader.oa()&&!a.parser.g;)a.parser.Zc(a.start+b,a.reader,a.partialOkay)}function Gf(a){for(var b=Ff(a),c=a.reader.N(),d=0;d<c&&(a.parser.Zc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Hf(a){return function(b){a(b.reader.$a(b.reader.S.byteLength-b.reader.ba()))}}
|
|
186
186
|
function Bf(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function If(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Ff(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}L("shaka.util.Mp4Parser",Af);Af.headerSize=Ff;Af.typeToString=If;Af.allData=Hf;Af.sampleDescription=Gf;Af.children=Ef;Af.prototype.parseNext=Af.prototype.Zc;Af.prototype.parse=Af.prototype.parse;Af.prototype.stop=Af.prototype.stop;
|
|
@@ -190,57 +190,57 @@ function Qf(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.nex
|
|
|
190
190
|
function Vf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Wf(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Xf(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
|
|
191
191
|
function Yf(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
192
192
|
function Zf(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function $f(a){a=Number(a);return 0===a%1?a:null}function ag(a){a=Number(a);return 0===a%1&&0<a?a:null}function bg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function cg(a){a=Number(a);return isNaN(a)?null:a}function dg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
193
|
-
function eg(a,b){var c=new DOMParser,d=fg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function gg(a,b){try{var c=
|
|
194
|
-
var fg=new
|
|
195
|
-
q.destroy=function(){return this.j.destroy()};function kg(a){return
|
|
193
|
+
function eg(a,b){var c=new DOMParser,d=fg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function gg(a,b){try{var c=Ac(a);return eg(c,b)}catch(d){return null}}
|
|
194
|
+
var fg=new lc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function hg(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.ka=this.da=!1;this.J=0;this.g=null;this.s=new nf;this.i=new Map;this.B=[];this.o=new kc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.la=new Map;this.ea=new Map;this.Z=new O(function(){return ig(c)});this.O=!1;this.M=[];this.T=!1;this.fa=(new O(function(){jg(c)})).Fa(b);this.o.catch(function(){});this.j=new lf(function(){return kg(c)});this.$=!1;this.L=this.F=null}q=hg.prototype;
|
|
195
|
+
q.destroy=function(){return this.j.destroy()};function kg(a){return J(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.fa.stop(),a.fa=null,a.Z.stop(),a.Z=null,u(b,lg(a),2);case 2:if(!a.l){b.A(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.u=null,a.B=[],a.h=null,a.m=function(){},a.D=null,a.$=!1,a.F=null,A(b)}})}q.configure=function(a){this.h=a};
|
|
196
196
|
function mg(a,b,c){a.ka=!0;a.B=[];a.O=c;return ng(a,b)}function og(a,b,c){a.B=c;a.O=0<c.length;return ng(a,b)}
|
|
197
197
|
function pg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return qg(a,g,[])}
|
|
198
|
-
function ng(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,x,
|
|
199
|
-
return u(
|
|
200
|
-
function wg(a,b){return
|
|
201
|
-
q.Zb=function(a){var b=this;return
|
|
198
|
+
function ng(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D;return J(function(z){if(1==z.g){if(c=rg(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});g||(h=uf(a.h.servers),sg(b,h));k=new Set;l=r(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,p=tg(m),n=r(p),t=n.next();!t.done;t=n.next())y=t.value,k.add(y);x=r(k);for(t=x.next();!t.done;t=
|
|
199
|
+
x.next())v=t.value,ug(v,uf(a.h.servers),uf(a.h.advanced||{}),a.h.keySystemsMapping);return u(z,Sd(b,a.O,a.$),2)}w=g||Object.keys(a.h.servers).length;if(!w)return a.da=!0,z.return(Promise.resolve());D=qg(a,void 0,b);return z.return(g?D:D.catch(function(){}))})}
|
|
200
|
+
function vg(a){var b;return J(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.F){c.A(2);break}return u(c,a.F,3);case 3:return mf(a.j),c.return();case 2:return C(c,4),a.F=a.l.setMediaKeys(a.u),u(c,a.F,6);case 6:ua(c,5);break;case 4:b=F(c),a.m(new M(2,6,6003,b.message));case 5:mf(a.j),A(c)}})}function wg(a,b){return J(function(c){if(1==c.g)return u(c,vg(a),2);xg(a,b.initDataType,Db(b.initData));A(c)})}
|
|
201
|
+
q.Zb=function(a){var b=this;return J(function(c){if(1==c.g){if(!b.u)return b.s.ia(a,"encrypted",function(){b.m(new M(2,6,6010))}),c.return();b.l=a;b.s.ia(b.l,"play",function(){for(var d=r(b.M),e=d.next();!e.done;e=d.next())yg(b,e.value);b.T=!0;b.M=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return lg(b)});b.L=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.L||"com.apple.fps"!==b.g.keySystem||
|
|
202
202
|
b.B.length?u(c,vg(b),2):c.A(2)}zg(b);b.L||b.B.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(d){return wg(b,d)});A(c)})};
|
|
203
|
-
function Ag(a){var b,c,d,e,f;return
|
|
204
|
-
C(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=
|
|
205
|
-
function zg(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,xg(a,d.initDataType,d.initData);c=r(a.B);for(d=c.next();!d.done;d=c.next())Cg(a,d.value);b.length||a.B.length||a.o.resolve();return a.o}function xg(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Bb(c,e.value.initData)&&!
|
|
203
|
+
function Ag(a){var b,c,d,e,f;return J(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=df([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.lb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Db(d.data);ua(g,4);break;case 3:throw e=F(g),new M(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
204
|
+
C(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=F(g),new M(2,6,6004,f.message);}})}function Bg(a,b){var c,d,e;return J(function(f){if(1==f.g)return u(f,Cg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Ka=new kc,d.push(e.Ka);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);A(f)})}
|
|
205
|
+
function zg(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,xg(a,d.initDataType,d.initData);c=r(a.B);for(d=c.next();!d.done;d=c.next())Cg(a,d.value);b.length||a.B.length||a.o.resolve();return a.o}function xg(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Bb(c,e.value.initData)&&!rc("Tizen 2"))return;0<a.i.size&&Dg(a)&&(a.o.resolve(),a.o=new kc,a.o.catch(function(){}));Eg(a,b,c,a.g.sessionType)}}
|
|
206
206
|
function Fg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Gg(a){a=a.i.keys();a=sf(a,function(b){return b.sessionId});return Array.from(a)}q.hc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Nc=function(){return vf(this.ea)};
|
|
207
|
-
function qg(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,x
|
|
208
|
-
f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],
|
|
209
|
-
D.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),z=[],B=[],
|
|
210
|
-
w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:
|
|
211
|
-
function Hg(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(tg(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new M(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={
|
|
212
|
-
l.
|
|
213
|
-
function Ig(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,x,
|
|
214
|
-
w.h,w.return(c);case 6:
|
|
215
|
-
function rg(a){a=uf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){f=Mc(f);e=Mc(e);e={kty:"oct",kid:Kc(f,!1),k:Kc(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Db(
|
|
207
|
+
function qg(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x;return J(function(v){switch(v.g){case 1:d=new Map;if(c.length){e=Hg(a,c,d);v.A(2);break}return u(v,Ig(a,b),3);case 3:e=v.h;case 2:f=e;if(!f)throw new M(2,6,6001);mf(a.j);C(v,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.G.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.G.add(t.contentType.toLowerCase());if(c.length){var w=
|
|
208
|
+
f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],G=[],E=[],H=new Set;Jg(D,z,G,B,E,H);var I=a.O?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||I,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};D=r(D);for(z=D.next();!z.done;z=
|
|
209
|
+
D.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),z=[],B=[],G=[],E=[],H=new Set,Jg(w.drmInfos,z,G,B,E,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
|
|
210
|
+
w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new M(2,6,6012,a.g.keySystem);return u(v,f.createMediaKeys(),6);case 6:return y=v.h,mf(a.j),a.u=y,a.da=!0,u(v,Ag(a),7);case 7:mf(a.j);ua(v,0);break;case 4:x=F(v);mf(a.j,x);a.g=null;a.G.clear();if(x instanceof M)throw x;throw new M(2,6,6002,x.message);}})}
|
|
211
|
+
function Hg(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(tg(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new M(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={od:d.od},e=a.next())for(d.od=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
212
|
+
l.od}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
213
|
+
function Ig(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v;return J(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new M(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.A(4);break}k=h.value;if(!b.has(k)){w.A(3);break}l=b.get(k);C(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
214
|
+
w.h,w.return(c);case 6:F(w);case 7:mf(a.j);case 3:h=g.next();w.A(2);break;case 4:m=r([!0,!1]),p=m.next();case 9:if(p.done){w.A(11);break}n=p.value;t=r(b.keys());h=t.next();case 12:if(h.done){p=m.next();w.A(9);break}y=h.value;x=b.get(y);v=x.drmInfos.some(function(D){return!!D.licenseServerUri});if(v!=n){w.A(13);break}C(w,15);return u(w,navigator.requestMediaKeySystemAccess(y,[x]),17);case 17:return c=w.h,w.return(c);case 15:F(w);case 16:mf(a.j);case 13:h=t.next();w.A(12);break;case 11:return w.return(c)}})}
|
|
215
|
+
function rg(a){a=uf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){f=Mc(f);e=Mc(e);e={kty:"oct",kid:Kc(f,!1),k:Kc(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Db(Ec(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
216
216
|
serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
217
|
-
function Cg(a,b){var c,d,e,f,g;return
|
|
218
|
-
h.h;mf(a.j);if(!f)return a.i.delete(c),a.m(new M(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Dg(a)&&a.o.resolve();return h.return(c);case 2:g=
|
|
219
|
-
function Eg(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.m(new M(2,6,6005,f.message));return}a.s.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.T?a.M.push(f):yg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Kg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,
|
|
217
|
+
function Cg(a,b){var c,d,e,f,g;return J(function(h){switch(h.g){case 1:try{c=a.u.createSession("persistent-license")}catch(k){return d=new M(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.s.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.T?a.M.push(k):yg(a,k)});a.s.C(c,"keystatuseschange",function(k){return Kg(a,k)});e={initData:null,initDataType:null,loaded:!1,Sd:Infinity,Ka:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=
|
|
218
|
+
h.h;mf(a.j);if(!f)return a.i.delete(c),a.m(new M(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Dg(a)&&a.o.resolve();return h.return(c);case 2:g=F(h),mf(a.j,g),a.i.delete(c),a.m(new M(2,6,6005,g.message));case 3:return h.return(Promise.resolve())}})}
|
|
219
|
+
function Eg(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.m(new M(2,6,6005,f.message));return}a.s.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.T?a.M.push(f):yg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Kg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Sd:Infinity,Ka:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof M||(b=new M(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Kc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
220
220
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new M(2,6,6006,f.message,f,h))}})}
|
|
221
|
-
function yg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,x
|
|
222
|
-
Fg(a.g.keySystem)&&Lg(g),h=Date.now(),C(v,2),l=a.D.lb.request(2,g),u(v,l.promise,4);case 4:k=v.h;ua(v,3);break;case 2:return m=
|
|
223
|
-
d&&(d.Ka&&d.Ka.resolve(),
|
|
224
|
-
function Lg(a){var b=
|
|
225
|
-
function Kg(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Fg(a.g.keySystem)&&16==g.byteLength&&(navigator.userAgent.match(/Edge?\//)||
|
|
221
|
+
function yg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;J(function(v){switch(v.g){case 1:return c=b.target,a.h.logLicenseExchange&&Kc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=df([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
|
|
222
|
+
Fg(a.g.keySystem)&&Lg(g),h=Date.now(),C(v,2),l=a.D.lb.request(2,g),u(v,l.promise,4);case 4:k=v.h;ua(v,3);break;case 2:return m=F(v),p=new M(2,6,6007,m),a.m(p),d&&d.Ka&&d.Ka.reject(p),v.return();case 3:if(a.j.g)return v.return();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Kc(k.data);C(v,5);return u(v,c.update(k.data),7);case 7:ua(v,6);break;case 5:return n=F(v),t=new M(2,6,6008,n.message),a.m(t),d&&d.Ka&&d.Ka.reject(t),v.return();case 6:if(a.j.g)return v.return();y=new Q("drmsessionupdate");a.D.onEvent(y);
|
|
223
|
+
d&&(d.Ka&&d.Ka.resolve(),x=new O(function(){d.loaded=!0;Dg(a)&&a.o.resolve()}),x.R(Mg));A(v)}})}
|
|
224
|
+
function Lg(a){var b=Bc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=eg(b,"PlayReadyKeyMessage");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Lc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
225
|
+
function Kg(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Fg(a.g.keySystem)&&16==g.byteLength&&(navigator.userAgent.match(/Edge?\//)||vc())){h=Gb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Nc(g).slice(0,32);a.la.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ka&&(a.i.delete(b),
|
|
226
226
|
b.close().catch(function(){}));Dg(a)&&(a.o.resolve(),a.Z.R(Ng))}function ig(a){var b=a.la,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new M(2,6,6014));a.D.Xc(vf(c))}
|
|
227
|
-
function Og(){var a,b,c,d,e,f,g,h;return
|
|
228
|
-
n;return
|
|
229
|
-
function Pg(a){var b;return
|
|
230
|
-
function lg(a){var b;return
|
|
227
|
+
function Og(){var a,b,c,d,e,f,g,h;return J(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,p,
|
|
228
|
+
n;return J(function(t){switch(t.g){case 1:C(t,2);if("org.w3.clearkey"===l&&wc())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,rc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(t,m.createMediaKeys(),5);case 5:ua(t,0);break;case 2:F(t),f.set(l,null),A(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(vf(f))})}
|
|
229
|
+
function Pg(a){var b;return J(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).R(Qg)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);F(c);A(c)})}
|
|
230
|
+
function lg(a){var b;return J(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return J(function(g){if(1==g.g)return C(g,2),a.ka||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Pg(e),5):u(g,e.remove(),5);if(2!=g.g)return ua(g,0);F(g);A(g)})})),0)})}
|
|
231
231
|
function Rg(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=r(b),g=f.next();!g.done;e={Ga:e.Ga},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Ga=[];e.Ga=e.Ga.concat(d.initData||[]);e.Ga=e.Ga.concat(g.initData||[]);e.Ga=e.Ga.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Ga.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ia(d.keyIds),ia(g.keyIds))):
|
|
232
232
|
d.keyIds||g.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||g.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||g.persistentStateRequired,videoRobustness:d.videoRobustness||g.videoRobustness,audioRobustness:d.audioRobustness||g.audioRobustness,serverCertificate:d.serverCertificate||g.serverCertificate,serverCertificateUri:d.serverCertificateUri||g.serverCertificateUri,
|
|
233
|
-
initData:e.Ga,keyIds:f});break}}return c}function tg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function jg(a){a.i.forEach(function(b,c){var d=b.
|
|
233
|
+
initData:e.Ga,keyIds:f});break}}return c}function tg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function jg(a){a.i.forEach(function(b,c){var d=b.Sd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Sd=e)})}function Dg(a){a=a.i.values();return tf(a,function(b){return b.loaded})}
|
|
234
234
|
function sg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=r(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
235
235
|
function Jg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={ra:g.ra},h=a.next()){g.ra=h.value;b.includes(g.ra.licenseServerUri)||b.push(g.ra.licenseServerUri);d.includes(g.ra.serverCertificateUri)||d.push(g.ra.serverCertificateUri);g.ra.serverCertificate&&(c.some(function(m){return function(p){return Bb(p,m.ra.serverCertificate)}}(g))||c.push(g.ra.serverCertificate));if(g.ra.initData){h={};for(var k=r(g.ra.initData),l=k.next();!l.done;h={Bc:h.Bc},l=k.next())h.Bc=l.value,e.some(function(m){return function(p){var n=
|
|
236
236
|
m.Bc;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Bb(p.initData,n.initData)}}(h))||e.push(h.Bc)}if(g.ra.keyIds)for(h=r(g.ra.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
237
237
|
function ug(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
|
|
238
|
-
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Qg=1,Mg=5,Ng=.5,Sg=new
|
|
238
|
+
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Qg=1,Mg=5,Ng=.5,Sg=new lc(function(){return Eb(new Uint8Array([0]))});function Tg(){}function Ug(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.g){if(d&&(e=Vg[d.toLowerCase()]))return k.return(e);if(f=Wg(a))if(g=Xg[f])return k.return(g);return d?k.A(2):u(k,Yg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Vg[d]))return k.return(h);throw new M(2,4,4E3,a);})}function Yg(a,b,c){var d,e,f;return J(function(g){if(1==g.g)return d=df([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
|
|
239
239
|
function Wg(a){a=(new Lb(a)).xa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}L("shaka.media.ManifestParser",Tg);Tg.unregisterParserByMime=function(a){delete Vg[a]};Tg.registerParserByMime=function(a,b){Vg[a]=b};Tg.registerParserByExtension=function(a,b){Xg[a]=b};var Vg={},Xg={};function Zg(a){function b(){d=!0}function c(l){f.push(l);Ef(l)}a=Db(a);var d=!1,e,f=[],g=[];(new Af).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).U("stsd",function(l){e=l;f.push(l);Gf(l)}).U("encv",b).U("enca",b).U("hev1",function(l){g.push({box:l,mb:1701733238})}).U("hvc1",function(l){g.push({box:l,mb:1701733238})}).U("avc1",function(l){g.push({box:l,mb:1701733238})}).U("avc3",function(l){g.push({box:l,mb:1701733238})}).U("ac-3",function(l){g.push({box:l,mb:1701733217})}).U("ec-3",
|
|
240
240
|
function(l){g.push({box:l,mb:1701733217})}).U("mp4a",function(l){g.push({box:l,mb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw ab(Nc(a)),new M(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=$g(a,e,k.box,f,k.mb);return a}
|
|
241
|
-
function $g(a,b,c,d,e){var f=ah.value(),g=a.subarray(c.start,c.start+c.size),h=Gb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Gb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);bh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=
|
|
242
|
-
k.setUint32(b,a+1);return e}function bh(a,b,c){a=Gb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var ah=new
|
|
243
|
-
t||-1===
|
|
241
|
+
function $g(a,b,c,d,e){var f=ah.value(),g=a.subarray(c.start,c.start+c.size),h=Gb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Gb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);bh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=qc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,bh(e,d.start,d.size+k.byteLength);k=Gb(e,b.start);b=Ff(b);a=k.getUint32(b);
|
|
242
|
+
k.setUint32(b,a+1);return e}function bh(a,b,c){a=Gb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var ah=new lc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function ch(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=dh(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],t=-1,y=-1,x=0;x<n.length;x++)if(null!=n[x]&&""!==n[x].g.trim()){t=x;break}for(x=n.length-1;0<=x;x--)if(null!=n[x]&&""!==n[x].g.trim()){y=x;break}if(-1===
|
|
243
|
+
t||-1===y)n=eh(d,e),a.nestedCues.push(n);else{for(;t<=y;t++)if(x=n[t]){var v=x.l,w=x.i,D=x.j,z=x.h;if(v!=h||w!=k||D!=l||z!=m)p.payload&&a.nestedCues.push(p),p=dh(d,e,v,w,D,z),h=v,k=w,l=D,m=z;p.payload+=x.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=eh(d,e),a.nestedCues.push(p));p=dh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
244
244
|
function dh(a,b,c,d,e,f){a=new fb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function eh(a,b){a=new fb(a,b,"");a.lineBreak=!0;return a}function fh(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function gh(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";hh(this)}function ih(a,b,c){return ch(new fb(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function hh(a){jh(a,0,15);a.g=1}function kh(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case lh:d=mh.has(c)?mh.get(c):String.fromCharCode(c);break;case nh:d=oh.get(c);break;case ph:a.i[a.g].pop();d=qh.get(c);break;case rh:a.i[a.g].pop(),d=sh.get(c)}d&&a.i[a.g].push(new fh(d,a.m,a.j,a.o,a.l))}}
|
|
245
245
|
function th(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function jh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
246
246
|
var lh=0,nh=1,ph=2,rh=3,mh=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),oh=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),qh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
|
|
@@ -258,680 +258,681 @@ function bi(a,b){var c=b.type;if(16===(b.Aa&112)){var d=b.Aa>>3&1;0===c?a.m=d:a.
|
|
|
258
258
|
a=1===(a&1);if(c.h!==yh){e=c.g;if(c.h===xh&&b!==e.g){var g=1+b-e.h;th(e,g,1+e.g-e.h,e.h);jh(e,0,g-1);jh(e,b+1,15-b)}e.g=b;c.g.m=a;c.g.j=f;c.g.l=d;c.g.o="black"}}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",kh(c.g,lh,32),d=!1,b=Dh[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Ch[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))kh(c.g,nh,a);else if(18===
|
|
259
259
|
(d&246)&&32===(a&224))kh(c.g,d&1?rh:ph,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Na){case 32:zh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=wh(c,2,a);break;case 38:d=wh(c,3,a);break;case 39:d=wh(c,4,a);break;case 40:kh(c.g,lh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:hh(c.o);Bh(c);break;case 43:Bh(c);break;case 44:b=c.i;d=null;c.h!==yh&&(d=ih(b,c.j,a));jh(b,0,15);break;case 45:b=c.g;c.h!==xh?d=null:(d=ih(b,c.j,a),f=b.g-b.h+1,th(b,f-1,f,b.h),jh(b,0,
|
|
260
260
|
f-1),jh(b,b.g,15-b.g),c.j=a);break;case 46:jh(c.l,0,15);break;case 47:b=null,c.h!==yh&&(b=ih(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,zh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.Na,kh(c.g,lh,b.Aa),kh(c.g,lh,d);return a}
|
|
261
|
-
function ci(a,b){var c=[];try{for(;b.oa();){var d=Qh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Qh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Rh(e));for(var g=a.j.get(e),h=b.ba();b.ba()-h<f;){e=b;var k=Qh(e),l=k.value,m=k.pts;if(16===l){var p=Qh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Jh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.B-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Kh(t,n,g.i));if(t.h+1>=t.F){n=t;for(var
|
|
262
|
-
|
|
263
|
-
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Ih(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Yh.has(e)){var w=Yh.get(e);Ih(g.g,w)}else Ih(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Ih(g.g,"_"):Ih(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(D){if(D instanceof M&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function di(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ei(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,ve:c,
|
|
264
|
-
function
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
(
|
|
268
|
-
|
|
269
|
-
function
|
|
270
|
-
;function
|
|
271
|
-
function R(a,b,c,d,e,f,g,h,k,l,m,p,n,t,
|
|
272
|
-
q.kc=function(){return this.Ea};q.fc=function(){return this.na};q.
|
|
273
|
-
q.he=function(a){null==this.g?Ua("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};L("shaka.media.SegmentReference",R);R.prototype.syncAgainst=R.prototype.he;R.prototype.offset=R.prototype.offset;R.prototype.isPreload=R.prototype.
|
|
274
|
-
R.prototype.getEndByte=R.prototype.fc;R.prototype.getStartByte=R.prototype.kc;R.prototype.getEndTime=R.prototype.
|
|
275
|
-
function
|
|
276
|
-
function
|
|
277
|
-
function
|
|
261
|
+
function ci(a,b){var c=[];try{for(;b.oa();){var d=Qh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Qh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Rh(e));for(var g=a.j.get(e),h=b.ba();b.ba()-h<f;){e=b;var k=Qh(e),l=k.value,m=k.pts;if(16===l){var p=Qh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Jh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.B-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Kh(t,n,g.i));if(t.h+1>=t.F){n=t;for(var y=0,x=1;16>x;x++,
|
|
262
|
+
y++)n.i[y]=n.i[x];for(x=0;1>x;x++,y++)n.i[y]=Hh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Kh(t,n,g.i));t.i[t.h]=Hh();t.g=0;break;case 12:t.isVisible()&&(e=Kh(t,n,g.i)),Gh(t),n=t,n.h=0,n.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=Sh(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Ih(g.g,"\u266a"):Ih(g.g,
|
|
263
|
+
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Ih(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Yh.has(e)){var w=Yh.get(e);Ih(g.g,w)}else Ih(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Ih(g.g,"_"):Ih(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(D){if(D instanceof M&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function di(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ei(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(ia(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function fi(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,ve:c,mf:d}}function gi(a,b){return{pe:1==b?a.Lb():a.N()}}function hi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
|
|
264
|
+
function ii(a,b,c){var d=a.N(),e=[],f=null;c&1&&(f=a.N());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Zd:null,sampleSize:null,ad:null};c&256&&(h.Zd=a.N());c&512&&(h.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(h.ad=0==b?a.N():a.Le());e.push(h)}return{hh:d,Ne:e,lf:f}};function ji(){this.i=new Map;this.h=this.g=0}
|
|
265
|
+
ji.prototype.init=function(a){var b=this,c=[],d=[];(new Af).box("moov",Ef).box("mvex",Ef).U("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",Ef).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",Ef).U("mdhd",function(e){e=hi(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new M(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
266
|
+
ji.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=0,g=[],h=null,k=9E4;(new Af).box("moof",function(l){f=l.start;g=[];Ef(l)}).box("traf",Ef).U("trun",function(l){l=ii(l.reader,l.version,l.flags);g.push(l)}).U("tfhd",function(l){l=fi(l.reader,l.flags);d=l.ve||b.g;e=l.mf||b.h;l=l.trackId;b.i.has(l)&&(k=b.i.get(l))}).U("tfdt",function(l){h=gi(l.reader,l.version).pe}).box("mdat",function(l){if(null===h)throw Va("Unable to find base media decode time for CEA captions!"),new M(2,2,2010);
|
|
267
|
+
ki(l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
268
|
+
function ki(a,b,c,d,e,f,g,h){var k=0,l=e,m=g.map(function(t){return t.Ne});m=[].concat.apply([],ia(m));m.length&&(l=m[0].sampleSize||e);for(a.skip(f+g[0].lf);a.oa();){f=a.N();if(6==(a.Sa()&31)){g=0;k<m.length&&(g=m[k].ad||0);g=(b+g)/c;for(var p=r(ei(a.$a(f-1))),n=p.next();!n.done;n=p.next())h.push({Zf:n.value,pts:g})}else try{a.skip(f-1)}catch(t){break}l-=f+4;0==l&&(b=k<m.length?b+(m[k].Zd||d):b+d,k++,k<m.length?l=m[k].sampleSize||e:l=e)}};function li(){this.h=new ji;this.g=new Zh}li.prototype.init=function(a){this.h.init(a)};
|
|
269
|
+
function mi(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Db(d.Zf);if(0<e.length&&(c=a.g,d=d.pts,e=new xf(e,0),181===e.Sa()&&49===e.Vd()&&1195456820===e.N()&&3===e.Sa())){var f=e.Sa();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.Sa(),k=(h&4)>>2,l=e.Sa(),m=e.Sa();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Aa:l,Na:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return ai(a.g)}
|
|
270
|
+
;function ni(a,b,c,d){this.Ba=a;this.Ea=b;this.na=c;this.Ld=void 0===d?null:d}ni.prototype.kc=function(){return this.Ea};ni.prototype.fc=function(){return this.na};function oi(a,b){return a&&b?a.kc()==b.kc()&&a.fc()==b.fc()&&eb(a.Ba(),b.Ba()):a==b}L("shaka.media.InitSegmentReference",ni);ni.prototype.getEndByte=ni.prototype.fc;ni.prototype.getStartByte=ni.prototype.kc;
|
|
271
|
+
function R(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){l=void 0===l?[]:l;t=void 0===t?pi:t;this.startTime=a;this.j=this.endTime=b;this.u=c;this.Ea=d;this.na=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.o=void 0===p?null:p;this.g=void 0===n?null:n;this.status=t;this.s=!1;this.m=void 0===y?null:y;this.l=0}q=R.prototype;q.Ba=function(){return this.u()};q.getStartTime=function(){return this.startTime};q.vf=function(){return this.endTime};
|
|
272
|
+
q.kc=function(){return this.Ea};q.fc=function(){return this.na};q.Lf=function(){return this.tilesLayout};q.Kf=function(){return this.o};q.Eb=function(){return this.status};q.Tf=function(){this.status=qi};q.Ge=function(){this.s=!0};q.Rf=function(){return this.s};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=r(this.h),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
|
|
273
|
+
q.he=function(a){null==this.g?Ua("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};L("shaka.media.SegmentReference",R);R.prototype.syncAgainst=R.prototype.he;R.prototype.offset=R.prototype.offset;R.prototype.isPreload=R.prototype.Rf;R.prototype.markAsPreload=R.prototype.Ge;R.prototype.markAsUnavailable=R.prototype.Tf;R.prototype.getStatus=R.prototype.Eb;R.prototype.getTileDuration=R.prototype.Kf;R.prototype.getTilesLayout=R.prototype.Lf;
|
|
274
|
+
R.prototype.getEndByte=R.prototype.fc;R.prototype.getStartByte=R.prototype.kc;R.prototype.getEndTime=R.prototype.vf;R.prototype.getStartTime=R.prototype.getStartTime;R.prototype.getUris=R.prototype.Ba;var pi=0,qi=1;R.Status={yg:pi,ah:qi,Lg:2};function ri(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function si(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ti(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
|
|
275
|
+
function ui(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(vi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}function wi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=vi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
|
|
276
|
+
function vi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function xi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.M={};this.L={};this.g=null;this.F=!1;this.T=d||function(){};this.i={};this.s=new nf;this.o={};this.B=b;this.G=new kc;this.J="";this.l=yi(this,this.G);this.D=new lf(function(){return zi(e)});this.u=!1;this.O=new kc}function yi(a,b){var c=new MediaSource;a.s.ia(c,"sourceopen",function(){URL.revokeObjectURL(a.J);b.resolve()});a.J=Ai(c);a.j.src=a.J;return c}q=xi.prototype;q.destroy=function(){return this.D.destroy()};
|
|
277
|
+
function zi(a){var b,c,d,e,f,g,h,k;return J(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p.catch(ac)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new M(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.o)b.push(a.o[k].destroy());return u(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.o={};a.B=null;a.i={};
|
|
278
278
|
A(l)})}
|
|
279
|
-
q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return
|
|
280
|
-
function(n){return function(){return
|
|
281
|
-
function
|
|
282
|
-
function
|
|
283
|
-
a.o[b].g.resetCaptions();return u(I,Tc(a.o[b],c),7);case 7:p=I.h,a.g||
|
|
284
|
-
|
|
285
|
-
v,u(I,a.Da(w),8);case 8:return d&&a.u&&b!=h.X&&(f||g)&&(H=d.startTime,
|
|
286
|
-
function
|
|
287
|
-
function
|
|
288
|
-
q.endOfStream=function(a){var b=this;return
|
|
289
|
-
function
|
|
290
|
-
function
|
|
291
|
-
function
|
|
292
|
-
q.Ib=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.
|
|
293
|
-
q.
|
|
294
|
-
q.Pa=function(){return Math.max(0,this.hb()-(this.
|
|
295
|
-
T.prototype.setUserSeekStart=T.prototype.Se;T.prototype.getSegmentAvailabilityStart=T.prototype.Qa;T.prototype.isInProgress=T.prototype.kb;T.prototype.isLive=T.prototype.
|
|
296
|
-
T.prototype.setSegmentAvailabilityDuration=T.prototype.
|
|
297
|
-
function
|
|
298
|
-
d||0==d&&!a.
|
|
299
|
-
function
|
|
300
|
-
function
|
|
279
|
+
q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return J(function(p){if(1==p.g)return e=jc,u(p,d.G,2);d.u=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={qa:f.qa},h=g.next())f.qa=h.value,k=a.get(f.qa),l=Vc(k.mimeType,k.codecs),f.qa==e.X?Bi(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Qc(l,f.qa)||(d.o[f.qa]=new Pc,l=Sc(f.qa,l)),m=d.l.addSourceBuffer(l),d.s.C(m,"error",function(n){return function(){d.i[n.qa][0].p.reject(new M(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.s.C(m,"updateend",
|
|
280
|
+
function(n){return function(){return Ci(d,n.qa)}}(f)),d.h[f.qa]=m,d.M[f.qa]=l,d.i[f.qa]=[],d.L[f.qa]=!!k.drmInfos.length);A(p)})};function Bi(a,b,c){a.g||(a.g=new $c(a.m));var d=a.g;a=a.F;"application/cea-608"==b||"application/cea-708"==b?d.i=null:(d.i=(0,bd[b])(),d.i.setSequenceMode?d.i.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function Di(a){return a.l?"ended"==a.l.readyState:!0}function Ei(a,b){return b==hc?a.g.g:ri(Fi(a,b))}
|
|
281
|
+
function Gi(a,b){return b==hc?a.g.h:si(Fi(a,b))}function Hi(a,b,c){if(b==hc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Fi(a,b);return ui(a,c)}q.Oa=function(){var a={total:vi(this.j.buffered),audio:vi(Fi(this,"audio")),video:vi(Fi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Fi(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
282
|
+
function Ii(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H;return J(function(I){switch(I.g){case 1:h=jc;if(b!=h.X){I.A(2);break}if(!a.u){I.A(3);break}return u(I,a.O,4);case 4:k=I.h,a.g.s=k;case 3:return u(I,cd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return I.return();case 2:if(!a.o[b]){e&&(a.g||Bi(a,"application/cea-608",a.u),d?(l=mi(a.B,c),l.length&&(m=a.h[h.ua].timestampOffset,hd(a.g,l,d.startTime,d.endTime,m))):a.B.init(c));I.A(6);break}f&&
|
|
283
|
+
a.o[b].g.resetCaptions();return u(I,Tc(a.o[b],c),7);case 7:p=I.h,a.g||Bi(a,"application/cea-608",a.u),p.metadata&&(n=a.h[b].timestampOffset,a.T(p.metadata,n,d?d.endTime:null)),p.captions&&p.captions.length&&(t=a.h[h.ua].timestampOffset,y=fd(p.captions),hd(a.g,y,d?d.startTime:null,d?d.endTime:null,t)),c=p.data;case 6:c=Ji(a,c,d?d.startTime:null,b);x=a.h[b];v=Ki;if(!a.u||x.mode==v||!d){I.A(8);break}w=a.l.duration;D=b==h.ua||!(h.ua in a.h);if(!D){I.A(9);break}z=[x.appendWindowStart,x.appendWindowEnd];
|
|
284
|
+
x.appendWindowStart=0;x.appendWindowEnd=Infinity;B=x.timestampOffset;x.timestampOffset=0;return u(I,Li(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return u(I,Li(a,b,function(){return Mi(a,b)}),11);case 11:return x.timestampOffset=B,x.appendWindowStart=z[0],x.appendWindowEnd=z[1],G=ri(Fi(a,b)),E=(d.startTime||0)-(G||0),a.O.resolve(E),u(I,Li(a,b,function(){return Ni(a,b,0,w)}),12);case 12:if(b!=h.ua){I.A(9);break}return u(I,Li(a,b,function(){a.j.currentTime-=.001;Ci(a,b)}),9);case 9:return x.mode=
|
|
285
|
+
v,u(I,a.Da(w),8);case 8:return d&&a.u&&b!=h.X&&(f||g)&&(H=d.startTime,Li(a,b,function(){return Mi(a,b)}),Li(a,b,function(){return Oi(a,b,H)})),u(I,Li(a,b,function(){a.h[b].appendBuffer(c)}),16);case 16:A(I)}})}function Pi(a,b){var c=Gi(a,"video")||0;ed(a.g,b,c)}function Qi(a){a.g&&ed(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return J(function(f){e=jc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,Li(d,a,function(){return Ni(d,a,b,c)}),0)})};
|
|
286
|
+
function Ri(a,b){var c;return J(function(d){c=jc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,Li(a,b,function(){return Ni(a,b,0,a.l.duration)}),0)})}q.flush=function(a){var b=this,c;return J(function(d){c=jc;return a==c.X?d.return():u(d,Li(b,a,function(){b.j.currentTime-=.001;Ci(b,a)}),0)})};
|
|
287
|
+
function Si(a,b,c,d,e,f){var g;return J(function(h){g=jc;return b==g.X?(f||(a.g.s=c),dd(a.g,d,e),h.return()):u(h,Promise.all([Li(a,b,function(){return Mi(a,b)}),f?Promise.resolve():Li(a,b,function(){return Oi(a,b,c)}),Li(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Ci(a,b)})]),0)})}function Ti(a,b,c){var d;return J(function(e){d=jc;if(b==d.X)return e.return();Li(a,b,function(){return Mi(a,b)});return u(e,Li(a,b,function(){return Oi(a,b,c)}),0)})}
|
|
288
|
+
q.endOfStream=function(a){var b=this;return J(function(c){return u(c,Ui(b,function(){Di(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.Da=function(a){var b=this;return J(function(c){return u(c,Ui(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new kc};b.i[d].unshift(e)}b.l.duration=a}),0)})};q.getDuration=function(){return this.l.duration};function Ni(a,b,c,d){d<=c?Ci(a,b):a.h[b].remove(c,d)}
|
|
289
|
+
function Mi(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Ci(a,b)}function Oi(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Ci(a,b)}function Ci(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Vi(a,b))}function Li(a,b,c){mf(a.D);c={start:c,p:new kc};a.i[b].push(c);1==a.i[b].length&&Wi(a,b);return c.p}
|
|
290
|
+
function Ui(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.g){case 1:mf(a.D);c=[];d={};for(e in a.h)d.Ub=new kc,f={start:function(l){return function(){return l.Ub.resolve()}}(d),p:d.Ub},a.i[e].push(f),c.push(d.Ub),1==a.i[e].length&&f.start(),d={Ub:d.Ub};C(k,2);return u(k,Promise.all(c),4);case 4:ua(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new M(2,3,3015,l);}finally{for(h in a.h)Vi(a,h)}A(k)}})}function Vi(a,b){a.i[b].shift();Wi(a,b)}
|
|
291
|
+
function Wi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new M(2,3,3017,b)):c.p.reject(new M(2,3,3015,d)),Vi(a,b)}}function Ji(a,b,c,d){var e=a.L[d];null==c&&e&&(sc()||qc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=Zg(b));return b}var Ai=window.URL.createObjectURL,Ki="sequence",Xi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function T(a,b,c){this.l=a;this.$c=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.B=void 0===c?!0:c;this.D=0;this.F=!1}q=T.prototype;q.getDuration=function(){return this.i};q.Bf=function(){return this.g};q.Da=function(a){this.i=a};q.Gf=function(){return this.l};q.Re=function(a){this.o=a};q.xc=function(a){this.s=a};q.ge=function(a){this.m=a};q.og=function(a){this.$c=a};q.uf=function(){return this.$c};
|
|
292
|
+
q.Ib=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Qd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.B&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};q.Jd=function(){this.F=!0};q.Qd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.Pd=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
|
|
293
|
+
q.V=function(){return Infinity==this.i&&!this.s};q.kb=function(){return Infinity!=this.i&&!this.s};q.Qa=function(){return Math.max(this.u,this.hb()-this.m)};q.Se=function(a){this.u=a};q.hb=function(){return this.V()||this.kb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};q.jc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.hb()-this.m+a,this.Pa()))};q.Db=function(){return this.jc(0)};
|
|
294
|
+
q.Pa=function(){return Math.max(0,this.hb()-(this.V()||this.kb()?this.$c:0))};q.Ve=function(){return null==this.l||null!=this.h&&this.B?!1:!0};q.Qe=function(a){this.D=a};L("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Qe;T.prototype.usingPresentationStartTime=T.prototype.Ve;T.prototype.getSeekRangeEnd=T.prototype.Pa;T.prototype.getSeekRangeStart=T.prototype.Db;T.prototype.getSafeSeekRangeStart=T.prototype.jc;T.prototype.getSegmentAvailabilityEnd=T.prototype.hb;
|
|
295
|
+
T.prototype.setUserSeekStart=T.prototype.Se;T.prototype.getSegmentAvailabilityStart=T.prototype.Qa;T.prototype.isInProgress=T.prototype.kb;T.prototype.isLive=T.prototype.V;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Pd;T.prototype.notifyMinSegmentStartTime=T.prototype.Qd;T.prototype.lockStartTime=T.prototype.Jd;T.prototype.notifySegments=T.prototype.Ib;T.prototype.getDelay=T.prototype.uf;T.prototype.setDelay=T.prototype.og;
|
|
296
|
+
T.prototype.setSegmentAvailabilityDuration=T.prototype.ge;T.prototype.setStatic=T.prototype.xc;T.prototype.setClockOffset=T.prototype.Re;T.prototype.getPresentationStartTime=T.prototype.Gf;T.prototype.setDuration=T.prototype.Da;T.prototype.getMaxSegmentDuration=T.prototype.Bf;T.prototype.getDuration=T.prototype.getDuration;function Yi(a,b,c){this.l=c;this.j=a;this.s=Zi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}Yi.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function $i(a,b){a.i=b}function aj(a){this.g=a}function Zi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(vi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function bj(a,b,c,d,e){var f=this;this.s=e;this.g=a;this.u=b;this.F=c;this.l=new nf;this.j=!1;this.D=a.readyState;this.B=this.i=0;this.h=d;this.o=!1;this.l.C(a,"waiting",function(){return cj(f)});this.m=(new O(function(){cj(f)})).Fa(.25)}bj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.u=this.s=null};bj.prototype.Td=function(){this.o=!0;cj(this)};
|
|
297
|
+
function cj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.D&&(a.D=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Zi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=wi(c,b,a.F.gapDetectionThreshold),null==
|
|
298
|
+
d||0==d&&!a.o||(e=c.start(d),e>=a.u.Pa()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.B++,a.s(new Q("gapjumped")))))}}};function dj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ej.value().get(b),c.ia(a,b,d))}var ej=new lc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function fj(a,b,c,d){var e=this;this.g=a;this.l=b;this.o=c;this.j=d;this.m=!1;this.h=new nf;this.i=new gj(a);dj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){hj(e,e.j)})}fj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function ij(a){return a.m?a.g.currentTime:a.j}function jj(a,b){0<a.g.readyState?kj(a.i,b):dj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){hj(a,a.j)})}
|
|
299
|
+
function hj(a,b){.001>Math.abs(a.g.currentTime-b)?lj(a):(a.h.ia(a.g,"seeking",function(){lj(a)}),kj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function lj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()});a.o(a.g.currentTime)}function gj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}gj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
300
|
+
function kj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Fa(.1)};function mj(a){this.g=a;this.j=!1;this.h=null;this.i=new nf}q=mj.prototype;q.wd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ia(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;dj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.xd=function(a){this.h=this.j?this.h:a};q.Fc=function(){return(this.j?this.g.currentTime:this.h)||0};q.ne=function(){return 0};
|
|
301
301
|
q.me=function(){return 0};q.Ie=function(){};
|
|
302
|
-
function
|
|
303
|
-
l-k&&(k=l-3);h<k&&(h=
|
|
304
|
-
function
|
|
305
|
-
function pj(a,b){var c=a.g.Db()
|
|
302
|
+
function nj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=oj(a,c,f);this.j=new bj(a,b.presentationTimeline,c,this.o,f);this.h=new fj(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=ij(g.h);h=pj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;jj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},qj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&
|
|
303
|
+
!g.i.paused){var h=ij(g.h),k=g.g.Db(),l=g.g.Pa();3>l-k&&(k=l-3);h<k&&(h=pj(g,h),g.i.currentTime=h)}})}q=nj.prototype;q.wd=function(){this.m.Fa(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};q.xd=function(a){jj(this.h,a)};q.Fc=function(){var a=ij(this.h);return 0<this.i.readyState&&!this.i.paused?rj(this,a):a};q.ne=function(){return this.o?this.o.o:0};
|
|
304
|
+
q.me=function(){return this.j.B};function qj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Db():a.g.Pa():0>b&&(b=a.g.Pa()+b);return sj(a,rj(a,b))}q.Ie=function(){this.j.Td()};function sj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
305
|
+
function pj(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Db(),f=a.g.Pa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.jc(c),k=a.g.jc(d);c=a.g.jc(c+d);return b>=g?sj(a,b):b>f?f:b<e?ti(a.i.buffered,k)?k:c:b>=h||ti(a.i.buffered,b)?b:c}function rj(a,b){var c=a.g.Db();if(b<c)return c;a=a.g.Pa();return b>a?a:b}
|
|
306
|
+
function oj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Yi(new aj(a),b.stallThreshold,c);$i(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function tj(a){this.H=a;this.g=null;this.h=0;this.i=!1}q=tj.prototype;q.release=function(){this.i||(this.H=[],this.g&&this.g.stop(),this.g=null)};q.Uf=function(){this.i=!0};q.find=function(a){for(var b=this.H.length-1,c=b;0<=c;--c){var d=this.H[c],e=c<b?this.H[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.H.length&&a<this.H[0].startTime?this.h:null};q.get=function(a){if(0==this.H.length)return null;a-=this.h;return 0>a||a>=this.H.length?null:this.H[a]};
|
|
306
307
|
q.offset=function(a){if(!this.i)for(var b=r(this.H),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.pc=function(a){if(!this.i&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.H=this.H.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.H.push.apply(this.H,ia(a))}};q.Hb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.H.length||d.endTime>c.H[0].startTime)});this.pc(a);this.fb(b)};
|
|
307
308
|
q.fb=function(a){if(!this.i){var b=this.H.length;this.H=this.H.filter(function(c){return c.endTime>a});this.h+=b-this.H.length}};
|
|
308
309
|
q.Ya=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.H.length;)if(this.H[this.H.length-1].startTime>=b)this.H.pop();else break;for(;this.H.length;)if(this.H[0].endTime<=a)this.H.shift(),c||this.h++;else break;0!=this.H.length&&(a=this.H[this.H.length-1],this.H[this.H.length-1]=new R(a.startTime,b,a.u,a.Ea,a.na,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.o,a.g,a.status,a.m),this.H[this.H.length-1].l=a.l)}};
|
|
309
|
-
q.
|
|
310
|
-
function
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.H.length}return null};q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.H.length}return null};q.offset=function(){};q.pc=function(){};q.fb=function(){};q.Hb=function(){};q.Ya=function(){};q.
|
|
314
|
-
L("shaka.media.MetaSegmentIndex",
|
|
315
|
-
|
|
316
|
-
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.te=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function
|
|
317
|
-
function(
|
|
318
|
-
function
|
|
319
|
-
q.configure=function(a){this.j=a;this.F=new Je({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};q.start=function(){var a=this;return
|
|
320
|
-
function
|
|
321
|
-
function
|
|
322
|
-
function
|
|
323
|
-
function
|
|
310
|
+
q.cd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.H.push.apply(c.H,ia(d)):(c.g.stop(),c.g=null)}),this.g.Fa(a))};tj.prototype[Symbol.iterator]=function(){return this.Cb(0)};tj.prototype.Cb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new uj(this,b,d)};
|
|
311
|
+
function vj(a,b,c){return new tj([new R(a,a+b,function(){return c},0,null,null,a,a,a+b)])}L("shaka.media.SegmentIndex",tj);tj.forSingleSegment=vj;tj.prototype.getIteratorForTime=tj.prototype.Cb;tj.prototype.updateEvery=tj.prototype.cd;tj.prototype.fit=tj.prototype.Ya;tj.prototype.evict=tj.prototype.fb;tj.prototype.mergeAndEvict=tj.prototype.Hb;tj.prototype.offset=tj.prototype.offset;tj.prototype.get=tj.prototype.get;tj.prototype.find=tj.prototype.find;tj.prototype.markImmutable=tj.prototype.Uf;
|
|
312
|
+
tj.prototype.release=tj.prototype.release;function uj(a,b,c){this.i=a;this.g=b;this.h=c}uj.prototype.kf=function(){return this.g};uj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.Ba().length&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};
|
|
313
|
+
uj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.Ba().length&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};L("shaka.media.SegmentIterator",uj);uj.prototype.next=uj.prototype.next;uj.prototype.current=uj.prototype.current;uj.prototype.currentPosition=uj.prototype.kf;function wj(){tj.call(this,[]);this.j=[]}pa(wj,tj);q=wj.prototype;q.clone=function(){var a=new wj;a.j=this.j.slice();return a};
|
|
314
|
+
q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.H.length}return null};q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.H.length}return null};q.offset=function(){};q.pc=function(){};q.fb=function(){};q.Hb=function(){};q.Ya=function(){};q.cd=function(){};
|
|
315
|
+
L("shaka.media.MetaSegmentIndex",wj);wj.prototype.updateEvery=wj.prototype.cd;wj.prototype.fit=wj.prototype.Ya;wj.prototype.mergeAndEvict=wj.prototype.Hb;wj.prototype.evict=wj.prototype.fb;wj.prototype.merge=wj.prototype.pc;wj.prototype.offset=wj.prototype.offset;wj.prototype.get=wj.prototype.get;wj.prototype.find=wj.prototype.find;wj.prototype.release=wj.prototype.release;function xj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Qc();this.h=new O(function(){b.g.He(.25*b.i)})}xj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};xj.prototype.set=function(a){this.i=a;yj(this)};xj.prototype.Mc=function(){return this.g.Mc()};function yj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Qc()!=b&&a.g.fe(b);return}catch(c){}a.h.Fa(.25);0!=a.g.Qc()&&a.g.fe(0)};function zj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Aj(b,!1)})).Fa(.25)}zj.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Aj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Bj(a){Ve.call(this);this.g=new Map;this.h=a}pa(Bj,Ve);Bj.prototype.release=function(){this.g.clear();Ve.prototype.release.call(this)};function Cj(a,b){var c=a.g.get(b);c||(c={qc:[],te:null,contentType:b},a.g.set(b,c));return c}function Dj(a,b,c){var d=Cj(a,b.contentType);Ej(a,d);a={Ld:b,position:c};d=d.qc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
316
|
+
Bj.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.qc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Ld;break a}}d=null}if(e=d)e=c.te,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
317
|
+
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.te=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Ej(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.qc;b.qc=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.qc=[]};function Fj(a){Ve.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Fa(2)}pa(Fj,Ve);Fj.prototype.release=function(){this.g.clear();this.h.stop();Ve.prototype.release.call(this)};function Gj(a,b){Ve.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{sb:null,rb:Hj,jb:function(d,e){return Ij(c,"enter",d,e)}},{sb:Jj,rb:Hj,jb:function(d,e){return Ij(c,"enter",d,e)}},{sb:Kj,rb:Hj,jb:function(d,e){return Ij(c,"enter",d,e)}},{sb:Hj,rb:Jj,jb:function(d,e){return Ij(c,"exit",d,e)}},{sb:Hj,rb:Kj,jb:function(d,e){return Ij(c,"exit",d,e)}},{sb:Jj,rb:Kj,jb:function(d,e){return Ij(c,"skip",d,e)}},{sb:Kj,rb:Jj,jb:function(d,e){return Ij(c,"skip",d,e)}}];this.h=new nf;this.h.C(this.i,
|
|
318
|
+
"regionremove",function(d){c.g.delete(d.region)})}pa(Gj,Ve);Gj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Ve.prototype.release.call(this)};Gj.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Jj:a>d.endTime?Kj:Hj;this.g.set(d,f);for(var g=r(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.sb==e&&h.rb==f&&h.jb(d,b)}}};
|
|
319
|
+
function Ij(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Jj=1,Hj=2,Kj=3;function Lj(a,b,c,d,e){a=df(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Mj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.u=1;this.o=this.l=null;this.D=0;this.i=new Map;this.B=!1;this.F=null;this.s=!1;this.h=new lf(function(){return Nj(c)})}q=Mj.prototype;q.destroy=function(){return this.h.destroy()};function Nj(a){var b,c,d,e;return J(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Oj(e),b.push(Pj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;A(f)})}
|
|
320
|
+
q.configure=function(a){this.j=a;this.F=new Je({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};q.start=function(){var a=this;return J(function(b){if(1==b.g)return u(b,Qj(a),2);mf(a.h);a.B=!0;A(b)})};
|
|
321
|
+
function Rj(a,b){var c,d,e,f,g,h,k;J(function(l){switch(l.g){case 1:return c=jc,a.D++,d=a.D,C(l,2),u(l,Ri(a.g.P,c.X),4);case 4:ua(l,3);break;case 2:if(e=F(l),a.g)a.g.onError(e);case 3:f=Vc(b.mimeType,b.codecs),Bi(a.g.P,f,a.m.sequenceMode),g=a.g.P.m,(h=g.isTextVisible()||a.j.alwaysStreamText)&&a.D==d&&(k=Sj(b),a.i.set(c.X,k),Tj(a,k,0)),A(l)}})}function Uj(a){var b=a.i.get(hc);b&&(Oj(b),Pj(b).catch(function(){}),a.i.delete(hc));a.o=null}
|
|
322
|
+
function Vj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.pb&&(Wj(a,b,!1,0,!1),c.pb=d);else if(d=c.pb)c.pb=null,Wj(a,d,!0,0,!1)}}function Xj(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.B&&(b.video&&Wj(a,b.video,c,d,e,f),b.audio&&Wj(a,b.audio,c,d,e,f))}function Yj(a,b){a.o=b;a.B&&Wj(a,b,!0,0,!1)}
|
|
323
|
+
function Wj(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=hc?g&&(g.pb&&(b.trickModeVideo?(g.pb=b,b=b.trickModeVideo):g.pb=null),g.stream!=b||e)&&(b.type==hc&&Bi(a.g.P,Vc(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Y=null,g.oe=!!f,c&&(g.bc?g.fd=!0:g.ta?(g.bb=!0,g.Ic=d,g.fd=!0):(Oj(g),Zj(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),ak(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Rj(a,b)}
|
|
324
|
+
function ak(a,b){var c,d;return J(function(e){if(1==e.g){if(!b.wa)return e.return();c=b.stream;d=b.wa;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.wa!=d||b.stream!=c)return e.return();var f=a.g.Pc();var g=Gi(a.g.P,b.type),h=b.stream.segmentIndex.find(b.sa?b.sa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.na?k.na-k.Ea:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.na?k.na-k.Ea:null)||0),k=a.g.getBandwidthEstimate(),
|
|
324
325
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.wa.h.g>h?!0:!1):f=!1;f&&b.wa.abort();A(e)})}
|
|
325
|
-
q.uc=function(){if(this.g)for(var a=this.g.Pc(),b=r(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Y&&(e=c.Y.current());if(!e||e.startTime>a||e.endTime<a)c.Y=null;e=this.g.P;d==
|
|
326
|
-
c.uc=!0}}};function
|
|
327
|
-
function
|
|
328
|
-
function
|
|
329
|
-
function
|
|
330
|
-
|
|
331
|
-
function
|
|
332
|
-
f=Infinity;g=Array.from(a.i.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,
|
|
333
|
-
function
|
|
334
|
-
function
|
|
335
|
-
function(
|
|
336
|
-
if(a.s)return z.return();b.sa=d;g.next();b.ta=!1;b.
|
|
337
|
-
function
|
|
338
|
-
function
|
|
339
|
-
function
|
|
340
|
-
2),u(
|
|
341
|
-
function
|
|
342
|
-
w=m.reader.N(),n=m.reader.rc(),t=m.reader.rc();m=m.reader.$a(m.reader.S.byteLength-m.reader.ba());if(p&&p.includes(n)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==n?a.g.
|
|
343
|
-
f,e,g,h,k),4);case 4:mf(a.h),A(l)}})}function
|
|
344
|
-
function
|
|
345
|
-
function
|
|
346
|
-
function
|
|
347
|
-
function
|
|
348
|
-
function
|
|
349
|
-
function
|
|
350
|
-
function
|
|
351
|
-
q.append=function(a){var b=
|
|
352
|
-
c.indexOf(g)});a=r(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&(
|
|
353
|
-
function
|
|
354
|
-
function
|
|
355
|
-
window&&(this.l=new ResizeObserver(function(){
|
|
356
|
-
q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=null);this.l&&(this.l.disconnect(),this.l=null)};q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});
|
|
357
|
-
function
|
|
358
|
-
function
|
|
359
|
-
t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.sc?(c.appendChild(d.sc),d.sc.appendChild(d.
|
|
360
|
-
function
|
|
326
|
+
q.uc=function(){if(this.g)for(var a=this.g.Pc(),b=r(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Y&&(e=c.Y.current());if(!e||e.startTime>a||e.endTime<a)c.Y=null;e=this.g.P;d==hc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Fi(e,d),e=ti(e,a));if(!e){(null!=Gi(this.g.P,d)||c.ta)&&bk(this,c);c.wa&&(c.wa.abort(),c.wa=null);if(d===hc)for(d=this.g.P.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,$h(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())Vh(e.value);
|
|
327
|
+
c.uc=!0}}};function bk(a,b){b.bc||b.bb||(b.ta?(b.bb=!0,b.Ic=0):null==Ei(a.g.P,b.type)?null==b.La&&Tj(a,b,0):(Oj(b),Zj(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
328
|
+
function Qj(a){var b,c,d,e,f,g,h,k,l,m;return J(function(p){if(1==p.g){b=jc;if(!a.l)throw new M(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.eb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.ua,a.l.video),d.add(a.l.video));a.o&&(c.set(b.X,a.o),d.add(a.o));e=a.g.P;f=a.j.forceTransmuxTS;return u(p,e.init(c,f,a.m.sequenceMode),2)}mf(a.h);a.updateDuration();g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||(m=Sj(l),a.i.set(k,m),Tj(a,m,0));A(p)})}
|
|
329
|
+
function Sj(a){return{stream:a,type:a.type,Y:null,sa:null,Uc:null,Id:null,Hd:null,Gd:null,pb:null,endOfStream:!1,ta:!1,La:null,bb:!1,Ic:0,fd:!1,bc:!1,uc:!0,Od:!1,Xd:!1,lc:!1,wa:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.P.Da(a):this.g.P.Da(Math.pow(2,32))};
|
|
330
|
+
function ck(a,b){var c,d,e,f,g;return J(function(h){switch(h.g){case 1:mf(a.h);if(b.ta||null==b.La||b.bc)return h.return();b.La=null;if(!b.bb){h.A(2);break}return u(h,Zj(a,b,b.fd,b.Ic),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.ta||b.La||Tj(a,b,0),h.return();case 4:C(h,6);d=dk(a,b);null!=d&&(Tj(a,b,d),b.lc=!1);ua(h,7);break;case 6:return e=
|
|
331
|
+
F(h),u(h,ek(a,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.P.endOfStream(),10);case 10:mf(a.h),g=a.g.P.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Da(g),A(h)}})}
|
|
332
|
+
function dk(a,b){if(fk(b))return Pi(a.g.P,b.stream.originalId||""),null;b.type==hc&&Qi(a.g.P);var c=a.g.Pc(),d=b.sa?b.sa.endTime:c,e=Hi(a.g.P,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=Gi(a.g.P,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(hc))&&fk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=gk(a,b,c,h);if(!e)return a.j.updateIntervalSeconds;
|
|
333
|
+
f=Infinity;g=Array.from(a.i.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,fk(h)||h.Y&&!h.Y.current()||(f=Math.min(f,h.sa?h.sa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;hk(a,b,c,e).catch(function(){});return null}
|
|
334
|
+
function gk(a,b,c,d){if(b.Y)return b.Y.current();if(b.sa||d)return c=b.sa?b.sa.endTime:d,b.Od=!0,b.Y=b.stream.segmentIndex.Cb(c),b.Y&&b.Y.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.Y=b.stream.segmentIndex.Cb(d),e=b.Y&&b.Y.next().value);e||(b.Y=b.stream.segmentIndex.Cb(c),e=b.Y&&b.Y.next().value);return e}
|
|
335
|
+
function hk(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,y,x,v,w,D;return J(function(z){switch(z.g){case 1:e=jc;f=b.stream;g=b.Y;b.ta=!0;C(z,2);if(2==d.Eb())throw new M(1,1,1011);return u(z,ik(a,b,d),4);case 4:mf(a.h);if(a.s)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h&&!d.m)return p=new Uint8Array(0),t=n=!1,y=function(B){var G,E,H;return J(function(I){if(n)return I.return();t=!0;mf(a.h);if(a.s)return I.return();p=jk(p,B);G=!1;E=0;(new Af).box("mdat",
|
|
336
|
+
function(K){E=K.size+K.start;G=!0}).parse(p,!1,!0);if(!G)return I.A(0);H=p.subarray(0,E);p=p.subarray(E);return u(I,kk(a,b,c,f,d,H),0)})},u(z,lk(a,b,d,y),11);l=lk(a,b,d);return u(z,l,7);case 7:m=z.h;mf(a.h);if(a.s)return z.return();if(!d.m){z.A(8);break}return u(z,mk(m,d,g),9);case 9:m=z.h;case 8:return mf(a.h),b.bb?(b.ta=!1,Tj(a,b,0),z.return()):u(z,kk(a,b,c,f,d,m),6);case 11:x=z.h;if(t){z.A(6);break}n=!0;mf(a.h);return a.s?z.return():b.bb?(b.ta=!1,Tj(a,b,0),z.return()):u(z,kk(a,b,c,f,d,x),6);case 6:mf(a.h);
|
|
337
|
+
if(a.s)return z.return();b.sa=d;g.next();b.ta=!1;b.Xd=!1;v=a.g.P.Oa();w=v[b.type];$a(JSON.stringify(w));b.bb||a.g.Td();Tj(a,b,0);ua(z,0);break;case 2:D=F(z);mf(a.h,D);if(a.s)return z.return();b.ta=!1;if(7001==D.code)b.ta=!1,Oj(b),Tj(a,b,0),z.A(0);else if(b.type==e.X&&a.j.ignoreTextStreamFailures)a.i.delete(e.X),z.A(0);else if(3017==D.code)nk(a,b,D),z.A(0);else return b.lc=!0,D.severity=2,u(z,ek(a,D),0)}})}
|
|
338
|
+
function mk(a,b,c){var d,e,f,g;return J(function(h){if(1==h.g)return d=b.m,d.cryptoKey?h.A(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Db(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function jk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
339
|
+
function nk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Xd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.lc=!0;a.s=!0;a.g.onError(c);return}b.Xd=!0}Tj(a,b,4)}
|
|
340
|
+
function ik(a,b,c){var d,e,f,g,h,k,l,m;return J(function(p){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Id||e!=b.Hd||f!=b.Gd)h=function(){var n;return J(function(t){if(1==t.g)return C(t,2),b.Hd=e,b.Gd=f,b.Id=g,u(t,Si(a.g.P,b.type,g,e,f,a.m.sequenceMode),4);if(2!=t.g)return ua(t,0);n=F(t);b.Hd=null;b.Gd=null;b.Id=null;throw n;})},d.push(h());!oi(c.i,b.Uc)&&(b.Uc=c.i)&&(k=lk(a,b,c.i),l=function(){var n,t,y;return J(function(x){switch(x.g){case 1:return C(x,
|
|
341
|
+
2),u(x,k,4);case 4:return n=x.h,mf(a.h),t=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(x,a.g.qe(b.type,n),5);case 5:return u(x,Ii(a.g.P,b.type,n,null,t),6);case 6:ua(x,0);break;case 2:throw y=F(x),b.Uc=null,y;}})},a.g.Xf(c.startTime,c.i),d.push(l()));a.m.sequenceMode&&(m=b.sa?b.sa.l:null,c.l!=m||b.Od)&&(b.Od=!1,d.push(Ti(a.g.P,b.type,c.startTime)));return u(p,Promise.all(d),0)})}
|
|
342
|
+
function kk(a,b,c,d,e,f){var g,h,k;return J(function(l){switch(l.g){case 1:return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.j.dispatchAllEmsgBoxes)&&(new Af).U("emsg",function(m){var p=d.emsgSchemeIdUris;if(0===m.version){var n=m.reader.rc();var t=m.reader.rc();var y=m.reader.N();var x=m.reader.N();var v=m.reader.N();var w=m.reader.N();var D=e.startTime+x/y}else y=m.reader.N(),D=m.reader.Lb()/y+e.timestampOffset,x=D-e.startTime,v=m.reader.N(),
|
|
343
|
+
w=m.reader.N(),n=m.reader.rc(),t=m.reader.rc();m=m.reader.$a(m.reader.S.byteLength-m.reader.ba());if(p&&p.includes(n)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==n?a.g.Yf():(p=(new Map).set("detail",{startTime:D,endTime:D+v/y,schemeIdUri:n,value:t,timescale:y,presentationTimeDelta:x,eventDuration:v,id:w,messageData:m}),p=new Q("emsg",p),a.g.onEvent(p))}).parse(f),u(l,ok(a,b,c),2);case 2:return mf(a.h),h=b.uc,b.uc=!1,k=b.oe,b.oe=!1,u(l,a.g.qe(b.type,f),3);case 3:return u(l,Ii(a.g.P,b.type,
|
|
344
|
+
f,e,g,h,k),4);case 4:mf(a.h),A(l)}})}function ok(a,b,c){var d,e,f,g;return J(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=Ei(a.g.P,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():u(h,a.g.P.remove(b.type,e,e+g),2)}mf(a.h);A(h)})}function fk(a){return a&&a.type==hc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
345
|
+
function lk(a,b,c,d){var e,f,g,h,k;return J(function(l){if(1==l.g)return e=kf,f=Lj(c.Ba(),c.Ea,c.na,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof ni,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.lb.request(e,f),b.wa=h,u(l,h.promise,2);k=l.h;b.wa=null;return l.return(k.data)})}
|
|
346
|
+
function Zj(a,b,c,d){var e,f;return J(function(g){if(1==g.g)return b.bb=!1,b.fd=!1,b.Ic=0,b.bc=!0,b.sa=null,b.Uc=null,b.Y=null,d?(e=a.g.Pc(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,Ri(a.g.P,b.type),4);if(3!=g.g)return mf(a.h),c?u(g,a.g.P.flush(b.type),3):g.A(3);mf(a.h);b.bc=!1;b.endOfStream=!1;b.ta||b.La||Tj(a,b,0);A(g)})}
|
|
347
|
+
function Tj(a,b,c){var d=b.type;if(d!=hc||a.i.has(d))b.La=(new mc(function(){var e;return J(function(f){if(1==f.g)return C(f,2),u(f,ck(a,b),4);if(2!=f.g)return ua(f,0);e=F(f);if(a.g)a.g.onError(e);A(f)})})).R(c)}function Oj(a){null!=a.La&&(a.La.stop(),a.La=null)}function Pj(a){return J(function(b){return a.wa?u(b,a.wa.abort(),0):b.A(0)})}function ek(a,b){return J(function(c){if(1==c.g)return u(c,Le(a.F),2);mf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);A(c)})};function pk(a,b){var c=qk(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return rk(d)});this.s=new lf(function(){return sk(d)})}pk.prototype.destroy=function(){return this.s.destroy()};function sk(a){var b,c,d;return J(function(e){if(1==e.g)return a.h&&a.h.abort(),tk(a),u(e,a.u,2);a.g&&a.g.Ja.nb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ja.nb();a.g=null;a.m=[];a.j=null;A(e)})}
|
|
348
|
+
function uk(a,b){var c={Jb:function(){},Wc:function(){},nb:function(){},onError:function(){},Yc:function(){},gh:function(){}};a.m.push({create:b,Ja:c});a.h&&a.h.abort();tk(a);return c}
|
|
349
|
+
function rk(a){return J(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.ib)var c=!1;else{a.g&&(a.g.Ja.nb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ja.Jb(),a.g={node:d.node,payload:d.payload,ib:d.ib,Ja:c.Ja}):c.Ja.Yc();c=!0}c?c=Promise.resolve():a.g?c=vk(a):(a.j.Wf(a.i),a.o=new kc,c=a.o);b=u(b,c,1)}return b})}
|
|
350
|
+
function vk(a){var b,c;return J(function(d){switch(d.g){case 1:return a.i=a.j.Df(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.nf(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ja.Wc(),a.g=null);ua(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ja.nb();else a.g.Ja.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function tk(a){a.o&&(a.o.resolve(),a.o=null)};function wk(a){var b=[],c=700<=a.fontWeight,d="italic"==a.fontStyle,e=a.textDecoration.includes("underline");c&&b.push("b");d&&b.push("i");e&&b.push("u");c=b.reduce(function(f,g){return f+"<"+g+">"},"");b=b.reduceRight(function(f,g){return f+"</"+g+">"},"");return a.lineBreak?"\n":a.nestedCues.length?a.nestedCues.map(wk).join(""):c+a.payload+b}
|
|
351
|
+
function xk(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.isContainer)xk(c.nestedCues,b);else{var d=c.clone();d.nestedCues=[];d.payload=wk(c);b.push(d)}return b};function yk(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=yk.prototype;q.remove=function(a,b){if(!this.g)return!1;zk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
352
|
+
q.append=function(a){var b=xk(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=r(b);for(var e=b.next();!e.done;d={ub:d.ub},e=b.next())d.ub=e.value,a.some(function(f){return function(g){return g.startTime==f.ub.startTime&&g.endTime==f.ub.endTime&&g.text==f.ub.payload?!0:!1}}(d))||(e=Ak(d.ub))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
|
|
353
|
+
c.indexOf(g)});a=r(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&(zk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
354
|
+
function Ak(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
355
|
+
function zk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}L("shaka.text.SimpleTextDisplayer",yk);yk.prototype.setTextVisibility=yk.prototype.setTextVisibility;yk.prototype.isTextVisible=yk.prototype.isTextVisible;yk.prototype.destroy=yk.prototype.destroy;yk.prototype.append=yk.prototype.append;yk.prototype.remove=yk.prototype.remove;function Bk(){}function Ck(a){for(;a.firstChild;)a.removeChild(a.firstChild)}L("shaka.util.Dom",Bk);Bk.removeAllChildren=Ck;function Dk(a,b){var c=this;this.j=!1;this.i=[];this.B=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.u=(new O(function(){Ek(c)})).Fa(.25);this.h=new Map;this.s=new nf;this.s.C(document,"fullscreenchange",function(){Ek(c,!0)});this.l=null;"ResizeObserver"in
|
|
356
|
+
window&&(this.l=new ResizeObserver(function(){Ek(c,!0)}),this.l.observe(this.g));this.o=new Map}q=Dk.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Ac:c.Ac},d=a.next())c.Ac=d.value,b.some(function(e){return function(f){return qb(f,e.Ac)}}(c))||this.i.push(c.Ac);Ek(this)};
|
|
357
|
+
q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=null);this.l&&(this.l.disconnect(),this.l=null)};q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Ek(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
|
|
358
|
+
function Fk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
359
|
+
function Gk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,p=l?l.We:null;l&&(g.push(l.yd),l.sc&&g.push(l.sc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Fk(a,p)||(f=!0):(Hk(a,k,e),l=a.h.get(k),p=l.We,f=!0));0<k.nestedCues.length&&p&&Gk(a,k.nestedCues,p,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(n,t){return n.startTime!=
|
|
360
|
+
t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.sc?(c.appendChild(d.sc),d.sc.appendChild(d.yd)):c.appendChild(d.yd)}}function Ek(a,b){if(a.g){var c=a.B.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.o.values());for(var d=b.next();!d.done;d=b.next())Ck(d.value);Ck(a.g);a.h.clear();a.o.clear()}if(a.j){b=new Map;d=r(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));Gk(a,a.i,a.g,c,[])}}}
|
|
361
|
+
function Hk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Ik(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==yb?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==yb?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=document.createElement("span"),h=c.heightUnits==yb?"%":"px",k=c.widthUnits==yb?"%":"px",l=c.viewportAnchorUnits==yb?"%":
|
|
361
362
|
"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(e,g);c=g}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=
|
|
362
|
-
b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{
|
|
363
|
-
function
|
|
364
|
-
"no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=
|
|
365
|
-
"before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=
|
|
363
|
+
b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{yd:f,We:e,sc:c})}
|
|
364
|
+
function Ik(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Jk(c.linePadding,c,a.m);f.paddingRight=Jk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
|
|
365
|
+
"no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Kk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent=
|
|
366
|
+
"before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Jk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==kb?(f.width="100%",c.lineAlign==mb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==mb?f.left=c.line+
|
|
366
367
|
"%":"end"==c.lineAlign&&(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==mb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==kb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&
|
|
367
|
-
f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==kb?f.width=c.size+"%":f.height=c.size+"%")}function
|
|
368
|
-
function
|
|
369
|
-
break;case "right":g.push("align:right");break;case jb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}L("shaka.text.WebVttGenerator",function(){});function
|
|
370
|
-
function
|
|
371
|
-
function
|
|
372
|
-
function
|
|
373
|
-
function
|
|
374
|
-
function
|
|
375
|
-
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function
|
|
376
|
-
function
|
|
377
|
-
function
|
|
378
|
-
k),g=!1)}return g}function
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
function
|
|
368
|
+
f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==kb?f.width=c.size+"%":f.height=c.size+"%")}function Jk(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}
|
|
369
|
+
function Kk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}L("shaka.text.UITextDisplayer",Dk);Dk.prototype.setTextVisibility=Dk.prototype.setTextVisibility;Dk.prototype.isTextVisible=Dk.prototype.isTextVisible;Dk.prototype.remove=Dk.prototype.remove;Dk.prototype.destroy=Dk.prototype.destroy;Dk.prototype.append=Dk.prototype.append;function Lk(a,b){function c(f){for(var g=f,h=r(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=xk(a,[]);a="WEBVTT\n\n";d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
|
|
370
|
+
break;case "right":g.push("align:right");break;case jb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}L("shaka.text.WebVttGenerator",function(){});function Mk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function Nk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.V()?Ok:Pk};d.ot=Qk(c);var e=d.ot===Rk||d.ot===Sk||d.ot===Tk||d.ot===Uk;e&&(d.bl=Vk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==Uk&&(d.tb=Wk(a,d.ot)/1E3);Xk(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
|
|
371
|
+
function Yk(a,b,c){try{if(!a.g.enabled)return b;var d=Zk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Tk;break a;case "application/x-mpegurl":e=$k;break a}e=void 0}d.ot=e;d.su=!0;var f=al(d);return bl(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Zk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
372
|
+
function Xk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Zk(a));c.pr=a.h.Oc();var e=c.ot===Rk||c.ot===Tk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=cl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=al(c);f&&(b.uris=b.uris.map(function(g){return bl(g,f)}))}}}
|
|
373
|
+
function Qk(a){var b=a.type;if(a.init)return dl;if("video"==b)return a.codecs.includes(",")?Tk:Rk;if("audio"==b)return Sk;if("text"==b)return"application/mp4"===a.mimeType?Uk:el}function Vk(a,b){b=a.h.Oa()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
|
|
374
|
+
function Wk(a,b){var c=a.h.Za();if(!c.length)return NaN;a=c[0];c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Rk:return a.videoBandwidth||NaN;case Sk:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
375
|
+
function al(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
376
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function cl(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=al(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
377
|
+
function bl(a,b){if(!b||a.includes("offline:"))return a;a=new Lb(a);a.g.set("CMCD",b);return a.toString()}var $k="m",Sk="a",Rk="v",Tk="av",dl="i",el="c",Uk="tt",Pk="v",Ok="l";L("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Rg:"s",OTHER:"o"});function fl(){}
|
|
378
|
+
function gl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=We(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=We(l)),k=gl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
|
|
379
|
+
k),g=!1)}return g}function hl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function il(a,b){return a&&b}L("shaka.util.ConfigUtils",fl);fl.convertToConfigObject=hl;fl.mergeConfigObjects=gl;function jl(){}function kl(a){a=Dc(a);return(new Lb(a)).Ia}function ll(a,b,c){function d(h){Gb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Db(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new M(2,6,6015);var e;"string"==typeof b?e=Fc(b,!0):e=b;a=Dc(a);a=Fc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}L("shaka.util.FairPlayUtils",jl);
|
|
380
|
+
jl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Ac(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Eb(Lc(c)))}};jl.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};jl.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
|
|
381
|
+
jl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Db(b.body),a=Kc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ec("spc="+a))};jl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Dc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return ll(a,d,b)};
|
|
382
|
+
jl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Dc(a).split(";").pop();return ll(a,c,b)};jl.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Dc(a).split("skd://").pop();return ll(a,c,b)};jl.initDataTransform=ll;jl.defaultGetContentId=kl;
|
|
383
|
+
jl.isFairPlaySupported=function(){var a;return J(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},C(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);F(b);return b.return(!1)})};function ml(){}
|
|
384
|
+
function nl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ke(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=kl(g),g=ll(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:qc()},c={retryParameters:Ke(),availabilityWindowOverride:NaN,disableAudio:!1,
|
|
384
385
|
disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
|
|
385
|
-
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return
|
|
386
|
-
d={retryParameters:Ke(),failureCallback:function(g){return
|
|
387
|
-
maxDisabledTime:30};if(
|
|
388
|
-
streaming:d,offline:e,abrFactory:function(){return new
|
|
386
|
+
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return il([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},
|
|
387
|
+
d={retryParameters:Ke(),failureCallback:function(g){return il([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,
|
|
388
|
+
maxDisabledTime:30};if(rc("Web0S")||sc()||rc("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return J(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return J(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k.return(!0);h=k.h;return k.return(h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return il([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,
|
|
389
|
+
streaming:d,offline:e,abrFactory:function(){return new ne},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,ignoreDevicePixelRatio:!1},
|
|
389
390
|
preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,
|
|
390
|
-
sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return
|
|
391
|
-
function
|
|
392
|
-
2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=
|
|
393
|
-
function
|
|
394
|
-
this.$b=this.h.preferForcedSubs;this.Yb=[];this.ec=null;b&&b(this);this.F=
|
|
395
|
-
f){return Qe(
|
|
396
|
-
function(e,f){return
|
|
397
|
-
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return
|
|
398
|
-
q.destroy=function(){var a=this,b;return
|
|
399
|
-
if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:a.s&&(a.s.release(),a.s=null),Ve.prototype.release.call(a),A(c)}})};q.Zb=function(a,b){b=void 0===b?!0:b;if(this.l==
|
|
400
|
-
q.detach=function(){var a=this;if(this.l==
|
|
401
|
-
q.load=function(a,b,c){var d=this;this.ec=null;if(this.l==
|
|
402
|
-
g.nb=function(){return k(
|
|
403
|
-
function
|
|
404
|
-
function
|
|
391
|
+
sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return J(function(h){return h.return(ol(g,f.preferredAudioLanguage))})};return f}function pl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return gl(a,b,c||nl(),d,"")}
|
|
392
|
+
function ol(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=vd(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return kd(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
|
|
393
|
+
2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=hc&&"image"!=d.type||b.push(d);return b}L("shaka.util.PlayerConfiguration",ml);ml.mergeConfigObjects=pl;ml.createDefault=nl;function ql(){this.g=null;this.h=[]}function rl(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function sl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
|
|
394
|
+
function tl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function ul(){this.i=this.h=null;this.g=[]}function vl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function wl(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.O=this.T=this.J=this.L=this.M=this.l=this.o=NaN;this.g=new ql;this.h=new ul};function U(a,b){Ve.call(this);var c=this;this.l=xl;this.Kc=this.g=null;this.da=!1;this.Sc=new nf;this.Ob=new nf;this.u=new nf;this.Ed=this.s=this.Xb=this.i=this.Tc=this.J=this.j=this.ka=this.T=this.la=this.M=this.Lc=this.G=this.xb=this.B=this.L=this.m=this.F=null;this.Ke=1E9;this.h=yl(this);this.dc={width:Infinity,height:Infinity};this.o=null;this.Ma=new Be(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.vb=this.h.preferredTextLanguage;this.ac=this.h.preferredTextRole;
|
|
395
|
+
this.$b=this.h.preferForcedSubs;this.Yb=[];this.ec=null;b&&b(this);this.F=zl(this);this.F.de(this.h.streaming.forceHTTPS);this.D=null;Al&&(this.D=Al());this.Sc.C(window,"online",function(){c.Yd()});this.O={name:"detach"};this.Z={name:"attach"};this.fa={name:"unload"};this.Rd={name:"manifest-parser"};this.Nd={name:"manifest"};this.wb={name:"media-source"};this.Fd={name:"drm-engine"};this.$={name:"load"};this.Ud={name:"src-equals-drm-engine"};this.yb={name:"src-equals"};var d=new Map;d.set(this.Z,function(e,
|
|
396
|
+
f){return Qe(Bl(c,e,f))});d.set(this.O,function(e){e.K&&(c.Ob.ob(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Qe(e)});d.set(this.fa,function(e){return Qe(Cl(c,e))});d.set(this.wb,function(e){e=Dl(c,e);return Qe(e)});d.set(this.Rd,function(e,f){e=El(c,e,f);return Qe(e)});d.set(this.Nd,function(e){return Fl(c,e)});d.set(this.Fd,function(e){e=Gl(c,e);return Qe(e)});d.set(this.$,function(e,f){return Qe(Hl(c,e,f))});d.set(this.Ud,function(e,f){e=Il(c,e,f);return Qe(e)});d.set(this.yb,
|
|
397
|
+
function(e,f){return Jl(c,e,f)});this.ya=new pk(this.O,{Df:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Z);e==c.Z&&(k=g==c.O||f.K!=h.K?c.O:g==c.Z?c.Z:g==c.wb||g==c.$?c.wb:g==c.yb?c.Ud:null);e==c.wb&&(k=g==c.$&&f.K==h.K?c.Rd:c.fa);e==c.Rd&&(k=Kl(c.$,c.Nd,c.fa,g,f,h));e==c.Nd&&(k=Kl(c.$,c.Fd,c.fa,g,f,h));e==c.Fd&&(k=Kl(c.$,c.$,c.fa,g,f,h));e==c.Ud&&(k=g==c.yb&&f.K==h.K?c.yb:c.fa);if(e==c.$||e==c.yb)k=c.fa;e==c.fa&&(k=h.K&&f.K==h.K?c.Z:c.O);return k},nf:function(e,f,g){c.dispatchEvent(Ll("onstatechange",
|
|
398
|
+
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return J(function(f){return 1==f.g?u(f,Cl(c,e),2):f.return(e.K?c.Z:c.O)})},Wf:function(e){c.dispatchEvent(Ll("onstateidle",(new Map).set("state",e.name)))}});this.Je=new O(function(){Md(c.i.variants,c.h.restrictions,c.dc)&&Ml(c)});a&&this.Zb(a,!0)}pa(U,Ve);function Ll(a,b){return new Q(a,b)}q=U.prototype;
|
|
399
|
+
q.destroy=function(){var a=this,b;return J(function(c){switch(c.g){case 1:if(a.l==Nl)return c.return();a.l=Nl;b=uk(a.ya,function(){return{node:a.O,payload:qk(),ib:!1}});return u(c,new Promise(function(d){b.Jb=function(){};b.Wc=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.Yc=function(){d()}}),2);case 2:return u(c,a.ya.destroy(),3);case 3:a.Sc&&(a.Sc.release(),a.Sc=null);a.Ob&&(a.Ob.release(),a.Ob=null);a.u&&(a.u.release(),a.u=null);a.Ed=null;a.h=null;a.o=null;a.Kc=null;a.T=null;
|
|
400
|
+
if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:a.s&&(a.s.release(),a.s=null),Ve.prototype.release.call(a),A(c)}})};q.Zb=function(a,b){b=void 0===b?!0:b;if(this.l==Nl)return Promise.reject(Ol());var c=qk();c.K=a;nc()||(b=!1);var d=b?this.wb:this.Z;a=uk(this.ya,function(){return{node:d,payload:c,ib:!1}});a.Jb=function(){};return Pl(a)};
|
|
401
|
+
q.detach=function(){var a=this;if(this.l==Nl)return Promise.reject(Ol());var b=uk(this.ya,function(){return{node:a.O,payload:qk(),ib:!1}});b.Jb=function(){};return Pl(b)};q.ke=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Nl)return Promise.reject(Ol());nc()||(a=!1);var c=qk(),d=uk(this.ya,function(e){var f=e.K&&a?b.wb:e.K?b.Z:b.O;c.K=e.K;return{node:f,payload:c,ib:!1}});d.Jb=function(){};return Pl(d)};q.wg=function(a){this.ec=a};
|
|
402
|
+
q.load=function(a,b,c){var d=this;this.ec=null;if(this.l==Nl)return Promise.reject(Ol());this.dispatchEvent(Ll("loading"));var e=qk();e.uri=a;e.bd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Ql(this,e)?this.yb:this.$,g=uk(this.ya,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,ib:!0}});this.o=new wl;this.T=Rl(this);g.Jb=function(){};return new Promise(function(h,k){g.Yc=function(){return k(new M(2,7,7002))};g.Wc=function(){h();d.dispatchEvent(Ll("loaded"))};
|
|
403
|
+
g.nb=function(){return k(Ol())};g.onError=function(l){return k(l)}})};function Ql(a,b){if(!nc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Wg(d),c=Sl[c]);if(c){if(""==(b.K||pc()).canPlayType(c))return!1;if(!nc()||!(c in Vg||Wg(d)in Xg)||("application/x-mpegurl"===c||"application/vnd.apple.mpegurl"===c)&&a.h.streaming.preferNativeHls)return!0;if(uc())return a.h.streaming.useNativeHlsOnSafari}return!1}
|
|
404
|
+
function Bl(a,b,c){null==b.K&&(b.K=c.K,a.Ob.C(b.K,"error",function(){var d=Tl(a);d&&Ul(a,d)}));a.g=b.K;return Promise.resolve()}
|
|
405
|
+
function Cl(a,b){var c,d,e,f,g,h,k,l,m;return J(function(p){switch(p.g){case 1:return a.l!=Nl&&(a.l=xl),c=a.Yb.map(function(n){return n()}),a.Yb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(Ll("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.la&&(a.la.release(),a.la=null);b.K&&a.u.ob();a.Je.stop();a.xb&&(a.xb.release(),a.xb=null);a.Lc&&(a.Lc.stop(),a.Lc=null);if(!a.J){p.A(3);break}return u(p,a.J.stop(),4);case 4:a.J=null,a.Tc=null;case 3:if(!a.s){p.A(5);break}return u(p,a.s.stop(),5);
|
|
405
406
|
case 5:if(!a.j){p.A(7);break}return u(p,a.j.destroy(),8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.B&&(a.B.release(),a.B=null);if(!a.L){p.A(9);break}return u(p,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.K||!b.K.src){p.A(11);break}return u(p,new Promise(function(n){return(new O(n)).R(.1)}),12);case 12:for(b.K.removeAttribute("src"),b.K.load();b.K.lastChild;)b.K.removeChild(b.K.firstChild);case 11:if(!a.m){p.A(13);break}return u(p,a.m.destroy(),14);case 14:a.m=
|
|
406
|
-
null;case 13:a.Xb=null;a.M=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.o=new
|
|
407
|
-
function
|
|
408
|
-
function
|
|
409
|
-
function
|
|
410
|
-
height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(
|
|
411
|
-
f)},onTimelineRegionAdded:function(f){var g=a.la;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new Q("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return
|
|
412
|
-
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()}},e=Date.now()/1E3;return new Me(function(){var f,g,h,k;return
|
|
413
|
-
function
|
|
414
|
-
function
|
|
415
|
-
(a.
|
|
416
|
-
k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);
|
|
417
|
-
break}p=a.B.Fc();return u(
|
|
418
|
-
a.u.ia(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.
|
|
419
|
-
function
|
|
407
|
+
null;case 13:a.Xb=null;a.M=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.o=new wl;a.Kd=null;Vl(a);A(p)}})}
|
|
408
|
+
function Dl(a,b){var c,d,e,f,g,h;return J(function(k){if(1==k.g)return c=new li,d=a.h.textDisplayFactory,e=d(),a.Kd=d,f=Wl(b.K,c,e,function(l,m,p){l=r(l);for(var n=l.next();!n.done;n=l.next())if(n=n.value,n.data&&n.cueTime&&n.frames){for(var t=n.cueTime+m,y=p,x=r(n.frames),v=x.next();!v.done;v=x.next())Xl(a,t,y,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(n,t)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.F=h,u(k,f.G,2);a.L=f;A(k)})}
|
|
409
|
+
function El(a,b,c){var d,e,f,g;return J(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Xb=d,f=a,u(h,Ug(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Tc=h.h;a.J=a.Tc();g=We(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.J.configure(g);A(h)})}
|
|
410
|
+
function Fl(a,b){var c=b.uri;b=a.F;a.la=new Fj(function(){return a.tc()});a.la.addEventListener("regionadd",function(f){f=f.region;Yl(a,"timelineregionadded",f);if(a.D)a.D.onDashTimedMetadata(f)});a.ka=null;a.h.streaming.observeQualityChanges&&(a.ka=new Bj(function(){return a.Oa()}),a.ka.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
|
|
411
|
+
height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(Ll("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.T;try{h.g.enabled&&(h.o=g.format,Xk(h,f,{ot:$k,su:!h.i}))}catch(k){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){Nk(a.T,f,g)},filter:function(f){return Zl(a,f)},makeTextStreamsForClosedCaptions:function(f){return $l(a,
|
|
412
|
+
f)},onTimelineRegionAdded:function(f){var g=a.la;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new Q("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return Ul(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
|
|
413
|
+
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()}},e=Date.now()/1E3;return new Me(function(){var f,g,h,k;return J(function(l){if(1==l.g)return f=a,u(l,a.J.start(c,d),2);f.i=l.h;g=Ll("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new M(2,4,4036);am(a.i);h=Date.now()/1E3;k=h-e;a.o.F=k;A(l)})}(),function(){return a.J.stop()})}
|
|
414
|
+
function Gl(a,b){var c,d;return J(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=bm(a,{lb:a.F,onError:function(f){Ul(a,f)},Xc:function(f){cm(a,f)},onExpirationUpdated:function(f,g){dm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,og(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Zb(b.K),3):u(e,Zl(a,a.i),0)})}
|
|
415
|
+
function Hl(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y;return J(function(x){switch(x.g){case 1:b.startTime=c.startTime;null!=a.ec&&(b.startTime=a.ec,a.ec=null);d=b.K;e=b.uri;a.Xb=e;a.G=new xj({Qc:function(){return d.playbackRate},Mc:function(){return d.defaultPlaybackRate},fe:function(v){d.playbackRate=v},He:function(v){d.currentTime+=v}});f=function(){return em(a)};g=function(){return fm(a)};a.u.C(d,"playing",f);a.u.C(d,"pause",f);a.u.C(d,"ended",f);a.u.C(d,"ratechange",g);h=a.h.abrFactory;a.s&&a.Ed==h||
|
|
416
|
+
(a.Ed=h,a.s=h(),"function"!=typeof a.s.setMediaElement&&(se(),a.s.setMediaElement=function(){}),a.s.configure(a.h.abr));a.Ma=new Be(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.vb=a.h.preferredTextLanguage;a.ac=a.h.preferredTextRole;a.$b=a.h.preferForcedSubs;gm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(v,w,D){a.j&&v!=a.j.l&&hm(a,v,!0,void 0===w?!1:w,void 0===D?0:D)});a.s.setMediaElement(d);a.B=im(a,b.startTime);a.xb=jm(a,
|
|
417
|
+
b.bd);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);km(a,k);yd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=lm(a);a.j.configure(a.h.streaming);a.l=mm;d.textTracks&&a.u.C(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":nm(a,v)}});a.dispatchEvent(Ll("streaming"));l=null;if(m=a.Za().find(function(v){return v.active})){x.A(2);break}l=Ml(a);hm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.A(3);
|
|
418
|
+
break}p=a.B.Fc();return u(x,om(l,p),4);case 4:n=x.h,a.B.xd(n);case 3:pm(a,null,ae(l));case 2:return a.B.wd(),t=a.Fb().find(function(v){return v.active}),t||((y=ke(a.i.textStreams,a.vb,a.ac,a.$b)[0]||null)&&vl(a.o.h,y,!0),l&&(y?(l.audio&&qm(a,l.audio,y)&&(a.da=!0),a.da&&a.L.m.setTextVisibility(!0),rm(a)):a.da=!1),y&&(a.h.streaming.alwaysStreamText||a.Dd())&&Yj(a.j,y)),u(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.s.enable(),sm(a)),Pd(a.j?a.j.l:null,a.i),tm(a.i),um(a),vm(a),a.i.variants.some(function(v){return v.primary}),
|
|
419
|
+
a.u.ia(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.bd}),A(x)}})}
|
|
420
|
+
function Il(a,b,c){var d,e,f,g,h,k,l;return J(function(m){return 1==m.g?(d=jc,e=Date.now()/1E3,f=!0,a.m=bm(a,{lb:a.F,onError:function(p){Ul(a,p)},Xc:function(p){cm(a,p)},onExpirationUpdated:function(p,n){dm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Wg(g),k=Sl[h],"application/x-mpegurl"==k&&uc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
|
|
420
421
|
primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Zc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ua,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
421
422
|
a.m.$=!0,u(m,og(a.m,[l],[]),2)):u(m,a.m.Zb(b.K),0)})}
|
|
422
|
-
function
|
|
423
|
-
e.preload&&a.u.ia(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.
|
|
424
|
-
"change",function(){return
|
|
425
|
-
2);if(f)return l.return();
|
|
426
|
-
function
|
|
427
|
-
function
|
|
428
|
-
function
|
|
429
|
-
function
|
|
430
|
-
function
|
|
431
|
-
function
|
|
432
|
-
function
|
|
433
|
-
function
|
|
434
|
-
function
|
|
423
|
+
function Jl(a,b,c){function d(){return em(a)}b.uri=c.uri;b.startTime=c.startTime;a.Xb=b.uri;var e=b.K;a.B=new mj(e);var f=!1;a.Yb.push(function(){f=!0});null!=b.startTime&&a.B.xd(b.startTime);a.G=new xj({Qc:function(){return e.playbackRate},Mc:function(){return e.defaultPlaybackRate},fe:function(k){e.playbackRate=k},He:function(k){e.currentTime+=k}});km(a,a.h.streaming.rebufferingGoal);a.u.C(e,"playing",d);a.u.C(e,"pause",d);a.u.C(e,"ended",d);a.u.C(e,"ratechange",function(){return fm(a)});"none"!=
|
|
424
|
+
e.preload&&a.u.ia(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.bd});e.audioTracks&&(a.u.C(e.audioTracks,"addtrack",function(){return um(a)}),a.u.C(e.audioTracks,"removetrack",function(){return um(a)}),a.u.C(e.audioTracks,"change",function(){return um(a)}));e.textTracks&&(a.u.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":wm(a,k);break;case "chapters":nm(a,k);break;default:um(a)}}),a.u.C(e.textTracks,"removetrack",function(){return um(a)}),a.u.C(e.textTracks,
|
|
425
|
+
"change",function(){return um(a)}));var g=Wg(b.uri);e.src=Yk(a.T,b.uri,Sl[g]);(sc()||rc("Web0S"))&&e.load();a.l=xm;a.dispatchEvent(Ll("streaming"));var h=new kc;dj(e,HTMLMediaElement.HAVE_METADATA,a.u,function(){a.B.wd();h.resolve()});dj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){var k;return J(function(l){if(1==l.g)return ym(a),k=zm(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.da=!0),l.A(2)):u(l,new Promise(function(m){a.u.ia(e.textTracks,"change",m);(new O(m)).R(1)}),
|
|
426
|
+
2);if(f)return l.return();Am(a);A(l)})});e.error?h.reject(Tl(a)):"none"==e.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.u.ia(e,"error",function(){h.reject(Tl(a))});return new Me(h,function(){h.reject(new M(2,7,7001));return Promise.resolve()})}
|
|
427
|
+
function ym(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.ae(b);var c=a.h.preferredVariantRole;""!=c&&a.ae(b,c)}}function Am(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.be(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.be(b,d,c)}}
|
|
428
|
+
function wm(a,b){if("metadata"==b.kind){b.mode="hidden";a.u.C(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Xl(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Bm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Nb().R(.5);a.Yb.push(function(){c.stop()})}}
|
|
429
|
+
function Xl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Ll("metadata",b))}function nm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Nb().R(.5);a.Yb.push(function(){c.stop()})}}function am(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function bm(a,b){return new hg(b,a.h.drm.updateExpirationTime)}
|
|
430
|
+
function zl(a){return new $e(function(b,c){a.s&&a.s.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Ll("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Ll("downloadfailed",b))})}
|
|
431
|
+
function im(a,b){return new nj(a.g,a.i,a.h.streaming,b,function(){a.xb&&Aj(a.xb,!0);a.j&&a.j.uc();a.M&&Cm(a)},function(c){return a.dispatchEvent(c)})}
|
|
432
|
+
function jm(a,b){b=new Gj(a.la,a.V()||0<b);b.addEventListener("enter",function(d){Yl(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Yl(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Yl(a,"timelineregionenter",e),Yl(a,"timelineregionexit",e))});var c=new zj(a.g);c.g.add(b);a.ka&&c.g.add(a.ka);return c}function km(a,b){a.M=new Fe;a.M.g=He;Ie(a.M,b,Math.min(.5,b/2));Vl(a);a.Lc=(new O(function(){Cm(a)})).Fa(.25)}
|
|
433
|
+
function Cm(a){switch(a.l){case xm:if(a.g.ended)var b=!0;else{var c=si(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case mm:a:if(a.g.ended||Di(a.L))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.hb();var d=si(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ui(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ge:He;c.g=d;b!=d&&Vl(a)}function Wl(a,b,c,d){return new xi(a,b,c,d)}
|
|
434
|
+
function Rl(a){return new Mk({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Oa:function(){return a.Oa()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Za:function(){return a.Za()},Oc:function(){return a.Oc()},V:function(){return a.V()}},a.h.cmcd)}
|
|
435
|
+
function lm(a){return new Mj(a.i,{Pc:function(){return a.B.Fc()},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Nk(a.T,b,c)},P:a.L,lb:a.F,onError:function(b){return Ul(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Yf:function(){a.J&&a.J.update&&a.J.update()},Td:function(){a.B&&a.B.Ie();Cm(a)},Xf:function(b,c){(c=c.Ld)&&a.ka&&Dj(a.ka,c,b)},qe:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.L&&["audio","video"].includes(b)){c=new Jf(Db(c));
|
|
435
436
|
var e=0,f=r(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=r(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;xg(d,"cenc",e);d=d.o}}else d=Promise.resolve();return d}})}
|
|
436
|
-
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
437
|
-
function
|
|
438
|
-
c);a.
|
|
439
|
-
q.
|
|
440
|
-
q.ze=function(){return this.D?this.D:null};q.
|
|
441
|
-
q.tc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Db(),end:a.Pa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.
|
|
442
|
-
q.
|
|
443
|
-
q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,
|
|
444
|
-
q.Fb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=
|
|
445
|
-
q.
|
|
446
|
-
f.startTime;v=f.o||y
|
|
447
|
-
q.Oe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(
|
|
448
|
-
q.Pe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&
|
|
449
|
-
|
|
450
|
-
q
|
|
451
|
-
r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=
|
|
452
|
-
q.
|
|
453
|
-
q.
|
|
454
|
-
q.
|
|
455
|
-
q.
|
|
456
|
-
function
|
|
457
|
-
q.
|
|
458
|
-
q.
|
|
459
|
-
q.Be=function(){if(!this.
|
|
460
|
-
q.getStats=function(){if(this.l!=
|
|
461
|
-
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.o.O=this.B.me(),this.o.T=this.B.ne());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.L=d;this.o.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.o.s=c;if(this.l==
|
|
462
|
-
1E3*this.tc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.o.u=c}this.l==
|
|
463
|
-
id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:
|
|
464
|
-
q.af=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,x,
|
|
465
|
-
|
|
466
|
-
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Vc(v.mimeType,v.codecs);D=ad(w);if(!D)throw new M(2,2,2014,d);h.i.textStreams.push(v);
|
|
467
|
-
q.$e=function(a,b,c){var d=this,e,f,g,h;return
|
|
468
|
-
case 5:throw new M(1,2,2012);}})};function
|
|
469
|
-
function
|
|
470
|
-
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function
|
|
471
|
-
function
|
|
472
|
-
q.
|
|
473
|
-
function
|
|
474
|
-
function
|
|
475
|
-
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:
|
|
476
|
-
function
|
|
477
|
-
function
|
|
478
|
-
function
|
|
479
|
-
function
|
|
480
|
-
function
|
|
481
|
-
function
|
|
482
|
-
function
|
|
483
|
-
function
|
|
484
|
-
function
|
|
485
|
-
function
|
|
486
|
-
function
|
|
487
|
-
function
|
|
488
|
-
(e=!0)}}}if(!e||
|
|
489
|
-
function
|
|
490
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new M(2,4,4012,a);}function
|
|
491
|
-
function
|
|
492
|
-
h.push({language:l,role:m,label:p})}});return h}function
|
|
493
|
-
U.prototype.getManifestParserFactory=U.prototype.
|
|
494
|
-
U.prototype.setTextTrackVisibility=U.prototype.
|
|
495
|
-
U.prototype.getAudioLanguagesAndRoles=U.prototype.
|
|
496
|
-
U.prototype.getExpiration=U.prototype.hc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.
|
|
497
|
-
U.prototype.getLoadMode=U.prototype.
|
|
498
|
-
U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return
|
|
499
|
-
|
|
500
|
-
k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=
|
|
501
|
-
U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||
|
|
502
|
-
U.registerSupportPlugin=function(a,b){
|
|
503
|
-
var
|
|
504
|
-
ssa:"text/x-ssa",ass:"text/x-ssa"};function
|
|
437
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hl(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=pl(this.h,a,yl(this));Dm(this);return c};
|
|
438
|
+
function Dm(a){if(a.J){var b=We(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Em(a,a.i)}catch(f){Ul(a,f)}a.s&&vm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Fm(a)}a.F&&a.F.de(a.h.streaming.forceHTTPS);if(a.L&&(a.L.F=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Kd!=b)){var c=b(),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=
|
|
439
|
+
c);a.Kd=b;a.j&&(b=a.j,(c=b.i.get(hc))&&Wj(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),sm(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ie(a.M,b,Math.min(.5,b/2)));a.i&&gm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=yl(this);pl(a,this.h,yl(this));return a};
|
|
440
|
+
q.rf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.tc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.hg=function(){for(var a in this.h)delete this.h[a];pl(this.h,yl(this),yl(this));Dm(this)};q.yf=function(){return this.l};q.Cf=function(){return this.g};q.ic=function(){return this.F};q.zd=function(){return this.Xb};
|
|
441
|
+
q.ze=function(){return this.D?this.D:null};q.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};q.kb=function(){return this.i?this.i.presentationTimeline.kb():!1};q.Pf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
442
|
+
q.tc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Db(),end:a.Pa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Nf=function(){this.V()&&(this.g.currentTime=this.tc().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.hc=function(){return this.m?this.m.hc():Infinity};q.Nc=function(){return this.m?this.m.Nc():{}};
|
|
443
|
+
q.Bd=function(){return this.M?this.M.g==He:!1};q.Oc=function(){return this.g?this.G?this.G.i:1:0};q.rg=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==mm&&(this.s.playbackRateChanged(a),Vj(this.j,1<Math.abs(a))))};q.ef=function(){var a=this.G.Mc();this.l==xm&&this.G.set(a);this.l==mm&&(this.G.set(a),this.s.playbackRateChanged(a),Vj(this.j,!1))};
|
|
444
|
+
q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ie(e)){var f=ae(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return he(g)}):[]};
|
|
445
|
+
q.Fb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=be(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?zm(this).map(function(f){return fe(f)}):[]};q.wf=function(){return this.i?this.i.imageStreams.map(function(a){return ce(a)}):[]};
|
|
446
|
+
q.Jf=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B;return J(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.A(3):u(G,d.createSegmentIndex(),3):G.return(null):G.A(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;y=m*p;x=f.j-
|
|
447
|
+
f.startTime;v=f.o||x/y;w=f.startTime;z=D=0;1<y&&(B=Math.floor((b-f.startTime)/v),w=f.startTime+B*v,D=B%m*n,z=Math.floor(B/m)*t);return G.return({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:z,startTime:w,duration:v,uris:f.Ba(),width:n})}return G.return(null)})};
|
|
448
|
+
q.Oe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(vl(this.o.h,b,!1),Yj(this.j,b),Gm(this),this.vb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,de(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";Gm(this)}};
|
|
449
|
+
q.Pe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&ie(d)&&(hm(this,d,!1,b,c),this.Ma=new Ae(d),vm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
450
|
+
de(c)==a.id){Hm(this,c);break}};q.qf=function(){return Im(this.Za())};q.If=function(){return Im(this.Fb())};q.pf=function(){return Array.from(Jm(this.Za()))};q.Hf=function(){return Array.from(Jm(this.Fb()))};
|
|
451
|
+
q.ae=function(a,b){if(this.i&&this.B){this.Ma=new Be(a,b||"",0,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var c=this.Ma.create(this.i.variants),d=null;c=r(c.values());for(var e=c.next();!e.done;e=c.next())if(e=e.value,!d||b(d,a)>b(e,a))d=e;d?(b=ae(d),this.Pe(b,!0)):Fm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);a=kd(a);c=d=null;e=
|
|
452
|
+
r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=he(f);kd(g.language)==a&&(d=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Hm(this,c):d&&Hm(this,d)}};
|
|
453
|
+
q.be=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.vb=a,this.ac=b||"",this.$b=c,(a=ke(this.i.textStreams,this.vb,this.ac,this.$b)[0]||null)&&a!=this.j.o&&(vl(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Dd()))Yj(this.j,a),Gm(this)}else{var d=kd(a);(a=this.Fb().find(function(e){return kd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Oe(a)}};
|
|
454
|
+
q.jg=function(a){if(this.i&&this.B){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ma=new Be(b.language,"",0,a),Fm(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Hm(this,b)}};
|
|
455
|
+
q.Dd=function(){var a=this.da;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?zm(this).some(function(b){return"showing"==b.mode}):a};q.Ae=function(){return this.g&&this.g.src&&this.g.textTracks?Km(this).map(function(a){return fe(a)}):[]};
|
|
456
|
+
q.tf=function(a){var b=kd(a),c=Km(this).filter(function(h){return kd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
457
|
+
function zm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Bm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Km(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
458
|
+
q.pg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==mm)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ke(this.i.textStreams,this.vb,this.ac,this.$b),0<a.length&&(Yj(this.j,a[0]),Gm(this))):Uj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}rm(this)}};
|
|
459
|
+
q.Ff=function(){if(!this.V())return null;var a=this.ya.l,b=0;if(this.B)b=this.B.Fc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
460
|
+
q.Be=function(){if(!this.V())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.Oa=function(){if(this.l==mm)return this.L.Oa();var a={total:[],audio:[],video:[],text:[]};this.l==xm&&(a.total=vi(this.g.buffered));return a};
|
|
461
|
+
q.getStats=function(){if(this.l!=mm&&this.l!=xm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};em(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
|
|
462
|
+
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.o.O=this.B.me(),this.o.T=this.B.ne());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.L=d;this.o.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.o.s=c;if(this.l==mm){if(c=this.j.l)this.o.B=(this.G?this.G.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.Be().valueOf()+
|
|
463
|
+
1E3*this.tc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.o.u=c}this.l==xm&&(c=this.o,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.o;a=e.o;c=e.l;b=e.B;d=e.L;var f=e.M,g=e.J,h=e.T,k=e.O,l=e.u,m=e.i,p=e.m,n=e.F,t=e.j,y=sl(e.g,"playing"),x=sl(e.g,"paused"),v=sl(e.g,"buffering"),w=e.s,D=e.D,z=e.G,B=tl(e.g),G=[];e=r(e.h.g);for(var E=e.next();!E.done;E=e.next())E=E.value,G.push({timestamp:E.timestamp,
|
|
464
|
+
id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:y,pauseTime:x,bufferingTime:v,licenseTime:w,liveLatency:D,maxSegmentDuration:z,stateHistory:B,switchHistory:G}};
|
|
465
|
+
q.af=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,y,x,v,w,D;return J(function(z){switch(z.g){case 1:if(h.l!=mm&&h.l!=xm)throw new M(1,7,7004);if(d){z.A(2);break}return u(z,Lm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=xm){z.A(4);break}g&&(c="forced");return u(z,Mm(h,a,b,c,d,f||"",k),5);case 5:l=h.Fb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return um(h),z.return(m);throw new M(1,2,2012);case 4:p=
|
|
466
|
+
jc;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new M(1,4,4033);if(!k.length){z.A(6);break}return u(z,Nm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:t=z.h,y=Om(h,t,d,k),x=new Blob([y],{type:"text/vtt"}),a=Ai(x),d="text/vtt";case 6:v={id:h.Ke++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:vj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.X,primary:!1,trickModeVideo:null,
|
|
467
|
+
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Vc(v.mimeType,v.codecs);D=ad(w);if(!D)throw new M(2,2,2014,d);h.i.textStreams.push(v);um(h);return z.return(be(v))}})};
|
|
468
|
+
q.$e=function(a,b,c){var d=this,e,f,g,h;return J(function(k){switch(k.g){case 1:if(d.l!=mm&&d.l!=xm)throw new M(1,7,7004);if(c){k.A(2);break}return u(k,Lm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Mm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ae();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.u.ia(f,"load",l);d.u.ia(f,"error",function(){m(new M(1,2,2015))})}),6);case 6:return k.return(h);
|
|
469
|
+
case 5:throw new M(1,2,2012);}})};function Lm(a,b){var c,d;return J(function(e){switch(e.g){case 1:c=Wg(b);if(d=Pm[c])return e.return(d);C(e,2);return u(e,Yg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;ua(e,3);break;case 2:F(e);case 3:if(d)return e.return(d);throw new M(1,2,2011,c);}})}
|
|
470
|
+
function Mm(a,b,c,d,e,f,g){var h,k,l,m;return J(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,Nm(a,b,a.F,a.h.streaming.retryParameters),3):p.A(2);2!=p.g&&(h=p.h,k=Om(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ai(l),e="text/vtt");m=document.createElement("track");var n=a.T,t=b;try{if(n.g.enabled){var y=Zk(n);y.ot=el;y.su=!0;var x=al(y);var v=bl(t,x)}else v=t}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),v=t}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
471
|
+
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function Nm(a,b,c,d){var e,f,g;return J(function(h){if(1==h.g){e=kf;f=df([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&Xk(k,f,{ot:el,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
472
|
+
function Om(a,b,c,d){var e=bd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Db(b),b=c.parseMedia(b,a),Lk(b,d);throw new M(2,2,2014,c);}q.ee=function(a,b){this.dc.width=a;this.dc.height=b};q.Yd=function(a){if(this.l==mm){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.s)b=!1;else{for(var c=r(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.lc||d.ta||d.La||(d.lc=!1,Tj(b,d,a));b=!0}}else b=!1;return b};
|
|
473
|
+
q.zf=function(){Va("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Af=function(){return this.Tc};
|
|
474
|
+
function yl(a){var b=nl();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Yd(d))}};b.textDisplayFactory=function(){return a.Kc?new Dk(a.g,a.Kc):new yk(a.g)};return b}q.Te=function(a){this.Kc=a};
|
|
475
|
+
function $l(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new wj;h={id:a.Ke++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
476
|
+
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:hc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function Zl(a,b){return J(function(c){if(1==c.g)return u(c,Qm(a,b),2);Em(a,b);A(c)})}
|
|
477
|
+
function Qm(a,b){var c;return J(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Nd(c,b),2);tm(b);A(d)})}
|
|
478
|
+
function Em(a,b){if(a.l!=Nl){Md(b.variants,a.h.restrictions,a.dc)&&a.j&&um(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=r(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=r(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,xg(a.m,g.initDataType,g.initData)}}Rm(a,b)}}
|
|
479
|
+
function om(a,b){var c,d,e,f,g;return J(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return J(function(t){if(1==t.g)return k?u(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.Cb(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
|
|
480
|
+
function Vl(a){var b=a.Bd();if(a.o&&a.M&&a.B){var c=a.G;c.j=b;yj(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);em(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Ll("buffering",b))}function fm(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Ll("ratechange"),a.dispatchEvent(b))}function em(a){if(a.o&&a.M){var b=a.o.g;a.M.g==He?rl(b,"buffering"):a.g.paused?rl(b,"paused"):a.g.ended?rl(b,"ended"):rl(b,"playing")}}
|
|
481
|
+
function vm(a){try{Rm(a,a.i)}catch(c){return Ul(a,c),!1}var b=a.i.variants.filter(function(c){return ie(c)});b=a.Ma.create(b);a.s.setVariants(Array.from(b.values()));return!0}function Ml(a){return vm(a)?a.s.chooseVariant():null}function Fm(a){var b=Ml(a);b&&hm(a,b,!0,!0,0)}
|
|
482
|
+
function hm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Xj(a.j,b,d,e,!0);else{var g=a.o.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Xj(a.j,b,d,e,void 0,c);d=null;f&&(d=ae(f));b=ae(b);c?pm(a,d,b):Sm(a,d,b)}}function Hm(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=he(c);b=he(b);Sm(a,c,b)}
|
|
483
|
+
function qm(a,b,c){a=kd(a.h.preferredTextLanguage);b=kd(b.language);c=kd(c.language);return jd(c,a)&&!jd(b,c)}function pm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Ll("adaptation",b);Tm(a,b)}function um(a){var b=Ll("trackschanged");Tm(a,b)}function Sm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Ll("variantchanged",b);Tm(a,b)}function Gm(a){var b=Ll("textchanged");Tm(a,b)}function rm(a){var b=Ll("texttrackvisibility");Tm(a,b)}
|
|
484
|
+
function sm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Tm(a,Ll("abrstatuschanged",b))}
|
|
485
|
+
function Um(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||a.l!=mm||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Za().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);Md(d.variants,a.h.restrictions,a.dc);b=Ml(a);if(!b)return!1;d=a.Oa().video.reduce(function(g,h){return g+h.end-h.start},0);hm(a,b,!1,!0,d);a.Je.R(c);return!0}
|
|
486
|
+
function Ul(a,b){if(a.l!=Nl)if(Um(a,b))b.handled=!0;else{var c=Ll("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Yl(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(Ll(b,c))}
|
|
487
|
+
function Tl(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new M(2,3,3016,b,c,a.g.error.message)}
|
|
488
|
+
function cm(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Vm.includes(l)}h!=f.allowedByKeySystem&&
|
|
489
|
+
(e=!0)}}}if(!e||vm(a))(b=a.j.l)&&!b.allowedByKeySystem&&Fm(a),e&&um(a)}}function dm(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=Ll("expirationupdated");a.dispatchEvent(b)}function gm(a,b,c){0<b&&(a.V()||a.Se(b));b=a.getDuration();c<b&&(a.V()||a.Da(c))}
|
|
490
|
+
function Rm(a,b){a=a.m?a.m.Nc():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var p=a[c?"00":m];p?Vm.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
491
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new M(2,4,4012,a);}function tm(a){if(!a.variants.some(ie))throw new M(2,4,4032);}function Tm(a,b){J(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Nl&&a.dispatchEvent(b);A(c)})}function Jm(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(kd(c.language)):b.add("und");return b}
|
|
492
|
+
function Im(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=kd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var p=null;c.has(l)&&c.get(l).has(m)&&(p=c.get(l).get(m));
|
|
493
|
+
h.push({language:l,role:m,label:p})}});return h}function Ol(){return new M(2,7,7E3)}function Kl(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function qk(){return{K:null,mimeType:null,startTime:null,bd:NaN,uri:null}}function Pl(a){return new Promise(function(b,c){a.nb=function(){return c(Ol())};a.Wc=function(){return b()};a.onError=function(d){return c(d)};a.Yc=function(){return c(Ol())}})}L("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Te;
|
|
494
|
+
U.prototype.getManifestParserFactory=U.prototype.Af;U.prototype.getManifest=U.prototype.zf;U.prototype.retryStreaming=U.prototype.Yd;U.prototype.setMaxHardwareResolution=U.prototype.ee;U.prototype.addChaptersTrack=U.prototype.$e;U.prototype.addTextTrackAsync=U.prototype.af;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Oa;U.prototype.getPresentationStartTimeAsDate=U.prototype.Be;U.prototype.getPlayheadTimeAsDate=U.prototype.Ff;
|
|
495
|
+
U.prototype.setTextTrackVisibility=U.prototype.pg;U.prototype.getChapters=U.prototype.tf;U.prototype.getChaptersTracks=U.prototype.Ae;U.prototype.isTextTrackVisible=U.prototype.Dd;U.prototype.selectVariantsByLabel=U.prototype.jg;U.prototype.selectTextLanguage=U.prototype.be;U.prototype.selectAudioLanguage=U.prototype.ae;U.prototype.getTextLanguages=U.prototype.Hf;U.prototype.getAudioLanguages=U.prototype.pf;U.prototype.getTextLanguagesAndRoles=U.prototype.If;
|
|
496
|
+
U.prototype.getAudioLanguagesAndRoles=U.prototype.qf;U.prototype.selectVariantTrack=U.prototype.Pe;U.prototype.selectTextTrack=U.prototype.Oe;U.prototype.getThumbnails=U.prototype.Jf;U.prototype.getImageTracks=U.prototype.wf;U.prototype.getTextTracks=U.prototype.Fb;U.prototype.getVariantTracks=U.prototype.Za;U.prototype.cancelTrickPlay=U.prototype.ef;U.prototype.trickPlay=U.prototype.rg;U.prototype.getPlaybackRate=U.prototype.Oc;U.prototype.isBuffering=U.prototype.Bd;U.prototype.getKeyStatuses=U.prototype.Nc;
|
|
497
|
+
U.prototype.getExpiration=U.prototype.hc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Nf;U.prototype.seekRange=U.prototype.tc;U.prototype.isAudioOnly=U.prototype.Pf;U.prototype.isInProgress=U.prototype.kb;U.prototype.isLive=U.prototype.V;U.prototype.getAdManager=U.prototype.ze;U.prototype.getAssetUri=U.prototype.zd;U.prototype.getNetworkingEngine=U.prototype.ic;U.prototype.getMediaElement=U.prototype.Cf;
|
|
498
|
+
U.prototype.getLoadMode=U.prototype.yf;U.prototype.resetConfiguration=U.prototype.hg;U.prototype.getBufferFullness=U.prototype.rf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.wg;U.prototype.unload=U.prototype.ke;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Zb;
|
|
499
|
+
U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return J(function(h){if(1==h.g)return b={},a?u(h,Og(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(nc()){for(var l in Vg)k[l]=!0;for(var m in Xg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=nc()?!!Vg[p]:oc(p);for(var n in l)k[n]=
|
|
500
|
+
nc()?!!Xg[n]:oc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ia(Xi));
|
|
501
|
+
k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=nc()?ad(l)?!0:MediaSource.isTypeSupported(l)||Qc(l):oc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Wm;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
502
|
+
U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||rc("Trident/"))return!1;var a=wc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:nc()?!0:oc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Al=a};
|
|
503
|
+
U.registerSupportPlugin=function(a,b){Wm[a]=b};U.prototype.destroy=U.prototype.destroy;var Nl=0,xl=1,mm=2,xm=3;U.LoadMode={DESTROYED:Nl,NOT_LOADED:xl,MEDIA_SOURCE:mm,SRC_EQUALS:xm};U.version="v4.2.12";var Xm=["4","2"];te=new function(a){this.g=a;this.i=ue;this.h=ve}(new re(Number(Xm[0]),Number(Xm[1])));
|
|
504
|
+
var Vm=["output-restricted","internal-error"],Wm={},Al=null,Sl={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Pm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
505
|
+
ssa:"text/x-ssa",ass:"text/x-ssa"};function Ym(){this.h=[];this.j=this.i=this.g=0};function V(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new nf;this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=V.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
505
506
|
q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
|
|
506
507
|
q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
507
508
|
q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};L("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;
|
|
508
509
|
V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;
|
|
509
|
-
V.prototype.getDuration=V.prototype.getDuration;function
|
|
510
|
-
function(f){
|
|
511
|
-
function
|
|
512
|
-
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,
|
|
513
|
-
null)}}function
|
|
514
|
-
function
|
|
515
|
-
function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
510
|
+
V.prototype.getDuration=V.prototype.getDuration;function Zm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new nf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.2.12");this.g=null;this.h.ia(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){$m(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
511
|
+
function(f){an(e,f)});this.h.C(this.i,"ended",function(){e.m.contentComplete()})}Zm.prototype.stop=function(){this.g&&this.g.stop();this.o&&Ck(this.o)};Zm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function an(a,b){b.getError();bn(a,null);a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
512
|
+
function $m(a,b){a.l(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",b)))}cn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,dn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
|
|
513
|
+
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,dn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,dn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,dn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.h.ia(a.i,"play",function(){a.g.start()})}catch(e){bn(a,
|
|
514
|
+
null)}}function dn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
515
|
+
function cn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new Q(d,c))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){an(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){en(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){en(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.C(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
516
|
+
function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){bn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){bn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
516
517
|
a.h.C(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.C(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.C(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.C(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.C(a.g,
|
|
517
518
|
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.C(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.C(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.C(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.C(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.C(a.g,google.ima.AdEvent.Type.AD_METADATA,
|
|
518
519
|
function(c){b(c,"ad-metadata")});a.h.C(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
519
|
-
function
|
|
520
|
+
function en(a,b){var c=b.getAd();a.j=new V(c,a.g,a.i);b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new Q("ad-started",b));a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))}function bn(a,b){a.l(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}q=W.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
520
521
|
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
521
522
|
q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};L("shaka.ads.ServerSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;
|
|
522
523
|
W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;
|
|
523
|
-
W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function
|
|
524
|
+
W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function fn(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.B="";this.D=[];this.h=new nf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new Q("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){gn(e,f)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
524
525
|
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new W(f,e.l);e.u&&(e.m.h=e.u);e.i(new Q("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
525
526
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.h=e.u)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new Q("ad-first-quartile"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new Q("ad-midpoint"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new Q("ad-third-quartile"))});
|
|
526
527
|
this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new Q("ad-complete"));e.i(new Q("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new Q("ad-skipped"));e.i(new Q("ad-stopped"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
|
|
527
|
-
f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}
|
|
528
|
-
function
|
|
529
|
-
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Ve.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new
|
|
530
|
-
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new
|
|
531
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.2.
|
|
532
|
-
(c.F=!0),c.j=new
|
|
528
|
+
f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}fn.prototype.stop=function(){this.B="";this.o=null;this.D=[]};fn.prototype.release=function(){this.stop();this.h&&this.h.release()};fn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
|
|
529
|
+
function gn(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.F||a.h.C(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function X(){Ve.call(this);this.g=this.i=null;this.h=new Ym;this.j=navigator.language}pa(X,Ve);q=X.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1E4);this.i&&this.i.release();this.i=new Zm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
530
|
+
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Ve.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new Ym};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
|
|
531
|
+
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new fn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
532
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.2.12";c=this.g;c.j?a=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
533
|
+
(c.F=!0),c.j=new kc,c.g.requestStream(a),c.B=b||"",c.G=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.2.12";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.D};
|
|
533
534
|
q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};L("shaka.ads.AdManager",X);
|
|
534
535
|
X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
|
|
535
536
|
X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
|
|
536
537
|
X.AD_VOLUME_CHANGED="ad-volume-changed";X.AD_MUTED="ad-muted";X.AD_PAUSED="ad-paused";X.AD_RESUMED="ad-resumed";X.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";X.CUEPOINTS_CHANGED="ad-cue-points-changed";X.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";X.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";X.AD_CLICKED="ad-clicked";X.AD_PROGRESS="ad-progress";X.AD_BUFFERING="ad-buffering";X.AD_IMPRESSION="ad-impression";X.AD_DURATION_CHANGED="ad-duration-changed";X.AD_CLOSED="ad-closed";
|
|
537
|
-
X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";
|
|
538
|
-
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(
|
|
539
|
-
function
|
|
540
|
-
function
|
|
541
|
-
var
|
|
542
|
-
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},
|
|
543
|
-
|
|
544
|
-
n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;
|
|
545
|
-
q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Nb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.O,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(
|
|
546
|
-
|
|
547
|
-
function
|
|
548
|
-
q.get=function(a,b){var c=this;if("video"==a){if(
|
|
549
|
-
q.set=function(a,b,c){this.g[a][b]=c;
|
|
550
|
-
q.Me=function(a,b){
|
|
551
|
-
function
|
|
552
|
-
function
|
|
553
|
-
q.destroy=function(a){a&&this.g.Ab();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Ve.prototype.release.call(this);return Promise.all(a)};q.
|
|
554
|
-
q.cast=function(){var a=this,b;return
|
|
555
|
-
q.ff=function(a,b){b=void 0===b?!1:b;var c=this;return
|
|
556
|
-
function
|
|
557
|
-
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
558
|
-
function
|
|
559
|
-
function
|
|
560
|
-
function
|
|
561
|
-
function
|
|
538
|
+
X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";Al=function(){return new X};function hn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof Q){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
|
|
539
|
+
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(vi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
|
|
540
|
+
function jn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=kn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
541
|
+
function kn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
542
|
+
var ln="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),mn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),nn=["loop","playbackRate"],on=["pause","play"],pn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
543
|
+
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},sn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},tn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},un=[["getConfiguration","configure"]],vn=[["isTextTrackVisible","setTextTrackVisibility"]],wn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
544
|
+
xn=["attach","detach","load","unload"];function yn(a,b,c,d,e,f,g){var h=this;this.G=a;this.O=g;this.j=new O(b);this.T=c;this.u=!1;this.s=d;this.F=e;this.L=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return zn(h)};this.D=function(k,l){k=jn(l);switch(k.type){case "event":var m=k.targetName,p=Te(k.event);h.s(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.u&&(h.T(),h.u=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new M(n.severity,n.category,
|
|
545
|
+
n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;An.add(this)}q=yn.prototype;q.destroy=function(){An.delete(this);Bn(this);Cn&&Dn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};q.va=function(){return this.h};q.Wd=function(){return this.M};
|
|
546
|
+
q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Nb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.O,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(An),d=c.next();!d.done;d=c.next())En(d.value,b)},function(b){for(var c=r(An),d=c.next();!d.done;d=c.next())d=d.value,Fn="available"==b,d.j.Nb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Fn&&this.j.R(Gn);(a=Cn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
547
|
+
En(this,a):Cn=null}else window.__onGCastApiAvailable!==Hn&&(In=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Hn)};q.ce=function(a){this.o=a;this.h&&Jn(this,{type:"appData",appData:this.o})};q.cast=function(a){var b=this;return J(function(c){if(!b.m)throw new M(1,8,8E3);if(!Fn)throw new M(1,8,8001);if(b.h)throw new M(1,8,8002);b.l=new kc;chrome.cast.requestSession(function(d){return Kn(b,a,d)},function(d){return Ln(b,d)});return u(c,b.l,0)})};
|
|
548
|
+
function Mn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return Kn(a,b,c)},function(c){return Ln(a,c)})}}q.Ab=function(){if(this.h){Bn(this);if(Cn){Dn(this);try{Cn.stop(function(){},function(){})}catch(a){}Cn=null}zn(this)}};
|
|
549
|
+
q.get=function(a,b){var c=this;if("video"==a){if(on.includes(b))return function(){return c.Me.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))}}else if("player"==a){if(tn[b]&&!this.get("player","isLive")())return function(){};if(wn.includes(b))return function(){return c.Me.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(xn.includes(b))return function(){return c.eg.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(pn[b]||sn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
550
|
+
q.set=function(a,b,c){this.g[a][b]=c;Jn(this,{type:"set",targetName:a,property:b,value:c})};function Kn(a,b,c){Cn=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);zn(a);Jn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Ln(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new M(2,8,c,b))}
|
|
551
|
+
q.Me=function(a,b){Jn(this,{type:"call",targetName:a,methodName:b,args:Ia.apply(2,arguments)})};q.eg=function(a,b){var c=Ia.apply(2,arguments),d=new kc,e=this.J.toString();this.J++;this.i[e]=d;try{Jn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function En(a,b){var c=a.L();a.l=new kc;a.u=!0;Kn(a,c,b)}function Dn(a){var b=Cn;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
|
|
552
|
+
function zn(a){var b=Cn?"connected"==Cn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Bn(a)}a.h=b;a.M=b?Cn.receiver.friendlyName:"";a.j.Nb()}function Bn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new M(1,7,7E3))}}function Jn(a,b){b=hn(b);var c=Cn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new M(2,8,8005,d),c=new Q("error",(new Map).set("detail",b)),a.s("player",c),a.Ab(),b;}}var Gn=.02,Fn=!1,Cn=null,In=null,An=new Set;
|
|
553
|
+
function Hn(a){In?window.__onGCastApiAvailable=In:delete window.__onGCastApiAvailable;In=null;if(a)for(var b=r(An),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Nn(a,b,c,d){d=void 0===d?!1:d;Ve.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.D=c;this.B=d;this.u=new Map;this.g=new yn(c,function(){return On(e)},function(){return Pn(e)},function(f,g){return Qn(e,f,g)},function(){return Rn(e)},function(){return Sn(e)},d);Tn(this)}pa(Nn,Ve);q=Nn.prototype;
|
|
554
|
+
q.destroy=function(a){a&&this.g.Ab();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Ve.prototype.release.call(this);return Promise.all(a)};q.Mf=function(){return this.l};q.Ef=function(){return this.s};q.cf=function(){return this.g.m&&Fn};q.va=function(){return this.g.va()};q.Wd=function(){return this.g.Wd()};
|
|
555
|
+
q.cast=function(){var a=this,b;return J(function(c){return 1==c.g?(b=Sn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.ke(),0):c.return()})};q.ce=function(a){this.g.ce(a)};q.qg=function(){Mn(this.g)};q.Ab=function(){this.g.Ab()};
|
|
556
|
+
q.ff=function(a,b){b=void 0===b?!1:b;var c=this;return J(function(d){if(1==d.g){if(a==c.D&&b==c.B)return d.return();c.D=a;c.B=b;c.g.Ab();return u(d,c.g.destroy(),2)}c.g=null;c.g=new yn(a,function(){return On(c)},function(){return Pn(c)},function(e,f){return Qn(c,e,f)},function(){return Rn(c)},function(){return Sn(c)},b);c.g.init();A(d)})};
|
|
557
|
+
function Tn(a){a.g.init();a.m=new nf;for(var b=r(ln),c=b.next();!c.done;c=b.next())a.m.C(a.i,c.value,function(f){a.g.va()||(f=Te(f),a.j.dispatchEvent(f))});for(var d in Ue)a.m.C(a.h,Ue[d],function(f){a.g.va()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Sb=e,Object.defineProperty(a.l,b.Sb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Un(a,f.Sb)}}(b),set:function(f){return function(g){var h=f.Sb;a.g.va()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Sb:b.Sb};a.s={};Vn(a,
|
|
558
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Wn(a,f)}})});Xn(a);a.j=new Ve;a.j.Rc=a.l;a.o=new Ve;a.o.Rc=a.s}function Xn(a){var b=new Map;Vn(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.u.set(c,d):a.u.set(d,c)):b.set(d,c)})}
|
|
559
|
+
function Vn(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=r(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
560
|
+
function Sn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.zd(),startTime:null};a.i.pause();for(var c=r(nn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(un);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(vn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function On(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
|
|
561
|
+
function Pn(a){var b=new Q(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
562
|
+
function Rn(a){for(var b=r(un),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(nn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(nn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(vn);for(k=
|
|
562
563
|
h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new Q("error",h);a.h.dispatchEvent(h)})}
|
|
563
|
-
function
|
|
564
|
-
function
|
|
565
|
-
if("setVideoContainer"==b)return function(c){return a.h.Te(c)};if(a.g.va()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.va()&&0==Object.keys(a.g.g.video).length&&(
|
|
566
|
-
function
|
|
567
|
-
|
|
568
|
-
q.
|
|
569
|
-
q.destroy=function(){var a=this,b,c;return
|
|
570
|
-
function
|
|
571
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
572
|
-
!1;
|
|
573
|
-
function
|
|
574
|
-
function
|
|
575
|
-
a.g.autoplay=f;b.manifest&&(a.g.play(),
|
|
576
|
-
function
|
|
577
|
-
1);
|
|
578
|
-
function
|
|
579
|
-
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return
|
|
580
|
-
function
|
|
581
|
-
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||
|
|
582
|
-
function
|
|
583
|
-
L("shaka.cast.CastReceiver",
|
|
584
|
-
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ue:g,eh:e,drmInfos:a,ye:!0}}function
|
|
585
|
-
function
|
|
586
|
-
function
|
|
587
|
-
function
|
|
588
|
-
226,251,75]),m=new Uint8Array([]);k=[{initData:Kf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=
|
|
589
|
-
function
|
|
590
|
-
var
|
|
564
|
+
function Un(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.va()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.va()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
565
|
+
function Wn(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.ze()};
|
|
566
|
+
if("setVideoContainer"==b)return function(c){return a.h.Te(c)};if(a.g.va()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.va()&&0==Object.keys(a.g.g.video).length&&(pn[b]||sn[b])||!a.g.va()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
567
|
+
function Qn(a,b,c){a.g.va()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}L("shaka.cast.CastProxy",Nn);Nn.prototype.changeReceiverId=Nn.prototype.ff;Nn.prototype.forceDisconnect=Nn.prototype.Ab;Nn.prototype.suggestDisconnect=Nn.prototype.qg;Nn.prototype.setAppData=Nn.prototype.ce;Nn.prototype.cast=Nn.prototype.cast;Nn.prototype.receiverName=Nn.prototype.Wd;Nn.prototype.isCasting=Nn.prototype.va;Nn.prototype.canCast=Nn.prototype.cf;Nn.prototype.getPlayer=Nn.prototype.Ef;
|
|
568
|
+
Nn.prototype.getVideo=Nn.prototype.Mf;Nn.prototype.destroy=Nn.prototype.destroy;function Yn(a,b,c,d){Ve.call(this);var e=this;this.g=a;this.h=b;this.j=new nf;this.J={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){Zn(e)});$n(this)}pa(Yn,Ve);q=Yn.prototype;q.isConnected=function(){return this.F};q.Qf=function(){return this.o};q.mg=function(a){this.i=a};q.jf=function(){this.i=null};
|
|
569
|
+
q.ng=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.lg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.kg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
570
|
+
q.destroy=function(){var a=this,b,c;return J(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.J=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Ve.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();A(d)})};
|
|
571
|
+
function $n(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return ao(a)};b.onSenderDisconnected=function(){return ao(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&bo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);bo(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return co(a,
|
|
572
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return eo(a,e)};b.start();b=r(ln);for(var c=b.next();!c.done;c=b.next())a.j.C(a.g,c.value,function(e){return fo(a,"video",e)});for(var d in Ue)a.j.C(a.h,Ue[d],function(e){return fo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.ee(3840,2160):a.h.ee(1920,1080);a.j.C(a.g,"loadeddata",function(){a.B=!0});a.j.C(a.h,"loading",function(){a.o=
|
|
573
|
+
!1;go(a)});a.j.C(a.g,"playing",function(){a.o=!1;go(a)});a.j.C(a.g,"pause",function(){go(a)});a.j.C(a.h,"unloading",function(){a.o=!0;go(a)});a.j.C(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,go(a))})).R(ho)})}function ao(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;go(a)}
|
|
574
|
+
function go(a){var b;J(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new Q("caststatuschanged");a.dispatchEvent(b);io(a)||jo(a);A(c)})}
|
|
575
|
+
function ko(a,b,c){var d,e,f,g,h,k,l,m,p,n;J(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,C(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:ua(t,3);break;case 5:return g=F(t),h=(new Map).set("detail",g),k=new Q("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
|
|
576
|
+
a.g.autoplay=f;b.manifest&&(a.g.play(),jo(a));A(t)}})}function fo(a,b,c){a.h&&(Zn(a),bo(a,{type:"event",targetName:b,event:c},a.l))}
|
|
577
|
+
function Zn(a){a.G.R(lo);for(var b={video:{},player:{}},c=r(mn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in tn)0==a.m%tn[e]&&(b.player[e]=a.h[e]());for(var f in pn)0==a.m%pn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;bo(a,{type:"update",update:b},a.l);for(var g in sn)0==a.m%sn[g]&&(b={player:{}},b.player[g]=a.h[g](),bo(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
578
|
+
1);io(a)}function io(a){return a.u&&(a.g.duration||a.h.V())?(mo(a),a.u=!1,!0):!1}function mo(a,b){var c={contentId:a.h.zd(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);jo(a,void 0===b?0:b,c)}
|
|
579
|
+
function eo(a,b){var c=jn(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.u=!0;ko(a,c.initState,c.appData);Zn(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
580
|
+
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return no(a,g,f,null)},function(h){return no(a,g,f,h)})}}
|
|
581
|
+
function co(a,b){var c=jn(b.data);switch(c.type){case "PLAY":a.g.play();jo(a);break;case "PAUSE":a.g.pause();jo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),jo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),jo(a));break;case "STOP":a.h.ke().then(function(){a.h&&jo(a)});break;case "GET_STATUS":mo(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
582
|
+
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||jo(a);break;case "LOAD":a.m=0;a.B=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.L(b.contentId);f=c.autoplay||!0;a.D(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&mo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");bo(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:bo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
583
|
+
function no(a,b,c,d){a.h&&bo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function bo(a,b,c,d){a.F&&(a=hn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function jo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?oo:a.h.Bd()?po:a.g.paused?qo:ro,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);bo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
584
|
+
L("shaka.cast.CastReceiver",Yn);Yn.prototype.destroy=Yn.prototype.destroy;Yn.prototype.setContentArtist=Yn.prototype.kg;Yn.prototype.setContentImage=Yn.prototype.lg;Yn.prototype.setContentTitle=Yn.prototype.ng;Yn.prototype.clearContentMetadata=Yn.prototype.jf;Yn.prototype.setContentMetadata=Yn.prototype.mg;Yn.prototype.isIdle=Yn.prototype.Qf;Yn.prototype.isConnected=Yn.prototype.isConnected;var lo=.5,ho=5,oo="IDLE",ro="PLAYING",po="BUFFERING",qo="PAUSED";function so(a,b,c){var d=to(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g.delete(null);if(1<g.size)throw new M(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.$d?(e=h.init||e,!1):!0}),f.length&&(a=uo(e,f,c,g),0==a.length&&(a=[dc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(dc(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
|
|
585
|
+
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ue:g,eh:e,drmInfos:a,ye:!0}}function vo(a,b,c,d){var e=so(a,c,d);if(b.ye){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.ye=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new M(2,4,4008);return e.ue||b.ue}
|
|
586
|
+
function wo(a){var b=0,c=Gb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Db(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
587
|
+
function xo(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function yo(a){a=Nf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Lc(a.textContent);a=wo(a).filter(function(b){return b.type===zo})[0];if(!a)return"";a=Bc(a.value,!0);return(a=eg(a,"WRMHEADER"))?xo(a):""}
|
|
588
|
+
function uo(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.$d];if(g){var h;if(h=Nf(f.node,"urn:microsoft:playready","pro")){h=Lc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Kf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.$d)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
|
|
589
|
+
226,251,75]),m=new Uint8Array([]);k=[{initData:Kf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=dc(g,f.init||a||h||k);if(g=Ao.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function to(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Bo(c.value))&&b.push(c);return b}
|
|
590
|
+
function Bo(a){var b=a.getAttribute("schemeIdUri"),c=Sf(a,"urn:mpeg:cenc:2013","default_KID"),d=Qf(a,"urn:mpeg:cenc:2013","pssh").map(Uf);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new M(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Lc(f),keyId:null}})}catch(f){throw new M(2,4,4007);}return{node:a,$d:b,keyId:c,init:0<e.length?e:null}}
|
|
591
|
+
var zo=1,Ao=(new Map).set("com.widevine.alpha",function(a){return(a=Nf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",yo).set("com.microsoft.playready.recommendation",yo).set("com.microsoft.playready.software",yo).set("com.microsoft.playready.hardware",yo).set("org.w3.clearkey",function(a){return(a=Nf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Co(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
|
|
591
592
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
592
|
-
function
|
|
593
|
-
m)if(p){p=Wf(p,"t",bg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,
|
|
594
|
-
function
|
|
595
|
-
function
|
|
596
|
-
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return
|
|
597
|
-
function
|
|
598
|
-
function
|
|
599
|
-
function
|
|
600
|
-
d)}function
|
|
601
|
-
function
|
|
602
|
-
function
|
|
603
|
-
function
|
|
604
|
-
function
|
|
605
|
-
I=new
|
|
606
|
-
function
|
|
607
|
-
function
|
|
608
|
-
Infinity,b);f&&(f.segmentIndex=e);return{Bb:function(){e&&0!=e.H.length||e.pc(g);return Promise.resolve(e)}}}function
|
|
609
|
-
function
|
|
610
|
-
function
|
|
611
|
-
Infinity,n=!(a.Xa&&a.
|
|
612
|
-
function
|
|
613
|
-
function
|
|
614
|
-
|
|
615
|
-
function
|
|
616
|
-
function
|
|
617
|
-
function
|
|
618
|
-
n=r(m);for(t=n.next();!t.done;t=n.next())
|
|
619
|
-
!va.length||(
|
|
620
|
-
a.l=z;A(
|
|
621
|
-
function
|
|
622
|
-
function
|
|
623
|
-
function
|
|
624
|
-
function
|
|
625
|
-
k.push(
|
|
626
|
-
B.variantIds=[v++];return S.return(t.concat(n).concat(
|
|
627
|
-
function
|
|
628
|
-
z.next())for(B=t.value,
|
|
629
|
-
function
|
|
630
|
-
function
|
|
631
|
-
function
|
|
632
|
-
function
|
|
633
|
-
function
|
|
634
|
-
(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=
|
|
635
|
-
function
|
|
636
|
-
function
|
|
637
|
-
function
|
|
638
|
-
function
|
|
639
|
-
d=
|
|
640
|
-
function
|
|
641
|
-
function
|
|
642
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
643
|
-
function
|
|
644
|
-
function
|
|
645
|
-
q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};q.update=function(){var a=this,b;return
|
|
646
|
-
function
|
|
647
|
-
function
|
|
648
|
-
function
|
|
649
|
-
"timeShiftBufferDepth",Yf);
|
|
650
|
-
!isNaN(a.g.availabilityWindowOverride)&&(
|
|
651
|
-
B.
|
|
652
|
-
function
|
|
653
|
-
null;break}g=m+t}}a.L=f.map(function(
|
|
654
|
-
function
|
|
655
|
-
}d=c.filter(function(m){return!m.je});c=c.filter(function(m){return m.je});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.je.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Ec:h.Ec},l=k.next())h.Ec=l.value,h.Ec.trickModeVideo=e.streams.find(function(m){return function(p){return Xc(m.Ec.codecs)==Xc(p.codecs)}}(h))}}}e=a.g.disableAudio?[]
|
|
656
|
-
[]
|
|
657
|
-
function
|
|
658
|
-
function
|
|
659
|
-
l}}var p;m=Mf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=Mf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
|
|
660
|
-
10)));m=Mf(c,"Accessibility");var
|
|
661
|
-
1,null!=t)for(t=r(t.split(";")),v=t.next();!v.done;v=t.next())v=v.value,w=
|
|
662
|
-
(l=l[0],l.textContent&&(
|
|
663
|
-
m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(
|
|
664
|
-
function
|
|
665
|
-
throw E;}t=Mf(l,"ContentProtection");t=
|
|
666
|
-
(z=l.getAttribute("value")),!z))return null;var B;l=b.I.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");l=b.I.id?b.ca.id+","+b.I.id:"";var
|
|
667
|
-
frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.ga.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.I.Vc,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:z,matchedStreams:[]};
|
|
668
|
-
H.g){if(
|
|
669
|
-
function
|
|
670
|
-
m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Mf(a,"AudioChannelConfiguration");m=
|
|
593
|
+
function Do(a,b){var c=Eo(a,b,"timescale"),d=1;c&&(d=ag(c)||1);var e=Eo(a,b,"duration");c=ag(e||"");"image"==a.I.contentType&&(c=cg(e||""));c&&(c/=d);var f=Eo(a,b,"startNumber");e=Number(Eo(a,b,"presentationTimeOffset"))||0;var g=bg(f||"");if(null==f||null==g)g=1;f=Fo(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.W.duration||Infinity;f=Mf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=Wf(m,"t",bg),t=Wf(m,"d",bg);m=Wf(m,"r",$f);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
|
|
594
|
+
m)if(p){p=Wf(p,"t",bg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,ug:n}),n=k}b=h}return{timescale:d,ja:c,Mb:g,Ta:e/d||0,le:e,timeline:b}}function Eo(a,b,c){return[b(a.I),b(a.ga),b(a.ca)].filter(bc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
595
|
+
function Fo(a,b,c){return[b(a.I),b(a.ga),b(a.ca)].filter(bc).map(function(d){return Lf(d,c)}).reduce(function(d,e){return d||e})}
|
|
596
|
+
function Go(a,b,c,d,e,f){for(var g=Sf(a,"http://www.w3.org/1999/xlink","href"),h=Sf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Ne(new M(2,4,4028));if("onLoad"!=h)return Ne(new M(2,4,4027));var m=cc([d],[g]);return e.request(0,df(m,b)).aa(function(p){p=gg(p.data,a.tagName);if(!p)return Ne(new M(2,4,4001,g));
|
|
597
|
+
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return Ho(a,b,c,m[0],e,f+1)})}
|
|
598
|
+
function Ho(a,b,c,d,e,f){f=void 0===f?0:f;if(Sf(a,"http://www.w3.org/1999/xlink","href")){var g=Go(a,b,c,d,e,f);c&&(g=g.aa(void 0,function(){return Ho(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Sf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Ho(k,b,c,d,e,f)));return Re(g).aa(function(){return a})};function Io(a,b,c,d,e,f,g){var h,k=(new Af).U("sidx",function(l){h=Jo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
|
|
599
|
+
function Jo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new M(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Lb(),m=g.reader.Lb();g.reader.skip(2);var p=g.reader.Vd();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.N(),t=(n&2147483648)>>>31;n&=2147483647;var y=g.reader.N();g.reader.skip(4);if(1==t)throw new M(2,3,3006);h.push(new R(l/k+c,(l+y)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=y;a+=n}g.parser.stop();return h};function Ko(a){this.h=Gb(a);this.g=new xf(this.h,0)}Ko.prototype.oa=function(){return this.g.oa()};
|
|
600
|
+
function Lo(a){var b=Mo(a);if(7<b.length)throw new M(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Mo(a);a:{d=r(No);for(var e=d.next();!e.done;e=d.next())if(Bb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ba();else{if(8==b.length&&b[1]&224)throw new M(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ba()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ba();d=Gb(a.h,a.g.ba(),b);a.g.skip(b);return new Oo(c,
|
|
601
|
+
d)}function Mo(a){var b=a.g.ba(),c=a.g.Sa();if(0==c)throw new M(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Db(a.h,b,c)}var No=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Oo(a,b){this.id=a;this.g=b}
|
|
602
|
+
function Po(a){if(8<a.g.byteLength)throw new M(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new M(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Qo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Ko(a.g);for(var p=null,n=null;a.oa();){var t=Lo(a);if(187==t.id){var y=Ro(t);y&&(t=c*y.vg,y=b+y.dg,null!=p&&m.push(new R(p+g,t+g,l,n,y-1,f,g,h,k)),p=t,n=y)}}null!=p&&m.push(new R(p+g,d+g,l,n,null,f,g,h,k));return m}
|
|
603
|
+
function Ro(a){var b=new Ko(a.g);a=Lo(b);if(179!=a.id)throw new M(2,3,3013);a=Po(a);b=Lo(b);if(183!=b.id)throw new M(2,3,3012);b=new Ko(b.g);for(var c=0;b.oa();){var d=Lo(b);if(241==d.id){c=Po(d);break}}return{vg:a,dg:c}};function So(a,b){b=Fo(a,b,"Initialization");if(!b)return null;var c=a.I.za,d=b.getAttribute("sourceURL");d&&(c=cc(a.I.za,[d]));d=0;var e=null;if(b=Wf(b,"range",Zf))d=b.start,e=b.end;return new ni(function(){return c},d,e,To(a))}
|
|
604
|
+
function Uo(a,b){var c=Number(Eo(a,Vo,"presentationTimeOffset"))||0,d=Eo(a,Vo,"timescale"),e=1;d&&(e=ag(d)||1);var f=c/e||0,g=So(a,Vo);Wo(a,g);var h=Xe(a);return{Bb:function(){var k=Fo(h,Vo,"RepresentationIndex"),l=h.I.za;k&&(k=k.getAttribute("sourceURL"))&&(l=cc(h.I.za,[k]));k=Xo(h);return Yo(h,b,g,l,k.start,k.end,f)}}}
|
|
605
|
+
function Yo(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,D,z,B,G;return J(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Xa||!a.W.Cd,l=a.W.start,m=a.W.duration,p=a.I.mimeType.split("/")[1],n=b,t=null,y=[n(d,e,f),"webm"==p?n(c.Ba(),c.Ea,c.na):null],n=null,u(E,Promise.all(y),2);x=E.h;v=x[0];w=x[1]||null;D=null;z=l-g;B=l;G=m?l+m:Infinity;if("mp4"==p)var H=Io(v,e,d,c,z,B,G);else{H=new Ko(w);if(440786851!=Lo(H).id)throw new M(2,3,3008);var I=Lo(H);if(408125543!=I.id)throw new M(2,3,3009);H=I.g.byteOffset;
|
|
606
|
+
I=new Ko(I.g);for(var K=null;I.oa();){var N=Lo(I);if(357149030==N.id){K=N;break}}if(!K)throw new M(2,3,3010);K=new Ko(K.g);N=1E6;for(I=null;K.oa();){var P=Lo(K);if(2807729==P.id)N=Po(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new M(2,3,3003);}if(null==I)throw new M(2,3,3011);K=N/1E9;I*=K;N=Lo(new Ko(v));if(475249515!=N.id)throw new M(2,3,3007);H=Qo(N,H,K,I,d,c,z,B,G)}D=H;h.Ib(D);t=new tj(D);k&&t.Ya(B,G,!0);return E.return(t)})}
|
|
607
|
+
function Vo(a){return a.vc}function Xo(a){var b=Fo(a,Vo,"RepresentationIndex");a=Eo(a,Vo,"indexRange");a=Zf(a||"");b&&(a=Wf(b,"range",Zf,a));return a}function Wo(a,b){Zo(a,b);if(!Xo(a))throw new M(2,4,4002);}function Zo(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=hc&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);}
|
|
608
|
+
function To(a){var b=a.I;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Vc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function $o(a,b){var c=So(a,ap),d=bp(a);if(!d.ja&&!d.timeline&&1<d.Gb.length)throw new M(2,4,4002);if(!d.ja&&!a.W.duration&&!d.timeline&&1==d.Gb.length)throw new M(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new M(2,4,4002);var e=null,f=null;a.ca.id&&a.I.id&&(f=b[a.ca.id+","+a.I.id])&&(e=f.segmentIndex);var g=cp(a.W.start,a.W.duration,a.I.za,d,c);b=!e;e?e.Hb(g,a.presentationTimeline.Qa()):e=new tj(g);a.presentationTimeline.Ib(g);a.Xa&&a.W.Cd||e.Ya(a.W.start,a.W.duration?a.W.start+a.W.duration:
|
|
609
|
+
Infinity,b);f&&(f.segmentIndex=e);return{Bb:function(){e&&0!=e.H.length||e.pc(g);return Promise.resolve(e)}}}function ap(a){return a.ab}function bp(a){var b=dp(a);a=Do(a,ap);var c=a.Mb;0==c&&(c=1);var d=0;a.ja?d=a.ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ja:a.ja,startTime:d,Mb:c,Ta:a.Ta,timeline:a.timeline,Gb:b}}
|
|
610
|
+
function cp(a,b,c,d,e){var f=d.Gb.length;d.timeline&&d.timeline.length!=d.Gb.length&&(f=Math.min(d.timeline.length,d.Gb.length));for(var g=a-d.Ta,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={md:m.md},p++){var n=d.Gb[p];m.md=cc(c,[n.Vf]);var t=void 0;t=null!=d.ja?l+d.ja:d.timeline?d.timeline[p].end:l+b;k.push(new R(a+l,a+t,function(y){return function(){return y.md}}(m),n.start,n.end,e,g,a,h));l=t}return k}
|
|
611
|
+
function dp(a){return[a.I.ab,a.ga.ab,a.ca.ab].filter(bc).map(function(b){return Mf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ee&&(a.Ee=!0);var c=b.getAttribute("media");b=Wf(b,"mediaRange",Zf,{start:0,end:null});return{Vf:c,start:b.start,end:b.end}})};function ep(a,b,c,d,e,f){var g=fp(a),h=gp(a);hp(h);var k=Xe(a);if(h.mc)return Zo(a,g),{Bb:function(){var t=Co(h.mc,k.I.id,null,k.bandwidth||null,null);t=cc(k.I.za,[t]);return Yo(k,b,g,t,0,null,h.Ta)}};if(h.ja)return d||"image"===a.ga.contentType||(a.presentationTimeline.Pd(h.ja),a.presentationTimeline.Qd(a.W.start)),{Bb:function(){return ip(k,h,e,g,f)}};var l=null;d=d=null;a.ca.id&&a.I.id&&(d=a.ca.id+","+a.I.id,d=c[d])&&(l=d.segmentIndex);var m=jp(k,h,g);c=a.W.start;var p=a.W.duration?a.W.start+a.W.duration:
|
|
612
|
+
Infinity,n=!(a.Xa&&a.W.Cd);l?(n&&(new tj(m)).Ya(c,p,!0),l.Hb(m,a.presentationTimeline.Qa())):l=new tj(m);a.presentationTimeline.Ib(m);n&&l.Ya(c,p);d&&a.Xa&&(d.segmentIndex=l);return{Bb:function(){l&&0!=l.H.length||l.pc(m);return Promise.resolve(l)}}}function kp(a){return a.wc}function gp(a){var b=Do(a,kp),c=Eo(a,kp,"media");a=Eo(a,kp,"index");return{ja:b.ja,timescale:b.timescale,Mb:b.Mb,Ta:b.Ta,le:b.le,timeline:b.timeline,Md:c,mc:a}}
|
|
613
|
+
function hp(a){var b=a.mc?1:0;b+=a.timeline?1:0;b+=a.ja?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.mc&&(a.timeline=null),a.ja=null);if(!a.mc&&!a.Md)throw new M(2,4,4002);}
|
|
614
|
+
function ip(a,b,c,d,e){function f(K){var N=(K-t)*n,P=N+b.Ta,S=N+l;N=S+n;var Y=Math.min(N,h());S=new R(S,Y,function(){var fa=Co(x,w,K,v,P*y);return cc(D,[fa])},0,null,d,z,l,h());S.j=N;return S}function g(){var K=[Math.max(k.Qa(),l),Math.min(k.hb(),h())].map(function(N){return N-l});return[Math.ceil(K[0]/n),Math.ceil(K[1]/n)-1].map(function(N){return N+t})}function h(){var K=null!=m&&e[m]||p;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.W.start,m=a.ca.id,p=a.W.duration,n=b.ja,t=b.Mb,y=b.timescale,
|
|
615
|
+
x=b.Md,v=a.bandwidth||null,w=a.I.id,D=a.I.za,z=l-b.Ta,B=g();a=a.Xa?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var G=a;G<=B;++G){var E=f(G);c.push(E)}var H=new tj(c);c=k.hb()<h();G=k.V();if(c||G){var I=Math.max(a,B+1);H.cd(n,function(){var K=k.Qa();H.fb(K);var N=r(g());N.next();N=N.next().value;for(var P=[];I<=N;){var S=f(I);P.push(S);I++}return K>h()&&!P.length?null:P})}return Promise.resolve(H)}
|
|
616
|
+
function jp(a,b,c){var d=a.W.start,e=a.W.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={ld:h.ld,pd:h.pd,sd:h.sd,hd:h.hd,ud:h.ud,jd:h.jd},k++){var l=b.timeline[k],m=l.start,p=l.ug;l=l.end;h.sd=k+b.Mb;h.ud=p+b.le;h.pd=a.I.id;h.hd=a.bandwidth||null;h.ld=b.Md;h.jd=a.I.za;g.push(new R(d+m,d+l,function(n){return function(){var t=Co(n.ld,n.pd,n.sd,n.hd||null,n.ud);return cc(n.jd,[t]).map(function(y){return y.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
617
|
+
function fp(a){var b=Eo(a,kp,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.za;return new ni(function(){var f=Co(b,c,null,d,null);return cc(e,[f])},0,null,To(a))};function lp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}lp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
|
|
618
|
+
function mp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,K,N,P,S,Y,fa,va,Da;return J(function(Ea){switch(Ea.g){case 1:d=jc;np(b);op(b);pp(b);qp(b);if(!c&&1==b.length){e=b[0];a.g=e.Gc;a.h=e.ed;a.j=e.textStreams;a.i=e.imageStreams;Ea.A(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ea.return();k=b.map(function(Ga){return Ga.Gc});l=b.map(function(Ga){return Ga.ed});m=b.map(function(Ga){return Ga.textStreams});p=b.map(function(Ga){return Ga.imageStreams});
|
|
619
|
+
n=r(m);for(t=n.next();!t.done;t=n.next())y=t.value,y.push(rp(d.X));x=r(p);for(v=x.next();!v.done;v=x.next())w=v.value,w.push(rp(d.Wb));return u(Ea,sp(a.g,k,f,tp,up),3);case 3:return u(Ea,sp(a.h,l,f,tp,up),4);case 4:return u(Ea,sp(a.j,m,f,tp,up),5);case 5:return u(Ea,sp(a.i,p,f,tp,up),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),N=K.next();!N.done;N=K.next())for(P=N.value,S=r(a.h),Y=S.next();!Y.done;Y=S.next())fa=Y.value,va=Rg(P.drmInfos,fa.drmInfos),P.drmInfos.length&&fa.drmInfos.length&&
|
|
620
|
+
!va.length||(Da=D++,z.push({id:Da,language:P.language,primary:P.primary,audio:P,video:fa,bandwidth:(P.bandwidth||0)+(fa.bandwidth||0),drmInfos:va,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),G=r(B),E=G.next();!E.done;E=G.next())H=E.value,I=D++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.eb?H:null,video:H.type==d.ua?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
621
|
+
a.l=z;A(Ea)}})}function np(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Gc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&db(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Gc=c}}
|
|
622
|
+
function pp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&db(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
623
|
+
function op(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.ed),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&db(e.roles,h.roles)&&wf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.ed=c}}
|
|
624
|
+
function qp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
|
|
625
|
+
function vp(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,K,N,P;return J(function(S){switch(S.g){case 1:b=jc;if(1==a.length)return S.return(a[0]);c=a.map(function(Y){return Y.filter(function(fa){return fa.type==b.eb})});d=a.map(function(Y){return Y.filter(function(fa){return fa.type==b.ua})});e=a.map(function(Y){return Y.filter(function(fa){return fa.type==b.X})});f=a.map(function(Y){return Y.filter(function(fa){return fa.type==b.Wb})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
|
|
626
|
+
k.push(wp(b.X));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(wp(b.Wb));return u(S,sp([],c,0,xp,yp),2);case 2:return n=S.h,u(S,sp([],d,0,xp,yp),3);case 3:return t=S.h,u(S,sp([],e,0,xp,yp),4);case 4:return y=S.h,u(S,sp([],f,0,xp,yp),5);case 5:x=S.h;v=0;if(t.length&&n.length)for(G=r(n),E=G.next();!E.done;E=G.next())for(H=E.value,I=r(t),K=I.next();!K.done;K=I.next())N=K.value,P=v++,N.variantIds.push(P),H.variantIds.push(P);else for(w=t.concat(n),D=r(w),z=D.next();!z.done;z=D.next())B=z.value,
|
|
627
|
+
B.variantIds=[v++];return S.return(t.concat(n).concat(y).concat(x))}})}
|
|
628
|
+
function sp(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,K;return J(function(N){switch(N.g){case 1:f=jc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){N.A(4);break}m=l.value;return u(N,zp(m,b,c,e,g),5);case 5:p=N.h;if(!p)throw new M(2,4,4037);l=k.next();N.A(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(y=t.value,x=r(y),v=x.next();!v.done;v=x.next())w=v.value,(D=Ap(w,b,d,e,g))&&a.push(D);z=r(g);for(t=z.next();!t.done;t=
|
|
629
|
+
z.next())for(B=t.value,G={},E=r(B),v=E.next();!v.done;G={Wa:G.Wa},v=E.next())if(G.Wa=v.value,H=G.Wa.type==f.X&&!G.Wa.language,I=G.Wa.type==f.Wb&&!G.Wa.tilesLayout,!H&&!I&&(K=a.some(function(P){return function(S){return S.mimeType==P.Wa.mimeType&&Xc(S.codecs)==Xc(P.Wa.codecs)}}(G))))throw new M(2,4,4037);return N.return(a)}})}function zp(a,b,c,d,e){return J(function(f){if(1==f.g)return Bp(b,a),a.matchedStreams?a.segmentIndex?u(f,Cp(a,c),2):f.A(2):f.return(!1);Dp(a,c,d,e);return f.return(!0)})}
|
|
630
|
+
function Cp(a,b){var c,d,e,f,g,h,k;return J(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof wj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.j.push(k.segmentIndex);A(l)})}
|
|
631
|
+
function Ap(a,b,c,d,e){var f=c(a);Bp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return J(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new wj;return u(g,Cp(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;Dp(f,0,d,e);return f}function Dp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==od(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
|
|
632
|
+
function tp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
|
|
633
|
+
function xp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
634
|
+
function up(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Rg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new M(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
|
|
635
|
+
(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=tp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),up(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&up(a.trickModeVideo,b)}
|
|
636
|
+
function yp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
|
|
637
|
+
function Bp(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Ep,video:Ep,text:Fp,image:Gp}[e.type],g={audio:Hp,video:Ip,text:Jp,image:Kp}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function Ep(a,b){var c;!(c=b.mimeType!=a.mimeType||Xc(b.codecs)!=Xc(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Rg(a,b).length:1));return c?!1:!0}
|
|
638
|
+
function Fp(a,b){return a.language?b.language?0==od(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Gp(a){return a.tilesLayout?!0:!1}
|
|
639
|
+
function Hp(a,b,c){if(a.id==c.id)return!0;var d=od(a.language,b.language),e=od(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
|
|
640
|
+
d=Lp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Mp)return!0;if(d==Np)return!1;d=Lp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Mp?!0:d==Np?!1:a.bandwidth&&Op(a.bandwidth,b.bandwidth,c.bandwidth)==Mp?!0:!1}
|
|
641
|
+
function Ip(a,b,c){if(a.id==c.id)return!0;var d=Lp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Mp)return!0;if(d==Np)return!1;if(a.frameRate){d=Lp(a.frameRate,b.frameRate,c.frameRate);if(d==Mp)return!0;if(d==Np)return!1}return a.bandwidth&&Op(a.bandwidth,b.bandwidth,c.bandwidth)==Mp?!0:!1}
|
|
642
|
+
function Jp(a,b,c){if(a.id==c.id)return!0;var d=od(a.language,b.language),e=od(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
|
|
643
|
+
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Kp(a,b,c){return a.id==c.id?!0:Lp(a.width*a.height,b.width*b.height,c.width*c.height)==Mp?!0:!1}function wp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
644
|
+
function rp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new tj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
645
|
+
function Lp(a,b,c){if(b==a&&a!=c)return Np;if(c==a&&a!=b)return Mp;if(b>a){if(c<=a||c-a<b-a)return Mp;if(c-a>b-a)return Np}else{if(c>a)return Np;if(a-c<a-b)return Mp;if(a-c>a-b)return Np}return Pp}function Op(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Mp:b<a?Np:Pp}var Mp=1,Pp=0,Np=-1;function Qp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.M={};this.j=new lp;this.F=0;this.J=new Qa(5);this.D=new O(function(){Rp(a)});this.o=new Ye;this.s=null;this.L=[];this.u=Infinity;this.B=!1}q=Qp.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return J(function(e){if(1==e.g)return c.B=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Sp(c),2);d=e.h;c.h&&Tp(c,d);if(!c.h)throw new M(2,7,7001);return e.return(c.i)})};
|
|
646
|
+
q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};q.update=function(){var a=this,b;return J(function(c){if(1==c.g)return C(c,2),u(c,Sp(a),4);if(2!=c.g)return ua(c,0);b=F(c);if(!a.h||!b)return c.return();a.h.onError(b);A(c)})};q.onExpirationUpdated=function(){};
|
|
647
|
+
function Sp(a){var b,c,d,e,f,g,h;return J(function(k){if(1==k.g)return b=df(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Ze(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Up(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
|
|
648
|
+
function Up(a,b,c){var d,e,f,g,h;return J(function(k){if(1==k.g){d=gg(b,"MPD");if(!d)throw new M(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Vp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Ho(d,a.g.retryParameters,f,c,a.h.networkingEngine);Ze(a.o,g);return u(k,g.promise,2)}h=k.h;return k.return(Vp(a,h,c))})}
|
|
649
|
+
function Vp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,K,N,P,S,Y,fa,va,Da,Ea,Ga;return J(function(Ha){switch(Ha.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Mf(b,"Location").map(Uf).filter(bc);0<f.length&&(g=cc(e,f),e=a.m=g);h=Mf(b,"BaseURL");k=h.map(Uf);l=cc(e,k);m=0;h&&h.length&&(m=Wf(h[0],"availabilityTimeOffset",cg)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=Wf(b,"minBufferTime",Yf)||0);a.F=Wf(b,"minimumUpdatePeriod",Yf,-1);t=Wf(b,"availabilityStartTime",Xf);y=Wf(b,
|
|
650
|
+
"timeShiftBufferDepth",Yf);x=a.g.dash.ignoreSuggestedPresentationDelay;v=null;x||(v=Wf(b,"suggestedPresentationDelay",Yf));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Wf(b,"maxSegmentDuration",Yf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,G=r(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.fb(B.Qa());else I=a.g.defaultPresentationDelay||1.5*n,K=null!=v?v:I,B=new T(t,K,a.g.dash.autoCorrectDrift);B.xc("static"==z);(N=B.V())&&
|
|
651
|
+
!isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);B.ge(y);P=b.getAttribute("profiles")||"";S={Xa:"static"!=z,presentationTimeline:B,ca:null,W:null,ga:null,I:null,bandwidth:0,Ee:!1,zb:m,profiles:P.split(",")};Y=Wp(a,S,l,b);fa=Y.duration;va=Y.periods;"static"!=z&&Y.we||B.Da(fa||Infinity);a.u&&!a.B&&(Da=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.Qe(a.u):a.u&&Va("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
652
|
+
B.Pd(D||1);return u(Ha,mp(a.j,va,S.Xa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ha.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!B.Ve()){Ha.A(4);break}Ea=Mf(b,"UTCTiming");return u(Ha,Xp(a,l,Ea),5);case 5:Ga=Ha.h;if(!a.h)return Ha.return();B.Re(Ga);case 4:B.Jd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ha)}})}
|
|
653
|
+
function Wp(a,b,c,d){var e=Wf(d,"mediaPresentationDuration",Yf),f=[],g=0;d=Mf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Wf(k,"start",Yf,g),p=k.id,n=Wf(k,"duration",Yf),t=null;if(l){var y=Wf(l,"start",Yf);null!=y&&(t=y-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.s&&null!==p&&null!==m&&m<a.s)||a.L.includes(p)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=Yp(a,b,c,{start:m,duration:t,node:k,Cd:null==t||!l});f.push(g);b.ca.id&&t&&(a.M[b.ca.id]=t);if(null==t){g=
|
|
654
|
+
null;break}g=m+t}}a.L=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,we:!1}:{periods:f,duration:g,we:!0}}
|
|
655
|
+
function Yp(a,b,c,d){b.ca=Zp(d.node,null,c);b.W=d;b.ca.zb=b.zb;b.ca.id||(b.ca.id="__shaka_period_"+d.start);var e=Mf(d.node,"EventStream");c=b.presentationTimeline.Qa();e=r(e);for(var f=e.next();!f.done;f=e.next())$p(a,d.start,d.duration,f.value,c);c=Mf(d.node,"AdaptationSet").map(function(m){return aq(a,b,m)}).filter(bc);if(b.Xa){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.gg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new M(2,4,4018);
|
|
656
|
+
}d=c.filter(function(m){return!m.je});c=c.filter(function(m){return m.je});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.je.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Ec:h.Ec},l=k.next())h.Ec=l.value,h.Ec.trickModeVideo=e.streams.find(function(m){return function(p){return Xc(m.Ec.codecs)==Xc(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:bq(d,"audio");g=a.g.disableVideo?[]:bq(d,"video");f=a.g.disableText?
|
|
657
|
+
[]:bq(d,hc);c=a.g.disableThumbnails?[]:bq(d,"image");if(!g.length&&!e.length)throw new M(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ca.id,Gc:d,ed:e,textStreams:g,imageStreams:f}}
|
|
658
|
+
function bq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
659
|
+
function aq(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ga=Zp(c,b.ca,null);var e=!1,f=Mf(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(bc),h=void 0,k=b.ga.contentType==hc;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
660
|
+
l}}var p;m=Mf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=t&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=t&&(l=!0)}m=Mf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
|
|
661
|
+
n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),10)));m=Mf(c,"Accessibility");var y=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var x=r(t),v=x.next();!v.done;v=x.next()){var w=v.value,D=v=void 0;w.includes("=")?(w=w.split("="),v=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(v="CC"+n,2==t.length?n+=2:n++,D=w);y.set(v,kd(D))}}else y.set("CC1",
|
|
662
|
+
"und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=1,null!=t)for(t=r(t.split(";")),v=t.next();!v.done;v=t.next())v=v.value,w=x=void 0,v.includes("=")?(v=v.split("="),x="svc"+v[0],w=v[1].split(",")[0].split(":").pop()):(x="svc"+n,n++,w=v),y.set(x,kd(w));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Mf(c,"ContentProtection");var z=so(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=kd(c.getAttribute("lang")||"und"),
|
|
663
|
+
G=c.getAttribute("label");(l=Mf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(G=l.textContent));l=Mf(c,"Representation");c=l.map(function(E){if(E=cq(a,b,z,h,B,G,e,g,y,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ga.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new M(2,4,4003);}if(!b.ga.contentType||"application"==b.ga.contentType)for(b.ga.contentType=dq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=
|
|
664
|
+
b.ga.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(bc);return{id:b.ga.id||"__fake__"+a.G++,contentType:b.ga.contentType,language:B,fh:e,streams:c,drmInfos:z.drmInfos,je:f,gg:k}}
|
|
665
|
+
function cq(a,b,c,d,e,f,g,h,k,l){b.I=Zp(l,b.ga,null);a.u=Math.min(a.u,b.I.zb);if(!eq(b.I))return null;var m=b.W.start;b.bandwidth=Wf(l,"bandwidth",ag)||0;var p=b.I.contentType,n=p==hc||"application"==p;p="image"==p;try{var t=function(E,H,I){return fq(a,E,H,I)};if(b.I.vc)var y=Uo(b,t);else if(b.I.ab)y=$o(b,a.l);else if(b.I.wc)y=ep(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var x=b.I.za,v=b.W.duration||0;y={Bb:function(){return Promise.resolve(vj(m,v,x))}}}}catch(E){if((n||p)&&4002==E.code)return null;
|
|
666
|
+
throw E;}t=Mf(l,"ContentProtection");t=vo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Mf(l,"SupplementalProperty").some(function(E){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==E.getAttribute("schemeIdUri")&&"JOC"==E.getAttribute("value")})&&(w=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Mf(l,"EssentialProperty").find(function(E){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(E.getAttribute("schemeIdUri"))}))&&
|
|
667
|
+
(z=l.getAttribute("value")),!z))return null;var B;l=b.I.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");l=b.I.id?b.ca.id+","+b.I.id:"";var G=l&&a.l[l]?a.l[l]:{id:a.G++,originalId:b.I.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,
|
|
668
|
+
frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.ga.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.I.Vc,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:z,matchedStreams:[]};G.createSegmentIndex=function(){var E;return J(function(H){if(1==
|
|
669
|
+
H.g){if(G.segmentIndex)return H.A(0);E=G;return u(H,y.Bb(),3)}E.segmentIndex=H.h;A(H)})};l&&b.Xa&&!a.l[l]&&(a.l[l]=G);return G}function Rp(a){var b,c;J(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Sp(a),4);case 4:b=d.h;ua(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();Tp(a,b);A(d)}})}function Tp(a,b){0>a.F||a.D.R(Math.max(3,a.F-b,Ra(a.J)))}
|
|
670
|
+
function Zp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vc:null,audioSamplingRate:null,zb:0};c=c||b.za;var d=Mf(a,"BaseURL"),e=d.map(Uf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Wf(a,"frameRate",dg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Mf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
|
|
671
|
+
m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Mf(a,"AudioChannelConfiguration");m=gq(m)||b.Vc;n=Wf(a,"audioSamplingRate",bg)||b.audioSamplingRate;f||(f=dq(g,h));var t=Lf(a,"SegmentBase"),y=Lf(a,"SegmentTemplate"),x=t?Wf(t,"availabilityTimeOffset",cg)||0:0,v=y?Wf(y,"availabilityTimeOffset",cg)||0:0;d=d&&d.length?Wf(d[0],"availabilityTimeOffset",cg)||0:0;d=b.zb+d+x+v;return{za:cc(c,e),vc:t||b.vc,ab:Lf(a,"SegmentList")||b.ab,wc:y||b.wc,width:Wf(a,"width",bg)||b.width,height:Wf(a,
|
|
671
672
|
"height",bg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),Vc:m,audioSamplingRate:n,zb:d}}
|
|
672
|
-
function
|
|
673
|
-
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function
|
|
674
|
-
function
|
|
675
|
-
function
|
|
676
|
-
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}p.A(9);break;case 7:return u(p,
|
|
677
|
-
3);break;case 5:
|
|
678
|
-
function
|
|
679
|
-
function
|
|
680
|
-
|
|
681
|
-
function
|
|
682
|
-
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=
|
|
683
|
-
(h&&g.push(h),e.push(new
|
|
684
|
-
var
|
|
685
|
-
function
|
|
686
|
-
q.start=function(a,b){var c=this,d,e;return
|
|
687
|
-
q.update=function(){var a=this,b,c,d,e,f,g;return
|
|
688
|
-
function
|
|
673
|
+
function gq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
674
|
+
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function eq(a){var b=a.vc?1:0;b+=a.ab?1:0;b+=a.wc?1:0;if(0==b)return a.contentType==hc||"application"==a.contentType?!0:!1;1!=b&&(a.vc&&(a.ab=null),a.wc=null);return!0}
|
|
675
|
+
function hq(a,b,c,d){var e,f,g,h,k,l;return J(function(m){if(1==m.g)return e=cc(b,[c]),f=df(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Ze(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=Ac(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
|
|
676
|
+
function Xp(a,b,c){var d,e,f,g,h,k,l,m;return J(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){p.A(4);break}h=g.value;C(p,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return p.A(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return p.A(8);
|
|
677
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}p.A(9);break;case 7:return u(p,hq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return u(p,hq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:ua(p,
|
|
678
|
+
3);break;case 5:F(p);case 3:g=f.next();p.A(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p.return(0)}})}
|
|
679
|
+
function $p(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Wf(d,"timescale",bg)||1;d=r(Mf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Wf(k,"presentationTime",bg)||0,m=Wf(k,"duration",bg)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
|
|
680
|
+
function fq(a,b,c,d){var e,f,g,h,k;return J(function(l){if(1==l.g)return e=kf,f=Lj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Ze(a.o,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function dq(a,b){return ad(Vc(a,b))?hc:a.split("/")[0]}L("shaka.dash.DashParser",Qp);Xg.mpd=function(){return new Qp};Vg["application/dash+xml"]=function(){return new Qp};Vg["video/vnd.mpeg.dash.mpd"]=function(){return new Qp};function iq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function jq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}jq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
|
|
681
|
+
jq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function kq(a,b){a=a.getAttribute(b);if(!a)throw new M(2,4,4023,b);return a.value}function lq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function mq(a,b){this.name=a;this.value=b};function nq(a,b){return a.filter(function(c){return c.name==b})}function oq(a,b){return a.filter(function(c){return kq(c,"TYPE")==b})}function pq(a,b){a=nq(a,b);return a.length?a[0]:null}function qq(a,b){var c=0;c=void 0===c?0:c;return(a=pq(a,b))?Number(a.value):c}function rq(a,b){return cc([a],[b])[0]};function sq(a){this.h=a;this.g=0}function tq(a){uq(a,/[ \t]+/gm)}function uq(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function vq(a){return a.g==a.h.length?null:(a=uq(a,/[^ \t\n]*/gm))?a[0]:null};function wq(){this.g=0}
|
|
682
|
+
function xq(a,b,c){b=Ac(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new M(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=yq(a,g),--a.g,zq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=yq(a,h);if(Aq.includes(h.name)){if(1!=b)throw new M(2,4,4017);
|
|
683
|
+
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=yq(a,m),zq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?null!=Z(m,"BYTERANGE-START")?null!=Z(m,"BYTERANGE-LENGTH")&&k.push(m):k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=rq(d,m.trim()),h&&g.push(h),e.push(new lq(m,g,k)),g=[],k=[]);k.length&&
|
|
684
|
+
(h&&g.push(h),e.push(new lq("",g,k)));return new iq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new mq("URI",k)),e=!0)}}return new iq(c,b,f)}function yq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new M(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new sq(d);var f;(f=uq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=uq(d,g);)c.push(new mq(f[1],f[2]||f[3])),tq(d)}return new jq(a,b,c,e)}
|
|
685
|
+
var zq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Aq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Bq(){}function Cq(a){try{var b=Dq(a);return Pe({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ne(c)}}
|
|
686
|
+
function Dq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Lc(a):e=Ec(a);return{data:e,contentType:c}}L("shaka.net.DataUriPlugin",Bq);Bq.parse=Cq;af("data",Cq);function Eq(){var a=this;this.g=this.i=null;this.Ma=1;this.o=new Map;this.u=new Map;this.ya=new Set;this.h=new Map;this.j=null;this.M="";this.da=new wq;this.la=0;this.T=!1;this.O=null;this.$=Infinity;this.B=new O(function(){Fq(a)});this.m=Gq;this.J=null;this.fa=0;this.F=Infinity;this.Z=this.ka=0;this.D=new Ye;this.G=[];this.L=new Map;this.s=new Map;this.ea=new Map;this.l=!1}q=Eq.prototype;q.configure=function(a){this.g=a};
|
|
687
|
+
q.start=function(a,b){var c=this,d,e;return J(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),u(f,Hq(c,a),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,Iq(c,d.data,a),3);e=c.la;0<e&&c.B.R(e);return f.return(c.J)})};q.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.g=this.i=null;this.ya.clear();this.J=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
|
|
688
|
+
q.update=function(){var a=this,b,c,d,e,f,g;return J(function(h){if(1==h.g){if(a.m==Gq)return h.return();b=[];c=Array.from(a.h.values());return c.length?u(h,Jq(a,c[0]),2):h.A(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Jq(a,c[d]));return u(h,Promise.all(b),4)}Kq(a);e=c.some(function(k){return 0==k.Ce});e||(f=Lq,Mq(a,f.Ye),g=c.map(function(k){return k.nc}),a.j.Da(Math.min.apply(Math,ia(g))),a.i.updateDuration());A(h)})};
|
|
689
|
+
function Jq(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return J(function(y){if(1==y.g)return c=b.Ze,d=new Lb(c),a.l&&b.df&&Ob(d,new Qb("_HLS_skip=YES")),u(y,Hq(a,d.toString()),2);e=y.h;f=xq(a.da,e.data,e.uri);if(1!=f.type)throw new M(2,4,4017);g=nq(f.g,"EXT-X-DEFINE");h=Nq(a,g);k=b.stream;l=Oq(a,f,k.type,b.oc,h);a.G.push(l);k.segmentIndex.Hb(l,a.j.Qa());l.length&&(m=qq(f.g,"EXT-X-MEDIA-SEQUENCE"),p=b.oc.get(m),k.segmentIndex.fb(p));n=l[l.length-1];if(t=pq(f.g,"EXT-X-ENDLIST"))b.Ce=!0,b.nc=n.endTime;A(y)})}
|
|
689
690
|
q.onExpirationUpdated=function(){};
|
|
690
|
-
function
|
|
691
|
-
|
|
692
|
-
function
|
|
693
|
-
!0}}}function
|
|
694
|
-
function
|
|
695
|
-
|
|
696
|
-
disabledUntilTime:0,primary:!0,audio:"audio"==H?N.stream:null,video:"video"==H?N.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new M(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?
|
|
697
|
-
a.j.xc(!0));if(a.m!=
|
|
698
|
-
Of.createSegmentIndex(),0)})})),9);case 9:
|
|
699
|
-
function
|
|
700
|
-
function
|
|
701
|
-
function
|
|
702
|
-
p.next())t=n.value,t.stream.codecs=l;return
|
|
703
|
-
function
|
|
704
|
-
function
|
|
705
|
-
B.frameRate=Number(h)||void 0,B.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var
|
|
706
|
-
!!I&&I.primary,audio:E,video:I,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(E),a.ya.add(H))}}return v.call(
|
|
707
|
-
function
|
|
708
|
-
function
|
|
709
|
-
function
|
|
710
|
-
function
|
|
711
|
-
"YES"==t;return u(v,
|
|
712
|
-
function
|
|
713
|
-
if(p=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function
|
|
714
|
-
function
|
|
715
|
-
function
|
|
716
|
-
Y=
|
|
717
|
-
"EXT-X-SERVER-CONTROL"))?null!=Pf.getAttribute("CAN-SKIP-UNTIL"):!1;rn={id:a.Ma++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ub,mimeType:
|
|
718
|
-
return
|
|
719
|
-
function
|
|
720
|
-
|
|
721
|
-
function
|
|
722
|
-
function
|
|
723
|
-
function
|
|
724
|
-
if(!a.l)return null}var v=[];if(a.l)for(var w=
|
|
725
|
-
|
|
726
|
-
function
|
|
727
|
-
function
|
|
728
|
-
!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(
|
|
729
|
-
f=function(z){return function(){var B=n[z.zc];if(B){B!=z.Ua&&(z.Pb+=B.endTime-B.startTime);if(null!=B.g)return B.g+z.Pb;--z.zc}return null}}(c);null==c.Ua.g;)c.Ua.g=f(),null==c.Ua.g&&(c.Ua.g=e());if(b)for(c=r(n),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.$;if(b&&Infinity!=a)for(b=r(n),d=b.next();!d.done;d=b.next())d.value.he(a);return n}
|
|
730
|
-
function
|
|
731
|
-
function
|
|
732
|
-
if(!
|
|
733
|
-
function
|
|
734
|
-
var
|
|
735
|
-
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},
|
|
736
|
-
b=
|
|
737
|
-
|
|
738
|
-
function
|
|
739
|
-
if(!g){
|
|
740
|
-
function
|
|
741
|
-
function
|
|
742
|
-
c))};f.ontimeout=function(){m(new M(1,1,1003,a,c))};f.onprogress=function(t){var
|
|
743
|
-
function
|
|
744
|
-
function
|
|
745
|
-
function
|
|
746
|
-
function
|
|
747
|
-
q.updateManifest=function(){return Promise.reject(new M(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
748
|
-
q.getManifests=function(a){var b=this,c;return
|
|
749
|
-
function
|
|
750
|
-
function
|
|
751
|
-
function
|
|
752
|
-
|
|
753
|
-
function
|
|
754
|
-
function
|
|
755
|
-
function
|
|
756
|
-
|
|
757
|
-
function
|
|
758
|
-
function
|
|
759
|
-
dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}
|
|
760
|
-
function
|
|
761
|
-
f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function
|
|
762
|
-
|
|
691
|
+
function Pq(a){if(!a.T){for(var b=-1,c=new Map,d=r(a.h.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.H[0]||null))for(var g=r(e.oc),h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.O=b;b=r(a.h.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)if(f=a.O-c.get(d),e.H.splice(0,f),e=e.H[0]||null)e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
692
|
+
Qq(d,e);a.T=!0}}}
|
|
693
|
+
function Rq(a){if(!a.T&&Infinity==a.$){for(var b=Infinity,c=r(a.h.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.H[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){a.$=b;c=r(a.h.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;if(null!=e){var f=e.H[0]||null;if(null==f.g)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.dd,"Expect AV sync issues!");else for(Qq(d,f.g-b-f.startTime),d=r(e),e=d.next();!e.done;e=d.next())e.value.he(b)}}a.T=
|
|
694
|
+
!0}}}function Qq(a,b){a.nc+=b;for(var c=r(a.oc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.oc.set(d,e+b)}}
|
|
695
|
+
function Iq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,K,N,P,S,Y,fa,va,Da,Ea,Ga,Ha,Gc,Hc,ic,pd,ub,qd,Wb,rd;return J(function(Na){switch(Na.g){case 1:d=xq(a.da,b,a.M);e=nq(d.g,"EXT-X-DEFINE");Sq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],I=Zc(G),K=new Map,u(Na,Tq(a,d,c,c,I,H,"",!0,"Media Playlist",null,K,null,!1,!1,E),8);k=nq(d.g,"EXT-X-MEDIA");l=nq(d.g,"EXT-X-STREAM-INF");m=nq(d.g,"EXT-X-IMAGE-STREAM-INF");Uq(a,l);p=
|
|
696
|
+
nq(d.g,"EXT-X-SESSION-DATA");n=r(p);for(t=n.next();!t.done;t=n.next())if(y=t.value,x=Z(y,"DATA-ID"),v=Z(y,"URI"),w=Z(y,"LANGUAGE"),D=Z(y,"VALUE"),z=(new Map).set("id",x),v&&z.set("uri",rq(a.M,v)),w&&z.set("language",w),D&&z.set("value",D),B=new Q("sessiondata",z),a.i)a.i.onEvent(B);return u(Na,Vq(a,k),4);case 4:return Wq(a,k),u(Na,Xq(a,l),5);case 5:return f=Na.h,u(Na,Yq(a,k),6);case 6:return g=Na.h,u(Na,Zq(a,m),7);case 7:h=Na.h;Na.A(3);break;case 8:N=Na.h,a.h.set(c,N),f.push({id:0,language:"und",
|
|
697
|
+
disabledUntilTime:0,primary:!0,audio:"audio"==H?N.stream:null,video:"video"==H?N.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new M(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?Pq(a):Rq(a);P=Infinity;S=r(a.h.values());for(Y=S.next();!Y.done;Y=S.next())fa=Y.value,"text"!=fa.stream.type&&(P=Math.min(P,fa.nc));a.m!=Gq?(a.j=new T(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.fa),a.j.xc(!1)):(a.j=new T(null,0),
|
|
698
|
+
a.j.xc(!0));if(a.m!=Gq)a.la=a.F,va=Lq,a.m==va.Xe&&(Da=a.j.$c,isNaN(a.g.availabilityWindowOverride)||(Da=a.g.availabilityWindowOverride),a.j.ge(Da));else for(a.j.Da(P),Ea=r(a.h.values()),Y=Ea.next();!Y.done;Y=Ea.next())Ga=Y.value,Ga.stream.segmentIndex.Ya(0,P);a.G=[];Ha=[];Gc=r(f);for(Hc=Gc.next();!Hc.done;Hc=Gc.next())for(ic=Hc.value,pd=r([ic.video,ic.audio]),ub=pd.next();!ub.done;ub=pd.next())(qd=ub.value)&&Ha.push(qd);return u(Na,Promise.all(Ha.map(function(Of){return J(function(Pf){return u(Pf,
|
|
699
|
+
Of.createSegmentIndex(),0)})})),9);case 9:Wb=r(Ha);for(ub=Wb.next();!ub.done;ub=Wb.next())rd=ub.value,a.G.push(rd.segmentIndex.H);Kq(a);a.j.Jd();a.J={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.J);A(Na)}})}function Sq(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=Z(d,"NAME");d=Z(d,"VALUE");c&&d&&(a.o.has(c)||a.o.set(c,d))}}
|
|
700
|
+
function Nq(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.o.get(e))&&c.set(e,d)}return c}
|
|
701
|
+
function Uq(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=$q(a,d);if(f){var g=fc(hc,d);a.s.set(f,g);cb(d,g)}e&&(f=fc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.s.set(e,f));c&&(e=fc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.s.set(c,e))}}
|
|
702
|
+
function Yq(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return J(function(y){if(1==y.g)return c=oq(b,"SUBTITLES"),d=c.map(function(x){var v,w,D;return J(function(z){if(1==z.g){if(v=a.g.disableText)return z.return(null);C(z,2);return u(z,ar(a,x),4)}if(2!=z.g)return w=z.h,z.return(w.stream);D=F(z);if(a.g.hls.ignoreTextStreamFailures)return z.return(null);throw D;})}),u(y,Promise.all(d),2);e=y.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=kq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(p=r(m),n=p.next();!n.done;n=
|
|
703
|
+
p.next())t=n.value,t.stream.codecs=l;return y.return(e.filter(function(x){return x}))})}function Zq(a,b){var c,d;return J(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return J(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);C(l,2);return u(l,br(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=F(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
|
|
704
|
+
function Vq(a,b){var c;return J(function(d){b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f});c=b.map(function(e){return ar(a,e)});return u(d,Promise.all(c),0)})}
|
|
705
|
+
function Xq(a,b){var c,d,e;return J(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,p,n,t,y;return J(function(x){if(1==x.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(kq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,t=Z(g,"VIDEO-RANGE"),u(x,cr(a,g),2);y=x.h;for(var v=x.return,w=y.audio,D=y.video,z=r(D),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(p)||void 0,B.height=Number(n)||void 0,
|
|
706
|
+
B.frameRate=Number(h)||void 0,B.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var G=r(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=B?B.stream:null;var I=H?H.stream:null,K=B?B.stream.drmInfos:null,N=H?H.stream.drmInfos:null;H=(H?H.dd:"")+" - "+(B?B.dd:"");E&&I&&K.length&&N.length&&!(0<Rg(K,N).length)||a.ya.has(H)||(E={id:a.Ma++,language:E?E.language:"und",primary:!!E&&E.primary||
|
|
707
|
+
!!I&&I.primary,audio:E,video:I,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(E),a.ya.add(H))}}return v.call(x,z)})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce($b,[]);e=e.filter(function(g){return null!=g});return f.return(e)})}
|
|
708
|
+
function cr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return J(function(v){if(1==v.g)return c=jc,d=$q(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=kq(b,"URI"),n=k.audio.find(function(w){return w&&w.dd==p}),t=fc(c.ua,d),(y=fc(c.eb,d))&&!t?l=c.eb:!h.length&&y&&t?(l=c.ua,d=[[t,y].join()]):k.audio.length&&n?(l=c.eb,m=!0):l=k.video.length&&!k.audio.length?c.eb:c.ua,m?v.A(2):u(v,dr(a,b,d,l),3);2!=v.g&&(x=v.h,k[x.stream.type]=[x]);er(k);return v.return(k)})}
|
|
709
|
+
function $q(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=Yc(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function fr(a){a=Z(a,"LANGUAGE")||"und";return kd(a)}
|
|
710
|
+
function er(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Wq(a,b){b=oq(b,"CLOSED-CAPTIONS");b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=fr(d);var e=kq(d,"GROUP-ID");d=kq(d,"INSTREAM-ID");a.L.get(e)||a.L.set(e,new Map);a.L.get(e).set(d,c)}}
|
|
711
|
+
function ar(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return J(function(v){if(1==v.g){c=kq(b,"GROUP-ID");d="";var w=kq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=hc);e=w;e!=hc&&c&&a.s.has(c)&&(d=a.s.get(c));f=gr(kq(b,"URI"),a.o);if(a.h.has(f))return v.return(a.h.get(f));g=fr(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Z(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Z(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;p=w;n=Z(b,"CHARACTERISTICS");t=Z(b,"FORCED");y=
|
|
712
|
+
"YES"==t;return u(v,hr(a,f,d,e,g,l,h,m,null,n,y,p),2)}x=v.h;a.u.has(c)?a.u.get(c).push(x):a.u.set(c,[x]);if(a.h.has(f))return v.return(a.h.get(f));a.h.set(f,x);return v.return(x)})}
|
|
713
|
+
function br(a,b){var c,d,e,f,g,h,k,l,m,p;return J(function(n){if(1==n.g){c=gr(kq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=fr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(n,hr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(a.h.has(c))return n.return(a.h.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*Number(m.split("x")[1]);
|
|
714
|
+
if(p=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function dr(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.g){e=gr(kq(b,"URI"),a.o);if(a.h.has(e))return k.return(a.h.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.L.get(l):null;g=ec(d,c);return u(k,hr(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(a.h.has(e))return k.return(a.h.get(e));a.h.set(e,h);return k.return(h)})}
|
|
715
|
+
function hr(a,b,c,d,e,f,g,h,k,l,m,p){var n,t,y;return J(function(x){if(1==x.g)return n=rq(a.M,b),u(x,Hq(a,n),2);t=x.h;n=t.uri;y=xq(a.da,t.data,n);return x.return(Tq(a,y,b,n,c,d,e,f,g,h,k,l,m,p))})}
|
|
716
|
+
function Tq(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){var x,v,w,D,z,B,G,E,H,I,K,N,P,S,Y,fa,va,Da,Ea,Ga,Ha,Gc,Hc,ic,pd,ub,qd,Wb,rd,Na,Of,Pf,qn,rn;return J(function(td){if(1==td.g){if(1!=b.type)throw new M(2,4,4017);x=nq(b.g,"EXT-X-DEFINE");v=Nq(a,x);ir(a,b);return y?td.A(2):u(td,jr(a,f,e,b,v),3)}2!=td.g&&(y=td.h);w=[];if(b.segments)for(D=r(b.segments),z=D.next();!z.done;z=D.next())B=z.value,G=nq(B.g,"EXT-X-KEY"),w.push.apply(w,ia(G));H=E=!1;I=[];K=new Set;N=r(w);for(P=N.next();!P.done;P=N.next())if(S=P.value,
|
|
717
|
+
Y=kq(S,"METHOD"),"NONE"!=Y)if(E=!0,"AES-128"==Y)H=!0;else if(fa=kq(S,"KEYFORMAT"),Da=(va=kr[fa])?va(S,y):null){if(Da.keyIds)for(Ea=r(Da.keyIds),Ga=Ea.next();!Ga.done;Ga=Ea.next())Ha=Ga.value,K.add(Ha);I.push(Da)}if(E&&!I.length&&!H)throw new M(2,4,4026);Xi.includes(y)&&(e="");Gc=new Map;Hc=a.l;ic=Oq(a,b,f,Gc,v);Hc!=a.l&&ir(a,b);pd=ic[ic.length-1].endTime;ub=new tj(ic);qd=f==hc?"subtitle":void 0;Wb=[];if(p)for(rd=r(p.split(",")),Na=rd.next();!Na.done;Na=rd.next())Of=Na.value,Wb.push(Of);Wb.length||
|
|
718
|
+
"subtitle"!==qd||Wb.push("subtitle");qn=(Pf=pq(b.g,"EXT-X-SERVER-CONTROL"))?null!=Pf.getAttribute("CAN-SKIP-UNTIL"):!1;rn={id:a.Ma++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ub,mimeType:y,codecs:e,kind:qd,encrypted:E,drmInfos:I,keyIds:K,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Wb,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,
|
|
719
|
+
closedCaptions:m,hdr:void 0,tilesLayout:void 0};return td.return({stream:rn,dd:c,Ze:d,nc:pd,oc:Gc,df:qn,Ce:!1})})}
|
|
720
|
+
function lr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new M(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Mc(e.substr(2));if(16!=f.byteLength)throw new M(2,4,4043);}else d=qq(c.g,"EXT-X-MEDIA-SEQUENCE");b=rq(c.h,kq(b,"URI"));var g=df([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return J(function(p){if(1==p.g)return u(p,
|
|
721
|
+
mr(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new M(2,4,4044);l={name:"AES-CBC"};m=h;return u(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;A(p)})}};return h}
|
|
722
|
+
function ir(a,b){var c=pq(b.g,"EXT-X-PLAYLIST-TYPE"),d=pq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Mq(a,Gq);else{c?Mq(a,nr):Mq(a,or);d=pq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=pq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ka=Number(kq(c,"PART-TARGET")),a.F=Math.min(a.ka,a.F),b=pq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=b?Number(kq(b,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.fa=Math.max(d,a.fa)}}
|
|
723
|
+
function pr(a,b,c,d){c=pq(c,"EXT-X-MAP");if(!c)return null;var e=kq(c,"URI");d=gr(rq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=qr(d,c),a.ea.set(b,c));return a.ea.get(b)}function qr(a,b){var c=0,d=null;if(b=Z(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new ni(function(){return[a]},c,d)}
|
|
724
|
+
function rr(a,b,c,d,e,f,g,h,k){var l=d.g,m=gr(d.i,f),p=pq(l,"EXTINF"),n=0;f=0;var t=null;d.h.length&&!a.l&&Va("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var x=pq(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(y=Xf(x.value))}x=pi;pq(l,"EXT-X-GAP")&&(x=2);if(!p){if(0==d.h.length)throw new M(2,4,4024,
|
|
725
|
+
"EXTINF");if(!a.l)return null}var v=[];if(a.l){n={};for(var w=0;w<d.h.length;n={nd:n.nd},w++){var D=d.h[w],z=0==w?c:v[v.length-1],B=0==w?e:z.endTime,G=Number(Z(D,"DURATION"))||a.ka;if(G){G=B+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(E=Z(D,"BYTERANGE-START"))?Number(E):0:(E=Z(D,"BYTERANGE"),H=r(sr(z,E)),E=H.next().value,H=H.next().value);if(z=Z(D,"URI"))n.nd=rq(g,z),z=pi,"YES"==Z(D,"GAP")&&(z=2),B=new R(B,G,function(I){return function(){return[I.nd]}}(n),E,H,b,0,0,Infinity,[],"",null,null,z),
|
|
726
|
+
"EXT-X-PRELOAD-HINT"==D.name&&B.Ge(),v.push(B)}}}if(p){a=Number(p.value.split(",")[0]);if(0==a)return null;n=e+a}else n=v[v.length-1].endTime;(a=pq(l,"EXT-X-BYTERANGE"))?(t=r(sr(c,a.value)),f=t.next().value,t=t.next().value):v.length&&(f=v[0].Ea,t=v[v.length-1].na);c="";a=null;"image"==h&&(c="1x1",h=pq(l,"EXT-X-TILES"))&&(c=kq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new R(e,n,function(){return m.length?[m]:[]},f,t,b,0,0,Infinity,v,c,a,y,x,k)}
|
|
727
|
+
function sr(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.na+1,d=c+b-1);return[c,d]}function Kq(a){if(a.j){for(var b=r(a.G),c=b.next();!c.done;c=b.next())a.j.Ib(c.value);a.G=[]}}
|
|
728
|
+
function Oq(a,b,c,d,e){var f=b.segments,g=void 0,h=qq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=qq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=pq(b.g,"EXT-X-SKIP");l=l?Number(Z(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;a.m!=Gq&&d.has(m)&&(p=d.get(m));for(var n=[],t=null,y=0;y<f.length;y++){var x=f[y],v=0==y?p:t.endTime;m=k+l+y;pq(x.g,"EXT-X-DISCONTINUITY")&&h++;var w=r(x.g);for(var D=w.next();!D.done;D=w.next())D=D.value,"EXT-X-KEY"==D.name&&("AES-128"==kq(D,"METHOD")?g=lr(a,D,b):g=void 0);d.set(m,v);w=pr(a,b.h,x.g,e);
|
|
729
|
+
!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(x=rr(a,w,t,x,v,e,b.h,c,g))t=x,x.l=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.O&&m<a.O||n.push(x)}if(b=n.some(function(z){return null!=z.g}))for(c={},d=0;d<n.length;c={Rb:c.Rb,Qb:c.Qb,zc:c.zc,Ua:c.Ua,Pb:c.Pb},d++)if(c.Ua=n[d],null==c.Ua.g)for(c.Qb=0,c.Rb=d,e=function(z){return function(){var B=n[z.Rb];if(B){if(null!=B.g)return B.g+z.Qb;z.Qb-=B.endTime-B.startTime;z.Rb+=1}return null}}(c),c.Pb=0,c.zc=
|
|
730
|
+
d,f=function(z){return function(){var B=n[z.zc];if(B){B!=z.Ua&&(z.Pb+=B.endTime-B.startTime);if(null!=B.g)return B.g+z.Pb;--z.zc}return null}}(c);null==c.Ua.g;)c.Ua.g=f(),null==c.Ua.g&&(c.Ua.g=e());if(b)for(c=r(n),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.$;if(b&&Infinity!=a)for(b=r(n),d=b.next();!d.done;d=b.next())d.value.he(a);return n}
|
|
731
|
+
function gr(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new M(2,4,4039,e);}}return a}
|
|
732
|
+
function jr(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,y,x,v;return J(function(w){if(1==w.g){f=jc;g=kf;h=Math.trunc((d.segments.length-1)/2);k=gr(d.segments[h].i,e);l=new Lb(k);m=l.xa.split(".").pop();p=tr[b];if((n=p[m])||(n=ur[m]))return w.return(n);if(b==f.X){if("vtt"==c||"wvtt"==c)return w.return("text/vtt");if(c&&""!==c)return w.return("application/mp4")}if(b==f.Wb&&(!c||"jpeg"==c))return w.return("image/jpeg");t=df([k],a.g.retryParameters);t.method="HEAD";return u(w,mr(a,t,g),2)}y=w.h;x=y.headers["content-type"];
|
|
733
|
+
if(!x){if(b==f.X)return w.return("text/vtt");v=p.mp4;return w.return(v)}return w.return(x.split(";")[0])})}function Hq(a,b){b=df([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return mr(a,b,0)}function Fq(a){var b,c;J(function(d){if(1==d.g){if(!a.i)return d.return();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return a.m!=Gq&&(b=a.la,a.B.R(b)),ua(d,0);c=F(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.B.R(.1);A(d)})}
|
|
734
|
+
function Mq(a,b){a.m=b;a.j&&a.j.xc(a.m==Gq);a.m!=Gq||a.B.stop()}function mr(a,b,c){if(!a.D)throw new M(2,7,7001);b=a.i.networkingEngine.request(c,b);Ze(a.D,b);return b.promise}L("shaka.hls.HlsParser",Eq);
|
|
735
|
+
var ur={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},tr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
736
|
+
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},kr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new M(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new M(2,4,4041);return dc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=kq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
737
|
+
b=kq(a,"URI");b=Dq(b);b=Db(b.data);b=dc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=kq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=kq(a,"URI");a=Dq(a);a=Db(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Kf(a,b,new Set,0);return dc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Gq="VOD",
|
|
738
|
+
or="EVENT",nr="LIVE",Lq={Ye:Gq,Fg:or,Xe:nr};rc("Tizen 3")||rc("Tizen 2")||tc()||(Xg.m3u8=function(){return new Eq},Vg["application/x-mpegurl"]=function(){return new Eq},Vg["application/vnd.apple.mpegurl"]=function(){return new Eq});function vr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Dc(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function wr(){}function xr(a,b,c,d,e){var f=new yr;uf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new zr,h={re:!1,Ue:!1};a=Ar(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Me(a,function(){h.re=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Ue=!0;g.abort()});k.R(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
739
|
+
function Ar(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,D,z;return J(function(B){switch(B.g){case 1:return h=Br,k=Cr,n=p=0,t=Date.now(),C(B,2),u(B,h(a,c),4);case 4:l=B.h;f(Dr(l.headers));if("HEAD"==c.method){B.A(5);break}y=l.clone().body.getReader();v=(x=l.headers.get("Content-Length"))?parseInt(x,10):0;w=function(G){function E(){var H,I;return J(function(K){switch(K.g){case 1:return C(K,2),u(K,y.read(),4);case 4:H=K.h;ua(K,3);break;case 2:return F(K),K.return();case 3:if(H.done){K.A(5);break}p+=H.value.byteLength;
|
|
740
|
+
if(!g){K.A(5);break}return u(K,g(H.value),5);case 5:I=Date.now();if(100<I-t||H.done)e(I-t,p-n,v-p),n=p,t=I;H.done?G.close():(G.enqueue(H.value),E());A(K)}})}E()};new k({start:w});return u(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:ua(B,3);break;case 2:D=F(B);if(d.re)throw new M(1,1,7001,a,b);if(d.Ue)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,D,b);case 3:return z=Dr(l.headers),B.return(vr(z,m,l.status,a,l.url,b))}})}function Dr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
741
|
+
function Er(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}L("shaka.net.HttpFetchPlugin",wr);wr.isSupported=Er;wr.parse=xr;var Br=window.fetch,zr=window.AbortController,Cr=window.ReadableStream,yr=window.Headers;Er()&&(af("http",xr,2,!0),af("https",xr,2,!0),af("blob",xr,2,!0));function Fr(){}
|
|
742
|
+
function Gr(a,b,c,d,e){var f=new Hr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new M(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=Ir(f);e(t);p=!0}};f.onload=function(){var t=Ir(f),y=f.response;try{var x=vr(t,y,f.status,a,f.responseURL,c);l(x)}catch(v){m(v)}};f.onerror=function(t){m(new M(1,1,1002,a,t,
|
|
743
|
+
c))};f.ontimeout=function(){m(new M(1,1,1003,a,c))};f.onprogress=function(t){var y=Date.now();if(100<y-g||t.lengthComputable&&t.loaded==t.total)d(y-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=y};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new Me(k,function(){f.abort();return Promise.resolve()})}
|
|
744
|
+
function Ir(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}L("shaka.net.HttpXHRPlugin",Fr);Fr.parse=Gr;var Hr=window.XMLHttpRequest;af("http",Gr,1,!0);af("https",Gr,1,!0);af("blob",Gr,1,!0);function Jr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Kr(a){return a.Ba().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ea+":"+a.na}function Lr(a,b){return Lj(a.g.Ba(),a.g.Ea,a.g.na,b.streaming.retryParameters)};function Mr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Nr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Mr.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function Or(a){var b=this;this.o=a;this.j=new Map;this.i=new lf(function(){return Pr(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Mr}Or.prototype.destroy=function(){return this.i.destroy()};function Qr(a,b,c){a.m=b;a.l=c}function Pr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
745
|
+
function Rr(a,b,c,d,e,f){mf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return J(function(y){if(1==y.g)return u(y,Sr(a,c),2);h=y.h;if(a.i.g)throw new M(2,9,7001);if(e)for(m in k=Db(h),l=new Jf(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,t);a.g.close(d,h.byteLength);var x=a.g;a.m(0==x.i?0:x.j/x.i,a.g.h);return y.return(f(h))})});a.j.set(b,g)}function Tr(a){return J(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
746
|
+
function Sr(a,b){var c,d,e,f;return J(function(g){if(1==g.g)return c=kf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;cb(a.h,e);return g.return(f.data)})};function Ur(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new kc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Ur.prototype.abort=function(){var a=this;return J(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return ua(b,0);F(b);A(b)})};
|
|
747
|
+
function Vr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return J(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return u(g,b(f.key,f.value,f),2)}f.continue();A(g)})}})}Ur.prototype.store=function(){return this.h};Ur.prototype.promise=function(){return this.g};function Wr(a){this.h=a;this.g=[]}Wr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Xr(a,b){return Yr(a,b,"readwrite")}function Yr(a,b,c){c=a.h.transaction([b],c);var d=new Ur(c,b);a.g.push(d);d.promise().then(function(){cb(a.g,d)},function(){cb(a.g,d)});return d};function Zr(a,b,c){this.h=new Wr(a);this.i=b;this.g=c}q=Zr.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return $r(this.i)};q.removeSegments=function(a,b){return as(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return J(function(d){if(1==d.g)return u(d,bs(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.se(e)}))})};q.addManifests=function(){return $r(this.g)};
|
|
748
|
+
q.updateManifest=function(){return Promise.reject(new M(2,9,9016,"Cannot modify values in "+this.g))};function cs(a,b,c){a=Xr(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=Xr(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return as(this,this.g,a,b)};
|
|
749
|
+
q.getManifests=function(a){var b=this,c;return J(function(d){if(1==d.g)return u(d,bs(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.cc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return J(function(d){return 1==d.g?(b=Yr(a.h,a.g,"readonly"),c=new Map,u(d,Vr(b,function(e,f){var g;return J(function(h){if(1==h.g)return u(h,a.cc(f),2);g=h.h;c.set(e,g);A(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};q.se=function(a){return a};q.cc=function(a){return Promise.resolve(a)};
|
|
750
|
+
function $r(a){return Promise.reject(new M(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){if(1==m.g){d=Xr(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Dc:g.Dc},k=h.next())l=k.value,g.Dc=e.add(l),g.Dc.onsuccess=function(p){return function(){f.push(p.Dc.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
|
|
751
|
+
function as(a,b,c,d){a=Xr(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Cc:e.Cc},f=c.next())e.Cc=f.value,b.delete(e.Cc).onsuccess=function(g){return function(){return d(g.Cc)}}(e);return a.promise()}
|
|
752
|
+
function bs(a,b,c){var d,e,f,g,h,k,l;return J(function(m){if(1==m.g){d=Yr(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Vb:h.Vb,Tb:h.Tb},l=k.next())h.Tb=l.value,h.Vb=e.get(h.Tb),h.Vb.onsuccess=function(p){return function(){void 0==p.Vb.result&&g.push(p.Tb);f[p.Tb]=p.Vb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new M(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(p){return f[p]}))})};function ds(a){this.g=new Wr(a)}ds.prototype.destroy=function(){return this.g.destroy()};ds.prototype.getAll=function(){var a=this,b,c;return J(function(d){return 1==d.g?(b=Yr(a.g,"session-ids","readonly"),c=[],u(d,Vr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};ds.prototype.add=function(a){var b=Xr(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
753
|
+
ds.prototype.remove=function(a){var b=this,c;return J(function(d){return 1==d.g?(c=Xr(b.g,"session-ids"),u(d,Vr(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function es(){this.g=new Map}es.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};es.prototype.init=function(){var a=this;fs.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
754
|
+
function gs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ca:d,ma:f},ma:e})})});if(b)return b;throw new M(2,9,9013,"Could not find a cell that supports add-operations");}function hs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ca:d,ma:f},e)})})}
|
|
755
|
+
function is(a,b,c){a=a.g.get(b);if(!a)throw new M(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new M(2,9,9013,"Could not find cell with name "+c);return b}function js(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ks(a){var b=Array.from(a.g.keys());if(!b.length)throw new M(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
756
|
+
function ls(a){var b,c,d;return J(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=fs,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ms(a,b){fs.set(a,b)}L("shaka.offline.StorageMuxer",es);es.unregister=function(a){fs.delete(a)};es.register=ms;es.prototype.destroy=es.prototype.destroy;var fs=new Map;function ns(){Zr.apply(this,arguments)}pa(ns,Zr);ns.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return J(function(g){d=Xr(c.h,c.g);e=d.store();f=new kc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new M(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
|
|
757
|
+
ns.prototype.cc=function(a){var b,c,d,e,f,g;return J(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=os(a.periods[c],e),b.push(f);return u(h,vp(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
758
|
+
function os(a,b){ps(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return qs(e,a.startTime,b)})}
|
|
759
|
+
function qs(a,b,c){var d=a.initSegmentUri?rs(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=rs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
760
|
+
dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}ns.prototype.se=function(a){return{data:a.data}};function rs(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new M(2,9,9004,"Could not parse uri "+a);}
|
|
761
|
+
function ps(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
762
|
+
f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function ss(){Zr.apply(this,arguments)}pa(ss,Zr);
|
|
763
|
+
ss.prototype.cc=function(a){var b,c,d,e,f,g;return J(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(ts(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,vp(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
763
764
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
764
|
-
function
|
|
765
|
-
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function
|
|
766
|
-
q.init=function(){var a=this,b=new
|
|
767
|
-
new
|
|
768
|
-
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return
|
|
765
|
+
function ts(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
|
|
766
|
+
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function us(){Zr.apply(this,arguments)}pa(us,Zr);q=us.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return cs(this,a,b)};q.cc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function vs(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=vs.prototype;
|
|
767
|
+
q.init=function(){var a=this,b=new kc,c=!1,d=new O(function(){c=!0;b.reject(new M(2,9,9017))});d.R(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new ns(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new ss(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
768
|
+
new ss(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new us(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new ds(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new M(2,
|
|
769
|
+
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return J(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),A(b)}})};
|
|
769
770
|
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
|
|
770
|
-
q.erase=function(){var a=this;return
|
|
771
|
-
function
|
|
772
|
-
function
|
|
773
|
-
function
|
|
771
|
+
q.erase=function(){var a=this;return J(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,ws(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
|
|
772
|
+
function ws(){var a=new kc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new M(2,9,9001,b.error));c.preventDefault()};return a}ms("idb",function(){return rc("CrKey")||qc()||!window.indexedDB?null:new vs});function xs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}xs.prototype.Ca=function(){return this.i};xs.prototype.ma=function(){return this.h};xs.prototype.key=function(){return this.l};xs.prototype.toString=function(){return this.j};
|
|
773
|
+
function ys(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new xs(b,c,d,Number(a[4])):null};function zs(a,b){this.h=a;this.g=b}
|
|
774
|
+
function As(a,b){var c=new T(null,0);c.Da(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Bs(a,d,e,c);e=b.streams.filter(function(l){return l.type==hc}).map(function(l){return Cs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Cs(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
774
775
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1}}
|
|
775
|
-
function
|
|
776
|
-
b.next())for(e=e.value,g=
|
|
777
|
-
function
|
|
778
|
-
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function
|
|
779
|
-
function
|
|
780
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
781
|
-
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
782
|
-
Vg["application/x-offline-manifest"]=function(){return new
|
|
783
|
-
function
|
|
784
|
-
function
|
|
785
|
-
9);case 9:return f.return([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return
|
|
786
|
-
function
|
|
787
|
-
function
|
|
788
|
-
case 4:b.h=null,b.g=null,A(k)}})})}function
|
|
789
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
790
|
-
function
|
|
791
|
-
n,b,c,e,f),y
|
|
792
|
-
function
|
|
793
|
-
|
|
794
|
-
D=Object.values(l),u(z,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function
|
|
795
|
-
function
|
|
796
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();ua(w,0);break;case 2:return
|
|
797
|
-
function
|
|
798
|
-
d.push(
|
|
799
|
-
Y.next();!
|
|
800
|
-
function
|
|
801
|
-
n&&p&&(n.initData=[]);return{
|
|
802
|
-
function
|
|
803
|
-
function
|
|
804
|
-
function
|
|
805
|
-
function
|
|
806
|
-
function
|
|
807
|
-
q.list=function(){return
|
|
808
|
-
function
|
|
809
|
-
|
|
810
|
-
function
|
|
811
|
-
function
|
|
812
|
-
function
|
|
813
|
-
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;
|
|
814
|
-
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function
|
|
815
|
-
function
|
|
816
|
-
function
|
|
817
|
-
function
|
|
818
|
-
function
|
|
819
|
-
|
|
820
|
-
var
|
|
821
|
-
|
|
822
|
-
function
|
|
823
|
-
function
|
|
824
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
825
|
-
function
|
|
826
|
-
function
|
|
827
|
-
c.transferFunction&&(B+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(B)}else e=MediaSource.isTypeSupported(c.contentType);else
|
|
828
|
-
a.type){if(c&&(k=c.contentType,l=
|
|
829
|
-
sessionTypes:n.sessionTypes};t.length&&(w.audioCapabilities=t);
|
|
830
|
-
function
|
|
831
|
-
function
|
|
832
|
-
function
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
function
|
|
776
|
+
function Bs(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
|
|
777
|
+
b.next())for(e=e.value,g=Cs(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Cs(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
|
|
778
|
+
function Cs(a,b,c){var d=b.segments.map(function(e){return Ds(a,e)});c.Ib(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new tj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
|
|
779
|
+
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Ds(a,b){var c=new xs("segment",a.h,a.g,b.dataKey);return new R(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Es(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
780
|
+
function Es(a,b){var c=new xs("segment",a.h,a.g,b);return new ni(function(){return[c.toString()]},0,null)};function Fs(){this.g=null}q=Fs.prototype;q.configure=function(){};
|
|
781
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){switch(m.g){case 1:d=ys(a);c.g=d;if(null==d||"manifest"!=d.g)throw new M(2,1,9004,a);e=new es;ta(m);return u(m,e.init(),4);case 4:return u(m,is(e,d.Ca(),d.ma()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new zs(d.Ca(),d.ma()),l=As(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
782
|
+
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){switch(m.g){case 1:return d=c.g,e=new es,C(m,2,3),u(m,e.init(),5);case 5:return u(m,is(e,d.Ca(),d.ma()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
|
|
783
|
+
Vg["application/x-offline-manifest"]=function(){return new Fs};function Gs(){}function Hs(a){var b=ys(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Pe(a)):a=b&&"segment"==b.g?Is(b.key(),b):Ne(new M(2,1,9004,a));return a}
|
|
784
|
+
function Is(a,b){var c=new es;return Pe(void 0).aa(function(){return c.init()}).aa(function(){return is(c,b.Ca(),b.ma())}).aa(function(d){return d.getSegments([b.key()])}).aa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}L("shaka.offline.OfflineScheme",Gs);Gs.plugin=Hs;af("offline",Hs);function Js(a,b,c){var d,e,f,g,h,k;return J(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,y=r(m),x=y.next();!x.done;x=y.next())if(x=x.value,Ks(x.info,n)){x.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=Ls(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l.return(d)}})}
|
|
785
|
+
function Ls(a,b,c){var d,e;return J(function(f){switch(f.g){case 1:return d=new hg({lb:b,onError:function(){},Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,pg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return C(f,6),u(f,Ag(d),8);case 8:ua(f,7);break;case 6:return F(f),u(f,d.destroy(),
|
|
786
|
+
9);case 9:return f.return([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return J(function(h){if(1==h.g)return C(h,2),u(h,Bg(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);F(h);A(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f.return(e)}})}
|
|
787
|
+
function Ks(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&db(a.audioCapabilities,b.audioCapabilities,c)&&db(a.videoCapabilities,b.videoCapabilities,c)};function Ms(a,b,c){var d=b.presentationTimeline.getDuration();b=Ns(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Os(a,b){var c=As(new zs(a.Ca(),a.ma()),b),d=b.appMetadata||{};c=Ns(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
788
|
+
function Ns(a){var b=[],c=je(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(ae(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(be(c.value));return b};function Ps(){this.g={}}function Qs(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Rs(a,b){a.g[b.id]=b.bandwidth||2048}function Ss(a,b){a=a.g[b];null==a&&(a=0);return a};function Ts(a){var b=this;if(a&&a.constructor!=U)throw new M(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.ic()):(this.h=nl(),this.g=new $e);this.i=[];this.j=[];var c=!a;this.l=new lf(function(){var d,e,f,g,h;return J(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Pr(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return u(k,b.g.destroy(),4);
|
|
789
|
+
case 4:b.h=null,b.g=null,A(k)}})})}function Us(){if(nc())a:{var a=r(fs.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=Ts.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hl(a,b));return pl(this.h,a)};q.getConfiguration=function(){var a=nl();pl(a,this.h,nl());return a};q.ic=function(){return this.g};
|
|
790
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Or(this.g);this.j.push(f);b=Vs(this,a,b||{},function(){var g;return J(function(h){if(1==h.g)return u(h,Ug(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Me(b,function(){return Pr(f)});b.finally(function(){cb(d.j,f)});return Ws(this,b)};
|
|
791
|
+
function Vs(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,y,x,v,w,D,z;return J(function(B){switch(B.g){case 1:return Xs(),h=g=null,k=new es,p=m=l=null,C(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,Ys(a,b,g,e),6);case 6:n=B.h;Zs(a);t=!n.presentationTimeline.V()&&!n.presentationTimeline.kb();if(!t)throw new M(2,9,9005,b);return u(B,$s(a,n,function(G){p=p||G},e),7);case 7:h=B.h;Zs(a);if(p)throw p;return u(B,at(n,e),8);case 8:return u(B,k.init(),9);case 9:return Zs(a),u(B,gs(k),10);case 10:return l=B.h,Zs(a),y=bt(h,
|
|
792
|
+
n,b,c,e,f),x=y.Sf,v=y.ie,u(B,l.ma.addManifests([x]),11);case 11:w=B.h;Zs(a);m=w[0];Zs(a);if(p)throw p;return u(B,ct(a,v,m,x,f,e,l.ma,n,h),12);case 12:return Zs(a),D=new xs("manifest",l.path.Ca,l.path.ma,m),B.return(Os(D,x));case 3:return wa(B),u(B,k.destroy(),13);case 13:if(!g){B.A(14);break}return u(B,g.stop(),14);case 14:if(!h){B.A(16);break}return u(B,h.destroy(),16);case 16:xa(B,0);break;case 2:z=F(B);if(null==m){B.A(18);break}return u(B,dt(m),18);case 18:throw p||z;}})}
|
|
793
|
+
function ct(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,y,x,v,w,D;return J(function(z){switch(z.g){case 1:l={};m=0;p=function(B,G){var E,H,I,K,N,P,S;return J(function(Y){if(1==Y.g){E={};H=r(B);for(I=H.next();!I.done;E={cb:E.cb},I=H.next())E.cb=I.value,K=Lr(E.cb,f),N=E.cb.i,P=E.cb.h,S=function(fa){return function(va){var Da,Ea,Ga;return J(function(Ha){if(1==Ha.g)return u(Ha,g.addSegments([{data:va}]),2);Da=Ha.h;Zs(a);Ea=fa.cb.g;Ga=Kr(Ea);l[Ga]=Da[0];m+=va.byteLength;A(Ha)})}}(E),Rr(e,E.cb.groupId,K,N,P,S);return u(Y,
|
|
794
|
+
Tr(e),2)}if(!G)return Y.A(0);Zs(a);et(h,d,k,f);return u(Y,g.updateManifest(c,d),0)})};n=!1;C(z,2);if(!ft(h)||!n||gt(h)){z.A(4);break}return u(z,p(b.filter(function(B){return B.h}),!0),5);case 5:return Zs(a),b=b.filter(function(B){return!B.h}),t=l,y=m,l={},m=0,u(z,ht(g,c,d,t,y,function(){return Zs(a)}),6);case 6:Zs(a);case 4:if(n){z.A(7);break}return u(z,p(b,!1),8);case 8:return Zs(a),x=l,v=m,l={},m=0,u(z,ht(g,c,d,x,v,function(){return Zs(a)}),9);case 9:Zs(a);case 7:ua(z,0);break;case 2:return w=F(z),
|
|
795
|
+
D=Object.values(l),u(z,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function dt(a){var b,c,d,e;return J(function(f){switch(f.g){case 1:return b=new es,u(f,b.init(),2);case 2:return u(f,gs(b),3);case 3:return c=f.h,d=new xs("manifest",c.path.Ca,c.path.ma,a),u(f,b.destroy(),4);case 4:return e=new Ts,u(f,e.remove(d.toString()),0)}})}
|
|
796
|
+
function ht(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,y,x,v;return J(function(w){switch(w.g){case 1:g=!1;C(w,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.value,y=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=y&&(t.dataKey=y,t.pendingSegmentRefId=void 0),y=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=y&&(t.initSegmentKey=y,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
|
|
797
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();ua(w,0);break;case 2:return x=F(w),u(w,dt(b),5);case 5:if(g){w.A(6);break}v=Object.values(d);return u(w,a.removeSegments(v,function(){}),6);case 6:throw x;}})}
|
|
798
|
+
function at(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,K,N,P,S,Y,fa;return J(function(va){switch(va.g){case 1:return c={width:Infinity,height:Infinity},Kd(a,b.restrictions,c),u(va,Od(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;yd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(ae(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=n.value,
|
|
799
|
+
d.push(be(t));y=r(a.imageStreams);for(x=y.next();!x.done;x=y.next())v=x.value,d.push(ce(v));return u(va,b.offline.trackSelectionCallback(d),3);case 3:w=va.h;D=a.presentationTimeline.getDuration();z=0;B=r(w);for(G=B.next();!G.done;G=B.next())E=G.value,H=E.bandwidth*D/8,z+=H;C(va,4);return u(va,b.offline.downloadSizeCallback(z),6);case 6:I=va.h;if(!I)throw new M(2,9,9014);ua(va,5);break;case 4:K=F(va);if(K instanceof M)throw K;throw new M(2,9,9015);case 5:N=new Set;P=new Set;S=new Set;Y=r(w);for(G=
|
|
800
|
+
Y.next();!G.done;G=Y.next())fa=G.value,"variant"==fa.type&&N.add(fa.id),"text"==fa.type&&P.add(fa.id),"image"==fa.type&&S.add(fa.id);a.variants=a.variants.filter(function(Da){return N.has(Da.id)});a.textStreams=a.textStreams.filter(function(Da){return P.has(Da.id)});a.imageStreams=a.imageStreams.filter(function(Da){return S.has(Da.id)});it(a);A(va)}})}
|
|
801
|
+
function bt(a,b,c,d,e,f){var g=Ms(c,b,d),h=e.offline.progressCallback;Qr(f,function(t,y){g.size=y;h(g,t)},function(t,y){k&&e.offline.usePersistentLicense&&l==y&&xg(a,"cenc",t)});var k=ft(b)&&!gt(b),l=null;k&&(l=jt.get(a.g.keySystem));for(var m=new Ps,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())Rs(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())Qs(m,p.value);m=kt(f,m,b,e);f=m.streams;m=m.ie;n=a.g;p=e.offline.usePersistentLicense;
|
|
802
|
+
n&&p&&(n.initData=[]);return{Sf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.hc(),streams:f,sessionIds:p?Gg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},ie:m}}function ft(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
803
|
+
function gt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function et(a,b,c,d){b.expiration=c.hc();c=Gg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(ft(a)&&d.offline.usePersistentLicense&&!c.length)throw new M(2,9,9007);}q.remove=function(a){return lt(this,mt(this,a))};
|
|
804
|
+
function mt(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.g){case 1:Xs();c=ys(b);if(null==c||"manifest"!=c.g)throw new M(2,9,9004,b);d=c;e=new es;ta(k);return u(k,e.init(),4);case 4:return u(k,is(e,d.Ca(),d.ma()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([nt(a,h,e),ot(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
|
|
805
|
+
function pt(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Vc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Vc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function nt(a,b,c){return J(function(d){return u(d,qt(a.g,a.h.drm,c,b),0)})}
|
|
806
|
+
function ot(a,b,c){function d(){}var e=rt(c);Os(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.fg=function(){return lt(this,st(this))};
|
|
807
|
+
function st(a){var b,c,d,e,f,g,h,k,l,m;return J(function(p){switch(p.g){case 1:return Xs(),b=a.g,c=a.h.drm,d=new es,e=!1,ta(p),u(p,d.init(),4);case 4:f=[],js(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.A(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,Js(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.A(5);break;case 2:return wa(p),u(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p.return(!e)}})}
|
|
808
|
+
q.list=function(){return lt(this,tt())};function tt(){var a,b,c;return J(function(d){switch(d.g){case 1:return Xs(),a=[],b=new es,ta(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),hs(b,function(e,f){c=c.then(function(){var g;return J(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Os(new xs("manifest",e.Ca,e.ma,l),k);a.push(k)});A(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d.return(a)}})}
|
|
809
|
+
function Ys(a,b,c,d){var e,f,g,h,k;return J(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){}},c.configure(d.manifest),
|
|
810
|
+
Zs(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Zs(a),k=ut(h),u(l,Promise.all(sf(k,function(m){return m.createSegmentIndex()})),3);Zs(a);if(e)throw e;return l.return(h)})}
|
|
811
|
+
function $s(a,b,c,d){var e;return J(function(f){switch(f.g){case 1:return e=new hg({lb:a.g,onError:c,Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,mg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Ag(e),3);case 3:return u(f,zg(e),4);case 4:return f.return(e)}})}
|
|
812
|
+
function kt(a,b,c,d){var e=new Map,f=ut(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=vt(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),ie:Array.from(e.values())}}
|
|
813
|
+
function vt(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
|
|
814
|
+
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;wt(d,c.presentationTimeline.Qa(),function(l){var m=Kr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=Ss(b,d.id)*n;n=Nr(a.g,n);f.set(m,new Jr(l,n,k,!1))}l.i&&(p=Kr(l.i),f.has(p)||(n=.5*Ss(b,d.id),n=Nr(a.g,n),f.set(p,new Jr(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
|
|
815
|
+
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function wt(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Zs(a){if(a.l.g)throw new M(2,9,7001);}function Xs(){if(!Us())throw new M(2,9,9E3);}function lt(a,b){return J(function(c){if(1==c.g)return a.i.push(b),ta(c),u(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);cb(a.i,b);return xa(c,0)})}
|
|
816
|
+
function Ws(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){cb(a.i,c)})}function rt(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
817
|
+
function qt(a,b,c,d){var e,f,g;return J(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=ks(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:pt(d,!1),videoCapabilities:pt(d,!0)}});return u(h,Js(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
818
|
+
function ut(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
819
|
+
function it(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}L("shaka.offline.Storage",Ts);Ts.deleteAll=function(){var a;return J(function(b){return 1==b.g?(a=new es,ta(b),u(b,ls(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Ts.prototype.list=Ts.prototype.list;
|
|
820
|
+
Ts.prototype.removeEmeSessions=Ts.prototype.fg;Ts.prototype.remove=Ts.prototype.remove;Ts.prototype.store=Ts.prototype.store;Ts.prototype.getNetworkingEngine=Ts.prototype.ic;Ts.prototype.getConfiguration=Ts.prototype.getConfiguration;Ts.prototype.configure=Ts.prototype.configure;Ts.prototype.destroy=Ts.prototype.destroy;Ts.support=Us;
|
|
821
|
+
var jt=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
|
|
822
|
+
Wm.offline=Us;function xt(){}function yt(a,b){a={priority:b||0,bf:a};for(b=0;b<zt.length;b++)if(zt[b].priority<a.priority){zt.splice(b,0,a);return}zt.push(a)}L("shaka.polyfill",xt);xt.register=yt;xt.installAll=function(){for(var a=r(zt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.bf()}catch(c){Va("Error installing polyfill!",c)}}};var zt=[];function At(){this.g=new Bt}function Ct(){window.AbortController||(window.AbortController=At,window.AbortSignal=Bt)}At.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new Q("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(At.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});xt.AbortController=At;At.install=Ct;
|
|
823
|
+
function Bt(){Ve.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(Bt,Ve);da.Object.defineProperties(Bt.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});yt(Ct);function Dt(){}function Et(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Ft(b.value)}function Ft(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}xt.Aria=Dt;Dt.install=Et;yt(Et);function Gt(){}function Ht(){It()}xt.EncryptionScheme=Gt;Gt.install=Ht;yt(Ht,-2);function Jt(){}
|
|
824
|
+
function Kt(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
825
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Lt);document.addEventListener("webkitfullscreenerror",Lt);document.addEventListener("mozfullscreenchange",Lt);document.addEventListener("mozfullscreenerror",Lt);document.addEventListener("MSFullscreenChange",Lt);document.addEventListener("MSFullscreenError",Lt)}}
|
|
826
|
+
function Lt(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}xt.Fullscreen=Jt;Jt.install=Kt;yt(Kt);function Mt(){}function Nt(){var a=!0;if(uc()||rc("PlayStation 5")||vc()||rc("Web0S")||sc()||rc("CrKey")||rc("PC=EOS")||rc("Hisense")||rc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Ot=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Pt)}
|
|
827
|
+
function Pt(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D;return J(function(z){switch(z.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return z.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!nc())return z.return(b);if(c){if(rc("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var B=c.contentType;c.width&&c.height&&(B+="; width="+c.width+"; height="+c.height);c.framerate&&(B+="; framerate="+c.framerate);"pq"===
|
|
828
|
+
c.transferFunction&&(B+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(B)}else e=MediaSource.isTypeSupported(c.contentType);else sc()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=MediaSource.isTypeSupported(f)):e=MediaSource.isTypeSupported(c.contentType);if(!e)return z.return(b)}if(d&&(g=d.contentType,h=MediaSource.isTypeSupported(g),!h))return z.return(b)}else if("file"==
|
|
829
|
+
a.type){if(c&&(k=c.contentType,l=oc(k),!l)||d&&(m=d.contentType,p=oc(m),!p))return z.return(b)}else return z.return(b);if(!a.keySystemConfiguration)return b.supported=!0,z.return(Promise.resolve(b));n=a.keySystemConfiguration;t=[];y=[];n.audio&&(x={robustness:n.audio.robustness||"",contentType:a.audio.contentType},t.push(x));n.video&&(v={robustness:n.video.robustness||"",contentType:a.video.contentType},y.push(v));w={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,
|
|
830
|
+
sessionTypes:n.sessionTypes};t.length&&(w.audioCapabilities=t);y.length&&(w.videoCapabilities=y);C(z,3);return u(z,navigator.requestMediaKeySystemAccess(n.keySystem,[w]),5);case 5:D=z.h;ua(z,4);break;case 3:F(z);case 4:D&&(b.supported=!0,b.keySystemAccess=D);case 2:return z.return(b)}})}xt.MediaCapabilities=Mt;Mt.install=Nt;var Ot=null;Mt.originalMcap=Ot;yt(Nt,-1);function Qt(){}function Rt(){var a=wc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?St():a?12>=a?(Tt(),Ut()):15>=a&&Tt():navigator.userAgent.match(/Edge?\//)?Vt():(rc("Tizen 2")||rc("Tizen 3")||rc("Tizen 4"))&&Wt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Xt()}
|
|
831
|
+
function Tt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function Ut(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Vt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
|
|
832
|
+
function Wt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Yc(b)[0]&&a(b)}}function St(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
|
|
833
|
+
function Xt(){var a=MediaSource.isTypeSupported;rc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}xt.MediaSource=Qt;Qt.install=Rt;yt(Rt);function Yt(){}function Zt(){screen.orientation||void 0!=window.orientation&&$t()}function $t(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new au;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}xt.Orientation=Yt;
|
|
834
|
+
Yt.install=Zt;function au(){Ve.call(this);this.type="";this.angle=0}pa(au,Ve);
|
|
835
|
+
au.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
836
|
+
au.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};yt(Zt);function bu(){}function cu(a,b){try{var c=new du(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function eu(a){var b=this.mediaKeys;b&&b!=a&&fu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?fu(a,this):Promise.resolve()}function gu(a){a=Db(a.initData);if(Gb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Bc(a.subarray(4),!0);a=Ec(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Eb(a);this.dispatchEvent(b)}
|
|
837
|
+
xt.PatchedMediaKeysApple=bu;bu.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=eu,window.MediaKeys=hu,window.MediaKeySystemAccess=du,navigator.requestMediaKeySystemAccess=cu,window.shakaMediaKeysPolyfill=!0)};
|
|
838
|
+
function du(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
838
839
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=r(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
839
|
-
|
|
840
|
-
function
|
|
841
|
-
q.generateRequest=function(a,b){var c=this;this.h=new
|
|
842
|
-
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
843
|
-
q.update=function(a){this.g=new
|
|
844
|
-
function
|
|
845
|
-
function
|
|
846
|
-
function
|
|
847
|
-
function
|
|
848
|
-
function
|
|
840
|
+
du.prototype.createMediaKeys=function(){var a=new hu(this.keySystem);return Promise.resolve(a)};du.prototype.getConfiguration=function(){return this.g};function hu(a){this.h=new WebKitMediaKeys(a);this.g=new nf}hu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new iu(this.h,a)};hu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
841
|
+
function fu(a,b){a.g.ob();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",gu);try{return dj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function iu(a){Ve.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new nf;this.sessionId="";this.expiration=NaN;this.closed=new kc;this.keyStatuses=new ju}pa(iu,Ve);q=iu.prototype;
|
|
842
|
+
q.generateRequest=function(a,b){var c=this;this.h=new kc;try{var d=this.l.createSession("video/mp4",Db(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Eb()?"license-request":"license-renewal").set("message",Eb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(ku(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
|
|
843
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ku(c,"output-not-allowed");break;default:ku(c,"internal-error")}});ku(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
844
|
+
q.update=function(a){this.g=new kc;try{this.i.update(Db(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function ku(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
|
|
845
|
+
function ju(){this.size=0;this.g=void 0}q=ju.prototype;q.Eb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Sg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Sg.value();return this.g&&Bb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function lu(){}function mu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=nu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ou,window.MediaKeys=pu,window.MediaKeySystemAccess=qu,window.shakaMediaKeysPolyfill=!0)}function nu(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
846
|
+
function ou(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}xt.PatchedMediaKeysNop=lu;lu.install=mu;function pu(){throw new TypeError("Illegal constructor.");}pu.prototype.createSession=function(){};pu.prototype.setServerCertificate=function(){};function qu(){this.keySystem="";throw new TypeError("Illegal constructor.");}qu.prototype.getConfiguration=function(){};qu.prototype.createMediaKeys=function(){};yt(mu,-10);function ru(){}
|
|
847
|
+
function su(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)tu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=uu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=vu;window.MediaKeys=wu;window.MediaKeySystemAccess=xu;window.shakaMediaKeysPolyfill=!0}}
|
|
848
|
+
function yu(a){var b=tu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function uu(a,b){try{var c=new xu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function vu(a){var b=this.mediaKeys;b&&b!=a&&zu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&zu(a,this);return Promise.resolve()}xt.PatchedMediaKeysWebkit=ru;ru.install=su;
|
|
849
|
+
function xu(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),
|
|
849
850
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=r(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
850
|
-
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
851
|
-
function
|
|
852
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=
|
|
853
|
-
function
|
|
854
|
-
q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?
|
|
855
|
-
function
|
|
856
|
-
function
|
|
857
|
-
function
|
|
858
|
-
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=
|
|
859
|
-
q.forEach=function(a){this.g&&a(this.g,Sg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Sg.value();return this.g&&Bb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var
|
|
860
|
-
function
|
|
861
|
-
function
|
|
862
|
-
function
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Rf(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new hb;var
|
|
866
|
-
null!=v&&(n.width=Number(v[1]),n.height=Number(v[2]),w||(null!=
|
|
867
|
-
2,2001,"<p> can only be inside <div> in TTML");m=r(Mf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Mf(p.value,"span").length)throw new M(2,2,2001,"<span> can only be inside <p> in TTML");if(b=
|
|
868
|
-
function
|
|
869
|
-
a=[];if(!
|
|
870
|
-
w=Math.min(w,b.segmentEnd);if(!D&&0<a.length)for(v=Infinity,w=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,v=Math.min(v,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new fb(v,w,""),e.lineBreak=!0,e;b="";
|
|
871
|
-
z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=
|
|
872
|
-
function
|
|
873
|
-
f))a.backgroundColor=g;if(g=
|
|
874
|
-
"bold"==g&&(a.fontWeight=700);g=
|
|
875
|
-
f))d=d.split(" "),d[0].match(
|
|
876
|
-
function
|
|
877
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&cb(a.textDecoration,"overline")}}function
|
|
878
|
-
function
|
|
879
|
-
function
|
|
880
|
-
function
|
|
881
|
-
function
|
|
882
|
-
function
|
|
883
|
-
function
|
|
884
|
-
var
|
|
885
|
-
end:"end"},
|
|
886
|
-
L("shaka.text.Mp4TtmlParser",
|
|
887
|
-
|
|
888
|
-
e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new
|
|
889
|
-
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");
|
|
851
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}xu.prototype.createMediaKeys=function(){var a=new wu(this.g);return Promise.resolve(a)};xu.prototype.getConfiguration=function(){return this.h};function wu(a){this.l=a;this.h=null;this.g=new nf;this.i=[];this.j=new Map}
|
|
852
|
+
function zu(a,b){a.h=b;a.g.ob();var c=tu;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Eb(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=Au(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Eb()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=Au(a,d.sessionId))Bu(d,"usable"),
|
|
853
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=Au(a,d.sessionId);e&&e.handleError(d)}))}wu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Cu(b,this.l,a);this.i.push(a);return a};wu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
854
|
+
function Au(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function Cu(a,b,c){Ve.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new kc;this.keyStatuses=new Du}pa(Cu,Ve);q=Cu.prototype;
|
|
855
|
+
q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Bu(this,"output-restricted"):1==b?Bu(this,"expired"):Bu(this,"internal-error"))};
|
|
856
|
+
function Eu(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Db(Ec("LOAD_SESSION|"+c));else{var e=Ec("PERSISTENT|");d=Oc(e,b)}else d=Db(b)}catch(g){return Promise.reject(g)}a.h=new kc;var f=yu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
|
|
857
|
+
function Fu(a,b,c){if(a.g)a.g.then(function(){return Fu(a,b,c)}).catch(function(){return Fu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Ac(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Lc(e.keys[0].k);e=Lc(e.keys[0].kid)}else d=Db(c),e=null;var f=yu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
858
|
+
function Bu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return Eu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Eu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new kc;Fu(this,b,a);return b};
|
|
859
|
+
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=yu("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Du(){this.size=0;this.g=void 0}q=Du.prototype;q.Eb=function(){return this.g};
|
|
860
|
+
q.forEach=function(a){this.g&&a(this.g,Sg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Sg.value();return this.g&&Bb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var tu="";yt(su);function Gu(){}function Hu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Iu,Object.defineProperty(a,"disablePictureInPicture",{get:Ju,set:Ku,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Lu,document.addEventListener("webkitpresentationmodechanged",Mu,!0))}}
|
|
861
|
+
function Mu(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
862
|
+
function Iu(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Lu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
863
|
+
function Ju(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Ku(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}xt.PiPWebkit=Gu;Gu.install=Hu;yt(Hu);function Nu(){}function Ou(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Pu))}function Pu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}xt.RandomUUID=Nu;Nu.install=Ou;yt(Ou);function Qu(){}function Ru(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Su)}function Su(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}xt.StorageEstimate=Qu;Qu.install=Ru;yt(Ru);function Tu(){}function Uu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Vu})}function Vu(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}xt.Symbol=Tu;Tu.install=Uu;yt(Uu);function Wu(){}function Xu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}xt.VideoPlayPromise=Wu;Wu.install=Xu;yt(Xu);function Yu(){}function Zu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||tc())&&(a.getVideoPlaybackQuality=$u)}}function $u(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}xt.VideoPlaybackQuality=Yu;Yu.install=Zu;yt(Zu);function av(){}function bv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=cv;else if(6==b)a=dv;else{try{var c=!!cv(1,2,"")}catch(d){c=!1}c&&(a=cv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function cv(a,b,c){return new window.TextTrackCue(a,b,c)}function dv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}xt.VTTCue=av;av.install=bv;yt(bv);function ev(){}ev.prototype.parseInit=function(){};ev.prototype.setSequenceMode=function(){};ev.prototype.parseMedia=function(a,b){var c=null,d=[];a=Ac(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=fv.exec(e))){var f=gv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new fb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};L("shaka.text.LrcTextParser",ev);ev.prototype.parseMedia=ev.prototype.parseMedia;
|
|
864
|
+
ev.prototype.setSequenceMode=ev.prototype.setSequenceMode;ev.prototype.parseInit=ev.prototype.parseInit;var fv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,gv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;bd["application/x-subtitle-lrc"]=function(){return new ev};function hv(){}hv.prototype.parseInit=function(){};hv.prototype.setSequenceMode=function(){};
|
|
865
|
+
hv.prototype.parseMedia=function(a,b){var c=Ac(a);a=[];if(""==c)return a;var d=eg(c,"tt");if(!d)throw new M(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=Tf(d,iv,"frameRate"),f=Tf(d,iv,"subFrameRate"),g=Tf(d,iv,"frameRateMultiplier"),h=Tf(d,iv,"tickRate"),k=Tf(d,iv,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=Tf(d,jv,"extent");if("default"!=l&&"preserve"!=l)throw new M(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new kv(e,f,
|
|
866
|
+
g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Rf(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new hb;var y=t.getAttribute("xml:id");if(y){n.id=y;var x=null;m&&(x=lv.exec(m)||mv.exec(m));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var v,w;if(v=nv(t,g,"extent"))v=(w=lv.exec(v))||mv.exec(v),
|
|
867
|
+
null!=v&&(n.width=Number(v[1]),n.height=Number(v[2]),w||(null!=y&&(n.width=100*n.width/y),null!=x&&(n.height=100*n.height/x)),n.widthUnits=w||null!=y?yb:0,n.heightUnits=w||null!=x?yb:0);if(t=nv(t,g,"origin"))v=(w=lv.exec(t))||mv.exec(t),null!=v&&(n.viewportAnchorX=Number(v[1]),n.viewportAnchorY=Number(v[2]),w||(null!=x&&(n.viewportAnchorY=100*n.viewportAnchorY/x),null!=y&&(n.viewportAnchorX=100*n.viewportAnchorX/y)),n.viewportAnchorUnits=w||null!=y?yb:0)}else n=null;n&&h.push(n)}if(Mf(c,"p").length)throw new M(2,
|
|
868
|
+
2,2001,"<p> can only be inside <div> in TTML");m=r(Mf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Mf(p.value,"span").length)throw new M(2,2,2001,"<span> can only be inside <p> in TTML");if(b=ov(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
869
|
+
function ov(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var t=null,y=r(pv),x=y.next();!x.done&&!(t=qv(n,"backgroundImage",d,"#",x.value)[0]);x=y.next());y=m;if("p"==a.nodeName||t)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(n.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
|
|
870
|
+
a=[];if(!x)for(var v=r(n.childNodes),w=v.next();!w.done;w=v.next())(w=ov(w.value,b,c,d,e,f,g,h,k,n,m))&&a.push(w);d=null!=l;v=/\S/.test(n.textContent);var D=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(D||v||"br"==n.tagName||0!=a.length||d&&!h))return null;w=rv(n,c);v=w.start;for(w=w.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)w=sv(p,c,v,w),v=w.start,w=w.end,p=p.parentNode;null==v&&(v=0);v+=b.periodStart;w=null==w?Infinity:w+b.periodStart;v=Math.max(v,b.segmentStart);
|
|
871
|
+
w=Math.min(w,b.segmentEnd);if(!D&&0<a.length)for(v=Infinity,w=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,v=Math.min(v,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new fb(v,w,""),e.lineBreak=!0,e;b="";x&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new fb(v,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=qv(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==
|
|
872
|
+
z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=qv(l,"region",f,"")[0]);tv(b,n,g,t,e,y,0==a.length);return b}
|
|
873
|
+
function tv(a,b,c,d,e,f,g){f=f||g;"rtl"==uv(b,c,e,"direction",f)&&(a.direction="rtl");g=uv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=gb);(g=uv(b,c,e,"textAlign",!0))?(a.positionAlign=vv[g],a.lineAlign=wv[g],a.textAlign=rb[g.toUpperCase()]):a.textAlign=jb;if(g=uv(b,c,e,"displayAlign",!0))a.displayAlign=sb[g.toUpperCase()];if(g=uv(b,c,e,"color",f))a.color=g;if(g=uv(b,c,e,"backgroundColor",
|
|
874
|
+
f))a.backgroundColor=g;if(g=uv(b,c,e,"border",f))a.border=g;if(g=uv(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=g}(g=uv(b,c,e,"fontWeight",f))&&
|
|
875
|
+
"bold"==g&&(a.fontWeight=700);g=uv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=uv(b,c,e,"lineHeight",f))&&g.match(xv)&&(a.lineHeight=g);(g=uv(b,c,e,"fontSize",f))&&(g.match(xv)||g.match(yv))&&(a.fontSize=g);if(g=uv(b,c,e,"fontStyle",f))a.fontStyle=xb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=uv(b,c,e,"textOutline",
|
|
876
|
+
f))d=d.split(" "),d[0].match(xv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(xv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=uv(b,c,e,"letterSpacing",f))&&d.match(xv)&&(a.letterSpacing=d);(d=uv(b,c,e,"linePadding",f))&&d.match(xv)&&(a.linePadding=d);if(f=uv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=nv(c,e,"textDecoration"))&&zv(a,c);(b=Av(b,e,"textDecoration"))&&zv(a,b)}
|
|
877
|
+
function zv(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&cb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&cb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
878
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&cb(a.textDecoration,"overline")}}function uv(a,b,c,d,e){e=void 0===e?!0:e;return(a=Av(a,c,d))?a:e?nv(b,c,d):null}function nv(a,b,c){if(!a)return null;var d=Tf(a,jv,c);return d?d:Bv(a,b,c)}function Av(a,b,c){var d=Tf(a,jv,c);return d?d:Bv(a,b,c)}
|
|
879
|
+
function Bv(a,b,c){a=qv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Sf(a[e],"urn:ebu:tt:style",c);f||(f=Tf(a[e],jv,c));f||(f=Av(a[e],b,c));f&&(d=f)}return d}
|
|
880
|
+
function qv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Sf(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function sv(a,b,c,d){a=rv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
|
|
881
|
+
function rv(a,b){var c=Cv(a.getAttribute("begin"),b),d=Cv(a.getAttribute("end"),b);a=Cv(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
882
|
+
function Cv(a,b){var c=null;if(Dv.test(a)){a=Dv.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(Ev.test(a))c=Fv(Ev,a);else if(Gv.test(a))c=Fv(Gv,a);else if(Hv.test(a))a=Hv.exec(a),c=Number(a[1])/b.frameRate;else if(Iv.test(a))a=Iv.exec(a),c=Number(a[1])/b.g;else if(Jv.test(a))c=Fv(Jv,a);else if(a)throw new M(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
883
|
+
function Fv(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}L("shaka.text.TtmlTextParser",hv);hv.prototype.parseMedia=hv.prototype.parseMedia;hv.prototype.setSequenceMode=hv.prototype.setSequenceMode;hv.prototype.parseInit=hv.prototype.parseInit;
|
|
884
|
+
function kv(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
885
|
+
var lv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,yv=/^(\d{1,2}(?:\.\d+)?|100)%$/,xv=/^(\d+px|\d+em|\d*\.?\d+c)$/,mv=/^(\d+)px (\d+)px$/,Dv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Ev=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Gv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Hv=/^(\d*(?:\.\d*)?)f$/,Iv=/^(\d*(?:\.\d*)?)t$/,Jv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),wv={left:mb,center:"center",right:"end",start:mb,
|
|
886
|
+
end:"end"},vv={left:"line-left",center:"center",right:"line-right"},iv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],jv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],pv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];bd["application/ttml+xml"]=function(){return new hv};function Kv(){this.g=new hv}Kv.prototype.parseInit=function(a){var b=!1;(new Af).box("moov",Ef).box("trak",Ef).box("mdia",Ef).box("minf",Ef).box("stbl",Ef).U("stsd",Gf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new M(2,2,2007);};Kv.prototype.setSequenceMode=function(){};Kv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Af).box("mdat",Hf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new M(2,2,2007);return e};
|
|
887
|
+
L("shaka.text.Mp4TtmlParser",Kv);Kv.prototype.parseMedia=Kv.prototype.parseMedia;Kv.prototype.setSequenceMode=Kv.prototype.setSequenceMode;Kv.prototype.parseInit=Kv.prototype.parseInit;bd['application/mp4; codecs="stpp"']=function(){return new Kv};bd['application/mp4; codecs="stpp.ttml"']=function(){return new Kv};bd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Kv};bd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Kv};function Lv(){this.g=!1}Lv.prototype.parseInit=function(){};Lv.prototype.setSequenceMode=function(a){this.g=a};
|
|
888
|
+
Lv.prototype.parseMedia=function(a,b){a=Ac(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new M(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Mv(new sq(d[1]));if(null==a)throw new M(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
|
|
889
|
+
e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new sq(d);var f=new hb;vq(d);tq(d);for(var g=vq(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
|
|
890
|
+
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");tq(d);g=vq(d)}b.push(f)}e=new Map;Nv(e);d=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=r(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
|
|
890
891
|
(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new fb(0,0,""));for(var m=!1,p=0;p<k.length;p++){var n=/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(n){var t=n[2].trim().replace(";","");switch(n[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=t;break;case "color":m=!0;l.color=t;break;case "font-family":m=!0;l.fontFamily=t;break;case "font-size":m=!0;l.fontSize=t;break;case "font-weight":if(700<=parseInt(t,10)||"bold"==
|
|
891
892
|
t)m=!0,l.fontWeight=700;break;case "font-style":switch(t){case "normal":m=!0;l.fontStyle=pb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(t);break;case "text-shadow":m=!0;l.textShadow=t;break;case "white-space":m=!0,l.wrapLine="noWrap"!=t}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));
|
|
892
|
-
g=new
|
|
893
|
-
function
|
|
894
|
-
function
|
|
895
|
-
a.substr(f,e-f),f.match(
|
|
896
|
-
">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=eg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=
|
|
897
|
-
function
|
|
898
|
-
function
|
|
899
|
-
h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=
|
|
900
|
-
r(a.childNodes),a=b.next();!a.done;a=b.next())
|
|
901
|
-
function
|
|
902
|
-
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
903
|
-
function
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
var t=n.
|
|
907
|
-
function
|
|
908
|
-
function
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={
|
|
912
|
-
function
|
|
893
|
+
g=new sq(f[0]);k=Mv(g);p=uq(g,/[ \t]+--\x3e[ \t]+/g);l=Mv(g);if(null==k||null==p||null==l)throw new M(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.payload=""):f=new fb(k,l,"");Ov(m,f,e);tq(g);for(k=vq(g);k;)Pv(f,k,b),tq(g),k=vq(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
|
|
894
|
+
function Nv(a){for(var b=r(Object.entries(vb)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new fb(0,0,"");e.color=d;a.set("."+c,e)}b=r(Object.entries(wb));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new fb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
895
|
+
function Ov(a,b,c){0===c.size&&Nv(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+1:">"===a[e]&&0<f&&(f=
|
|
896
|
+
a.substr(f,e-f),f.match(Qv)&&d.push(f),f=-1);d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):
|
|
897
|
+
">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=eg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=Rv(a);return}a=r(e);for(e=a.next();!e.done;e=a.next())Sv(e.value,b,d,c);b.nestedCues=d}else b.payload=Rv(a)}
|
|
898
|
+
function Tv(a,b){return a&&0<a.length?a:b}
|
|
899
|
+
function Sv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=Tv(h.backgroundColor,e.backgroundColor),e.color=Tv(h.color,e.color),e.fontFamily=Tv(h.fontFamily,e.fontFamily),e.fontSize=Tv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
|
|
900
|
+
h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Mv(new sq(g)))e.startTime=g}}if(Vf(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=Rv(a),c.push(f)),f=!1;else for(b=
|
|
901
|
+
r(a.childNodes),a=b.next();!a.done;a=b.next())Sv(a.value,e,c,d)}
|
|
902
|
+
function Pv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=jb:a.textAlign=rb[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||
|
|
903
|
+
"end"==b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Uv(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=tb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=lb,a.line=Number(c[1]),c[2]&&(a.lineAlign=tb[c[2].toUpperCase()])}function Uv(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
|
|
904
|
+
function Mv(a){a=uq(a,Qv);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function Rv(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}L("shaka.text.VttTextParser",Lv);Lv.prototype.parseMedia=Lv.prototype.parseMedia;
|
|
905
|
+
Lv.prototype.setSequenceMode=Lv.prototype.setSequenceMode;Lv.prototype.parseInit=Lv.prototype.parseInit;var Qv=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;bd["text/vtt"]=function(){return new Lv};bd['text/vtt; codecs="vtt"']=function(){return new Lv};bd['text/vtt; codecs="wvtt"']=function(){return new Lv};function Vv(){this.g=null}Vv.prototype.parseInit=function(a){var b=this,c=!1;(new Af).box("moov",Ef).box("trak",Ef).box("mdia",Ef).U("mdhd",function(d){d=hi(d.reader,d.version);b.g=d.timescale}).box("minf",Ef).box("stbl",Ef).U("stsd",Gf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new M(2,2,2008);if(!c)throw new M(2,2,2008);};Vv.prototype.setSequenceMode=function(){};
|
|
906
|
+
Vv.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new M(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Af).box("moof",Ef).box("traf",Ef).U("tfdt",function(z){g=!0;c=gi(z.reader,z.version).pe}).U("tfhd",function(z){l=fi(z.reader,z.flags).ve}).U("trun",function(z){h=!0;d=ii(z.reader,z.version,z.flags).Ne}).box("mdat",Hf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new M(2,2,2008);a=c;for(var m=new xf(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;
|
|
907
|
+
var t=n.Zd||l,y=n.ad?c+n.ad:a;a=y+(t||0);var x=0;do{var v=m.N();x+=v;var w=m.N(),D=null;"vttc"==If(w)?8<v&&(D=m.$a(v-8)):m.skip(v-8);t&&D&&(v=Wv(D,b.periodStart+y/this.g,b.periodStart+a/this.g),f.push(v))}while(n.sampleSize&&x<n.sampleSize)}return f.filter(bc)};function Wv(a,b,c){var d,e,f;(new Af).box("payl",Hf(function(g){d=Ac(g)})).box("iden",Hf(function(g){e=Ac(g)})).box("sttg",Hf(function(g){f=Ac(g)})).parse(a);return d?Xv(d,e,f,b,c):null}
|
|
908
|
+
function Xv(a,b,c,d,e){d=new fb(d,e,"");Ov(a,d,new Map);b&&(d.id=b);if(c)for(a=new sq(c),b=vq(a);b;)Pv(d,b,[]),tq(a),b=vq(a);return d}L("shaka.text.Mp4VttParser",Vv);Vv.prototype.parseMedia=Vv.prototype.parseMedia;Vv.prototype.setSequenceMode=Vv.prototype.setSequenceMode;Vv.prototype.parseInit=Vv.prototype.parseInit;bd['application/mp4; codecs="wvtt"']=function(){return new Vv};function Yv(){}Yv.prototype.parseInit=function(){};Yv.prototype.setSequenceMode=function(){};Yv.prototype.parseMedia=function(a){var b=Ac(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new sq(c[0]),e=Zv(d),f=uq(d,/,/g);d=Zv(d);if(null==e||null==f||null==d)throw new M(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new fb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
909
|
+
function Zv(a){a=uq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}L("shaka.text.SbvTextParser",Yv);Yv.prototype.parseMedia=Yv.prototype.parseMedia;Yv.prototype.setSequenceMode=Yv.prototype.setSequenceMode;Yv.prototype.parseInit=Yv.prototype.parseInit;bd["text/x-subviewer"]=function(){return new Yv};function $v(){this.g=new Lv}$v.prototype.parseInit=function(){};$v.prototype.setSequenceMode=function(){};$v.prototype.parseMedia=function(a,b){a=Ac(a);a=aw(a);a=Db(Ec(a));return this.g.parseMedia(a,b)};function aw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}L("shaka.text.SrtTextParser",$v);
|
|
910
|
+
$v.srt2webvtt=aw;$v.prototype.parseMedia=$v.prototype.parseMedia;$v.prototype.setSequenceMode=$v.prototype.setSequenceMode;$v.prototype.parseInit=$v.prototype.parseInit;bd["text/srt"]=function(){return new $v};function bw(){}bw.prototype.parseInit=function(){};bw.prototype.setSequenceMode=function(){};
|
|
911
|
+
bw.prototype.parseMedia=function(a){var b="",c="";a=Ac(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=cw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=dw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(ew);else if("Style"==e){e=f.split(ew);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
912
|
+
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={td:e.td},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=dw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(ew);else if("Dialogue"==f){g=g.split(ew);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=fw(f.Start);var k=fw(f.End);g=new fb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.td=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.td}}(e)))&&gw(g,f);d.push(g)}return d};
|
|
913
|
+
function gw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=hw(c))a.color=c;if(c=b.BackColour)if(c=hw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=nb;a.textAlign="start";break;case 2:a.displayAlign=nb;a.textAlign=jb;break;case 3:a.displayAlign=nb;a.textAlign="end";
|
|
913
914
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=jb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=jb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
914
|
-
function
|
|
915
|
-
var
|
|
915
|
+
function hw(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function fw(a){a=iw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}L("shaka.text.SsaTextParser",bw);bw.prototype.parseMedia=bw.prototype.parseMedia;bw.prototype.setSequenceMode=bw.prototype.setSequenceMode;bw.prototype.parseInit=bw.prototype.parseInit;
|
|
916
|
+
var cw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,dw=/^\s*([^:]+):\s*(.*)/,ew=/\s*,\s*/,iw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;bd["text/x-ssa"]=function(){return new bw};/*
|
|
916
917
|
@license
|
|
917
918
|
EME Encryption Scheme Polyfill
|
|
918
919
|
Copyright 2019 Google LLC
|
|
919
920
|
SPDX-License-Identifier: Apache-2.0
|
|
920
921
|
*/
|
|
921
|
-
function
|
|
922
|
-
function
|
|
922
|
+
function jw(){}var kw;function lw(){kw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(kw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=mw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
923
|
+
function mw(a,b){var c=this,d;return J(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,kw.call(c,a,b),2);d=e.h;if(nw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=kw,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=ow;return e.return(ow.call(c,
|
|
923
924
|
a,b))})}
|
|
924
|
-
function
|
|
925
|
-
p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,
|
|
926
|
-
function
|
|
927
|
-
function
|
|
928
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
929
|
-
function
|
|
930
|
-
new
|
|
931
|
-
function
|
|
932
|
-
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}L("McEncryptionSchemePolyfill",
|
|
933
|
-
|
|
934
|
-
function
|
|
935
|
-
function
|
|
925
|
+
function ow(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return J(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=pw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=qw(h.videoCapabilities,d),l=qw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw p=Error("Unsupported keySystem or supportedConfigurations."),
|
|
926
|
+
p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,kw.call(c,a,e),2)}n=t.h;return t.return(new rw(n,d))})}function qw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}L("EmeEncryptionSchemePolyfill",jw);jw.install=lw;function sw(){}var tw;
|
|
927
|
+
function uw(){tw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(tw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=vw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
928
|
+
function vw(a){var b=this,c,d,e;return J(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,tw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&nw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=tw,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
929
|
+
navigator.mediaCapabilities.decodingInfo=ww;if(d){f.A(3);break}e=c;return u(f,xw(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(ww.call(b,a))}})}
|
|
930
|
+
function ww(a){var b=this,c,d,e,f,g,h,k,l;return J(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=pw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,tw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
931
|
+
new rw(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,xw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
932
|
+
function xw(a){var b,c;return J(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
|
|
933
|
+
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}L("McEncryptionSchemePolyfill",sw);sw.install=uw;function rw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
934
|
+
rw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};rw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
935
|
+
function pw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function nw(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
936
|
+
function yw(){}function It(){lw();uw()}L("EncryptionSchemePolyfills",yw);yw.install=It;"undefined"!==typeof module&&module.exports&&(module.exports=yw);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
936
937
|
|
|
937
938
|
//# sourceMappingURL=shaka-player.compiled.map
|