shaka-player 4.4.0 → 4.4.1
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/release-please.yaml +21 -13
- package/.github/workflows/report-incremental-coverage.yaml +2 -2
- package/.github/workflows/shaka-bot-commands/command-help.sh +27 -0
- package/.github/workflows/shaka-bot-commands/command-test.sh +56 -0
- package/.github/workflows/shaka-bot-commands/lib.sh +83 -0
- package/.github/workflows/shaka-bot-commands/main.sh +51 -0
- package/.github/workflows/talk-to-shaka-bot.yaml +29 -0
- package/.github/workflows/update-issues.yaml +2 -1
- package/.github/workflows/validate-pr-title.yaml +3 -11
- package/CHANGELOG.md +13 -0
- package/dist/deps.js +1 -1
- package/dist/locales.js +32 -32
- package/dist/shaka-player.compiled.d.ts +297 -297
- package/dist/shaka-player.compiled.debug.d.ts +297 -297
- package/dist/shaka-player.compiled.debug.externs.js +1 -1
- package/dist/shaka-player.compiled.debug.js +221 -222
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +1 -1
- package/dist/shaka-player.compiled.js +947 -946
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +341 -341
- package/dist/shaka-player.ui.debug.d.ts +341 -341
- package/dist/shaka-player.ui.debug.externs.js +1 -1
- package/dist/shaka-player.ui.debug.js +282 -283
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +1 -1
- package/dist/shaka-player.ui.js +566 -564
- package/dist/shaka-player.ui.map +3 -3
- package/externs/shaka/namespace.js +2 -2
- package/externs/shaka/transmuxer.js +2 -1
- package/lib/hls/hls_parser.js +1 -0
- package/lib/media/media_source_engine.js +22 -2
- package/lib/mss/mss_parser.js +1 -0
- package/lib/player.js +1 -1
- package/lib/text/simple_text_displayer.js +0 -1
- package/lib/transmuxer/aac_transmuxer.js +1 -1
- package/lib/transmuxer/ac3_transmuxer.js +1 -0
- package/lib/transmuxer/ec3_transmuxer.js +1 -0
- package/lib/transmuxer/mp3_transmuxer.js +1 -0
- package/lib/transmuxer/ts_transmuxer.js +54 -71
- package/lib/util/mp4_generator.js +27 -20
- package/lib/util/ts_parser.js +73 -110
- package/package.json +1 -1
- package/test/hls/hls_parser_unit.js +12 -13
- package/test/media/media_source_engine_integration.js +2 -2
- package/test/mss/mss_player_integration.js +1 -1
package/dist/shaka-player.ui.js
CHANGED
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
Copyright The Closure Library Authors.
|
|
16
16
|
SPDX-License-Identifier: Apache-2.0
|
|
17
17
|
*/
|
|
18
|
-
var q;function
|
|
18
|
+
var q;function ba(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
|
19
19
|
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}}
|
|
20
20
|
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
|
|
21
|
-
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return
|
|
22
|
-
function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:
|
|
21
|
+
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ba(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
22
|
+
function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ba(a)}}function u(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},la;
|
|
23
23
|
if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var na={a:!0},oa={};try{oa.__proto__=na;ma=oa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=la;
|
|
24
|
-
function qa(a,b){a.prototype=
|
|
25
|
-
function va(a,b){a.i={
|
|
26
|
-
function
|
|
27
|
-
function
|
|
28
|
-
function
|
|
29
|
-
function
|
|
24
|
+
function qa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(pa)pa(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.ik=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.B=function(a){this.h=a};
|
|
25
|
+
function va(a,b){a.i={kg:b,vg:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function C(a,b,c){a.g=c;return{value:b}}ra.prototype.F=function(a){this.g=a};function D(a){a.g=0}function wa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function xa(a){a.m=0;a.j=2}function ya(a,b,c){a.g=b;a.m=c||0}function za(a,b){a.m=b||0;b=a.i.kg;a.i=null;return b}function Aa(a){a.C=[a.i];a.m=0;a.j=0}
|
|
26
|
+
function Ba(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.vg?a.g=a.m||a.j:void 0!=c.F&&a.j<c.F?(a.g=c.F,a.i=null):a.g=a.j:a.g=b}function Da(a){this.g=new ra;this.h=a}function Fa(a,b){sa(a.g);var c=a.g.l;if(c)return Ga(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ha(a)}
|
|
27
|
+
function Ga(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,va(a.g,g),Ha(a)}a.g.l=null;d.call(a.g,f);return Ha(a)}function Ha(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,va(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.vg)throw b.kg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
28
|
+
function Ja(a){this.next=function(b){sa(a.g);a.g.l?b=Ga(a,a.g.l.next,b,a.g.B):(a.g.B(b),b=Ha(a));return b};this.throw=function(b){sa(a.g);a.g.l?b=Ga(a,a.g.l["throw"],b,a.g.B):(va(a.g,b),b=Ha(a));return b};this.return=function(b){return Fa(a,b)};this[Symbol.iterator]=function(){return this}}function Ka(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())})}
|
|
29
|
+
function H(a){return Ka(new Ja(new Da(a)))}function Ma(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
30
30
|
fa("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=ea.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=
|
|
31
31
|
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.H),reject:g(this.l)}};b.prototype.H=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.G(g):this.m(g)}};
|
|
32
32
|
b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.m=function(g){this.B(1,g)};b.prototype.B=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.I();this.C()};b.prototype.I=function(){var g=this;e(function(){if(g.D()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.D=
|
|
@@ -37,7 +37,7 @@ while(!k.done)})};return b});function Na(a,b){return Object.prototype.hasOwnProp
|
|
|
37
37
|
fa("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(!Na(k,g)){var l=new c;ca(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({}),
|
|
38
38
|
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(n){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(!Na(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Na(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Na(k,
|
|
39
39
|
g)&&Na(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Na(k,g)&&Na(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
40
|
-
fa("Map",function(a){function b(){var h={};return h.Ib=h.next=h.head=h}function c(h,k){var l=h.g;return
|
|
40
|
+
fa("Map",function(a){function b(){var h={};return h.Ib=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.Ib;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Na(h.h,l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
|
|
41
41
|
list:m,index:-1,entry:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
|
|
42
42
|
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this.g,Ib:this.g.Ib,head:this.g,key:h,value:k},l.list.push(l.entry),this.g.Ib.next=l.entry,this.g.Ib=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.entry.Ib.next=h.entry.next,
|
|
43
43
|
h.entry.next.Ib=h.entry.Ib,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Ib=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
|
|
@@ -55,24 +55,24 @@ fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Na(b
|
|
|
55
55
|
fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Na(b,d)&&c.push([d,b[d]]);return c}});var Sa=this||self;function K(a,b){a=a.split(".");var c=Sa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};var shaka={};function M(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}
|
|
56
56
|
function Ta(a){var b=new M(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}M.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};M.prototype.stopImmediatePropagation=function(){this.g=!0};M.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",M);
|
|
57
57
|
var Ua={Oi:"abrstatuschanged",Pi:"adaptation",Qi:"buffering",Ti:"downloadfailed",Ui:"downloadheadersreceived",Vi:"drmsessionupdate",bj:"emsg",Aj:"prft",Error:"error",cj:"expirationupdated",fj:"gapjumped",jj:"loaded",kj:"loading",pj:"manifestparsed",qj:"mediaqualitychanged",Metadata:"metadata",uj:"onstatechange",vj:"onstateidle",Fj:"ratechange",Lj:"segmentappended",Mj:"sessiondata",Nj:"stalldetected",Oj:"streaming",Pj:"textchanged",Qj:"texttrackvisibility",Rj:"timelineregionadded",Sj:"timelineregionenter",
|
|
58
|
-
Tj:"timelineregionexit",Uj:"trackschanged",Zj:"unloading",ck:"variantchanged"};function Va(){}function Wa(){}function Xa(){}function Ya(a){var b=Ma.apply(1,arguments);$a.has(a)||($a.add(a),Xa.apply(Va,u(b)))}function ab(){}function bb(){}function
|
|
59
|
-
|
|
58
|
+
Tj:"timelineregionexit",Uj:"trackschanged",Zj:"unloading",ck:"variantchanged"};function Va(){}function Wa(){}function Xa(){}function Ya(a){var b=Ma.apply(1,arguments);$a.has(a)||($a.add(a),Xa.apply(Va,u(b)))}function ab(){}function bb(){}function cb(){}function db(){}var $a=new Set;window.console&&(Xa=function(){return console.warn.apply(console,u(Ma.apply(0,arguments)))},Wa=function(){console.error.apply(console,u(Ma.apply(0,arguments)))});function fb(){this.g={}}q=fb.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])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.ea=new fb;this.qe=this}gb.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};gb.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};gb.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.qe;a.currentTarget=this.qe;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
59
|
+
gb.prototype.release=function(){this.ea=null};function hb(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 ib(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function jb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function kb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
|
|
60
60
|
@license
|
|
61
61
|
Copyright 2008 The Closure Library Authors
|
|
62
62
|
SPDX-License-Identifier: Apache-2.0
|
|
63
63
|
*/
|
|
64
|
-
var
|
|
64
|
+
var lb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
|
|
65
65
|
@license
|
|
66
66
|
Copyright 2006 The Closure Library Authors
|
|
67
67
|
SPDX-License-Identifier: Apache-2.0
|
|
68
68
|
*/
|
|
69
|
-
function
|
|
70
|
-
q.toString=function(){var a=[],b=this.cb;b&&a.push(
|
|
71
|
-
q.resolve=function(a){var b=this.clone();"data"===b.cb&&(b=new
|
|
72
|
-
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.La=d:c=""!==a.g.toString();c?
|
|
73
|
-
function
|
|
74
|
-
function Ab(a){if(!a.Ha&&(a.Ha={},a.dd=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=
|
|
75
|
-
q.set=function(a,b){Ab(this);this.g=null;this.Ha.hasOwnProperty(a)?this.Ha[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Ha)return"";var a=[],b;for(b in this.Ha)for(var c=encodeURIComponent(b),d=this.Ha[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
|
|
69
|
+
function mb(a){var b;a instanceof mb?(nb(this,a.cb),this.qc=a.qc,this.mb=a.mb,ob(this,a.Hc),this.La=a.La,pb(this,a.g.clone()),this.Zb=a.Zb):a&&(b=String(a).match(lb))?(nb(this,b[1]||"",!0),this.qc=qb(b[2]||""),this.mb=qb(b[3]||"",!0),ob(this,b[4]),this.La=qb(b[5]||"",!0),pb(this,b[6]||"",!0),this.Zb=qb(b[7]||"")):this.g=new rb(null)}q=mb.prototype;q.cb="";q.qc="";q.mb="";q.Hc=null;q.La="";q.Zb="";
|
|
70
|
+
q.toString=function(){var a=[],b=this.cb;b&&a.push(sb(b,ub,!0),":");if(b=this.mb){a.push("//");var c=this.qc;c&&a.push(sb(c,ub,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Hc;null!=b&&a.push(":",String(b))}if(b=this.La)this.mb&&"/"!=b.charAt(0)&&a.push("/"),a.push(sb(b,"/"==b.charAt(0)?vb:wb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Zb)&&a.push("#",sb(b,xb));return a.join("")};
|
|
71
|
+
q.resolve=function(a){var b=this.clone();"data"===b.cb&&(b=new mb);var c=!!a.cb;c?nb(b,a.cb):c=!!a.qc;c?b.qc=a.qc:c=!!a.mb;c?b.mb=a.mb:c=null!=a.Hc;var d=a.La;if(c)ob(b,a.Hc);else if(c=!!a.La){if("/"!=d.charAt(0))if(this.mb&&!this.La)d="/"+d;else{var e=b.La.lastIndexOf("/");-1!=e&&(d=b.La.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(""):".."==
|
|
72
|
+
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.La=d:c=""!==a.g.toString();c?pb(b,a.g.clone()):c=!!a.Zb;c&&(b.Zb=a.Zb);return b};q.clone=function(){return new mb(this)};function nb(a,b,c){a.cb=c?qb(b,!0):b;a.cb&&(a.cb=a.cb.replace(/:$/,""))}function ob(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Hc=b}else a.Hc=null}function pb(a,b,c){b instanceof rb?a.g=b:(c||(b=sb(b,yb)),a.g=new rb(b))}
|
|
73
|
+
function qb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function sb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,zb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function zb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var ub=/[#\/\?@]/g,wb=/[#\?:]/g,vb=/[#\?]/g,yb=/[#\?@]/g,xb=/#/g;function rb(a){this.g=a||null}
|
|
74
|
+
function Ab(a){if(!a.Ha&&(a.Ha={},a.dd=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=rb.prototype;q.Ha=null;q.dd=null;q.add=function(a,b){Ab(this);this.g=null;var c=this.Ha.hasOwnProperty(a)?this.Ha[a]:null;c||(this.Ha[a]=c=[]);c.push(b);this.dd++;return this};
|
|
75
|
+
q.set=function(a,b){Ab(this);this.g=null;this.Ha.hasOwnProperty(a)?this.Ha[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Ha)return"";var a=[],b;for(b in this.Ha)for(var c=encodeURIComponent(b),d=this.Ha[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 rb;a.g=this.g;if(this.Ha){var b={},c;for(c in this.Ha)b[c]=this.Ha[c].concat();a.Ha=b;a.dd=this.dd}return a};function N(a,b,c){var d=Ma.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;if(Bb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};K("shaka.util.Error",N);var Bb=!0;N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
76
76
|
N.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
|
|
77
77
|
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_SRC_EQUALS:2016,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,
|
|
78
78
|
WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_CODEC_UNKNOWN:3021,MSS_TRANSMUXING_FAILED:3022,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,
|
|
@@ -81,7 +81,7 @@ HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORT
|
|
|
81
81
|
CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,
|
|
82
82
|
OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,
|
|
83
83
|
STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,
|
|
84
|
-
SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function Cb(a,b){return a.concat(b)}function Db(){}function Eb(a){return null!=a};function Fb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new
|
|
84
|
+
SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function Cb(a,b){return a.concat(b)}function Db(){}function Eb(a){return null!=a};function Fb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new mb(d)});return a.map(function(d){return new mb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Cb,[]).map(function(d){return d.toString()})}function Gb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
85
85
|
function Hb(a,b){if(1==b.length)return b[0];a=Ib(a,b);if(null!=a)return a;throw new N(2,4,4025,b);}function Ib(a,b){for(var c=r(Jb[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==Kb?"":null}
|
|
86
86
|
var Kb="text",Lb={Na:"video",Pb:"audio",oa:Kb,Zc:"image",Li:"application"},Jb={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Mb(){}function Nb(a,b){a=Ob(a);b=Ob(b);return a.split("-")[0]==b.split("-")[0]}function Pb(a,b){a=Ob(a);b=Ob(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Qb(a,b){a=Ob(a);b=Ob(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Ob(a){var b=a.split("-x-"),c=b[0].split("-");a=c[0]||"";c=c[1]||"";b=b[1]?"x-"+b[1]:"";a=a.toLowerCase();a=Rb.get(a)||a;c=c.toUpperCase();return(c?a+"-"+c:a)+(b?"-"+b:"")}
|
|
87
87
|
function Sb(a,b){var c=Tb(a),d=Tb(b);return a!=c&&b!=d&&c==d}function Ub(a,b){a=Ob(a);b=Ob(b);return b==a?4:Pb(b,a)?3:Qb(b,a)?2:Pb(a,b)?1:0}function Tb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Rb.get(a)||a}function Vb(a){return a.language?Ob(a.language):a.audio&&a.audio.language?Ob(a.audio.language):a.video&&a.video.language?Ob(a.video.language):"und"}
|
|
@@ -92,50 +92,50 @@ var Rb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
92
92
|
"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",
|
|
93
93
|
"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",
|
|
94
94
|
"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",
|
|
95
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Xb(a){
|
|
96
|
-
q.
|
|
95
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Xb(a){gb.call(this);this.j=Ob(a);this.i=new Map;this.g=new Set;this.h=new Map}qa(Xb,gb);q=Xb.prototype;q.release=function(){gb.prototype.release.call(this)};
|
|
96
|
+
q.cg=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Ob(c.value));Yb(this);a=kb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new M("unknown-locales",(new Map).set("locales",a)));a=kb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new M("locale-changed",a))};
|
|
97
97
|
q.na=function(a,b,c){a=Ob(a);void 0===c&&(c=Zb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Zb||d.set(f,e)});this.h.set(a,d);Yb(this);this.dispatchEvent(new M("locale-updated"));return this};q.si=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new M("unknown-localization",a));return""};
|
|
98
|
-
function Yb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={
|
|
98
|
+
function Yb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={uc:f.uc},h=g.next()){f.uc=h.value;e.add(f.uc);e.add(Tb(f.uc));h=kb(b.keys(),function(l){return function(m){return Sb(m,l.uc)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=kb(b.keys(),function(l){return function(m){return Tb(m)==l.uc}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
|
|
99
99
|
c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,$b(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new M("missing-localizations",d)))}function $b(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}K("shaka.ui.Localization",Xb);Xb.prototype.resolve=Xb.prototype.resolve;
|
|
100
|
-
Xb.prototype.resolveDictionary=Xb.prototype.si;Xb.prototype.insert=Xb.prototype.na;Xb.prototype.changeLocale=Xb.prototype.
|
|
101
|
-
|
|
100
|
+
Xb.prototype.resolveDictionary=Xb.prototype.si;Xb.prototype.insert=Xb.prototype.na;Xb.prototype.changeLocale=Xb.prototype.cg;Xb.prototype.release=Xb.prototype.release;var Zb=1;Xb.ConflictResolution={USE_OLD:0,USE_NEW:Zb};Xb.UNKNOWN_LOCALES="unknown-locales";Xb.UNKNOWN_LOCALIZATION="unknown-localization";Xb.MISSING_LOCALIZATIONS="missing-localizations";Xb.LOCALE_CHANGED="locale-changed";Xb.LOCALE_UPDATED="locale-updated";var ac={oj:"MUTE",BACK:"BACK",Zi:"EXIT_FULL_SCREEN",Dj:"RESOLUTION",xj:"PICTURE_IN_PICTURE",dj:"FAST_FORWARD",ij:"LOOP",nj:"MULTIPLE_LANGUAGES",yj:"PLAY",Ii:"AD_DURATION",$i:"EXIT_LOOP_MODE",Bj:"QUALITY",Xj:"UNMUTE",mj:"MORE_SETTINGS",bk:"VOLUME",Ri:"CAPTIONS",Gj:"SEEK",tj:"ON",Wj:"UNDETERMINED_LANGUAGE",hj:"LANGUAGE",aj:"EXIT_PICTURE_IN_PICTURE",Xi:"ENTER_PICTURE_IN_PICTURE",Yj:"UNRECOGNIZED_LANGUAGE",AD_PROGRESS:"AD_PROGRESS",Si:"CAST",Ij:"SKIP_TO_LIVE",Cj:"REPLAY",Mi:"AUTO_QUALITY",ej:"FULL_SCREEN",
|
|
101
|
+
Ej:"REWIND",wj:"PAUSE",Wi:"ENTER_LOOP_MODE",Hj:"SKIP_AD",Ki:"AIRPLAY",sj:"OFF",rj:"NOT_APPLICABLE",Kj:"STATISTICS",Sg:"LIVE",Ji:"AD_TIME",zj:"PLAYBACK_RATE",Tg:"SUBTITLE_FORCED"};function bc(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}bc.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 cc(a){return a.h/(1-Math.pow(a.g,a.i))};function dc(){this.h=new bc(2);this.j=new bc(5);this.g=0;this.i=128E3;this.l=16E3}dc.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)};dc.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)}};dc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(cc(this.h),cc(this.j))};function ec(a){if(fc.has(a))return fc.get(a);var b=MediaSource.isTypeSupported(a);fc.set(a,b);return b}var fc=new Map;function hc(){}hc.prototype.extract=function(){};hc.prototype.decode=function(){return[]};hc.prototype.clear=function(){};function ic(){}ic.prototype.init=function(){};ic.prototype.parse=function(){return[]};function jc(){}function kc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(lc(a)==lc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=mc(a);b=mc(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function lc(a){return a instanceof ArrayBuffer?a:a.buffer}function nc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
102
102
|
function mc(a,b,c){c=void 0===c?Infinity:c;return oc(a,void 0===b?0:b,c,Uint8Array)}function pc(a,b,c){c=void 0===c?Infinity:c;return oc(a,void 0===b?0:b,c,DataView)}function oc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(lc(a),b,Math.min(b+Math.max(c,0),e)-b)}K("shaka.util.BufferUtils",jc);jc.toDataView=pc;jc.toUint8=mc;jc.toArrayBuffer=nc;jc.equal=kc;function qc(){}qc.prototype.init=function(){};qc.prototype.j=function(){};qc.prototype.i=function(){};K("shaka.media.IClosedCaptionParser",qc);function rc(a){this.h=new ic;if(a=sc[a.toLowerCase()])this.h=a();this.g=new hc;if(a=tc)this.g=a()}rc.prototype.init=function(a){this.h.init(a)};rc.prototype.j=function(a){a=this.h.parse(a);a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=mc(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};rc.prototype.i=function(){this.g.clear()};
|
|
103
|
-
K("shaka.media.ClosedCaptionParser",rc);rc.findDecoder=function(){return tc};rc.unregisterDecoder=function(){tc=null};rc.registerDecoder=function(a){tc=a};rc.findParser=function(a){return sc[a]};rc.unregisterParser=function(a){delete sc[a]};rc.registerParser=function(a,b){sc[a]=b};var sc={},tc=null;function uc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function wc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function xc(a,b,c){c||(c=uc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={
|
|
103
|
+
K("shaka.media.ClosedCaptionParser",rc);rc.findDecoder=function(){return tc};rc.unregisterDecoder=function(){tc=null};rc.registerDecoder=function(a){tc=a};rc.findParser=function(a){return sc[a]};rc.unregisterParser=function(a){delete sc[a]};rc.registerParser=function(a,b){sc[a]=b};var sc={},tc=null;function uc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function wc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function xc(a,b,c){c||(c=uc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Ee:d.Ee},e=a.next()){d.Ee=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ee,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
104
104
|
function yc(a,b,c){c||(c=uc);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 zc(a,b,c){this.startTime=a;this.endTime=b;this.$=c;this.region=new Ac;this.position=null;this.I=Bc;this.size=0;this.textAlign=Cc;this.direction=Dc;this.writingMode=Ec;this.J=Fc;this.m=null;this.aa="";this.B=Gc;this.i=Hc;this.D=this.U=this.P=this.backgroundColor=this.j="";this.C=Ic;this.o=Jc;this.ea=this.W=this.l="";this.G=1;this.h=[];this.ba=this.L=this.K="";this.N=!0;this.id="";this.g=[];this.H=this.Z=!1;this.X={eh:32,rows:15}}
|
|
105
105
|
zc.prototype.clone=function(){var a=new zc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
106
106
|
function Kc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.$!=b.$)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!yc(a.g,b.g,Kc))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(!yc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}K("shaka.text.Cue",zc);zc.equal=Kc;zc.prototype.clone=zc.prototype.clone;var Bc="auto";
|
|
107
107
|
zc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Bc};var Cc="center",Lc={LEFT:"left",RIGHT:"right",CENTER:Cc,START:"start",END:"end"};zc.textAlign=Lc;var Hc="after",Mc={BEFORE:"before",CENTER:"center",AFTER:Hc};zc.displayAlign=Mc;var Dc="ltr";zc.direction={HORIZONTAL_LEFT_TO_RIGHT:Dc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Ec="horizontal-tb";zc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Ec,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Fc=0;
|
|
108
108
|
zc.lineInterpretation={LINE_NUMBER:Fc,PERCENTAGE:1};var Gc="start",Nc={CENTER:"center",START:Gc,END:"end"};zc.lineAlign=Nc;var Oc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};zc.defaultTextColor=Oc;var Qc={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};zc.defaultTextBackgroundColor=Qc;var Ic=400;zc.fontWeight={NORMAL:Ic,BOLD:700};
|
|
109
|
-
var Jc="normal",Rc={NORMAL:Jc,ITALIC:"italic",OBLIQUE:"oblique"};zc.fontStyle=Rc;zc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function Ac(){this.id="";this.o=this.m=this.h=this.g=0;this.height=this.width=100;this.j=this.l=this.i=Sc;this.B=Tc}K("shaka.text.CueRegion",Ac);var Sc=1;Ac.units={PX:0,PERCENTAGE:Sc,LINES:2};var Tc="";Ac.scrollMode={NONE:Tc,UP:"up"};function Uc(){}Uc.prototype.destroy=function(){};function Vc(a,b,c){Wc[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,
|
|
109
|
+
var Jc="normal",Rc={NORMAL:Jc,ITALIC:"italic",OBLIQUE:"oblique"};zc.fontStyle=Rc;zc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function Ac(){this.id="";this.o=this.m=this.h=this.g=0;this.height=this.width=100;this.j=this.l=this.i=Sc;this.B=Tc}K("shaka.text.CueRegion",Ac);var Sc=1;Ac.units={PX:0,PERCENTAGE:Sc,LINES:2};var Tc="";Ac.scrollMode={NONE:Tc,UP:"up"};function Uc(){}Uc.prototype.destroy=function(){};function Vc(a,b,c){Wc[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,pe:b}}function Xc(a,b){for(var c=a.toLowerCase().split(";")[0],d=r([Yc,Zc,$c,ad]),e=d.next();!e.done;e=d.next())if(e=Wc[c+"-"+e.value]){var f=e.pe(),g=f.isSupported(a,b);f.destroy();if(g)return e.pe}return null}K("shaka.transmuxer.TransmuxerEngine",Uc);Uc.findTransmuxer=Xc;Uc.unregisterTransmuxer=function(a,b){delete Wc[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
110
110
|
Uc.registerTransmuxer=Vc;Uc.prototype.destroy=Uc.prototype.destroy;var Wc={},ad=1,$c=2,Zc=3,Yc=4;Uc.PluginPriority={FALLBACK:ad,PREFERRED_SECONDARY:$c,PREFERRED:Zc,APPLICATION:Yc};function bd(){}function cd(a,b){var c=a;b&&!dd.includes(a)&&(c+='; codecs="'+b+'"');return c}function ed(a,b){b&&(a+='; codecs="'+b+'"');return a}function fd(a,b,c){var d=cd(a,b);b=ed(a,b);Xc(b)?(a=Xc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
111
111
|
function gd(a){var b=hd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===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"===
|
|
112
112
|
a&&"b2"===b:return"dtsx";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 id(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function hd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}K("shaka.util.MimeUtils",bd);bd.getFullTypeWithAllCodecs=ed;
|
|
113
113
|
bd.getFullType=cd;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var dd=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function jd(a){this.i=null;this.j=a;this.C=!1;this.l=this.B=0;this.m=Infinity;this.h=this.g=null;this.D="";this.o=new Map}function kd(a){return ld[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!tc:!1}jd.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
114
|
-
function md(a,b,c,d){var e,f,g,h;return
|
|
115
|
-
jd.prototype.remove=function(a,b){var c=this;return
|
|
114
|
+
function md(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g)return C(k,Promise.resolve(),2);if(!a.i||!a.j)return k.return();if(null==c||null==d)return a.i.parseInit(mc(b)),k.return();e=a.C?c:a.B;f={periodStart:a.B,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.i.parseMedia(mc(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);D(k)})}
|
|
115
|
+
jd.prototype.remove=function(a,b){var c=this;return H(function(d){if(1==d.g)return C(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));D(d)})};function nd(a,b,c){a.l=b;a.m=c}function od(a,b,c){a.D=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)}
|
|
116
116
|
function pd(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.g);for(var d=b.next();!d.done;d=b.next())pd(a,d.value,c)}
|
|
117
117
|
function qd(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,[]);pd(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.D&&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,
|
|
118
118
|
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}K("shaka.text.TextEngine",jd);jd.prototype.destroy=jd.prototype.destroy;jd.findParser=function(a){return ld[a]};jd.unregisterParser=function(a){delete ld[a]};jd.registerParser=function(a,b){ld[a]=b};var ld={};function rd(a){this.h=a;this.g=null}rd.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};rd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Da=function(){this.stop();this.h();return this};O.prototype.R=function(a){var b=this;this.stop();this.g=(new rd(function(){b.h()})).R(a);return this};O.prototype.ka=function(a){var b=this;this.stop();this.g=(new rd(function(){b.g.R(a);b.h()})).R(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};K("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.ka;O.prototype.tickAfter=O.prototype.R;
|
|
119
119
|
O.prototype.tickNow=O.prototype.Da;function sd(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function td(a){return""!=ud().canPlayType(a)}function vd(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function wd(){return xd("Xbox One")}function yd(){return xd("Tizen")}function zd(){return xd("Web0S")&&xd("Chrome/38.0.2125.122 Safari/537.36")}function Ad(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!yd()&&!xd("PC=EOS")&&!xd("VirginMedia")&&!xd("SOPOpenBrowser")&&!Bd()&&!xd("AFT")}
|
|
120
120
|
function Bd(){return xd("PlayStation 4")}function Cd(){if(!Ad())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 xd(a){return(navigator.userAgent||"").includes(a)}function ud(){if(Dd)return Dd;Ed||(Ed=new O(function(){Dd=null}));(Dd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Dd=document.createElement("video"));Ed.R(1);return Dd}
|
|
121
|
-
var Ed=null,Dd=null;function Fd(){}function Gd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Hd(f,b,c);f=Id(f,d);b=Jd(f);b=Kd(b);var g=Ld(b,e);a.variants=a.variants.filter(function(h){return Md(h)==g?!0:!1})}function Jd(a){var b=new
|
|
122
|
-
function Kd(a){var b=0,c=new Map,d=a.size();a.forEach(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
|
|
123
|
-
function Hd(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={
|
|
124
|
-
function Ld(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==Nd||c==Od){if(a=Pd(a,c),1==a.size())return a.keys()[0]}else if(c==Qd)break;return Rd(a)}function Pd(a,b){var c=0,d=new
|
|
121
|
+
var Ed=null,Dd=null;function Fd(){}function Gd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Hd(f,b,c);f=Id(f,d);b=Jd(f);b=Kd(b);var g=Ld(b,e);a.variants=a.variants.filter(function(h){return Md(h)==g?!0:!1})}function Jd(a){var b=new fb;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Md(c);b.push(d,c)}return b}
|
|
122
|
+
function Kd(a){var b=0,c=new Map,d=a.size();a.forEach(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 fb);var k=c.get(h);k.push(e,g);k.size()===d&&(b=Math.max(b,h))}}});return b?c.get(b):a}
|
|
123
|
+
function Hd(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={Ke:d.Ke},e=b.next())if(d.Ke=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Ke)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={Ce:d.Ce},b=c.next())if(d.Ce=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Ce)}}(d)),b.length){a=b;break}return a}
|
|
124
|
+
function Ld(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==Nd||c==Od){if(a=Pd(a,c),1==a.size())return a.keys()[0]}else if(c==Qd)break;return Rd(a)}function Pd(a,b){var c=0,d=new fb;a.forEach(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}
|
|
125
125
|
function Rd(a){var b="",c=Infinity;a.forEach(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 Md(a){var b="";a.video&&(b=gd(a.video.codecs));var c="";a.audio&&(c=gd(a.audio.codecs));return b+"-"+c}function Sd(a,b,c){a.variants=a.variants.filter(function(d){return Td(d,b,c)})}
|
|
126
126
|
function Td(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;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}
|
|
127
|
-
function Ud(a,b){return
|
|
128
|
-
function Vd(a,b){return
|
|
127
|
+
function Ud(a,b){return H(function(c){if(1==c.g)return C(c,Vd(b,0<b.offlineSessionIds.length),2);Wd(a,b);Xd(b);return C(c,Yd(b),0)})}
|
|
128
|
+
function Vd(a,b){return H(function(c){if(1==c.g)return C(c,Zd(a.variants,b,!1,[]),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=$d(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Hb("video",g);f=$d(f);g=Hb("audio",g);g=ae(g);var h=fd(e.mimeType,g,"audio");if(!ec(h))return!1;f=[f,g].join()}g=fd(e.mimeType,f,"video");if(!ec(g))return!1;e.codecs=f}if(f=d.audio){g=ae(f.codecs);h=fd(f.mimeType,g,"audio");if(!ec(h))return!1;f.codecs=g}if(wd()&&e&&(e.width&&1920<
|
|
129
129
|
e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return bb(be(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||bb(be(d));return e});D(c)})}function ce(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=ce(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
130
|
-
function de(a,b){var c,d,e;return
|
|
131
|
-
function Zd(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B;return
|
|
132
|
-
de(n,w),9);case 9:v=t.next();E.F(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();E.F(5);break;case 7:if(k)return E.return();f={
|
|
130
|
+
function de(a,b){var c,d,e;return H(function(f){switch(f.g){case 1:c=ce(b);wa(f,2);d=ee;if(d[c]){a.decodingInfos.push(d[c]);f.F(4);break}return C(f,navigator.mediaCapabilities.decodingInfo(b),5);case 5:e=f.h,d[c]=e,a.decodingInfos.push(e);case 4:ya(f,0);break;case 2:za(f),JSON.stringify(b),D(f)}})}
|
|
131
|
+
function Zd(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B;return H(function(E){switch(E.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return E.return();f={};g=r(d);h=g.next();case 2:if(h.done){E.F(4);break}f.Ge=h.value;k=!1;l=r(a);m=l.next();case 5:if(m.done){E.F(7);break}n=m.value;p=fe(n,b,c).filter(function(F){return function(G){return(G.keySystemConfiguration&&G.keySystemConfiguration.keySystem)===F.Ge}}(f));t=r(p);v=t.next();case 8:if(v.done){E.F(10);break}w=v.value;return C(E,
|
|
132
|
+
de(n,w),9);case 9:v=t.next();E.F(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();E.F(5);break;case 7:if(k)return E.return();f={Ge:f.Ge};h=g.next();E.F(2);break;case 4:y=r(a),m=y.next();case 12:if(m.done){E.F(0);break}x=m.value;A=fe(x,b,c).filter(function(F){F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});z=r(A);v=z.next();case 15:if(v.done){m=y.next();E.F(12);break}B=v.value;return C(E,de(x,B),16);case 16:v=z.next(),E.F(15)}})}
|
|
133
133
|
function fe(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=Hb("video",g);f=$d(f);g=Hb("audio",g);g=ae(g);g=fd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=$d(f);f=fd(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=
|
|
134
134
|
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=ae(d.codecs),f=fd(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,
|
|
135
135
|
[]);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 n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=r(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
136
136
|
(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}
|
|
137
137
|
function ae(a){return"fLaC"===a?"flac":"Opus"===a?"opus":yd()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function $d(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 Wd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ge(d,a.audio)||c&&a&&a.video&&!ge(c,a.video)?!1:!0})}
|
|
138
|
-
function Xd(a){a.textStreams=a.textStreams.filter(function(b){b=cd(b.mimeType,b.codecs);return kd(b)})}function Yd(a){var b,c,d,e,f,g,h,k;return
|
|
138
|
+
function Xd(a){a.textStreams=a.textStreams.filter(function(b){b=cd(b.mimeType,b.codecs);return kd(b)})}function Yd(a){var b,c,d,e,f,g,h,k;return H(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.F(4);break}e=d.value;f=e.mimeType;if(he.has(f)){l.F(5);break}g=ie.get(f);if(!g){he.set(f,!1);l.F(5);break}return C(l,je(g),7);case 7:h=l.h,he.set(f,h);case 5:(k=he.get(f))&&b.push(e);d=c.next();l.F(2);break;case 4:a.imageStreams=b,D(l)}})}
|
|
139
139
|
function je(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 ge(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
140
140
|
function ke(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 n=r(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=r(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
141
141
|
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,accessibilityPurpose:null,originalLanguage:null};
|
|
@@ -164,20 +164,20 @@ function He(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.lang
|
|
|
164
164
|
function Ie(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return hd(d)[0]});b=b.codecs.split(",").map(function(d){return hd(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 Je(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 Ke(a){this.g=a;this.h=new Le(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"","")}Ke.prototype.create=function(a){var b=this,c=a.filter(function(d){return He(b.g,d)});return c.length?new Ge(c[0],c):this.h.create(a)};function Le(a,b,c,d,e){this.j=a;this.l=b;this.g=c;this.h=d;this.i=void 0===e?"":e}
|
|
165
165
|
Le.prototype.create=function(a){var b=[];b=Me(a,this.j);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ne(b,this.l);a.length&&(b=a);this.h&&(a=Oe(b,this.h),a.length&&(b=a));this.g&&(a=Id(b,this.g),a.length&&(b=a));this.i&&(a=Pe(b,this.i),a.length&&(b=a));a=new Ge(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,He(a.h,c)&&a.add(c);return a};function Me(a,b){b=Ob(b);var c=Wb(b,a.map(function(d){return Vb(d)}));return c?a.filter(function(d){return c==Vb(d)}):[]}
|
|
166
166
|
function Ne(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Pe(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Oe(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})};function Qe(){this.g=Re;this.h=(new Map).set(Re,2).set(Se,1)}function Te(a,b,c){a.h.set(Re,c).set(Se,b)}var Se=0,Re=1;function Ue(a,b){var c=Ve();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}
|
|
167
|
-
function We(a){var b,c;return
|
|
167
|
+
function We(a){var b,c;return H(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(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 C(d,new Promise(function(e){(new O(e)).R(c/1E3)}),2)}a.h*=a.m;D(d)})}function Ve(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Xe(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Xe.prototype.resolve=function(){};Xe.prototype.reject=function(){};function Ye(a,b){this.promise=a;this.i=b;this.g=!1}function Ze(a){return new Ye(Promise.reject(a),function(){return Promise.resolve()})}function $e(){var a=Promise.reject(new N(2,7,7001));a.catch(function(){});return new Ye(a,function(){return Promise.resolve()})}function af(a){return new Ye(Promise.resolve(a),function(){return Promise.resolve()})}function bf(a){return new Ye(a,function(){return a.catch(function(){})})}Ye.prototype.abort=function(){this.g=!0;return this.i()};
|
|
168
168
|
function cf(a){return new Ye(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ye.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
169
169
|
Ye.prototype.ra=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=df(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Xe,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Ye(f,function(){return d()})};
|
|
170
|
-
function df(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()}}}K("shaka.util.AbortableOperation",Ye);Ye.prototype.chain=Ye.prototype.ra;Ye.prototype["finally"]=Ye.prototype.finally;Ye.all=cf;Ye.prototype.abort=Ye.prototype.abort;Ye.notAbortable=bf;Ye.completed=af;Ye.aborted=$e;Ye.failed=Ze;function ef(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 ff(a){var b={},c;for(c in a)b[c]=a[c];return b};function gf(){this.g=[]}function hf(a,b){a.g.push(b.finally(function(){wc(a.g,b)}))}gf.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 jf(a,b,c,d){
|
|
171
|
-
function nf(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();
|
|
170
|
+
function df(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()}}}K("shaka.util.AbortableOperation",Ye);Ye.prototype.chain=Ye.prototype.ra;Ye.prototype["finally"]=Ye.prototype.finally;Ye.all=cf;Ye.prototype.abort=Ye.prototype.abort;Ye.notAbortable=bf;Ye.completed=af;Ye.aborted=$e;Ye.failed=Ze;function ef(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 ff(a){var b={},c;for(c in a)b[c]=a[c];return b};function gf(){this.g=[]}function hf(a,b){a.g.push(b.finally(function(){wc(a.g,b)}))}gf.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 jf(a,b,c,d){gb.call(this);this.i=!1;this.m=new gf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.C=d||null;this.o=!1}qa(jf,gb);q=jf.prototype;q.Bf=function(a){this.o=a};function kf(a,b,c,d){c=c||lf;var e=mf[a];if(!e||c>=e.priority)mf[a]={priority:c,pe:b,ji:void 0===d?!1:d}}q.ki=function(a){this.g.add(a)};q.Ei=function(a){this.g.delete(a)};q.ah=function(){this.g.clear()};q.li=function(a){this.h.add(a)};q.Fi=function(a){this.h.delete(a)};q.bh=function(){this.h.clear()};
|
|
171
|
+
function nf(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();gb.prototype.release.call(this);return this.m.destroy()};
|
|
172
172
|
q.request=function(a,b,c){var d=this,e=new of;if(this.i){var f=Promise.reject(new N(2,7,7001));f.catch(function(){});return new pf(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?ef(b.retryParameters):Ve();b.uris=ef(b.uris);f=qf(this,a,b,c);var g=f.ra(function(){return rf(d,a,b,new Ue(b.retryParameters,!1),0,null,e)}),h=g.ra(function(p){return sf(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
173
173
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.ra(function(p){var t=Date.now()-m,v=p.response;v.timeMs+=l;v.timeMs+=t;p.Rh||!d.l||v.fromCache||"HEAD"==b.method||a!=tf||d.l(v.timeMs,v.data.byteLength);return v},function(p){p&&(p.severity=2);throw p;});f=new pf(n.promise,function(){return n.abort()},e);hf(this.m,f);return f};
|
|
174
174
|
function qf(a,b,c,d){function e(h){f=f.ra(function(){c.body&&(c.body=nc(c.body));return h(b,c,d)})}var f=af(void 0);a.C&&e(a.C);a=r(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.ra(void 0,function(h){if(h instanceof N&&7001==h.code)throw h;throw new N(2,1,1006,h);})}
|
|
175
|
-
function rf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new
|
|
175
|
+
function rf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new mb(c.uris[e]),k=h.cb,l=!1;k||(k=location.protocol,k=k.slice(0,-1),nb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=mf[k])?k.pe:null;if(!m)return Ze(new N(2,1,1E3,h));var n=k.ji,p=null,t=null,v=!1,w=!1,y;return bf(We(d)).ra(function(){if(a.i)return $e();y=Date.now();var x=m(c.uris[e],c,b,function(B,E,F){p&&p.stop();t&&t.R(z/1E3);a.l&&b==tf&&(a.l(B,E),l=!0,g.g=F)},function(B){a.j&&a.j(B,c,b);w=!0});
|
|
176
176
|
if(!n)return x;var A=c.retryParameters.connectionTimeout;A&&(p=new O(function(){v=!0;x.abort()}),p.R(A/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new O(function(){v=!0;x.abort()}));return x}).ra(function(x){p&&p.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);var A={response:x,Rh:l};!w&&a.j&&a.j(x.headers,c,b);return A},function(x){p&&p.stop();t&&t.stop();if(a.B){var A=null,z=0;x instanceof N&&(A=x,1001==x.code&&(z=x.data[1]));a.B(c,A,z,v)}if(a.i)return $e();v&&(x=new N(1,1,1003,
|
|
177
177
|
c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return A=(new Map).set("error",x),A=new M("retry",A),a.dispatchEvent(A),e=(e+1)%c.uris.length,rf(a,b,c,d,e,x,g)}throw x;})}
|
|
178
|
-
function sf(a,b,c,d){var e=af(void 0),f={};a=r(a.h);for(var g=a.next();!g.done;f={
|
|
179
|
-
jf.defaultRetryParameters=function(){return Ve()};jf.prototype.clearAllResponseFilters=jf.prototype.bh;jf.prototype.unregisterResponseFilter=jf.prototype.Fi;jf.prototype.registerResponseFilter=jf.prototype.li;jf.prototype.clearAllRequestFilters=jf.prototype.ah;jf.prototype.unregisterRequestFilter=jf.prototype.Ei;jf.prototype.registerRequestFilter=jf.prototype.ki;jf.unregisterScheme=function(a){delete mf[a]};jf.registerScheme=kf;jf.prototype.setForceHTTPS=jf.prototype.
|
|
180
|
-
jf.NumBytesRemainingClass=of;function pf(a,b,c){Ye.call(this,a,b);this.h=c}qa(pf,Ye);jf.PendingRequest=pf;var tf=1;jf.RequestType={MANIFEST:0,SEGMENT:tf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};jf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var lf=3;jf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:lf};var mf={};function uf(a){this.g=!1;this.h=new Xe;this.i=a}uf.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 vf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function wf(){this.g=new
|
|
178
|
+
function sf(a,b,c,d){var e=af(void 0),f={};a=r(a.h);for(var g=a.next();!g.done;f={Ie:f.Ie},g=a.next())f.Ie=g.value,e=e.ra(function(h){return function(){var k=c.response;k.data&&(k.data=nc(k.data));return h.Ie(b,k,d)}}(f));return e.ra(function(){return c},function(h){var k=2;if(h instanceof N){if(7001==h.code)throw h;k=h.severity}throw new N(k,1,1007,h);})}K("shaka.net.NetworkingEngine",jf);jf.prototype.request=jf.prototype.request;jf.prototype.destroy=jf.prototype.destroy;jf.makeRequest=nf;
|
|
179
|
+
jf.defaultRetryParameters=function(){return Ve()};jf.prototype.clearAllResponseFilters=jf.prototype.bh;jf.prototype.unregisterResponseFilter=jf.prototype.Fi;jf.prototype.registerResponseFilter=jf.prototype.li;jf.prototype.clearAllRequestFilters=jf.prototype.ah;jf.prototype.unregisterRequestFilter=jf.prototype.Ei;jf.prototype.registerRequestFilter=jf.prototype.ki;jf.unregisterScheme=function(a){delete mf[a]};jf.registerScheme=kf;jf.prototype.setForceHTTPS=jf.prototype.Bf;function of(){this.g=0}
|
|
180
|
+
jf.NumBytesRemainingClass=of;function pf(a,b,c){Ye.call(this,a,b);this.h=c}qa(pf,Ye);jf.PendingRequest=pf;var tf=1;jf.RequestType={MANIFEST:0,SEGMENT:tf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};jf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var lf=3;jf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:lf};var mf={};function uf(a){this.g=!1;this.h=new Xe;this.i=a}uf.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 vf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function wf(){this.g=new fb}q=wf.prototype;q.release=function(){this.Vb();this.g=null};q.s=function(a,b,c,d){this.g&&(a=new xf(a,b,c,d),this.g.push(b,a))};q.xa=function(a,b,c,d){function e(g){f.Lc(a,b,e);c(g)}var f=this;this.s(a,b,e,d)};q.Lc=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.Lc(),this.g.remove(b,e))}};
|
|
181
181
|
q.Vb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,u(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.Lc();this.g.g={}}};K("shaka.util.EventManager",wf);wf.prototype.removeAll=wf.prototype.Vb;wf.prototype.unlisten=wf.prototype.Lc;wf.prototype.listenOnce=wf.prototype.xa;wf.prototype.listen=wf.prototype.s;wf.prototype.release=wf.prototype.release;function xf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=yf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
182
182
|
xf.prototype.Lc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function yf(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 zf(a)?b:b.capture||!1}
|
|
183
183
|
function zf(a){var b=Af;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}Af=b}return b||!1}var Af=void 0;function Bf(a){this.h=a;this.g=void 0}Bf.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Cf(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 Df(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Ef(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 Ff(){}
|
|
@@ -202,59 +202,59 @@ function sg(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-
|
|
|
202
202
|
function tg(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 ug(a){a=Number(a);return 0===a%1?a:null}function vg(a){a=Number(a);return 0===a%1&&0<a?a:null}function wg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function xg(a){a=Number(a);return isNaN(a)?null:a}function yg(a){return a?"true"===a.toLowerCase():!1}
|
|
203
203
|
function zg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function Ag(a,b){var c=new DOMParser,d=Bg.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}
|
|
204
204
|
function Cg(a,b){try{var c=Jf(a);return Ag(c,b)}catch(d){return null}}var Bg=new Bf(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 Dg(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.m=this.B=null;this.ba=this.Z=!1;this.J=0;this.g=null;this.D=new wf;this.i=new Map;this.C=new Map;this.l=new Xe;this.h=null;this.o=function(d){2==d.severity&&c.l.reject(d);a.onError(d)};this.U=new Map;this.ea=new Map;this.W=new O(function(){return Eg(c)});this.N=!1;this.L=[];this.P=!1;this.aa=(new O(function(){Fg(c)})).ka(b);this.l.catch(function(){});this.j=new uf(function(){return Gg(c)});this.X=!1;this.K=this.H=null}q=Dg.prototype;
|
|
205
|
-
q.destroy=function(){return this.j.destroy()};function Gg(a){return
|
|
205
|
+
q.destroy=function(){return this.j.destroy()};function Gg(a){return H(function(b){switch(b.g){case 1:return a.D.release(),a.D=null,a.l.reject(),a.aa.stop(),a.aa=null,a.W.stop(),a.W=null,C(b,Hg(a),2);case 2:if(!a.m){b.F(3);break}wa(b,4);return C(b,a.m.setMediaKeys(null),6);case 6:ya(b,5);break;case 4:za(b);case 5:a.m=null;case 3:a.g=null,a.I.clear(),a.B=null,a.C=new Map,a.h=null,a.o=function(){},a.G=null,a.X=!1,a.H=null,D(b)}})}q.configure=function(a){this.h=a};
|
|
206
206
|
function Ig(a,b,c){a.ba=!0;a.C=new Map;a.N=c;return Jg(a,b)}function Kg(a,b,c){a.C=new Map;c=r(c);for(var d=c.next();!d.done;d=c.next())a.C.set(d.value,{initData:null,initDataType:null});c=r(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.C.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.N=0<a.C.size;return Jg(a,b)}
|
|
207
207
|
function Lg(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 Mg(a,g,[])}
|
|
208
|
-
function Jg(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A;return
|
|
208
|
+
function Jg(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A;return H(function(z){if(1==z.g){if(c=Ng(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=Cf(a.h.servers),Og(b,h));k=new Set;l=r(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Pg(m),p=r(n),t=p.next();!t.done;t=p.next())v=t.value,k.add(v);w=r(k);for(t=w.next();!t.done;t=
|
|
209
209
|
w.next())y=t.value,Qg(y,Cf(a.h.servers),Cf(a.h.advanced||{}),a.h.keySystemsMapping);return C(z,Zd(b,a.N,a.X,a.h.preferredKeySystems),2)}x=g||Object.keys(a.h.servers).length;if(!x)return a.Z=!0,z.return(Promise.resolve());A=Mg(a,void 0,b);return z.return(g?A:A.catch(function(){}))})}
|
|
210
|
-
function Rg(a){var b;return
|
|
211
|
-
q.$c=function(a){var b=this;return
|
|
210
|
+
function Rg(a){var b;return H(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.H){c.F(2);break}return C(c,a.H,3);case 3:return vf(a.j),c.return();case 2:return wa(c,4),a.H=a.m.setMediaKeys(a.B),C(c,a.H,6);case 6:ya(c,5);break;case 4:b=za(c),a.o(new N(2,6,6003,b.message));case 5:vf(a.j),D(c)}})}function Sg(a,b){return H(function(c){if(1==c.g)return C(c,Rg(a),2);Tg(a,b.initDataType,mc(b.initData));D(c)})}
|
|
211
|
+
q.$c=function(a){var b=this;return H(function(c){if(1==c.g){if(!b.B)return b.D.xa(a,"encrypted",function(){b.o(new N(2,6,6010))}),c.return();b.m=a;b.D.xa(b.m,"play",function(){for(var d=r(b.L),e=d.next();!e.done;e=d.next())Ug(b,e.value);b.P=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.D.s(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Hg(b)});b.K=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.K||"com.apple.fps"!==b.g.keySystem||
|
|
212
212
|
b.C.size?C(c,Rg(b),2):c.F(2)}Vg(b).catch(function(){});b.K||b.C.size||b.h.parseInbandPsshEnabled||b.D.s(b.m,"encrypted",function(d){return Sg(b,d)});D(c)})};
|
|
213
|
-
function Wg(a){var b,c,d,e,f;return
|
|
214
|
-
wa(g,6);return C(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:
|
|
215
|
-
function Vg(a){var b,c,d,e,f;return
|
|
216
|
-
function Tg(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(kc(c,e.value.initData)&&!xd("Tizen 2"))return;0<a.i.size&&$g(a)&&(a.l.resolve(),a.l=new Xe,a.l.catch(function(){}));ah(a,b,c,a.g.sessionType)}}function bh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function ch(a){a=a.i.keys();a=
|
|
217
|
-
q.
|
|
218
|
-
function Mg(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,x;return
|
|
219
|
-
f.keySystem;var B=d.get(f.keySystem);var E=[],F=[],G=[],
|
|
220
|
-
B.next())E=E.value,E.distinctiveIdentifierRequired&&(z.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(z.persistentStateRequired=E.persistentStateRequired);B=z}else B=f.keySystem,z=b.get(f.keySystem),E=[],F=[],G=[],
|
|
221
|
-
z.audioCapabilities[0].robustness:"")||"",videoRobustness:(z.videoCapabilities?z.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:F[0],initData:
|
|
222
|
-
6,6018);vf(a.j);
|
|
223
|
-
function dh(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Pg(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 N(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={
|
|
224
|
-
l.
|
|
225
|
-
function eh(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y;return
|
|
226
|
-
x.h,x.return(c);case 6:
|
|
213
|
+
function Wg(a){var b,c,d,e,f;return H(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.F(2);break}b=nf([a.g.serverCertificateUri],a.h.retryParameters);wa(g,3);c=a.G.lc.request(5,b);return C(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=mc(d.data);ya(g,4);break;case 3:throw e=za(g),new N(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();
|
|
214
|
+
wa(g,6);return C(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:ya(g,0);break;case 6:throw f=za(g),new N(2,6,6004,f.message);}})}function Xg(a,b){var c,d,e;return H(function(f){if(1==f.g)return C(f,Yg(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.ub=new Xe,d.push(e.ub);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);D(f)})}
|
|
215
|
+
function Vg(a){var b,c,d,e,f;return H(function(g){if(1==g.g){if(!a.C.size)return g.F(2);a.C.forEach(function(h,k){Yg(a,k,h)});return C(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Zg(a))return g.return(a.l);a.l=new Xe;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=r(c);for(e=d.next();!e.done;e=d.next())f=e.value,Tg(a,f.initDataType,f.initData);c.length||a.l.resolve();return g.return(a.l)})}
|
|
216
|
+
function Tg(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(kc(c,e.value.initData)&&!xd("Tizen 2"))return;0<a.i.size&&$g(a)&&(a.l.resolve(),a.l=new Xe,a.l.catch(function(){}));ah(a,b,c,a.g.sessionType)}}function bh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function ch(a){a=a.i.keys();a=hb(a,function(b){return b.sessionId});return Array.from(a)}
|
|
217
|
+
q.Te=function(){var a=this,b=this.i.keys();b=hb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.gd=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.Vd=function(){return Df(this.ea)};
|
|
218
|
+
function Mg(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,x;return H(function(A){switch(A.g){case 1:d=new Map;if(c.length){e=dh(a,c,d);A.F(2);break}return C(A,eh(a,b),3);case 3:e=A.h;case 2:f=e;if(!f)throw new N(2,6,6001);vf(a.j);wa(A,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.I.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.I.add(t.contentType.toLowerCase());if(c.length){var z=
|
|
219
|
+
f.keySystem;var B=d.get(f.keySystem);var E=[],F=[],G=[],I=[],J=new Set;fh(B,E,G,F,I,J);var L=a.N?"persistent-license":"temporary";z={keySystem:z,licenseServerUri:E[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||L,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:F[0],initData:I,keyIds:J};B=r(B);for(E=B.next();!E.done;E=
|
|
220
|
+
B.next())E=E.value,E.distinctiveIdentifierRequired&&(z.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(z.persistentStateRequired=E.persistentStateRequired);B=z}else B=f.keySystem,z=b.get(f.keySystem),E=[],F=[],G=[],I=[],J=new Set,fh(z.drmInfos,E,G,F,I,J),B={keySystem:B,licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==z.distinctiveIdentifier,persistentStateRequired:"required"==z.persistentState,sessionType:z.sessionTypes[0]||"temporary",audioRobustness:(z.audioCapabilities?
|
|
221
|
+
z.audioCapabilities[0].robustness:"")||"",videoRobustness:(z.videoCapabilities?z.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:F[0],initData:I,keyIds:J};a.g=B;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return C(A,f.createMediaKeys(),6);case 6:v=A.h;vf(a.j);a.B=v;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.B)){A.F(7);break}wa(A,8);return C(A,a.B.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:w=A.h;if("usable"!=w)throw new N(2,
|
|
222
|
+
6,6018);vf(a.j);ya(A,7,4);break;case 8:y=za(A,4);if(y instanceof N)throw y;throw new N(2,6,6019,y.message);case 7:return a.Z=!0,C(A,Wg(a),11);case 11:vf(a.j);ya(A,0);break;case 4:x=za(A);vf(a.j,x);a.g=null;a.I.clear();if(x instanceof N)throw x;throw new N(2,6,6002,x.message);}})}
|
|
223
|
+
function dh(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Pg(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 N(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={He:d.He},e=a.next())for(d.He=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==
|
|
224
|
+
l.He}}(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}
|
|
225
|
+
function eh(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y;return H(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new N(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){x.F(4);break}k=h.value;if(!b.has(k)){x.F(3);break}l=b.get(k);wa(x,6);return C(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
226
|
+
x.h,x.return(c);case 6:za(x);case 7:vf(a.j);case 3:h=g.next();x.F(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){x.F(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();x.F(9);break}v=h.value;w=b.get(v);y=w.drmInfos.some(function(A){return!!A.licenseServerUri});if(y!=p){x.F(13);break}wa(x,15);return C(x,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=x.h,x.return(c);case 15:za(x);case 16:vf(a.j);case 13:h=t.next();x.F(12);break;case 11:return x.return(c)}})}
|
|
227
227
|
function Ng(a){a=Cf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=ag(cg(f),!1));f=e;22!=f.length&&(f=ag(cg(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:mc(Kf(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
|
|
228
228
|
videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}function gh(a){$g(a)&&a.l.resolve()}function hh(a,b){(new O(function(){b.loaded=!0;gh(a)})).R(ih)}
|
|
229
|
-
function Yg(a,b,c){var d,e,f,g,h,k,l;return
|
|
230
|
-
d.load(b),4);case 4:return g=m.h,vf(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new N(h,6,6013)),f.loaded=!0),hh(a,f),gh(a),m.return(d);case 2:k=
|
|
231
|
-
function ah(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.o(new N(2,6,6005,f.message));return}a.D.s(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.P?a.L.push(f):Ug(a,f)});a.D.s(e,"keystatuseschange",function(f){return jh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,
|
|
229
|
+
function Yg(a,b,c){var d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new N(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.D.s(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.P?a.L.push(n):Ug(a,n)});a.D.s(d,"keystatuseschange",function(n){return jh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,nf:Infinity,ub:null,type:"persistent-license"};a.i.set(d,f);wa(m,2);return C(m,
|
|
230
|
+
d.load(b),4);case 4:return g=m.h,vf(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new N(h,6,6013)),f.loaded=!0),hh(a,f),gh(a),m.return(d);case 2:k=za(m),vf(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new N(l,6,6005,k.message)),f.loaded=!0,gh(a);case 3:return m.return(Promise.resolve())}})}
|
|
231
|
+
function ah(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.o(new N(2,6,6005,f.message));return}a.D.s(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.P?a.L.push(f):Ug(a,f)});a.D.s(e,"keystatuseschange",function(f){return jh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,nf:Infinity,ub:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&ag(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
232
232
|
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.o(new N(2,6,6006,f.message,f,h))}})}
|
|
233
|
-
function Ug(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;
|
|
234
|
-
Hf(g.body,!0,!0);if(y.includes("PlayReadyKeyMessage")){y=Ag(y,"PlayReadyKeyMessage");for(var x=r(y.getElementsByTagName("HttpHeader")),A=x.next();!A.done;A=x.next())A=A.value,g.headers[A.getElementsByTagName("name")[0].textContent]=A.getElementsByTagName("value")[0].textContent;g.body=bg(y.getElementsByTagName("Challenge")[0].textContent)}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();wa(w,2);l=a.G.
|
|
235
|
-
|
|
233
|
+
function Ug(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;H(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&ag(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=nf([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);if(bh(a.g.keySystem)){var y=
|
|
234
|
+
Hf(g.body,!0,!0);if(y.includes("PlayReadyKeyMessage")){y=Ag(y,"PlayReadyKeyMessage");for(var x=r(y.getElementsByTagName("HttpHeader")),A=x.next();!A.done;A=x.next())A=A.value,g.headers[A.getElementsByTagName("name")[0].textContent]=A.getElementsByTagName("value")[0].textContent;g.body=bg(y.getElementsByTagName("Challenge")[0].textContent)}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();wa(w,2);l=a.G.lc.request(2,g);return C(w,l.promise,4);case 4:k=w.h;ya(w,3);break;case 2:return m=
|
|
235
|
+
za(w),n=new N(2,6,6007,m),a.o(n),d&&d.ub&&d.ub.reject(n),w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ag(k.data);wa(w,5);return C(w,c.update(k.data),7);case 7:ya(w,6);break;case 5:return p=za(w),t=new N(2,6,6008,p.message),a.o(t),d&&d.ub&&d.ub.reject(t),w.return();case 6:if(a.j.g)return w.return();v=new M("drmsessionupdate");a.G.onEvent(v);d&&(d.ub&&d.ub.resolve(),hh(a,d));D(w)}})}
|
|
236
236
|
function jh(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(bh(a.g.keySystem)&&16==g.byteLength&&(vd()||Bd())){h=pc(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=dg(g).slice(0,32);a.U.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ub&&(a.i.delete(b),b.close().catch(function(){}));
|
|
237
|
-
$g(a)&&(a.l.resolve(),a.W.R(kh))}function Eg(a){var b=a.U,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.o(new N(2,6,6014));a.G.
|
|
238
|
-
function lh(){var a,b,c,d,e,f,g,h;return
|
|
239
|
-
p;return
|
|
240
|
-
function mh(a){var b;return
|
|
241
|
-
function Hg(a){var b;return
|
|
237
|
+
$g(a)&&(a.l.resolve(),a.W.R(kh))}function Eg(a){var b=a.U,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.o(new N(2,6,6014));a.G.me(Df(c))}
|
|
238
|
+
function lh(){var a,b,c,d,e,f,g,h;return H(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,n,
|
|
239
|
+
p;return H(function(t){switch(t.g){case 1:wa(t,2);if("org.w3.clearkey"===l&&Cd())throw Error("Unsupported keySystem");return C(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,xd("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),C(t,m.createMediaKeys(),5);case 5:ya(t,0);break;case 2:za(t),f.set(l,null),D(t)}})},h=a.map(function(l){return g(l)}),C(k,Promise.all(h),2)):k.return(Df(f))})}
|
|
240
|
+
function mh(a){var b;return H(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).R(nh)}),wa(c,2),C(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ya(c,0);za(c);D(c)})}
|
|
241
|
+
function Hg(a){var b;return H(function(c){b=Array.from(a.i.entries());a.i.clear();return C(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return H(function(g){if(1==g.g)return wa(g,2),a.ba||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?C(g,mh(e),5):C(g,e.remove(),5);if(2!=g.g)return ya(g,0);za(g);D(g)})})),0)})}function oh(a,b){return a.length&&b.length&&a!==b?0<ph(a,b).length:!0}
|
|
242
242
|
function ph(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={ab:e.ab},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.ab=[];e.ab=e.ab.concat(d.initData||[]);e.ab=e.ab.concat(g.initData||[]);e.ab=e.ab.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.ab.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(u(d.keyIds),u(g.keyIds))):
|
|
243
243
|
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,
|
|
244
|
-
initData:e.ab,keyIds:f});break}}return c}function Pg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Fg(a){a.i.forEach(function(b,c){var d=b.
|
|
244
|
+
initData:e.ab,keyIds:f});break}}return c}function Pg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Fg(a){a.i.forEach(function(b,c){var d=b.nf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.nf=e)})}function $g(a){a=a.i.values();return ib(a,function(b){return b.loaded})}function Zg(a){for(var b=r(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.U.get(c.value))return!1;return!0}
|
|
245
245
|
function Og(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)}
|
|
246
246
|
function fh(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ja:g.Ja},h=a.next()){g.Ja=h.value;b.includes(g.Ja.licenseServerUri)||b.push(g.Ja.licenseServerUri);d.includes(g.Ja.serverCertificateUri)||d.push(g.Ja.serverCertificateUri);g.Ja.serverCertificate&&(c.some(function(m){return function(n){return kc(n,m.Ja.serverCertificate)}}(g))||c.push(g.Ja.serverCertificate));if(g.Ja.initData){h={};for(var k=r(g.Ja.initData),l=k.next();!l.done;h={Fd:h.Fd},l=k.next())h.Fd=l.value,e.some(function(m){return function(n){var p=
|
|
247
247
|
m.Fd;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&kc(n.initData,p.initData)}}(h))||e.push(h.Fd)}if(g.Ja.keyIds)for(h=r(g.Ja.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
248
248
|
function Qg(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=
|
|
249
|
-
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 nh=1,ih=5,kh=.5,qh=new Bf(function(){return nc(new Uint8Array([0]))});function rh(){}function sh(a,b,c,d){var e,f,g,h;return
|
|
250
|
-
function uh(a){a=(new
|
|
251
|
-
function(l){g.push({box:l,
|
|
249
|
+
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 nh=1,ih=5,kh=.5,qh=new Bf(function(){return nc(new Uint8Array([0]))});function rh(){}function sh(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){if(d&&(e=th[d.toLowerCase()]))return k.return(e);if(f=uh(a))if(g=vh[f])return k.return(g);return d?k.F(2):C(k,wh(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=th[d]))return k.return(h);throw new N(2,4,4E3,a);})}function wh(a,b,c){var d,e,f;return H(function(g){if(1==g.g)return d=nf([a],c),d.method="HEAD",C(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
|
|
250
|
+
function uh(a){a=(new mb(a)).La.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}K("shaka.media.ManifestParser",rh);rh.unregisterParserByMime=function(a){delete th[a]};rh.registerParserByMime=function(a,b){th[a]=b};rh.registerParserByExtension=function(a,b){vh[a]=b};rh.AccessibilityPurpose={$j:"visually impaired",gj:"hard of hearing"};var th={},vh={};function xh(a){function b(){d=!0}function c(l){f.push(l);Uf(l)}a=mc(a);var d=!1,e,f=[],g=[];(new Pf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);Wf(l)}).T("encv",b).T("enca",b).T("hev1",function(l){g.push({box:l,mc:1701733238})}).T("hvc1",function(l){g.push({box:l,mc:1701733238})}).T("avc1",function(l){g.push({box:l,mc:1701733238})}).T("avc3",function(l){g.push({box:l,mc:1701733238})}).T("ac-3",function(l){g.push({box:l,mc:1701733217})}).T("ec-3",
|
|
251
|
+
function(l){g.push({box:l,mc:1701733217})}).T("mp4a",function(l){g.push({box:l,mc:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw db(dg(a)),new N(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=yh(a,e,k.box,f,k.mc);return a}
|
|
252
252
|
function yh(a,b,c,d,e){var f=zh.value(),g=a.subarray(c.start,c.start+c.size),h=pc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=pc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ah(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=wd()?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,Ah(e,d.start,d.size+k.byteLength);k=pc(e,b.start);b=Vf(b);a=k.getUint32(b);
|
|
253
|
-
k.setUint32(b,a+1);return e}function Ah(a,b,c){a=pc(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 zh=new Bf(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 Bh(a,b,c,d,e,f){this.Oa=a;this.Sa=b;this.Aa=c;this.
|
|
253
|
+
k.setUint32(b,a+1);return e}function Ah(a,b,c){a=pc(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 zh=new Bf(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 Bh(a,b,c,d,e,f){this.Oa=a;this.Sa=b;this.Aa=c;this.jf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f}Bh.prototype.kd=function(){return this.Sa};Bh.prototype.fd=function(){return this.Aa};function Ch(a,b){return a&&b?a.kd()==b.kd()&&a.fd()==b.fd()&&yc(a.Oa(),b.Oa())&&kc(a.g,b.g):a==b}K("shaka.media.InitSegmentReference",Bh);Bh.prototype.getEndByte=Bh.prototype.fd;Bh.prototype.getStartByte=Bh.prototype.kd;
|
|
254
254
|
function P(a,b,c,d,e,f,g,h,k,l,m,n,p,t,v){l=void 0===l?[]:l;t=void 0===t?Dh:t;this.startTime=a;this.l=this.endTime=b;this.H=c;this.Sa=d;this.Aa=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.G=void 0===n?null:n;this.g=void 0===p?null:p;this.status=t;this.m=!1;this.B=!0;this.o=!1;this.C=void 0===v?null:v;this.D=null;this.j=0}q=P.prototype;q.Oa=function(){return this.H()};q.getStartTime=function(){return this.startTime};
|
|
255
|
-
q.uh=function(){return this.endTime};q.kd=function(){return this.Sa};q.fd=function(){return this.Aa};q.Nh=function(){return this.tilesLayout};q.Mh=function(){return this.G};q.
|
|
256
|
-
q.offset=function(a){this.startTime+=a;this.endTime+=a;this.l+=a;for(var b=r(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.l+=a};q.
|
|
257
|
-
P.prototype.hasByterangeOptimization=P.prototype.Sh;P.prototype.markAsByterangeOptimization=P.prototype.xg;P.prototype.isIndependent=P.prototype.Vh;P.prototype.markAsNonIndependent=P.prototype.yg;P.prototype.isPreload=P.prototype.Wh;P.prototype.markAsPreload=P.prototype.
|
|
255
|
+
q.uh=function(){return this.endTime};q.kd=function(){return this.Sa};q.fd=function(){return this.Aa};q.Nh=function(){return this.tilesLayout};q.Mh=function(){return this.G};q.dc=function(){return this.status};q.$h=function(){this.status=Eh};q.hf=function(){this.m=!0};q.Wh=function(){return this.m};q.yg=function(){this.B=!1};q.Vh=function(){return this.B};q.xg=function(){this.o=!0};q.Sh=function(){return this.o};q.Lg=function(a){this.D=a};q.Lh=function(){return this.D};
|
|
256
|
+
q.offset=function(a){this.startTime+=a;this.endTime+=a;this.l+=a;for(var b=r(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.l+=a};q.Hf=function(a){null==this.g?Wa("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};K("shaka.media.SegmentReference",P);P.prototype.syncAgainst=P.prototype.Hf;P.prototype.offset=P.prototype.offset;P.prototype.getThumbnailSprite=P.prototype.Lh;P.prototype.setThumbnailSprite=P.prototype.Lg;
|
|
257
|
+
P.prototype.hasByterangeOptimization=P.prototype.Sh;P.prototype.markAsByterangeOptimization=P.prototype.xg;P.prototype.isIndependent=P.prototype.Vh;P.prototype.markAsNonIndependent=P.prototype.yg;P.prototype.isPreload=P.prototype.Wh;P.prototype.markAsPreload=P.prototype.hf;P.prototype.markAsUnavailable=P.prototype.$h;P.prototype.getStatus=P.prototype.dc;P.prototype.getTileDuration=P.prototype.Mh;P.prototype.getTilesLayout=P.prototype.Nh;P.prototype.getEndByte=P.prototype.fd;
|
|
258
258
|
P.prototype.getStartByte=P.prototype.kd;P.prototype.getEndTime=P.prototype.uh;P.prototype.getStartTime=P.prototype.getStartTime;P.prototype.getUris=P.prototype.Oa;var Dh=0,Eh=1;P.Status={Ni:Dh,Vj:Eh,lj:2};function Fh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Gh(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)}function Hh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(Ih(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}
|
|
259
259
|
function Jh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Ih(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ih(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};/*
|
|
260
260
|
@license
|
|
@@ -266,8 +266,8 @@ function Kh(){}function Lh(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&5
|
|
|
266
266
|
function Oh(a){var b={key:a.type,description:"",data:""};if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Gf(mc(a.data,1,c));a=Gf(mc(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;c=a.data.subarray(1).indexOf(0);if(-1===c)return null;d=Gf(mc(a.data,1,c));a=Gf(mc(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("PRIV"===a.type){if(2>
|
|
267
267
|
a.size)return null;d=a.data.indexOf(0);if(-1===d)return null;d=Gf(mc(a.data,0,d));b.description=d;"com.apple.streaming.transportStreamTimestamp"==d?(d=a.data.subarray(d.length+1),a=d[3]&1,d=(d[4]<<23)+(d[5]<<15)+(d[6]<<7)+d[7],d/=45,a&&(d+=4.772185884E7),b.data=d):(a=nc(a.data.subarray(d.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Gf(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Gf(a.data).replace(/\0*$/,""),b.data=
|
|
268
268
|
a,b):a.data?(b.data=nc(a.data),b):null}function Ph(a){for(var b=0,c=[];Lh(a,b);){var d=Nh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Nh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Oh(e))&&c.push(f);b+=e.size+10}Mh(a,b)&&(b+=10)}return c}function Qh(a,b){for(var c=b=void 0===b?0:b,d=0;Lh(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Nh(a,b+6),Mh(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}
|
|
269
|
-
K("shaka.util.Id3Utils",Kh);Kh.getID3Data=Qh;Kh.getID3Frames=Ph;function Rh(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Ic());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,
|
|
270
|
-
function Uh(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={
|
|
269
|
+
K("shaka.util.Id3Utils",Kh);Kh.getID3Data=Qh;Kh.getID3Frames=Ph;function Rh(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Ic());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,ig:c,hh:d,dk:e}}function Sh(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function Th(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.Ya();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
270
|
+
function Uh(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={uf:null,sampleSize:null,ve:null};c&256&&(h.uf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.ve=0==b?a.O():a.Cg());e.push(h)}return{hk:d,Eg:e,gh:f}}
|
|
271
271
|
function Vh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.O();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.Ya()+a.Ya()/16;a=a.Ya()+a.Ya()/16;return{trackId:c,width:b,height:a}}function Wh(a){var b="mp4a";a.skip(11);b+="."+this.g(a.Ia());b+="."+this.g(a.Ia()>>>2&63).replace(/^0/,"");return{ib:b}}function Xh(a,b){a.skip(87);return{ib:b+"."+this.g(a.Ia())+this.g(a.Ia())+this.g(a.Ia())}}function Yh(a){a=a.O();return{ib:Tf(a)}};/*
|
|
272
272
|
|
|
273
273
|
Copyright Brightcove, Inc.
|
|
@@ -285,126 +285,127 @@ function Vh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.O();1=
|
|
|
285
285
|
limitations under the License.
|
|
286
286
|
*/
|
|
287
287
|
function Zh(a){this.j=a;this.i=a.byteLength;this.g=this.h=0}function $h(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Mf(c,0)).O(),a.g=8*d,a.i-=d)}function ai(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;$h(a)}a.h<<=b;a.g-=b}function bi(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&$h(a);c=b-c;return 0<c?d<<c|bi(a,c):d}
|
|
288
|
-
function ci(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;$h(a);return b+ci(a)}function di(a){ai(a,1+ci(a))}function ei(a){var b=ci(a);return bi(a,b+1)-1}function fi(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=ei(a),d=(c+(1&d?1+d>>>1:-1*(d>>>1))+256)%256),c=0===d?c:d}function gi(a){bi(a,8);ei(a);return ei(a)}K("shaka.util.ExpGolomb",Zh);function hi(){this.
|
|
289
|
-
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,ii(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.
|
|
290
|
-
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(-1==g.audio&&0<m)for(var n=h+5,p=m;2<p;){switch(f[n]){case 106:g.audio=l;g.audioCodec="ac3";break;case 122:g.audio=l,g.audioCodec="ec3"}var t=f[n+1]+2;n+=t;p-=t}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1==g.
|
|
291
|
-
"hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;null==this.
|
|
292
|
-
|
|
293
|
-
function ji(a
|
|
294
|
-
q.
|
|
295
|
-
|
|
296
|
-
q.
|
|
297
|
-
q.
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
288
|
+
function ci(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;$h(a);return b+ci(a)}function di(a){ai(a,1+ci(a))}function ei(a){var b=ci(a);return bi(a,b+1)-1}function fi(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=ei(a),d=(c+(1&d?1+d>>>1:-1*(d>>>1))+256)%256),c=0===d?c:d}function gi(a){bi(a,8);ei(a);return ei(a)}K("shaka.util.ExpGolomb",Zh);function hi(){this.C=null;this.D=!1;this.m=this.o=null;this.i=[];this.B=this.j=null;this.g=[];this.l=null;this.h=[]}q=hi.prototype;q.clearData=function(){this.i=[];this.g=[];this.h=[]};
|
|
289
|
+
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,ii(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.C=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.C:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Ye:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
|
|
290
|
+
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(-1==g.audio&&0<m)for(var n=h+5,p=m;2<p;){switch(f[n]){case 106:g.audio=l;g.audioCodec="ac3";break;case 122:g.audio=l,g.audioCodec="ec3"}var t=f[n+1]+2;n+=t;p-=t}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1==g.Ye&&(g.Ye=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec=
|
|
291
|
+
"hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;null==this.o&&(this.o=f.video,this.m=f.videoCodec);null==this.j&&(this.j=f.audio,this.B=f.audioCodec);null==this.l&&(this.l=f.Ye);d&&!this.D&&(d=!1,e=b-188);this.D=!0;break;case this.o:h=a.subarray(h,e+188);f?this.i.push(h):this.i.length&&(f=this.i[this.i.length-1])&&(this.i[this.i.length-1]=eg(f,h));break;case this.j:h=a.subarray(h,e+188);f?this.g.push(h):
|
|
292
|
+
this.g.length&&(f=this.g[this.g.length-1])&&(this.g[this.g.length-1]=eg(f,h));break;case this.l:h=a.subarray(h,e+188);f?this.h.push(h):this.h.length&&(f=this.h[this.h.length-1])&&(this.h[this.h.length-1]=eg(f,h));break;default:d=!0}}return this};
|
|
293
|
+
function ji(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),ii:a[4]<<8|a[5],pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
|
|
294
|
+
q.qf=function(a,b){for(var c=a.pts?a.pts/9E4:null,d=a.data,e=d.byteLength,f=0,g=[],h=-1,k=0,l=!1,m,n=0;n<e;++n){var p=d[n];if(p)if(2<=f&&1==p&&l){a=n-(3<f?3:f);m.data=eg(m.data,d.subarray(0,a));m.Bb=eg(m.Bb,d.subarray(0,a));break}else{if(2<=f&&1==p){0<=h&&(f=n-((3<f?3:f)+1),g.push({data:d.subarray(h+1,f+1),Bb:d.subarray(h,f+1),type:k,time:c}));if(n>=e-1)return g;n++;h=n;k=d[n]&31}f=0}else f++;n>=e-1&&0<=h&&0<=f&&(l?(m.data=eg(m.data,d),m.Bb=eg(m.Bb,d)):(l=!0,m={data:d.subarray(h+1,e),Bb:d.subarray(h,
|
|
295
|
+
e),type:k,time:c},b&&0==a.ii&&(d=b.data,e=d.byteLength,n=-1)))}m&&g.push(m);return g};q.getMetadata=function(){for(var a=[],b=r(this.h),c=b.next();!c.done;c=b.next())(c=ji(c.value))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Ph(c.data),dts:c.dts,pts:c.pts});return a};q.$b=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())(c=ji(c.value))&&a.push(c);return a};q.Yd=function(){for(var a=[],b=r(this.i),c=b.next();!c.done;c=b.next())(c=ji(c.value))&&a.push(c);return a};
|
|
296
|
+
q.getStartTime=function(){for(var a=null,b=r(this.$b()),c=b.next();!c.done;c=b.next()){var d=c.value;d&&null!=d.pts&&(d=Math.min(d.dts,d.pts)/9E4,null==a||a>d)&&(a=d)}b=null;d=r(this.Yd());for(c=d.next();!c.done;c=d.next())(c=c.value)&&null!=c.pts&&(c=Math.min(c.dts,c.pts)/9E4,null==b||b>c)&&(b=c);return{audio:a,video:b}};q.Sd=function(){return{audio:this.B,video:this.m}};
|
|
297
|
+
q.Xe=function(){var a=[];if("avc"!=this.m)return a;for(var b=this.Yd(),c=0;c<b.length;c++){var d=b[c],e=void 0;c+1<b.length&&(e=b[c+1]);a.push.apply(a,u(this.qf(d,e)))}return a};
|
|
298
|
+
q.qg=function(){var a={height:null,width:null},b=this.Xe();if(!b.length)return a;b=b.find(function(l){return 7==l.type});if(!b)return a;b=new Zh(b.data);var c=bi(b,8);bi(b,8);bi(b,8);di(b);if(ki.includes(c)&&(c=ei(b),3===c&&ai(b,1),di(b),di(b),ai(b,1),1===bi(b,1))){c=3!==c?8:12;for(var d=0;d<c;d++)1===bi(b,1)&&(6>d?fi(b,16):fi(b,64))}di(b);c=ei(b);if(0===c)ei(b);else if(1===c)for(ai(b,1),di(b),di(b),c=ei(b),d=0;d<c;d++)di(b);di(b);ai(b,1);c=ei(b);d=ei(b);var e=bi(b,1);0===e&&ai(b,1);ai(b,1);var f=
|
|
299
|
+
0,g=0,h=0,k=0;1===bi(b,1)&&(f=ei(b),g=ei(b),h=ei(b),k=ei(b));a.height=String((2-e)*(d+1)*16-2*h-2*k);a.width=String(16*(c+1)-2*f-2*g);return a};function li(a){return 0>ii(a)?!1:!0}function ii(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}K("shaka.util.TsParser",hi);hi.syncOffset=ii;hi.probe=li;hi.prototype.getVideoResolution=hi.prototype.qg;hi.prototype.getVideoNalus=hi.prototype.Xe;hi.prototype.getCodecs=hi.prototype.Sd;
|
|
300
|
+
hi.prototype.getStartTime=hi.prototype.getStartTime;hi.prototype.getVideoData=hi.prototype.Yd;hi.prototype.getAudioData=hi.prototype.$b;hi.prototype.getMetadata=hi.prototype.getMetadata;hi.prototype.parseAvcNalus=hi.prototype.qf;hi.prototype.parse=hi.prototype.parse;hi.prototype.clearData=hi.prototype.clearData;hi.Timescale=9E4;var ki=[100,110,122,244,44,83,86,118,128,138,139,134];function mi(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&Xa("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Xa("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Xa(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
|
|
301
|
+
(this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}mi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ni(a,b){var c=oi;switch(b.mimeType){case "video/webm":c=pi;break;case "video/mp4":c=qi}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}K("shaka.lcevc.Dil",mi);mi.prototype.release=mi.prototype.release;var oi=0,pi=1,qi=2;function ri(a,b,c,d){var e=this;this.l=a;this.G=null;this.C=b;this.h={};this.J={};this.W={};this.g=null;this.N=!1;this.ea=c||function(){};this.L=d||null;this.j={};this.D=new wf;this.m={};this.H=null;this.I=new Xe;this.P="";this.i=si(this,this.I);this.o=!1;this.K=new uf(function(){return ti(e)});this.B=!1;this.Z="UNKNOWN";this.U=this.X=!1;this.aa=new Xe}function si(a,b){var c=new MediaSource;a.D.xa(c,"sourceopen",function(){URL.revokeObjectURL(a.P);b.resolve()});a.P=ui(c);a.l.src=a.P;return c}q=ri.prototype;
|
|
301
302
|
q.destroy=function(){return this.K.destroy()};
|
|
302
|
-
function ti(a){var b,c,d,e,f,g,h,k;return
|
|
303
|
-
a.
|
|
304
|
-
function vi(a,b,c){var d=cd(c.mimeType,c.codecs);if(b==Kb)wi(a,d,a.B,c.external);else{var e=a.G.forceTransmux;if(!ec(d)||!a.B&&dd.includes(d))e=!0;var f=ed(c.mimeType,c.codecs);e&&(e=Xc(f))&&(d=e(),a.m[b]=d,d=d.convertCodecs(b,f));f=d+a.G.sourceBufferExtraFeatures;vf(a.K);try{var g=a.i.addSourceBuffer(f)}catch(h){throw new N(2,3,3015,h,"The mediaSource_ status was"+a.i.readyState+"expected 'open'");}a.B&&(g.mode=xi);a.D.s(g,"error",function(){a.
|
|
303
|
+
function ti(a){var b,c,d,e,f,g,h,k;return H(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(Db)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.C&&b.push(a.C.destroy());for(k in a.m)b.push(a.m[k].destroy());return C(l,Promise.all(b),2)}a.D&&(a.D.release(),a.D=null);a.l&&(a.l.removeAttribute("src"),a.l.load(),a.l=null);a.G=null;a.i=null;a.g=null;a.C=null;a.h={};a.m={};a.H=null;
|
|
304
|
+
a.j={};a.L=null;D(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k;return H(function(l){if(1==l.g)return C(l,e.I,2);e.B=b;e.Z=c;e.X=d;e.U=!e.B&&"HLS"==e.Z&&!e.X;f=r(a.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=a.get(h),vi(e,h,k),e.j[h]=[];D(l)})};
|
|
305
|
+
function vi(a,b,c){var d=cd(c.mimeType,c.codecs);if(b==Kb)wi(a,d,a.B,c.external);else{var e=a.G.forceTransmux;if(!ec(d)||!a.B&&dd.includes(d))e=!0;var f=ed(c.mimeType,c.codecs);e&&(e=Xc(f))&&(d=e(),a.m[b]=d,d=d.convertCodecs(b,f));f=d+a.G.sourceBufferExtraFeatures;vf(a.K);try{var g=a.i.addSourceBuffer(f)}catch(h){throw new N(2,3,3015,h,"The mediaSource_ status was"+a.i.readyState+"expected 'open'");}a.B&&(g.mode=xi);a.D.s(g,"error",function(){a.j[b][0].p.reject(new N(2,3,3014,a.l.error?a.l.error.code:
|
|
305
306
|
0))});a.D.s(g,"updateend",function(){return yi(a,b)});a.h[b]=g;a.J[b]=d;a.W[b]=!!c.drmInfos.length}}q.configure=function(a){this.G=a};function wi(a,b,c,d){a.g||(a.g=new jd(a.C));var e=a.g;a=d||a.N;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,ld[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Xa('Text parsers should have a "setSequenceMode" method!'),e.C=a)}function zi(a){return a.o?!1:a.i?"ended"==a.i.readyState:!0}
|
|
306
307
|
function Ai(a,b){a.o?a=null:b==Kb?a=a.g.g:(a=Bi(a,b),a=!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);return a}function Ci(a,b){return a.o?null:b==Kb?a.g.h:Fh(Bi(a,b))}function Di(a,b,c){if(a.o)return 0;if(b==Kb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Bi(a,b);return Hh(a,c)}
|
|
307
|
-
q.Cb=function(){var a={total:this.o?[]:Ih(this.
|
|
308
|
+
q.Cb=function(){var a={total:this.o?[]:Ih(this.l.buffered),audio:this.o?[]:Ih(Bi(this,"audio")),video:this.o?[]:Ih(Bi(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 Bi(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
308
309
|
function Ei(a,b,c,d,e,f){var g=null,h=mc(c);if(dd.includes(e))f=Ph(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ea([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.h&&d.h.timescale){var k=d.h.timescale;if(!isNaN(k)){var l=0,m=!1;(new Pf).box("moof",Uf).box("traf",Uf).T("tfdt",function(n){l=Sh(n.reader,n.version).baseMediaDecodeTime/
|
|
309
310
|
k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!li(h)||(h=(new hi).parse(h),b=h.getStartTime()[b],null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ea(h,f,d?d.endTime:null));return g}
|
|
310
|
-
function Fi(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,t,v,w,y,x,A;return
|
|
311
|
-
b)}),Gi(a,b,function(){return Ii(a,b,m)}));w=b==k.Na||!(k.Na in a.h);a.B&&w&&a.aa.resolve(m)}f&&b==k.Na&&(a.g||wi(a,"application/cea-608",a.B,!1),a.H||(y=n.split(";",1)[0],a.H=new rc(y)),d?(x=a.H.j(c),x.length&&qd(a.g,x,d.startTime,d.endTime,m)):a.H.init(c));if(!a.m[b]){z.F(6);break}return C(z,a.m[b].transmux(c,e,d,a.i.duration),7);case 7:c=z.h;case 6:return c=Ji(a,c,d?d.startTime:null,b),d&&a.B&&b!=k.oa&&(g||h)&&(A=d.startTime,Gi(a,b,function(){return Hi(a,b)}),Gi(a,b,function(){return Ii(a,b,
|
|
312
|
-
C(z,Gi(a,b,function(){var B=c;if("video"==b&&a.L){var E=a.L;E.g&&E.g.appendBuffer(B,"video",E.i)}a.h[b].appendBuffer(B)}),8);case 8:D(z)}})}function Ki(a,b){var c=Ci(a,"video")||0;od(a.g,b,c)}function Li(a){a.g&&od(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return
|
|
313
|
-
function Mi(a,b){var c;return
|
|
314
|
-
function Ni(a,b,c,d,e,f,g,h){var k,l,m;return
|
|
315
|
-
function Pi(a,b,c){var d;return
|
|
316
|
-
q.Ra=function(a){var b=this;return
|
|
317
|
-
function yi(a,b){if(!a.o){var c=a.
|
|
318
|
-
function Qi(a,b){var c,d,e,f,g,h,k;return
|
|
319
|
-
}})}function Ri(a,b){a.
|
|
311
|
+
function Fi(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,t,v,w,y,x,A;return H(function(z){switch(z.g){case 1:k=Lb;if(b!=k.oa){z.F(2);break}if(!a.B){z.F(3);break}return C(z,a.aa,4);case 4:l=z.h,a.g.B=l;case 3:return C(z,md(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return z.return();case 2:m=a.h[b].timestampOffset;n=a.J[b];a.m[b]&&(n=a.m[b].getOrginalMimeType());if(d&&(p=Ei(a,b,c,d,n,m),null!=p)){t=d.startTime-p;v=Math.abs(m-t);if(.1<=v||g||h)m=t,a.U&&(Gi(a,b,function(){return Hi(a,
|
|
312
|
+
b)}),Gi(a,b,function(){return Ii(a,b,m)}));w=b==k.Na||!(k.Na in a.h);a.B&&w&&a.aa.resolve(m)}f&&b==k.Na&&(a.g||wi(a,"application/cea-608",a.B,!1),a.H||(y=n.split(";",1)[0],a.H=new rc(y)),d?(x=a.H.j(c),x.length&&qd(a.g,x,d.startTime,d.endTime,m)):a.H.init(c));if(!a.m[b]){z.F(6);break}return C(z,a.m[b].transmux(c,e,d,a.i.duration,b),7);case 7:c=z.h;case 6:return c=Ji(a,c,d?d.startTime:null,b),d&&a.B&&b!=k.oa&&(g||h)&&(A=d.startTime,Gi(a,b,function(){return Hi(a,b)}),Gi(a,b,function(){return Ii(a,b,
|
|
313
|
+
A)})),C(z,Gi(a,b,function(){var B=c;if("video"==b&&a.L){var E=a.L;E.g&&E.g.appendBuffer(B,"video",E.i)}a.h[b].appendBuffer(B)}),8);case 8:D(z)}})}function Ki(a,b){var c=Ci(a,"video")||0;od(a.g,b,c)}function Li(a){a.g&&od(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return H(function(f){e=Lb;return a==e.oa?C(f,d.g.remove(b,c),0):C(f,Gi(d,a,function(){c<=b?yi(d,a):d.h[a].remove(b,c)}),0)})};
|
|
314
|
+
function Mi(a,b){var c;return H(function(d){c=Lb;return b==c.oa?a.g?C(d,a.g.remove(0,Infinity),0):d.return():C(d,Gi(a,b,function(){var e=a.i.duration;0>=e?yi(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return H(function(d){c=Lb;return a==c.oa?d.return():C(d,Gi(b,a,function(){b.l.currentTime-=.001;yi(b,a)}),0)})};
|
|
315
|
+
function Ni(a,b,c,d,e,f,g,h){var k,l,m;return H(function(n){if(1==n.g){k=Lb;if(b==k.oa)return f||(a.g.B=c),nd(a.g,d,e),n.return();l=[];return C(n,Oi(a,b,g,h),2)}(m=n.h)||l.push(Gi(a,b,function(){return Hi(a,b)}));f||l.push(Gi(a,b,function(){return Ii(a,b,c)}));l.push(Gi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;yi(a,b)}));return C(n,Promise.all(l),0)})}
|
|
316
|
+
function Pi(a,b,c){var d;return H(function(e){d=Lb;if(b==d.oa)return e.return();Gi(a,b,function(){return Hi(a,b)});return C(e,Gi(a,b,function(){return Ii(a,b,c)}),0)})}q.endOfStream=function(a){var b=this;return H(function(c){return C(c,Qi(b,function(){zi(b)||"closed"===b.i.readyState||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};
|
|
317
|
+
q.Ra=function(a){var b=this;return H(function(c){return C(c,Qi(b,function(){if(a<b.i.duration)for(var d in b.h){var e={start:function(){},p:new Xe};b.j[d].unshift(e)}b.i.duration=a}),0)})};q.getDuration=function(){return this.i.duration};function Hi(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;yi(a,b)}function Ii(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;yi(a,b)}
|
|
318
|
+
function yi(a,b){if(!a.o){var c=a.j[b][0];c&&(c.p.resolve(),Ri(a,b))}}function Gi(a,b,c){vf(a.K);c={start:c,p:new Xe};a.j[b].push(c);1==a.j[b].length&&Si(a,b);return c.p}
|
|
319
|
+
function Qi(a,b){var c,d,e,f,g,h,k;return H(function(l){switch(l.g){case 1:vf(a.K);c=[];d={};for(e in a.h)d.Uc=new Xe,f={start:function(m){return function(){return m.Uc.resolve()}}(d),p:d.Uc},a.j[e].push(f),c.push(d.Uc),1==a.j[e].length&&f.start(),d={Uc:d.Uc};wa(l,2);return C(l,Promise.all(c),4);case 4:ya(l,3);break;case 2:throw g=za(l),g;case 3:return wa(l,5,6),C(l,b(),6);case 6:Aa(l);for(h in a.h)Ri(a,h);Ba(l,0);break;case 5:throw k=za(l),new N(2,3,3015,k,a.l.error||"No error in the media element");
|
|
320
|
+
}})}function Ri(a,b){a.j[b].shift();Si(a,b)}function Si(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d,a.l.error||"No error in the media element")),Ri(a,b)}}function Ji(a,b,c,d){var e=a.W[d];a.G.insertFakeEncryptionInInit&&null==c&&e&&(yd()||wd())&&"mp4"==a.J[d].split(";")[0].split("/")[1]&&(b=xh(b));return b}
|
|
320
321
|
function Ti(a,b,c,d){return Gi(a,b,function(){b!==Kb&&(window.SourceBuffer&&SourceBuffer.prototype&&SourceBuffer.prototype.changeType&&(a.m[b]&&a.m[b].destroy(),d&&(a.m[b]=d),a.h[b].changeType(c+a.G.sourceBufferExtraFeatures),a.J[b]=c),yi(a,b))})}
|
|
321
|
-
function Ui(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w;return
|
|
322
|
-
|
|
323
|
-
function Oi(a,b,c,d){var e,f,g,h,k,l,m,n,p;return
|
|
324
|
-
var ui=window.URL.createObjectURL,xi="sequence";function
|
|
325
|
-
q.Bg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.
|
|
326
|
-
q.td=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.o)/1E3;a=r(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.
|
|
327
|
-
q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.S=function(){return Infinity==this.j&&!this.G};q.
|
|
328
|
-
q.jd=function(a){var b=Math.max(this.l,this.H);return Infinity==this.B?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
322
|
+
function Ui(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E;return H(function(F){switch(F.g){case 1:a.o=!0;c=a.l.currentTime;xa(F);a.D.Vb();d=[];for(e in a.m)d.push(a.m[e].destroy());for(f in a.j)for(g=a.j[f],h=g[0],a.j[f]=g.slice(0,1),h&&d.push(h.p.catch(Db)),k=r(g.slice(1)),l=k.next();!l.done;l=k.next())m=l.value,m.p.reject(new N(2,7,7003,void 0));for(n in a.h){p=a.h[n];try{a.i.removeSourceBuffer(p)}catch(G){}}return C(F,Promise.all(d),4);case 4:return a.m={},a.j={},a.h={},t=a.i.duration,a.I=new Xe,
|
|
323
|
+
a.i=si(a,a.I),C(F,a.I,5);case 5:a.i.duration=t;v=new Xe;w=a.i.sourceBuffers;y=b.size;x=0;a.D.s(w,"addsourcebuffer",function(){x++;x===y&&v.resolve()});A=r(b.keys());for(z=A.next();!z.done;z=A.next())B=z.value,E=b.get(B),vi(a,B,E);a.l.currentTime=c;return C(F,v,2);case 2:Aa(F),a.o=!1,Ba(F,0)}})}function Vi(a,b){return Qi(a,function(){return Ui(a,b)})}
|
|
324
|
+
function Oi(a,b,c,d){var e,f,g,h,k,l,m,n,p;return H(function(t){if(1==t.g){e=hd(id(a.J[b]))[0];f=a.J[b].split(";")[0];h=cd(c.mimeType,c.codecs);k=a.G.forceTransmux;if(!ec(h)||!a.B&&dd.includes(h))k=!0;l=ed(c.mimeType,c.codecs);k&&(m=Xc(l))&&(g=m(),h=g.convertCodecs(b,l));n=hd(id(h))[0];p=h.split(";")[0];if(e===n&&f===p)return t.return(!1);if(window.SourceBuffer&&SourceBuffer.prototype&&SourceBuffer.prototype.changeType)return C(t,Ti(a,b,h,g),3);g&&g.destroy();return C(t,Vi(a,d),3)}return t.return(!0)})}
|
|
325
|
+
var ui=window.URL.createObjectURL,xi="sequence";function Q(a,b,c){this.i=a;this.m=b;this.B=this.j=Infinity;this.g=1;this.h=this.l=null;this.o=0;this.G=!0;this.H=0;this.C=void 0===c?!0:c;this.I=0;this.D=!1}q=Q.prototype;q.getDuration=function(){return this.j};q.Dh=function(){return this.g};q.Kg=function(a){this.i=a};q.Ra=function(a){this.j=a};q.Hh=function(){return this.i};q.Gg=function(a){this.o=a};q.Jc=function(a){this.G=a};q.xe=function(a){this.B=a};q.Hg=function(a){this.m=a};q.sh=function(){return this.m};
|
|
326
|
+
q.Bg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.ie(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.D&&(this.i=(Date.now()+this.o)/1E3-this.h-this.g)}};
|
|
327
|
+
q.td=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.o)/1E3;a=r(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.ie(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.D&&(this.i=d-this.h-this.g)}};q.be=function(){this.D=!0};q.ie=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.mf=function(a){this.g=Math.max(this.g,a)};
|
|
328
|
+
q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.S=function(){return Infinity==this.j&&!this.G};q.hc=function(){return Infinity!=this.j&&!this.G};q.Eb=function(){return Math.max(this.H,this.cc()-this.B)};q.Mg=function(a){this.H=a};q.cc=function(){return this.S()||this.hc()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.i)+this.I,this.j):this.h?Math.min(this.h,this.j):this.j};
|
|
329
|
+
q.jd=function(a){var b=Math.max(this.l,this.H);return Infinity==this.B?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.cc()-this.B+a,this.Db()))};q.Ac=function(){return this.jd(0)};q.Db=function(){return Math.max(0,this.cc()-(this.S()||this.hc()?this.m:0))};q.Qg=function(){return null==this.i||null!=this.h&&this.C?!1:!0};q.Fg=function(a){this.I=a};K("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.Fg;Q.prototype.usingPresentationStartTime=Q.prototype.Qg;
|
|
330
|
+
Q.prototype.getSeekRangeEnd=Q.prototype.Db;Q.prototype.getSeekRangeStart=Q.prototype.Ac;Q.prototype.getSafeSeekRangeStart=Q.prototype.jd;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.cc;Q.prototype.setUserSeekStart=Q.prototype.Mg;Q.prototype.getSegmentAvailabilityStart=Q.prototype.Eb;Q.prototype.isInProgress=Q.prototype.hc;Q.prototype.isLive=Q.prototype.S;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.mf;Q.prototype.notifyMinSegmentStartTime=Q.prototype.ie;
|
|
331
|
+
Q.prototype.lockStartTime=Q.prototype.be;Q.prototype.notifySegments=Q.prototype.td;Q.prototype.notifyTimeRange=Q.prototype.Bg;Q.prototype.getDelay=Q.prototype.sh;Q.prototype.setDelay=Q.prototype.Hg;Q.prototype.setSegmentAvailabilityDuration=Q.prototype.xe;Q.prototype.setStatic=Q.prototype.Jc;Q.prototype.setClockOffset=Q.prototype.Gg;Q.prototype.getPresentationStartTime=Q.prototype.Hh;Q.prototype.setDuration=Q.prototype.Ra;Q.prototype.setPresentationStartTime=Q.prototype.Kg;
|
|
332
|
+
Q.prototype.getMaxSegmentDuration=Q.prototype.Dh;Q.prototype.getDuration=Q.prototype.getDuration;function Wi(a,b,c){this.l=c;this.j=a;this.B=Xi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.C=b;this.i=function(){}}Wi.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function Yi(a,b){a.i=b}function Zi(a){this.g=a}function Xi(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(Ih(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 $i(a,b,c,d,e){var f=this;this.C=e;this.g=a;this.D=b;this.B=c;this.l=new wf;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.o=!1;this.l.s(a,"waiting",function(){return aj(f)});this.m=(new O(function(){aj(f)})).ka(this.B.gapJumpTimerTime)}$i.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.D=this.C=null};$i.prototype.pf=function(){this.o=!0;aj(this)};
|
|
332
333
|
function aj(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.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Xi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.B!=d)b.m=f,b.g=e,b.B=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new M("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Jh(c,b,a.B.gapDetectionThreshold),null==
|
|
333
334
|
d||0==d&&!a.o||(e=c.start(d),e>=a.D.Db()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.C(new M("gapjumped")))))}}};function bj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=cj.value().get(b),c.xa(a,b,d))}var cj=new Bf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function dj(a,b,c,d){var e=this;this.g=a;this.m=b;this.B=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new wf;this.i=new ej(a);bj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){fj(e,e.j())})}dj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function gj(a){return a.o?a.g.currentTime:a.j()}
|
|
334
335
|
function hj(a,b){0<a.g.readyState?ij(a.i,b):bj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){fj(a,a.j())})}function fj(a,b){.001>Math.abs(a.g.currentTime-b)?jj(a):(a.h.xa(a.g,"seeking",function(){jj(a)}),ij(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function jj(a){a.o=!0;a.h.s(a.g,"seeking",function(){return a.m()});a.B(a.g.currentTime)}
|
|
335
|
-
function ej(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--)})}ej.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function ij(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function kj(a){this.g=a;this.j=!1;this.h=null;this.i=new wf}q=kj.prototype;q.
|
|
336
|
-
q.
|
|
336
|
+
function ej(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--)})}ej.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function ij(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function kj(a){this.g=a;this.j=!1;this.h=null;this.i=new wf}q=kj.prototype;q.Ne=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.xa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;bj(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.Oe=function(a){this.h=this.j?this.h:a};q.Kd=function(){return(this.j?this.g.currentTime:this.h)||0};q.Wf=function(){return 0};
|
|
337
|
+
q.Vf=function(){return 0};q.Ag=function(){};
|
|
337
338
|
function lj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.D=b.minBufferTime||0;this.l=c;this.C=e;this.B=null;this.o=mj(a,c,f);this.j=new $i(a,b.presentationTimeline,c,this.o,f);this.h=new dj(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=gj(g.h);h=nj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;hj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
|
|
338
|
-
g.g.Ac():g.g.Db():0>h&&(h=g.g.Db()+h);return oj(g,pj(g,h))});this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=gj(g.h),k=g.g.Ac(),l=g.g.Db();3>l-k&&(k=l-3);h<k&&(h=nj(g,h),g.i.currentTime=h)}})}q=lj.prototype;q.
|
|
339
|
-
q.Kd=function(){var a=gj(this.h);return 0<this.i.readyState&&!this.i.paused?pj(this,a):a};q.
|
|
339
|
+
g.g.Ac():g.g.Db():0>h&&(h=g.g.Db()+h);return oj(g,pj(g,h))});this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=gj(g.h),k=g.g.Ac(),l=g.g.Db();3>l-k&&(k=l-3);h<k&&(h=nj(g,h),g.i.currentTime=h)}})}q=lj.prototype;q.Ne=function(){this.m.ka(.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.C=function(){}};q.Oe=function(a){hj(this.h,a)};
|
|
340
|
+
q.Kd=function(){var a=gj(this.h);return 0<this.i.readyState&&!this.i.paused?pj(this,a):a};q.Wf=function(){return this.o?this.o.o:0};q.Vf=function(){return this.j.G};q.Ag=function(){this.j.pf()};function oj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
340
341
|
function nj(a,b){var c=Math.max(a.D,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Ac(),f=a.g.Db(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.jd(c),k=a.g.jd(d);c=a.g.jd(c+d);return b>=g?oj(a,b):b>f?f:b<e?Gh(a.i.buffered,k)?k:c:b>=h||Gh(a.i.buffered,b)?b:c}function pj(a,b){var c=a.g.Ac();if(b<c)return c;a=a.g.Db();return b>a?a:b}
|
|
341
342
|
function mj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Wi(new Zi(a),b.stallThreshold,c);Yi(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function qj(a){this.g=a;this.l=null;this.i=0;this.m=!1}q=qj.prototype;q.hd=function(){return this.g.length};q.release=function(){this.m||(this.g=[],this.l&&this.l.stop(),this.l=null)};q.ai=function(){this.m=!0};function rj(a,b){a=r(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};
|
|
342
|
-
q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.m)for(var b=r(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.
|
|
343
|
-
q.sd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.
|
|
344
|
-
q.
|
|
345
|
-
q.
|
|
346
|
-
qj.prototype
|
|
347
|
-
qj.prototype.getIteratorForTime=qj.prototype
|
|
343
|
+
q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.m)for(var b=r(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.fe=function(a){if(!this.m&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,u(a))}};
|
|
344
|
+
q.sd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.fe(a);this.ob(b)};q.ob=function(a){if(!this.m){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
|
|
345
|
+
q.wc=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new P(a.startTime,b,a.H,a.Sa,a.Aa,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.G,a.g,a.status,a.C),this.g[this.g.length-1].j=a.j)}};
|
|
346
|
+
q.Ae=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new O(function(){var d=b();d?c.g.push.apply(c.g,u(d)):(c.l.stop(),c.l=null)}),this.l.ka(a))};qj.prototype[Symbol.iterator]=function(){return this.ac(0)};
|
|
347
|
+
qj.prototype.ac=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.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.B;)e--,f=c.i[e];if(!f.B)return Wa("No independent partial segment found!"),null;b++;d=e-1;break}}return new sj(this,b,d)};function tj(a,b,c){return new qj([new P(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",qj);qj.forSingleSegment=tj;
|
|
348
|
+
qj.prototype.getIteratorForTime=qj.prototype.ac;qj.prototype.updateEvery=qj.prototype.Ae;qj.prototype.fit=qj.prototype.wc;qj.prototype.evict=qj.prototype.ob;qj.prototype.mergeAndEvict=qj.prototype.sd;qj.prototype.offset=qj.prototype.offset;qj.prototype.get=qj.prototype.get;qj.prototype.find=qj.prototype.find;qj.prototype.markImmutable=qj.prototype.ai;qj.prototype.release=qj.prototype.release;function sj(a,b,c){this.i=a;this.g=b;this.h=c}sj.prototype.fh=function(){return this.g};
|
|
348
349
|
sj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.Oa().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};sj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.Oa().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};K("shaka.media.SegmentIterator",sj);sj.prototype.next=sj.prototype.next;sj.prototype.current=sj.prototype.current;
|
|
349
350
|
sj.prototype.currentPosition=sj.prototype.fh;function uj(){qj.call(this,[]);this.h=[]}qa(uj,qj);q=uj.prototype;q.clone=function(){var a=new uj;a.h=this.h.slice();return a};q.release=function(){for(var a=r(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};q.find=function(a){for(var b=0,c=r(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.i+d.g.length}return null};
|
|
350
|
-
q.get=function(a){for(var b=0,c=r(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.i+d.g.length}return null};q.offset=function(){};q.
|
|
351
|
-
uj.prototype.offset=uj.prototype.offset;uj.prototype.get=uj.prototype.get;uj.prototype.find=uj.prototype.find;uj.prototype.release=uj.prototype.release;function vj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Xd();this.h=new O(function(){b.g.zg(.25*b.i)})}vj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};vj.prototype.set=function(a){this.i=a;wj(this)};vj.prototype.Td=function(){return this.g.Td()};function wj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Xd()!=b&&a.g.
|
|
352
|
-
zj.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.vd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.
|
|
353
|
-
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.
|
|
354
|
-
"regionremove",function(d){c.g.delete(d.region)})}qa(Ej,
|
|
355
|
-
function Gj(a,b,c,d){b=new M(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Hj=1,Fj=2,Ij=3;function Jj(a,b,c){this.j=a;this.h=b;this.i=0;this.l=c;this.g=new Map}function Kj(a,b){if(a.h.segmentIndex){var c=a.h.segmentIndex
|
|
356
|
-
function Oj(a,b){var c=a.g.get(b);a.g.delete(b);c&&c.abort()}function Lj(a){this.i=a;this.g=this.h=null}function Mj(a,b,c){a.g=a.i(b,c,function(d){return
|
|
351
|
+
q.get=function(a){for(var b=0,c=r(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.i+d.g.length}return null};q.offset=function(){};q.fe=function(){};q.ob=function(){};q.sd=function(){};q.wc=function(){};q.Ae=function(){};K("shaka.media.MetaSegmentIndex",uj);uj.prototype.updateEvery=uj.prototype.Ae;uj.prototype.fit=uj.prototype.wc;uj.prototype.mergeAndEvict=uj.prototype.sd;uj.prototype.evict=uj.prototype.ob;uj.prototype.merge=uj.prototype.fe;
|
|
352
|
+
uj.prototype.offset=uj.prototype.offset;uj.prototype.get=uj.prototype.get;uj.prototype.find=uj.prototype.find;uj.prototype.release=uj.prototype.release;function vj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Xd();this.h=new O(function(){b.g.zg(.25*b.i)})}vj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};vj.prototype.set=function(a){this.i=a;wj(this)};vj.prototype.Td=function(){return this.g.Td()};function wj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Xd()!=b&&a.g.Df(b);return}catch(c){}a.h.ka(.25);0!=a.g.Xd()&&a.g.Df(0)};function xj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){yj(b,!1)})).ka(.25)}xj.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 yj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function zj(a){gb.call(this);this.g=new Map;this.h=a}qa(zj,gb);zj.prototype.release=function(){this.g.clear();gb.prototype.release.call(this)};function Aj(a,b){var c=a.g.get(b);c||(c={vd:[],gg:null,contentType:b},a.g.set(b,c));return c}function Bj(a,b,c){var d=Aj(a,b.contentType);Cj(a,d);a={jf:b,position:c};d=d.vd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
353
|
+
zj.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.vd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.jf;break a}}d=null}if(e=d)e=c.gg,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);
|
|
354
|
+
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.gg=d,JSON.stringify(d),c=new M("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Cj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.vd;b.vd=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.vd=[]};function Dj(a){gb.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 M("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ka(2)}qa(Dj,gb);Dj.prototype.release=function(){this.g.clear();this.h.stop();gb.prototype.release.call(this)};function Ej(a,b){gb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{sc:null,rc:Fj,fc:function(d,e){return Gj(c,"enter",d,e)}},{sc:Hj,rc:Fj,fc:function(d,e){return Gj(c,"enter",d,e)}},{sc:Ij,rc:Fj,fc:function(d,e){return Gj(c,"enter",d,e)}},{sc:Fj,rc:Hj,fc:function(d,e){return Gj(c,"exit",d,e)}},{sc:Fj,rc:Ij,fc:function(d,e){return Gj(c,"exit",d,e)}},{sc:Hj,rc:Ij,fc:function(d,e){return Gj(c,"skip",d,e)}},{sc:Ij,rc:Hj,fc:function(d,e){return Gj(c,"skip",d,e)}}];this.h=new wf;this.h.s(this.i,
|
|
355
|
+
"regionremove",function(d){c.g.delete(d.region)})}qa(Ej,gb);Ej.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;gb.prototype.release.call(this)};Ej.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?Hj:a>d.endTime?Ij:Fj;this.g.set(d,f);for(var g=r(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.sc==e&&h.rc==f&&h.fc(d,b)}}};
|
|
356
|
+
function Gj(a,b,c,d){b=new M(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Hj=1,Fj=2,Ij=3;function Jj(a,b,c){this.j=a;this.h=b;this.i=0;this.l=c;this.g=new Map}function Kj(a,b){if(a.h.segmentIndex){var c=a.h.segmentIndex.ac(Math.max(b.startTime,a.i));if(c)for(;a.g.size<a.j&&null!=b;){var d=!0;b.m&&null!=b.Aa&&(d=!1);2==b.dc()&&(d=!1);d&&!a.g.has(b)&&(d=new Lj(a.l),Mj(d,b,a.h),a.g.set(b,d));a.i=b.startTime;b=c.next().value}}}function Nj(a){if(0!==a.g.size){for(var b=r(a.g.keys()),c=b.next();!c.done;c=b.next())(c=c.value)&&Oj(a,c);a.i=0}}function Pj(a,b){b&&b!==a.h&&(Nj(a),a.h=b)}
|
|
357
|
+
function Oj(a,b){var c=a.g.get(b);a.g.delete(b);c&&c.abort()}function Lj(a){this.i=a;this.g=this.h=null}function Mj(a,b,c){a.g=a.i(b,c,function(d){return H(function(e){return a.h?C(e,a.h(d),0):e.F(0)})})}Lj.prototype.abort=function(){this.g&&this.g.abort()};function Qj(a,b,c,d,e){a=nf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Rj(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.C=1;this.o=this.j=null;this.H=0;this.G=!1;this.h=new Map;this.D=!1;this.I=null;this.B=!1;this.l=new uf(function(){return Sj(c)})}q=Rj.prototype;q.destroy=function(){return this.l.destroy()};function Sj(a){var b,c,d,e;return H(function(f){if(1==f.g){b=[];c=r(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,Tj(e),b.push(Uj(e));return C(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;D(f)})}
|
|
357
358
|
q.configure=function(a){this.i=a;this.I=new Ue({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);for(var b=r(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=this.h.get(c.value),c.Qa){var d=c.Qa,e=a.segmentPrefetchLimit;d.j=e;for(var f=Array.from(d.g.keys());f.length>e;){var g=f.pop();g&&Oj(d,g)}0<a.segmentPrefetchLimit||
|
|
358
|
-
(c.Qa=null)}else 0<a.segmentPrefetchLimit&&(c.Qa=Vj(this,c.stream))};q.start=function(){var a=this;return
|
|
359
|
-
function Xj(a,b){var c,d,e,f,g,h,k;
|
|
360
|
-
function bk(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.
|
|
361
|
-
function ck(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Kb?g&&(g.
|
|
362
|
-
function gk(a,b){var c,d;return
|
|
359
|
+
(c.Qa=null)}else 0<a.segmentPrefetchLimit&&(c.Qa=Vj(this,c.stream))};q.start=function(){var a=this;return H(function(b){if(1==b.g)return C(b,Wj(a),2);vf(a.l);a.D=!0;D(b)})};
|
|
360
|
+
function Xj(a,b){var c,d,e,f,g,h,k;H(function(l){switch(l.g){case 1:return c=Lb,a.H++,d=a.H,wa(l,2),C(l,Mi(a.g.Y,c.oa),4);case 4:ya(l,3);break;case 2:if(e=za(l),a.g)a.g.onError(e);case 3:f=cd(b.mimeType,b.codecs),wi(a.g.Y,f,a.m.sequenceMode,b.external),g=a.g.Y.C,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.H==d&&(k=Yj(a,b),a.h.set(c.oa,k),Zj(a,k,0)),D(l)}})}function ak(a){var b=a.h.get(Kb);b&&(Tj(b),Uj(b).catch(function(){}),a.h.delete(Kb));a.o=null}
|
|
361
|
+
function bk(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.pc&&(ck(a,b,!1,0,!1),c.pc=d);else if(d=c.pc)c.pc=null,ck(a,d,!0,0,!1)}}function dk(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.j=b;a.D&&(b.video&&ck(a,b.video,c,d,e,f),b.audio&&ck(a,b.audio,c,d,e,f))}function ek(a,b){H(function(c){if(1==c.g)return a.o=b,a.D?b.segmentIndex?c.F(2):C(c,b.createSegmentIndex(),2):c.return();ck(a,b,!0,0,!1);D(c)})}
|
|
362
|
+
function ck(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Kb?g&&(g.pc&&(b.trickModeVideo?(g.pc=b,b=b.trickModeVideo):g.pc=null),g.stream!=b||e)&&(g.Qa&&Pj(g.Qa,b),b.type==Kb&&(e=cd(b.mimeType,b.codecs),wi(a.g.Y,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ia=null,g.Xf=!!f,c&&(g.bd?g.Be=!0:g.Ma?(g.Xb=!0,g.Qd=d,g.Be=!0):(Tj(g),fk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),gk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Xj(a,b)}
|
|
363
|
+
function gk(a,b){var c,d;return H(function(e){if(1==e.g){if(!b.Pa)return e.return();c=b.stream;d=b.Pa;return c.segmentIndex?e.F(2):C(e,c.createSegmentIndex(),2)}if(b.Pa!=d||b.stream!=c)return e.return();var f=a.g.Wd();var g=Ci(a.g.Y,b.type),h=b.stream.segmentIndex.find(b.Ka?b.Ka.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Aa?k.Aa-k.Sa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.Aa?k.Aa-k.Sa:null)||0),k=a.g.getBandwidthEstimate(),
|
|
363
364
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.Pa.h.g>h?!0:!1):f=!1;f&&b.Pa.abort();D(e)})}
|
|
364
365
|
q.yd=function(){if(this.g)for(var a=this.g.Wd(),b=r(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e=null;c.ia&&(e=c.ia.current());if(!e||e.startTime>a||e.endTime<a)c.ia=null;e=this.g.Y;e.o?e=!1:d==Kb?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Bi(e,d),e=Gh(e,a));e||((null!=Ci(this.g.Y,d)||c.Ma)&&hk(this,c),c.Pa&&(c.Pa.abort(),c.Pa=null),d===Kb&&(d=this.g.Y,d.H&&d.H.i()),c.yd=!0)}};
|
|
365
366
|
function hk(a,b){b.bd||b.Xb||(b.Ma?(b.Xb=!0,b.Qd=0):null==Ai(a.g.Y,b.type)?null==b.vb&&Zj(a,b,0):(Tj(b),fk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
366
|
-
function Wj(a){var b,c,d,e,f,g,h,k,l;return
|
|
367
|
-
0));D(m)})}function Yj(a,b){return{stream:b,type:b.type,ia:null,Qa:Vj(a,b),Ka:null,Ec:null,
|
|
368
|
-
function jk(a,b){var c,d,e,f,g;return
|
|
369
|
-
|
|
367
|
+
function Wj(a){var b,c,d,e,f,g,h,k,l;return H(function(m){if(1==m.g){b=Lb;if(!a.j)throw new N(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.Pb,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.Na,a.j.video),d.add(a.j.video));a.o&&(c.set(b.oa,a.o),d.add(a.o));e=a.g.Y;return C(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}vf(a.l);a.updateDuration();f=r(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.h.has(h)||(l=Yj(a,k),a.h.set(h,l),Zj(a,l,
|
|
368
|
+
0));D(m)})}function Yj(a,b){return{stream:b,type:b.type,ia:null,Qa:Vj(a,b),Ka:null,Ec:null,ef:null,cf:null,bf:null,pc:null,endOfStream:!1,Ma:!1,vb:null,Xb:!1,Qd:0,Be:!1,bd:!1,yd:!0,lf:!1,rf:!1,nd:!1,Pa:null}}function Vj(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.i.segmentPrefetchLimit?new Jj(a.i.segmentPrefetchLimit,b,function(c,d,e){return ik(a,c,d,e)}):null}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Y.Ra(a):this.g.Y.Ra(Math.pow(2,32))};
|
|
369
|
+
function jk(a,b){var c,d,e,f,g;return H(function(h){switch(h.g){case 1:vf(a.l);if(b.Ma||null==b.vb||b.bd)return h.return();b.vb=null;if(!b.Xb){h.F(2);break}return C(h,fk(a,b,b.Be,b.Qd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.F(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ma||b.vb||Zj(a,b,0),h.return();case 4:wa(h,6);d=kk(a,b);null!=d&&(Zj(a,b,d),b.nd=!1);ya(h,7);break;case 6:return e=
|
|
370
|
+
za(h),C(h,lk(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.h.values());if(!a.D||!f.every(function(k){return k.endOfStream})){h.F(0);break}return C(h,a.g.Y.endOfStream(),10);case 10:vf(a.l),g=a.g.Y.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ra(g),D(h)}})}
|
|
370
371
|
function kk(a,b){if(mk(b))return Ki(a.g.Y,b.stream.originalId||""),null;b.type==Kb&&Li(a.g.Y);var c=a.g.Wd(),d=b.Ka?b.Ka.endTime:c,e=Di(a.g.Y,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=Ci(a.g.Y,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(Kb))&&mk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=nk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;
|
|
371
372
|
f=Infinity;g=Array.from(a.h.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,mk(h)||h.ia&&!h.ia.current()||(f=Math.min(f,h.Ka?h.Ka.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.Qa&&b.ia&&Kj(b.Qa,e);ok(a,b,c,e).catch(function(){});return null}
|
|
372
|
-
function nk(a,b,c,d){if(b.ia)return b.ia.current();if(b.Ka||d)return c=b.Ka?b.Ka.endTime:d,b.
|
|
373
|
-
function ok(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,w,y,x,A;return
|
|
374
|
-
qk(n,B);E=!1;F=0;(new Pf).box("mdat",function(J){F=J.size+J.start;E=!0}).parse(n,!1,!0);if(!E)return
|
|
375
|
-
z.return()):C(z,rk(a,b,c,f,d,w),6);case 6:vf(a.l);if(a.B)return z.return();b.Ka=d;g.next();b.Ma=!1;b.
|
|
376
|
-
function tk(a,b,c){var d,e,f,g;return
|
|
377
|
-
function uk(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.
|
|
378
|
-
function pk(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w;return
|
|
379
|
-
a.j.audio),a.j.video&&x.set(d.Na,a.j.video),wa(B,2),b.
|
|
380
|
-
Uf).T("mdhd",function(
|
|
381
|
-
x,null,b.stream,E),6);case 6:
|
|
382
|
-
function rk(a,b,c,d,e,f){var g,h,k,l,m,n;return
|
|
373
|
+
function nk(a,b,c,d){if(b.ia)return b.ia.current();if(b.Ka||d)return c=b.Ka?b.Ka.endTime:d,b.lf=!0,b.ia=b.stream.segmentIndex.ac(c),b.ia&&b.ia.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ia=b.stream.segmentIndex.ac(d),e=b.ia&&b.ia.next().value);e||(b.ia=b.stream.segmentIndex.ac(c),e=b.ia&&b.ia.next().value);return e}
|
|
374
|
+
function ok(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,w,y,x,A;return H(function(z){switch(z.g){case 1:e=Lb;f=b.stream;g=b.ia;b.Ma=!0;wa(z,2);if(2==d.dc())throw new N(1,1,1011);return C(z,pk(a,b,d),4);case 4:vf(a.l);if(a.B)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.o))return n=new Uint8Array(0),t=p=!1,v=function(B){var E,F,G;return H(function(I){if(p)return I.return();t=!0;vf(a.l);if(a.B)return I.return();n=
|
|
375
|
+
qk(n,B);E=!1;F=0;(new Pf).box("mdat",function(J){F=J.size+J.start;E=!0}).parse(n,!1,!0);if(!E)return I.F(0);G=n.subarray(0,F);n=n.subarray(F);return C(I,rk(a,b,c,f,d,G),0)})},C(z,sk(a,b,d,v),11);l=sk(a,b,d);return C(z,l,7);case 7:m=z.h;vf(a.l);if(a.B)return z.return();if(!d.C){z.F(8);break}return C(z,tk(m,d,g),9);case 9:m=z.h;case 8:return vf(a.l),b.Xb?(b.Ma=!1,Zj(a,b,0),z.return()):C(z,rk(a,b,c,f,d,m),6);case 11:w=z.h;if(t){z.F(6);break}p=!0;vf(a.l);return a.B?z.return():b.Xb?(b.Ma=!1,Zj(a,b,0),
|
|
376
|
+
z.return()):C(z,rk(a,b,c,f,d,w),6);case 6:vf(a.l);if(a.B)return z.return();b.Ka=d;g.next();b.Ma=!1;b.rf=!1;y=a.g.Y.Cb();x=y[b.type];cb(JSON.stringify(x));b.Xb||a.g.pf(d.startTime,d.endTime,b.type);Zj(a,b,0);ya(z,0);break;case 2:A=za(z);vf(a.l,A);if(a.B)return z.return();b.Ma=!1;if(7001==A.code)b.Ma=!1,Tj(b),Zj(a,b,0),z.F(0);else if(b.type==e.oa&&a.i.ignoreTextStreamFailures)a.h.delete(e.oa),z.F(0);else if(3017==A.code)uk(a,b,A),z.F(0);else return b.nd=!0,A.severity=2,C(z,lk(a,b,A),0)}})}
|
|
377
|
+
function tk(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g)return d=b.C,d.cryptoKey?h.F(2):C(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=mc(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 qk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
378
|
+
function uk(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.rf})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.nd=!0;a.B=!0;a.g.onError(c);return}b.rf=!0}Zj(a,b,4)}
|
|
379
|
+
function pk(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w;return H(function(y){d=Lb;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=hd(b.stream.codecs)[0];k=b.stream.mimeType.split(";")[0];l=c.timestampOffset;if(l!=b.ef||f!=b.cf||g!=b.bf||h!=b.ae||k!=b.df){if(b.ae&&h!=b.ae||b.df&&k!=b.df)if(b.type===d.Na){if(m=a.h.get(d.Pb))m.Ec=null,Uj(m)}else b.type===d.Pb&&(n=a.h.get(d.Na))&&(n.Ec=null,Uj(n));p=function(){var x,A,z;return H(function(B){if(1==B.g)return x=new Map,a.j.audio&&x.set(d.Pb,
|
|
380
|
+
a.j.audio),a.j.video&&x.set(d.Na,a.j.video),wa(B,2),b.cf=f,b.bf=g,b.ae=h,b.df=k,b.ef=l,A=a.m.sequenceMode||"HLS"==a.m.type,C(B,Ni(a.g.Y,b.type,l,f,g,A,b.stream,x),4);if(2!=B.g)return ya(B,0);z=za(B);b.cf=null;b.bf=null;b.ae=null;b.ef=null;throw z;})};e.push(p())}!Ch(c.h,b.Ec)&&(b.Ec=c.h)&&(t=sk(a,b,c.h,void 0,!0),v=function(){var x,A,z,B,E,F;return H(function(G){switch(G.g){case 1:return wa(G,2),C(G,t,4);case 4:return x=G.h,vf(a.l),A=null,z=new Map,B=new Pf,B.box("moov",Uf).box("trak",Uf).box("mdia",
|
|
381
|
+
Uf).T("mdhd",function(I){A=Th(I.reader,I.version).timescale}).box("hdlr",function(I){I=I.reader;I.skip(8);I=I.Jb(4);var J=String.fromCharCode(I[0]);J+=String.fromCharCode(I[1]);J+=String.fromCharCode(I[2]);J+=String.fromCharCode(I[3]);switch(J){case "soun":z.set(d.Pb,A);break;case "vide":z.set(d.Na,A)}A=null}).parse(x),z.has(b.type)?c.h.timescale=z.get(b.type):null!=A&&(c.h.timescale=A),E=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(G,a.g.Zf(b.type,x),5);case 5:return C(G,Fi(a.g.Y,b.type,
|
|
382
|
+
x,null,b.stream,E),6);case 6:ya(G,0);break;case 2:throw F=za(G),b.Ec=null,F;}})},a.g.di(c.startTime,c.h),e.push(v()));w=b.Ka?b.Ka.j:null;if(a.m.sequenceMode){if(c.j!=w||b.lf)b.lf=!1,e.push(Pi(a.g.Y,b.type,c.startTime))}else a.m.ignoreManifestTimestampsInSegmentsMode&&c.j!=w&&e.push(Pi(a.g.Y,b.type,c.timestampOffset));return C(y,Promise.all(e),0)})}
|
|
383
|
+
function rk(a,b,c,d,e,f){var g,h,k,l,m,n;return H(function(p){switch(p.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;l=a.i.parsePrftBox&&!a.G;if(k||l)h=new Pf;k&&h.T("emsg",function(t){var v=d.emsgSchemeIdUris;if(0===t.version){var w=t.reader.wd();var y=t.reader.wd();var x=t.reader.O();var A=t.reader.O();var z=t.reader.O();var B=t.reader.O();var E=e.startTime+A/x}else x=t.reader.O(),E=t.reader.Ic()/x+e.timestampOffset,
|
|
383
384
|
A=E-e.startTime,z=t.reader.O(),B=t.reader.O(),w=t.reader.wd(),y=t.reader.wd();t=t.reader.Jb(t.reader.getLength()-t.reader.sa());if(v&&v.includes(w)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.ei():(v=(new Map).set("detail",{startTime:E,endTime:E+z/x,schemeIdUri:w,value:y,timescale:x,presentationTimeDelta:A,eventDuration:z,id:B,messageData:t}),v=new M("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
384
385
|
w||(w=Ph(t),w.length&&e&&a.g.gi([{cueTime:e.startTime,data:t,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});l&&h.T("prft",function(t){if(!a.G&&e.h.timescale){var v=t.reader,w=t.version;v.O();t=v.O();var y=v.O();t=1E3*t+y/Math.pow(2,32)*1E3;0===w?v=v.O():(w=v.O(),v=v.O(),v=w*Math.pow(2,32)+v);t=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+t)).getTime();v=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-v/e.h.timescale*1E3)});v=new M("prft",v);a.g.onEvent(v);
|
|
385
|
-
a.G=!0}});(k||l)&&h.parse(f);return C(p,vk(a,b,c),2);case 2:return vf(a.l),m=b.yd,b.yd=!1,n=b.
|
|
386
|
-
function mk(a){return a&&a.type==Kb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}function sk(a,b,c,d,e){var f,g,h;return
|
|
387
|
-
function ik(a,b,c,d,e){e=e?0:1;var f=b instanceof P?b:void 0;b=Qj(b.Oa(),b.Sa,b.Aa,a.i.retryParameters,d);return a.g.
|
|
388
|
-
function fk(a,b,c,d){var e,f;return
|
|
389
|
-
function Zj(a,b,c){var d=b.type;if(d!=Kb||a.h.has(d))b.vb=(new rd(function(){var e;return
|
|
390
|
-
function lk(a,b,c){var d;return
|
|
391
|
-
function Bk(a,b){var c={Gc:function(){},
|
|
392
|
-
function yk(a){return
|
|
393
|
-
function Ck(a){var b,c;return
|
|
386
|
+
a.G=!0}});(k||l)&&h.parse(f);return C(p,vk(a,b,c),2);case 2:return vf(a.l),m=b.yd,b.yd=!1,n=b.Xf,b.Xf=!1,C(p,a.g.Zf(b.type,f),3);case 3:return C(p,Fi(a.g.Y,b.type,f,e,d,g,m,n),4);case 4:vf(a.l),D(p)}})}function vk(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Ai(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():C(h,a.g.Y.remove(b.type,e,e+g),2)}vf(a.l);D(h)})}
|
|
387
|
+
function mk(a){return a&&a.type==Kb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}function sk(a,b,c,d,e){var f,g,h;return H(function(k){if(1==k.g){if(c instanceof Bh&&(f=c.g))return k.return(f);g=null;if(b.Qa&&c instanceof P){var l=b.Qa;if(l.g.has(c)){var m=l.g.get(c);d&&(m.h=d);l.g.delete(c);g=m.g}else g=null}g||(g=ik(a,c,b.stream,d,e));b.Pa=g;return C(k,g.promise,2)}h=k.h;b.Pa=null;return k.return(h.data)})}
|
|
388
|
+
function ik(a,b,c,d,e){e=e?0:1;var f=b instanceof P?b:void 0;b=Qj(b.Oa(),b.Sa,b.Aa,a.i.retryParameters,d);return a.g.lc.request(tf,b,{type:e,stream:c,segment:f})}
|
|
389
|
+
function fk(a,b,c,d){var e,f;return H(function(g){if(1==g.g)return b.Xb=!1,b.Be=!1,b.Qd=0,b.bd=!0,b.Ka=null,b.Ec=null,b.ia=null,b.Qa&&Nj(b.Qa),d?(e=a.g.Wd(),f=a.g.Y.getDuration(),C(g,a.g.Y.remove(b.type,e+d,f),3)):C(g,Mi(a.g.Y,b.type),4);if(3!=g.g)return vf(a.l),c?C(g,a.g.Y.flush(b.type),3):g.F(3);vf(a.l);b.bd=!1;b.endOfStream=!1;b.Ma||b.vb||Zj(a,b,0);D(g)})}
|
|
390
|
+
function Zj(a,b,c){var d=b.type;if(d!=Kb||a.h.has(d))b.vb=(new rd(function(){var e;return H(function(f){if(1==f.g)return wa(f,2),C(f,jk(a,b),4);if(2!=f.g)return ya(f,0);e=za(f);if(a.g)a.g.onError(e);D(f)})})).R(c)}function Tj(a){null!=a.vb&&(a.vb.stop(),a.vb=null)}function Uj(a){return H(function(b){return a.Pa?C(b,a.Pa.abort(),0):b.F(0)})}
|
|
391
|
+
function lk(a,b,c){var d;return H(function(e){if(1==e.g)return C(e,We(a.I),2);vf(a.l);d=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Re(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.i.failureCallback(c);D(e)})};function wk(a,b){var c=xk(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return yk(d)});this.B=new uf(function(){return zk(d)})}wk.prototype.destroy=function(){return this.B.destroy()};function zk(a){var b,c,d;return H(function(e){if(1==e.g)return a.h&&a.h.abort(),Ak(a),C(e,a.C,2);a.g&&a.g.sb.nc();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.sb.nc();a.g=null;a.m=[];a.j=null;D(e)})}
|
|
392
|
+
function Bk(a,b){var c={Gc:function(){},le:function(){},nc:function(){},onError:function(){},oe:function(){},gk:function(){}};a.m.push({create:b,sb:c});a.h&&a.h.abort();Ak(a);return c}
|
|
393
|
+
function yk(a){return H(function(b){if(a.B.g)b=b.F(0);else{if(0==a.m.length||a.g&&!a.g.ec)var c=!1;else{a.g&&(a.g.sb.nc(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.sb.Gc(),a.g={node:d.node,$:d.$,ec:d.ec,sb:c.sb}):c.sb.oe();c=!0}c?c=Promise.resolve():a.g?c=Ck(a):(a.j.ci(a.i),a.o=new Xe,c=a.o);b=C(b,c,1)}return b})}
|
|
394
|
+
function Ck(a){var b,c;return H(function(d){switch(d.g){case 1:return a.i=a.j.Fh(a.i,a.l,a.g.node,a.g.$),wa(d,2),a.h=a.j.ih(a.i,a.l,a.g.$),C(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.sb.le(),a.g=null);ya(d,0);break;case 2:b=za(d);if(7001==b.code)a.g.sb.nc();else a.g.sb.onError(b);a.g=null;a.h=null;c=a;return C(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,D(d)}})}function Ak(a){a.o&&(a.o.resolve(),a.o=null)};function Dk(a){if(a.H)return"\n";if(a.g.length)return a.g.map(Dk).join("");var b=[],c=700<=a.C,d="italic"==a.o,e=a.h.includes("underline");c&&b.push(["b"]);d&&b.push(["i"]);e&&b.push(["u"]);c="";(d=Ek(a.j))&&(c+="."+d);(d=Ek(a.backgroundColor))&&(c+=".bg_"+d);c&&b.push(["c",c]);return b.reduceRight(function(f,g){var h=r(g);g=h.next().value;h=h.next().value;return"<"+g+(void 0===h?"":h)+">"+f+"</"+g+">"},a.$)}
|
|
394
395
|
function Ek(a){switch(a.toLowerCase()){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}
|
|
395
|
-
function Fk(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.Z)Fk(c.g,b);else{var d=c.clone();d.g=[];d.$=Dk(c);b.push(d)}return b};function Gk(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")
|
|
396
|
-
q.append=function(a){var b=Fk(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=r(b);for(var e=b.next();!e.done;d={
|
|
396
|
+
function Fk(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.Z)Fk(c.g,b);else{var d=c.clone();d.g=[];d.$=Dk(c);b.push(d)}return b};function Gk(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=Gk.prototype;q.remove=function(a,b){if(!this.g)return!1;Hk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
397
|
+
q.append=function(a){var b=Fk(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=r(b);for(var e=b.next();!e.done;d={tc:d.tc},e=b.next())d.tc=e.value,a.some(function(f){return function(g){return g.startTime==f.tc.startTime&&g.endTime==f.tc.endTime&&g.text==f.tc.$?!0:!1}}(d))||(e=Ik(d.tc))&&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)-
|
|
397
398
|
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&&(Hk(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"};
|
|
398
399
|
function Ik(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.$);b.lineAlign=a.B;b.positionAlign=a.I;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.J&&(b.snapToLines=!1);null!=a.m&&(b.line=a.m);null!=a.position&&(b.position=a.position);return b}
|
|
399
|
-
function Hk(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}K("shaka.text.SimpleTextDisplayer",Gk);Gk.prototype.setTextVisibility=Gk.prototype.setTextVisibility;Gk.prototype.isTextVisible=Gk.prototype.isTextVisible;Gk.prototype.destroy=Gk.prototype.destroy;Gk.prototype.append=Gk.prototype.append;Gk.prototype.remove=Gk.prototype.remove;function Jk(){}function
|
|
400
|
+
function Hk(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}K("shaka.text.SimpleTextDisplayer",Gk);Gk.prototype.setTextVisibility=Gk.prototype.setTextVisibility;Gk.prototype.isTextVisible=Gk.prototype.isTextVisible;Gk.prototype.destroy=Gk.prototype.destroy;Gk.prototype.append=Gk.prototype.append;Gk.prototype.remove=Gk.prototype.remove;function Jk(){}function R(a){return document.createElement(a)}function Kk(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Lk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}K("shaka.util.Dom",Jk);Jk.removeAllChildren=Lk;function Mk(a,b){var c=this;this.j=!1;this.i=[];this.D=a;this.m=b;this.g=R("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.C=(new O(function(){Nk(c)})).ka(.25);this.h=new Map;this.B=new wf;this.B.s(document,"fullscreenchange",function(){Nk(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){Nk(c,
|
|
400
401
|
!0)}),this.l.observe(this.g));this.o=new Map}q=Mk.prototype;q.append=function(a){var b=[].concat(u(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Ed:c.Ed},d=a.next())c.Ed=d.value,b.some(function(e){return function(f){return Kc(f,e.Ed)}}(c))||this.i.push(c.Ed);Nk(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.B&&(this.B.release(),this.B=null);this.l&&(this.l.disconnect(),this.l=null)};
|
|
401
402
|
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});Nk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};function Ok(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
402
|
-
function Pk(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,n=l?l.Rg:null;l&&(g.push(l.
|
|
403
|
-
p.startTime-t.startTime:p.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.xd?(c.appendChild(d.xd),d.xd.appendChild(d.
|
|
404
|
-
function Qk(a,b,c){var d=1<c.length,e=d?"span":"div";b.H&&(e="br");d=!d&&0<b.g.length;var f=
|
|
405
|
-
c.h+l;g.style.left=c.g+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.i?"flex-start":"center"==b.i?"center":"flex-end";a.o.set(e,g);c=g}e=f;d&&(e=
|
|
403
|
+
function Pk(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,n=l?l.Rg:null;l&&(g.push(l.Qe),l.xd&&g.push(l.xd),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Ok(a,n)||(f=!0):(Qk(a,k,e),l=a.h.get(k),n=l.Rg,f=!0));0<k.g.length&&n&&Pk(a,k.g,n,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(p,t){return p.startTime!=t.startTime?
|
|
404
|
+
p.startTime-t.startTime:p.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.xd?(c.appendChild(d.xd),d.xd.appendChild(d.Qe)):c.appendChild(d.Qe)}}function Nk(a,b){if(a.g){var c=a.D.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.o.values());for(var d=b.next();!d.done;d=b.next())Lk(d.value);Lk(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));Pk(a,a.i,a.g,c,[])}}}
|
|
405
|
+
function Qk(a,b,c){var d=1<c.length,e=d?"span":"div";b.H&&(e="br");d=!d&&0<b.g.length;var f=R(e);"br"!=e&&Rk(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.i==Sc?"%":"px")+"-"+c.g+"x"+c.h+(c.j==Sc?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=R("span"),h=c.i==Sc?"%":"px",k=c.l==Sc?"%":"px",l=c.j==Sc?"%":"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=
|
|
406
|
+
c.h+l;g.style.left=c.g+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.i?"flex-start":"center"==b.i?"center":"flex-end";a.o.set(e,g);c=g}e=f;d&&(e=R("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{Qe:f,Rg:e,xd:c})}
|
|
406
407
|
function Rk(a,b,c,d,e){var f=b.style,g=0==c.g.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.$.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.L;f.webkitTextStrokeWidth=c.ba;f.color=c.j;f.direction=c.direction;f.opacity=c.G;f.paddingLeft=Sk(c.ea,c,a.m);f.paddingRight=Sk(c.ea,c,a.m);f.textShadow=c.K;if(c.P)f.backgroundImage="url('"+c.P+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";
|
|
407
|
-
else{if(c.g.length)var l=b;else l=
|
|
408
|
+
else{if(c.g.length)var l=b;else l=R("span"),b.appendChild(l);c.U&&(l.style.border=c.U);e||((b=Tk(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].Z?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.i?"flex-start":"center"==c.i?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.l;f.fontWeight=c.C.toString();f.fontStyle=c.o;f.letterSpacing=
|
|
408
409
|
c.W;f.fontSize=Sk(c.D,c,a.m);null!=c.m&&1==c.J&&(f.position="absolute",c.writingMode==Ec?(f.width="100%",c.B==Gc?f.top=c.m+"%":"end"==c.B&&(f.bottom=100-c.m+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.B==Gc?f.left=c.m+"%":"end"==c.B&&(f.right=100-c.m+"%")):(f.height="100%",c.B==Gc?f.right=c.m+"%":"end"==c.B&&(f.left=100-c.m+"%")));f.lineHeight=c.aa;null!=c.position&&(c.writingMode==Ec?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.I?f.cssFloat="left":"line-right"==c.I&&
|
|
409
410
|
(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.h.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Ec?f.width=c.size+"%":f.height=c.size+"%")}
|
|
410
411
|
function Sk(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.X.rows+"px";case "c":return c.clientHeight*e/b.X.rows+"px";default:return a}}function Tk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}K("shaka.text.UITextDisplayer",Mk);Mk.prototype.setTextVisibility=Mk.prototype.setTextVisibility;Mk.prototype.isTextVisible=Mk.prototype.isTextVisible;
|
|
@@ -415,157 +416,157 @@ function el(a){if(0===a.type)return fl;if(a=a.stream){var b=a.type;if("video"==b
|
|
|
415
416
|
function kl(a,b){var c=a.h.pb();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 cl:return a.videoBandwidth||NaN;case gl:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
416
417
|
function $k(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},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"===
|
|
417
418
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function dl(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=$k(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
418
|
-
function al(a,b){if(!b||a.includes("offline:"))return a;a=new
|
|
419
|
+
function al(a,b){if(!b||a.includes("offline:"))return a;a=new mb(a);a.g.set("CMCD",b);return a.toString()}var Zk="m",gl="a",cl="v",Yk="av",fl="i",il="c",hl="tt";K("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Jj:"s",OTHER:"o"});function ll(){}
|
|
419
420
|
function ml(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]=ef(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=ef(l)),k=ml(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?(Wa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Xa("Unexpected number of arguments for "+k),a[h]=b[h]):(Wa("Invalid config, unrecognized key "+
|
|
420
|
-
k),g=!1)}return g}function nl(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 ol(a,b){return a&&b}K("shaka.util.ConfigUtils",ll);ll.convertToConfigObject=nl;ll.mergeConfigObjects=ml;function pl(){}function ql(a){a=Jf(a);return(new
|
|
421
|
+
k),g=!1)}return g}function nl(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 ol(a,b){return a&&b}K("shaka.util.ConfigUtils",ll);ll.convertToConfigObject=nl;ll.mergeConfigObjects=ml;function pl(){}function ql(a){a=Jf(a);return(new mb(a)).mb}function rl(a,b,c){function d(h){pc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(mc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Lf(b,!0):e=b;a=Jf(a);a=Lf(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function sl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Jf(a).split("skd://").pop();return rl(a,c,b)}
|
|
421
422
|
function tl(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}K("shaka.util.FairPlayUtils",pl);pl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Gf(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=nc(bg(c)))}};pl.expressplayFairPlayRequest=function(a,b){tl(a,b)};
|
|
422
423
|
pl.conaxFairPlayRequest=function(a,b){tl(a,b)};pl.ezdrmFairPlayRequest=function(a,b){tl(a,b)};pl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=mc(b.body),a=ag(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Kf("spc="+a))};pl.expressplayInitDataTransform=function(a,b,c){return sl(a,b,c)};
|
|
423
424
|
pl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Jf(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 rl(a,d,b)};pl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Jf(a).split(";").pop();return rl(a,c,b)};pl.verimatrixInitDataTransform=function(a,b,c){return sl(a,b,c)};pl.initDataTransform=rl;
|
|
424
|
-
pl.defaultGetContentId=ql;pl.isFairPlaySupported=function(){var a;return
|
|
425
|
+
pl.defaultGetContentId=ql;pl.isFairPlaySupported=function(){var a;return H(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},wa(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);za(b);return b.return(!1)})};function ul(){}
|
|
425
426
|
function vl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ve(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=ql(g),g=rl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:wd(),minHdcpVersion:""},
|
|
426
427
|
c={retryParameters:Ve(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!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",
|
|
427
428
|
"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","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 ol([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",
|
|
428
429
|
defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:xd("Tizen 3")||xd("Tizen 2")||zd()||Bd()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1},mss:{manifestPreprocessor:function(g){return ol([g],g)},sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},
|
|
429
430
|
d={retryParameters:Ve(),failureCallback:function(g){return ol([g])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff: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,
|
|
430
|
-
maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1};if(xd("Web0S")||yd()||xd("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return
|
|
431
|
+
maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1};if(xd("Web0S")||yd()||xd("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return H(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return H(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?C(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 ol([g,
|
|
431
432
|
h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,mediaSource:{sourceBufferExtraFeatures:"",forceTransmux:!1,insertFakeEncryptionInInit:!0},offline:e,abrFactory:function(){return new xe},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,
|
|
432
433
|
minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],
|
|
433
|
-
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,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};e.trackSelectionCallback=function(g){return
|
|
434
|
+
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,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};e.trackSelectionCallback=function(g){return H(function(h){return h.return(wl(g,
|
|
434
435
|
f.preferredAudioLanguage))})};return f}function xl(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 ml(a,b,c||vl(),d,"")}
|
|
435
436
|
function wl(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=Wb(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return Ob(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/
|
|
436
437
|
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!=Kb&&"image"!=d.type||b.push(d);return b}K("shaka.util.PlayerConfiguration",ul);ul.mergeConfigObjects=xl;ul.createDefault=vl;function yl(){this.g=null;this.h=[]}function zl(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 Al(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}
|
|
437
|
-
function Bl(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 Cl(){this.i=this.h=null;this.g=[]}function Dl(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 El(){this.C=this.D=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.N=this.P=this.J=this.K=this.L=this.l=this.o=NaN;this.g=new yl;this.h=new Cl};function
|
|
438
|
-
this.eb=this.g.preferredTextLanguage;this.ld=this.g.preferredTextRole;this.ed=this.g.preferForcedSubs;this.Qb=[];this.rd=null;b&&b(this);this.U=Hl(this);this.H=Il(this);this.H.
|
|
439
|
-
{name:"src-equals-drm-engine"};this.hb={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return bf(Ll(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.yb.Vb(),e.mediaElement=null);c.G&&c.G.release();c.h=null;e=Promise.resolve();return bf(e)});d.set(this.aa,function(e){return bf(Ml(c,e))});d.set(this.fb,function(e){e=Nl(c,e);return bf(e)});d.set(this.
|
|
440
|
-
d.set(this.X,function(e,f){return bf(Rl(c,e,f))});d.set(this.
|
|
441
|
-
g,f,h));e==c.
|
|
442
|
-
a&&this.$c(a,!0)}qa(
|
|
443
|
-
q.destroy=function(){var a=this,b;return
|
|
444
|
-
if(!a.H){c.F(4);break}return C(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.B&&(a.B.release(),a.B=null),
|
|
438
|
+
function Bl(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 Cl(){this.i=this.h=null;this.g=[]}function Dl(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 El(){this.C=this.D=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.N=this.P=this.J=this.K=this.L=this.l=this.o=NaN;this.g=new yl;this.h=new Cl};function S(a,b){gb.call(this);var c=this;this.l=Fl;this.ce=this.h=null;this.Z=!1;this.re=new wf;this.yb=new wf;this.o=new wf;this.wb=this.i=this.ue=this.K=this.j=this.ba=this.L=this.Uf=this.U=this.ya=this.N=this.ge=this.J=this.gb=this.D=this.I=this.m=this.H=null;this.od=!1;this.Lf=this.B=null;this.Tf=1E9;this.g=Gl(this);this.Sf={width:Infinity,height:Infinity};this.C=null;this.Fa=new Le(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel);
|
|
439
|
+
this.eb=this.g.preferredTextLanguage;this.ld=this.g.preferredTextRole;this.ed=this.g.preferForcedSubs;this.Qb=[];this.rd=null;b&&b(this);this.U=Hl(this);this.H=Il(this);this.H.Bf(this.g.streaming.forceHTTPS);this.G=null;Jl&&(this.G=Jl());this.re.s(window,"online",function(){Kl(c);c.tf()});this.P={name:"detach"};this.W={name:"attach"};this.aa={name:"unload"};this.Le={name:"manifest-parser"};this.Rf={name:"manifest"};this.fb={name:"media-source"};this.Pf={name:"drm-engine"};this.X={name:"load"};this.Me=
|
|
440
|
+
{name:"src-equals-drm-engine"};this.hb={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return bf(Ll(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.yb.Vb(),e.mediaElement=null);c.G&&c.G.release();c.h=null;e=Promise.resolve();return bf(e)});d.set(this.aa,function(e){return bf(Ml(c,e))});d.set(this.fb,function(e){e=Nl(c,e);return bf(e)});d.set(this.Le,function(e,f){e=Ol(c,e,f);return bf(e)});d.set(this.Rf,function(e){return Pl(c,e)});d.set(this.Pf,function(e){e=Ql(c,e);return bf(e)});
|
|
441
|
+
d.set(this.X,function(e,f){return bf(Rl(c,e,f))});d.set(this.Me,function(e,f){e=Sl(c,e,f);return bf(e)});d.set(this.hb,function(e,f){return Tl(c,e,f)});this.za=new wk(this.P,{Fh:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.W);e==c.W&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.W?c.W:g==c.fb||g==c.X?c.fb:g==c.hb?c.Me:null);e==c.fb&&(k=g==c.X&&f.mediaElement==h.mediaElement?c.Le:c.aa);e==c.Le&&(k=Ul(c.X,c.Rf,c.aa,g,f,h));e==c.Rf&&(k=Ul(c.X,c.Pf,c.aa,g,f,h));e==c.Pf&&(k=Ul(c.X,c.X,c.aa,
|
|
442
|
+
g,f,h));e==c.Me&&(k=g==c.hb&&f.mediaElement==h.mediaElement?c.hb:c.aa);if(e==c.X||e==c.hb)k=c.aa;e==c.aa&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.W:c.P);return k},ih:function(e,f,g){c.dispatchEvent(Vl("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return H(function(f){return 1==f.g?C(f,Ml(c,e),2):f.return(e.mediaElement?c.W:c.P)})},ci:function(e){c.dispatchEvent(Vl("onstateidle",(new Map).set("state",e.name)))}});this.ke=new O(function(){return Wl(c)});
|
|
443
|
+
a&&this.$c(a,!0)}qa(S,gb);function Xl(a){null!=a.L&&(a.L.release(),a.L=null)}function Yl(a,b){if(b.lcevc.enabled){var c=a.pb();c&&c[0]&&c[0].videoMimeType==Zl.ts&&(vd()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Xa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Xl(a);null==a.L&&(a.L=new mi(a.h,a.Uf,b.lcevc),a.I&&(a.I.L=a.L))}else Xl(a)}function Vl(a,b){return new M(a,b)}q=S.prototype;
|
|
444
|
+
q.destroy=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(a.l==$l)return c.return();Xl(a);a.l=$l;b=Bk(a.za,function(){return{node:a.P,$:xk(),ec:!1}});return C(c,new Promise(function(d){b.Gc=function(){};b.le=function(){d()};b.nc=function(){d()};b.onError=function(){d()};b.oe=function(){d()}}),2);case 2:return C(c,a.za.destroy(),3);case 3:a.re&&(a.re.release(),a.re=null);a.yb&&(a.yb.release(),a.yb=null);a.o&&(a.o.release(),a.o=null);a.Lf=null;a.g=null;a.C=null;a.ce=null;a.U=null;
|
|
445
|
+
if(!a.H){c.F(4);break}return C(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.B&&(a.B.release(),a.B=null),gb.prototype.release.call(a),D(c)}})};
|
|
445
446
|
function am(){window.Promise||Xa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||xd("Trident/"))return!1;var a=Cd();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:sd()?!0:td("application/x-mpegurl")}
|
|
446
|
-
q.$c=function(a,b){b=void 0===b?!0:b;if(this.l==$l)return Promise.reject(bm());var c=xk();c.mediaElement=a;sd()||(b=!1);var d=b?this.fb:this.W;a=Bk(this.za,function(){return{node:d,$:c,
|
|
447
|
-
q.
|
|
448
|
-
q.load=function(a,b,c){var d=this;this.rd=null;this.od=!1;if(this.l==$l)return Promise.reject(bm());this.dispatchEvent(Vl("loading"));var e=xk();e.uri=a;e.
|
|
449
|
-
g.
|
|
447
|
+
q.$c=function(a,b){b=void 0===b?!0:b;if(this.l==$l)return Promise.reject(bm());var c=xk();c.mediaElement=a;sd()||(b=!1);var d=b?this.fb:this.W;a=Bk(this.za,function(){return{node:d,$:c,ec:!1}});a.Gc=function(){};return cm(a)};q.Yf=function(a){this.Uf=a};q.detach=function(){var a=this;if(this.l==$l)return Promise.reject(bm());var b=Bk(this.za,function(){return{node:a.P,$:xk(),ec:!1}});b.Gc=function(){};return cm(b)};
|
|
448
|
+
q.Mf=function(a){var b=this;a=void 0===a?!0:a;if(this.l==$l)return Promise.reject(bm());this.od=!1;sd()||(a=!1);Xl(this);var c=xk(),d=Bk(this.za,function(e){var f=e.mediaElement&&a?b.fb:e.mediaElement?b.W:b.P;c.mediaElement=e.mediaElement;return{node:f,$:c,ec:!1}});d.Gc=function(){};return cm(d)};q.Hi=function(a){this.rd=a};
|
|
449
|
+
q.load=function(a,b,c){var d=this;this.rd=null;this.od=!1;if(this.l==$l)return Promise.reject(bm());this.dispatchEvent(Vl("loading"));var e=xk();e.uri=a;e.ye=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=dm(this,e)?this.hb:this.X,g=Bk(this.za,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,$:e,ec:!0}});this.C=new El;g.Gc=function(){};return new Promise(function(h,k){g.oe=function(){return k(new N(2,7,7002))};g.le=function(){h();d.dispatchEvent(Vl("loaded"))};
|
|
450
|
+
g.nc=function(){return k(bm())};g.onError=function(l){return k(l)}})};function dm(a,b){if(!sd())return!0;var c=b.mimeType,d=b.uri||"";c||(c=uh(d),c=Zl[c]);if(c){if(""==(b.mediaElement||ud()).canPlayType(c))return!1;if(!sd()||!(c in th||uh(d)in vh)||("application/x-mpegurl"===c||"application/vnd.apple.mpegurl"===c)&&a.g.streaming.preferNativeHls)return!0;if(Ad())return a.g.streaming.useNativeHlsOnSafari}return!1}
|
|
450
451
|
function Ll(a,b,c){null==b.mediaElement&&(b.mediaElement=c.mediaElement,a.yb.s(b.mediaElement,"error",function(){var d=em(a);d&&fm(a,d)}));a.h=b.mediaElement;return Promise.resolve()}
|
|
451
|
-
function Ml(a,b){var c,d,e,f,g,h,k,l,m;return
|
|
452
|
+
function Ml(a,b){var c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return a.l!=$l&&(a.l=Fl),c=a.Qb.map(function(p){return p()}),a.Qb=[],C(n,Promise.all(c),2);case 2:a.dispatchEvent(Vl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.ya&&(a.ya.release(),a.ya=null);b.mediaElement&&a.o.Vb();a.ke.stop();a.gb&&(a.gb.release(),a.gb=null);a.ge&&(a.ge.stop(),a.ge=null);if(!a.K){n.F(3);break}return C(n,a.K.stop(),4);case 4:a.K=null,a.ue=null;case 3:if(!a.B){n.F(5);break}return C(n,a.B.stop(),
|
|
452
453
|
5);case 5:if(!a.j){n.F(7);break}return C(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.J&&(a.J.release(),a.J=null);a.D&&(a.D.release(),a.D=null);if(!a.I){n.F(9);break}return C(n,a.I.destroy(),10);case 10:a.I=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.mediaElement||!b.mediaElement.src){n.F(11);break}return C(n,new Promise(function(p){return(new O(p)).R(.1)}),12);case 12:for(b.mediaElement.removeAttribute("src"),b.mediaElement.load();b.mediaElement.lastChild;)b.mediaElement.removeChild(b.mediaElement.firstChild);
|
|
453
|
-
case 11:if(!a.m){n.F(13);break}return C(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.wb=null;a.N=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.C=new El;a.
|
|
454
|
-
function Nl(a,b){var c,d,e,f,g;return
|
|
455
|
-
function Ol(a,b,c){var d,e,f,g;return
|
|
454
|
+
case 11:if(!a.m){n.F(13);break}return C(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.wb=null;a.N=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.C=new El;a.Qf=null;gm(a);D(n)}})}
|
|
455
|
+
function Nl(a,b){var c,d,e,f,g;return H(function(h){if(1==h.g)return c=a.g.textDisplayFactory,d=c(),a.Qf=c,e=hm(b.mediaElement,d,function(k,l,m){im(a,k,l,m)},a.L),e.configure(a.g.mediaSource),f=a.g.manifest,g=f.segmentRelativeVttTiming,e.N=g,C(h,e.I,2);a.I=e;D(h)})}
|
|
456
|
+
function Ol(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.wb=d,f=a,C(h,sh(d,e,a.g.manifest.retryParameters,b.mimeType),2);f.ue=h.h;a.K=a.ue();g=ef(a.g.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.K.configure(g);D(h)})}
|
|
456
457
|
function Pl(a,b){var c=b.uri;b=a.H;a.ya=new Dj(function(){return a.Ba()});a.ya.addEventListener("regionadd",function(f){f=f.region;jm(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.ba=null;a.g.streaming.observeQualityChanges&&(a.ba=new zj(function(){return a.Cb()}),a.ba.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,
|
|
457
458
|
height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(Vl("mediaqualitychanged",g))}));var d={networkingEngine:b,filter:function(f){return km(a,f)},makeTextStreamsForClosedCaptions:function(f){return lm(a,f)},onTimelineRegionAdded:function(f){var g=a.ya;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=
|
|
458
459
|
k;break a}h=null}null==h&&(g.g.add(f),f=new M("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return fm(a,f)},isLowLatencyMode:function(){return a.g.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.g.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&
|
|
459
|
-
a.m.B&&mm(a,g.keySystem,f)}},e=Date.now()/1E3;return new Ye(function(){var f,g,h,k;return
|
|
460
|
-
function Ql(a,b){var c,d;return
|
|
461
|
-
function Rl(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B;return
|
|
462
|
-
h=a.g.abrFactory;a.B&&a.
|
|
463
|
-
a.B.init(function(F,G,
|
|
464
|
-
n.audio]);for(t=p.next();!t.done;t=p.next())(v=t.value)&&!v.segmentIndex&&m.push(v.createSegmentIndex());if(!(0<m.length)){E.F(2);break}return C(E,Promise.all(m),2);case 2:tm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.D=zm(a,b.startTime);a.gb=Am(a,b.
|
|
465
|
-
A=a.Tb().find(function(F){return F.active}),A||((z=ue(a.i.textStreams,a.eb,a.ld,a.ed)[0]||null)&&Dl(a.C.h,z,!0),k&&(z?(k.audio&&Dm(a,k.audio,z)&&(a.Z=!0),a.Z&&a.I.C.setTextVisibility(!0),Em(a)):a.Z=!1),z&&(a.g.streaming.alwaysStreamText||a.
|
|
466
|
-
"timeupdate",B)),a.od=!0,a.o.xa(d,"loadedmetadata",function(){a.C.m=Date.now()/1E3-c.
|
|
467
|
-
function Sl(a,b,c){var d,e,f,g,h,k,l;return
|
|
460
|
+
a.m.B&&mm(a,g.keySystem,f)}},e=Date.now()/1E3;return new Ye(function(){var f,g,h,k;return H(function(l){if(1==l.g)return f=a,C(l,a.K.start(c,d),2);f.i=l.h;g=Vl("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new N(2,4,4036);nm(a.i);h=Date.now()/1E3;k=h-e;a.C.H=k;D(l)})}(),function(){return a.K.stop()})}
|
|
461
|
+
function Ql(a,b){var c,d;return H(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=om(a,{lc:a.H,onError:function(f){fm(a,f)},me:function(f){pm(a,f)},onExpirationUpdated:function(f,g){qm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.C.j=Date.now()/1E3-c,a.L&&(f=a.L,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.g.drm),C(e,Kg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?C(e,a.m.$c(b.mediaElement),3):C(e,km(a,a.i),0)})}
|
|
462
|
+
function Rl(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B;return H(function(E){switch(E.g){case 1:b.startTime=c.startTime;null!=a.rd&&(b.startTime=a.rd,a.rd=null);d=b.mediaElement;e=b.uri;a.wb=e;a.J=new vj({Xd:function(){return d.playbackRate},Td:function(){return d.defaultPlaybackRate},Df:function(F){d.playbackRate=F},zg:function(F){d.currentTime+=F}});f=function(){return rm(a)};g=function(){return sm(a)};a.o.s(d,"playing",f);a.o.s(d,"pause",f);a.o.s(d,"ended",f);a.o.s(d,"ratechange",g);Yl(a,a.g);
|
|
463
|
+
h=a.g.abrFactory;a.B&&a.Lf==h||(a.Lf=h,a.B=h(),"function"!=typeof a.B.setMediaElement&&(Ce("AbrManager","Please use an AbrManager with setMediaElement function."),a.B.setMediaElement=function(){}),a.B.configure(a.g.abr));a.Fa=new Le(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferredAudioLabel);a.eb=a.g.preferredTextLanguage;a.ld=a.g.preferredTextRole;a.ed=a.g.preferForcedSubs;tm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);
|
|
464
|
+
a.B.init(function(F,G,I){a.j&&F!=a.j.j&&um(a,F,!0,void 0===G?!1:G,void 0===I?0:I)});a.B.setMediaElement(d);Gd(a.i,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredAudioChannelCount,a.g.preferredDecodingAttributes);a.j=vm(a);a.j.configure(a.g.streaming);a.l=wm;d.textTracks&&a.o.s(d.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":xm(a,F)}});a.dispatchEvent(Vl("streaming"));k=null;(l=a.j.j)||(k=ym(a)?a.B.chooseVariant():null);m=[];n=l||k;p=r([n.video,
|
|
465
|
+
n.audio]);for(t=p.next();!t.done;t=p.next())(v=t.value)&&!v.segmentIndex&&m.push(v.createSegmentIndex());if(!(0<m.length)){E.F(2);break}return C(E,Promise.all(m),2);case 2:tm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.D=zm(a,b.startTime);a.gb=Am(a,b.ye);w=Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal);Bm(a,w);if(l){E.F(4);break}um(a,k,!0,!1,0);if(!a.g.streaming.startAtSegmentBoundary){E.F(4);break}y=a.D.Kd();return C(E,Cm(k,y),6);case 6:x=E.h,a.D.Oe(x);case 4:return a.D.Ne(),
|
|
466
|
+
A=a.Tb().find(function(F){return F.active}),A||((z=ue(a.i.textStreams,a.eb,a.ld,a.ed)[0]||null)&&Dl(a.C.h,z,!0),k&&(z?(k.audio&&Dm(a,k.audio,z)&&(a.Z=!0),a.Z&&a.I.C.setTextVisibility(!0),Em(a)):a.Z=!1),z&&(a.g.streaming.alwaysStreamText||a.jc())&&ek(a.j,z)),C(E,a.j.start(),7);case 7:a.g.abr.enabled&&(a.B.enable(),Fm(a)),Wd(a.j?a.j.j:null,a.i),Gm(a.i),Hm(a),ym(a),a.i.variants.some(function(F){return F.primary}),a.S()&&(a.g.streaming.liveSync||a.i.serviceDescription)&&(B=function(){return Im(a)},a.o.s(d,
|
|
467
|
+
"timeupdate",B)),a.od=!0,a.o.xa(d,"loadedmetadata",function(){a.C.m=Date.now()/1E3-c.ye}),D(E)}})}
|
|
468
|
+
function Sl(a,b,c){var d,e,f,g,h,k,l;return H(function(m){return 1==m.g?(d=Lb,e=Date.now()/1E3,f=!0,a.m=om(a,{lc:a.H,onError:function(n){fm(a,n)},me:function(n){pm(a,n)},onExpirationUpdated:function(n,p){qm(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.C.j=Date.now()/1E3-e)}}),a.m.configure(a.g.drm),g=c.uri||"",h=uh(g),k=Zl[h],"application/x-mpegurl"==k&&Ad()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
|
|
468
469
|
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?id(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1},bandwidth:100,
|
|
469
470
|
allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.X=!0,C(m,Kg(a.m,[l],[]),2)):C(m,a.m.$c(b.mediaElement),0)})}
|
|
470
|
-
function Tl(a,b,c){function d(){return rm(a)}b.uri=c.uri;b.startTime=c.startTime;a.wb=b.uri;var e=b.mediaElement;a.D=new kj(e);var f=!1;a.Qb.push(function(){f=!0});null!=b.startTime&&a.D.
|
|
471
|
-
"none"!=e.preload&&a.o.xa(e,"loadedmetadata",function(){a.C.m=Date.now()/1E3-c.
|
|
472
|
-
a.o.s(e.textTracks,"change",function(){return Hm(a)}));var g=uh(b.uri);e.src=Wk(a.U,b.uri,Zl[g]);(yd()||xd("Web0S"))&&e.load();a.l=Km;a.dispatchEvent(Vl("streaming"));var h=new Xe;bj(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.D.
|
|
471
|
+
function Tl(a,b,c){function d(){return rm(a)}b.uri=c.uri;b.startTime=c.startTime;a.wb=b.uri;var e=b.mediaElement;a.D=new kj(e);var f=!1;a.Qb.push(function(){f=!0});null!=b.startTime&&a.D.Oe(b.startTime);a.J=new vj({Xd:function(){return e.playbackRate},Td:function(){return e.defaultPlaybackRate},Df:function(k){e.playbackRate=k},zg:function(k){e.currentTime+=k}});Bm(a,a.g.streaming.rebufferingGoal);a.o.s(e,"playing",d);a.o.s(e,"pause",d);a.o.s(e,"ended",d);a.o.s(e,"ratechange",function(){return sm(a)});
|
|
472
|
+
"none"!=e.preload&&a.o.xa(e,"loadedmetadata",function(){a.C.m=Date.now()/1E3-c.ye});e.audioTracks&&(a.o.s(e.audioTracks,"addtrack",function(){return Hm(a)}),a.o.s(e.audioTracks,"removetrack",function(){return Hm(a)}),a.o.s(e.audioTracks,"change",function(){return Hm(a)}));e.textTracks&&(a.o.s(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Jm(a,k);break;case "chapters":xm(a,k);break;default:Hm(a)}}),a.o.s(e.textTracks,"removetrack",function(){return Hm(a)}),
|
|
473
|
+
a.o.s(e.textTracks,"change",function(){return Hm(a)}));var g=uh(b.uri);e.src=Wk(a.U,b.uri,Zl[g]);(yd()||xd("Web0S"))&&e.load();a.l=Km;a.dispatchEvent(Vl("streaming"));var h=new Xe;bj(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.D.Ne();h.resolve()});bj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return H(function(l){if(1==l.g)return Lm(a),k=Mm(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.Z=!0),l.F(2)):C(l,new Promise(function(m){a.o.xa(e.textTracks,"change",m);
|
|
473
474
|
(new O(m)).R(1)}),2);if(f)return l.return();Nm(a);D(l)})});e.error?h.reject(em(a)):"none"==e.preload&&(Xa('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.o.xa(e,"error",function(){h.reject(em(a))});return(new Ye(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})).ra(function(){a.S()&&
|
|
474
|
-
a.g.streaming.liveSync&&a.o.s(e,"timeupdate",function(){return Im(a)});a.od=!0})}function Lm(a){var b=a.g.preferredAudioLanguage;if(""!=b){a.
|
|
475
|
+
a.g.streaming.liveSync&&a.o.s(e,"timeupdate",function(){return Im(a)});a.od=!0})}function Lm(a){var b=a.g.preferredAudioLanguage;if(""!=b){a.we(b);var c=a.g.preferredVariantRole;""!=c&&a.we(b,c)}}function Nm(a){var b=a.g.preferredTextLanguage,c=a.g.preferForcedSubs;if(""!=b){a.wf(b,"",c);var d=a.g.preferredTextRole;""!=d&&a.wf(b,d,c)}}
|
|
475
476
|
function Jm(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.s(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Om(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Pm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Da().R(.5);a.Qb.push(function(){c.stop()})}}
|
|
476
477
|
function im(a,b,c,d){b=r(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=r(e.frames),k=h.next();!k.done;k=h.next())Om(a,f,g,"org.id3",k.value);if(a.G)a.G.onHlsTimedMetadata(e,f)}}function Om(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Vl("metadata",b))}
|
|
477
478
|
function xm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Da().R(.5);a.Qb.push(function(){c.stop()})}}function nm(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 om(a,b){return new Dg(b,a.g.drm.updateExpirationTime)}
|
|
478
479
|
function Il(a){return new jf(function(b,c){a.B&&a.B.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Vl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Vl("downloadfailed",b))},function(b,c,d){var e=a.U;d=void 0===d?{}:d;if(e.g.enabled)if("HEAD"===c.method)bl(e,c);else switch(b){case 0:try{if(e.g.enabled){if(d.type){a:{switch(d.type){case 4:var f=
|
|
479
480
|
"d";break a;case 3:case 2:f="h";break a;case 5:f="s";break a}f=void 0}e.o=f}bl(e,c,{ot:Zk,su:!e.i})}}catch(m){Ya("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",m)}break;case tf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.S()?"l":"v"};h.ot=el(b);var k=h.ot===cl||h.ot===gl||h.ot===Yk||h.ot===hl,l=b.stream;l&&(k&&(h.bl=jl(e,l.type)),l.bandwidth&&(h.br=l.bandwidth/1E3));k&&h.ot!==hl&&(h.tb=kl(e,h.ot)/1E3);bl(e,c,h)}}catch(m){Ya("CMCD_SEGMENT_ERROR",
|
|
480
481
|
"Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:bl(e,c,{ot:"k"});break;case 4:bl(e,c,{ot:"o"})}})}function zm(a,b){return new lj(a.h,a.i,a.g.streaming,b,function(){a.gb&&yj(a.gb,!0);a.j&&a.j.yd();a.N&&Qm(a)},function(c){return a.dispatchEvent(c)})}
|
|
481
|
-
function Am(a,b){b=new Ej(a.ya,a.S()||0<b);b.addEventListener("enter",function(d){jm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){jm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(jm(a,"timelineregionenter",e),jm(a,"timelineregionexit",e))});var c=new xj(a.h);c.g.add(b);a.ba&&c.g.add(a.ba);return c}function Bm(a,b){a.N=new Qe;a.N.g=Se;Te(a.N,b,Math.min(.5,b/2));gm(a);a.
|
|
482
|
-
function Qm(a){switch(a.l){case Km:if(a.h.ended)var b=!0;else{var c=Fh(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case wm:a:if(a.h.ended||zi(a.I))b=!0;else{if(a.i.presentationTimeline.S()){c=a.i.presentationTimeline.
|
|
483
|
-
function Hl(a){return new Vk({getBandwidthEstimate:function(){return a.B?a.B.getBandwidthEstimate():NaN},Cb:function(){return a.Cb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Sb:function(){return a.Sb()},
|
|
484
|
-
function vm(a){return new Rj(a.i,{Wd:function(){return a.D?a.D.Kd():0},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},Y:a.I,
|
|
485
|
-
!d.K&&["audio","video"].includes(b)){c=new fg(mc(c));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;Tg(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},gi:function(b,c,d){im(a,b,c,d)},
|
|
482
|
+
function Am(a,b){b=new Ej(a.ya,a.S()||0<b);b.addEventListener("enter",function(d){jm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){jm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(jm(a,"timelineregionenter",e),jm(a,"timelineregionexit",e))});var c=new xj(a.h);c.g.add(b);a.ba&&c.g.add(a.ba);return c}function Bm(a,b){a.N=new Qe;a.N.g=Se;Te(a.N,b,Math.min(.5,b/2));gm(a);a.ge=(new O(function(){Qm(a)})).ka(.25)}
|
|
483
|
+
function Qm(a){switch(a.l){case Km:if(a.h.ended)var b=!0;else{var c=Fh(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case wm:a:if(a.h.ended||zi(a.I))b=!0;else{if(a.i.presentationTimeline.S()){c=a.i.presentationTimeline.cc();var d=Fh(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Hh(a.h.buffered,a.h.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Re:Se;c.g=d;b!=d&&gm(a)}function hm(a,b,c,d){return new ri(a,b,c,d)}
|
|
484
|
+
function Hl(a){return new Vk({getBandwidthEstimate:function(){return a.B?a.B.getBandwidthEstimate():NaN},Cb:function(){return a.Cb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Sb:function(){return a.Sb()},bc:function(){return a.bc()},pb:function(){return a.pb()},S:function(){return a.S()}},a.g.cmcd)}
|
|
485
|
+
function vm(a){return new Rj(a.i,{Wd:function(){return a.D?a.D.Kd():0},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},Y:a.I,lc:a.H,onError:function(b){return fm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ei:function(){a.K&&a.K.update&&a.K.update()},pf:function(b,c,d){a.D&&a.D.Ag();Qm(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(Vl("segmentappended",b))},di:function(b,c){(c=c.jf)&&a.ba&&Bj(a.ba,c,b)},Zf:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&
|
|
486
|
+
!d.K&&["audio","video"].includes(b)){c=new fg(mc(c));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;Tg(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},gi:function(b,c,d){im(a,b,c,d)},Re:function(b,c){return a.Re(b,c)}})}
|
|
486
487
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=nl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Ce("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(Ce("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
487
488
|
a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2));var c=xl(this.g,a,Gl(this));Rm(this);return c};
|
|
488
|
-
function Rm(a){if(a.K){var b=ef(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.m&&a.m.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{Sm(a,a.i)}catch(f){fm(a,f)}a.B&&ym(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Tm(a)}a.H&&a.H.
|
|
489
|
-
e.destroy());d.g&&(d.g.j=c);a.
|
|
490
|
-
q.lh=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Ba().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.ri=function(){for(var a in this.g)delete this.g[a];xl(this.g,Gl(this),Gl(this));Rm(this)};q.
|
|
491
|
-
q.
|
|
489
|
+
function Rm(a){if(a.K){var b=ef(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.m&&a.m.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{Sm(a,a.i)}catch(f){fm(a,f)}a.B&&ym(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Tm(a)}a.H&&a.H.Bf(a.g.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.g.mediaSource),a.I.N=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,a.Qf!=b)){var c=b(),d=a.I,e=d.C;d.C=c;e&&(c.setTextVisibility(e.isTextVisible()),
|
|
490
|
+
e.destroy());d.g&&(d.g.j=c);a.Qf=b;a.j&&(b=a.j,(c=b.h.get(Kb))&&ck(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.g.abr),a.g.abr.enabled?a.B.enable():a.B.disable(),Fm(a));a.N&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Te(a.N,b,Math.min(.5,b/2)));a.i&&tm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.G&&a.G.configure(a.g.ads);a.U&&a.U.configure(a.g.cmcd)}q.getConfiguration=function(){var a=Gl(this);xl(a,this.g,Gl(this));return a};
|
|
491
|
+
q.lh=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Ba().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.ri=function(){for(var a in this.g)delete this.g[a];xl(this.g,Gl(this),Gl(this));Rm(this)};q.Ve=function(){return this.l};q.Ch=function(){return this.i?this.i.type:null};q.Eh=function(){return this.h};
|
|
492
|
+
q.bc=function(){return this.H};q.Ue=function(){return this.wb};q.Rd=function(){return this.G?this.G:null};q.S=function(){return this.i?this.i.presentationTimeline.S():this.h&&this.h.src?Infinity==this.h.duration:!1};q.hc=function(){return this.i?this.i.presentationTimeline.hc():!1};q.Cc=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
|
|
492
493
|
q.Ba=function(){if(!this.od)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.Ac(),end:a.Db()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Qh=function(){this.S()&&(this.h.currentTime=this.Ba().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.gd=function(){return this.m?this.m.gd():Infinity};
|
|
493
|
-
q.
|
|
494
|
+
q.Te=function(){return this.m?this.m.Te():[]};q.Vd=function(){return this.m?this.m.Vd():{}};q.qd=function(){return this.N?this.N.g==Se:!1};q.Sb=function(){return this.h?this.J?this.J.i:1:0};q.ze=function(a){0==a?Xa("A trick play rate of 0 is unsupported!"):(this.h.paused&&this.h.play(),this.J.set(a),this.l==wm&&(this.B.playbackRateChanged(a),bk(this.j,1<Math.abs(a))))};q.Pe=function(){var a=this.J.Td();this.l==Km&&this.J.set(a);this.l==wm&&(this.J.set(a),this.B.playbackRateChanged(a),bk(this.j,!1))};
|
|
494
495
|
q.pb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,se(e)){var f=ke(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.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return re(g)}):[]};
|
|
495
496
|
q.Tb=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=le(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Mm(this).map(function(f){return pe(f)}):[]};q.Ud=function(){return this.i?this.i.imageStreams.map(function(a){return me(a)}):[]};
|
|
496
|
-
q.
|
|
497
|
+
q.pg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F;return H(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(I){return I.id==a}))?d.segmentIndex?G.F(3):C(G,d.createSegmentIndex(),3):G.return(null):G.F(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);n=parseInt(h[2],10);p=k/m;t=l/n;v=m*n;
|
|
497
498
|
w=f.l-f.startTime;y=f.G||w/v;x=f.startTime;z=A=0;1<v&&(B=Math.floor((b-f.startTime)/y),x=f.startTime+B*y,A=B%m*p,z=Math.floor(B/m)*t);E=!1;if(F=f.D)E=!0,t=F.height,A=F.positionX,z=F.positionY,p=F.width;return G.return({imageHeight:l,imageWidth:k,height:t,positionX:A,positionY:z,startTime:x,duration:y,uris:f.Oa(),width:p,sprite:E})}return G.return(null)})};
|
|
498
|
-
q.
|
|
499
|
-
q.
|
|
499
|
+
q.xf=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&&(Dl(this.C.h,b,!1),ek(this.j,b),Um(this),this.eb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Mm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ne(c)==a.id?c.mode=this.Z?"showing":"hidden":c.mode="disabled";Um(this)}};
|
|
500
|
+
q.yf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.g.abr.enabled&&Xa("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&&se(d)&&(um(this,d,!1,b,c),this.Fa=new Ke(d),ym(this))}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
500
501
|
ne(c)==a.id){Vm(this,c);break}};q.kh=function(){return Wm(this.pb())};q.Kh=function(){return Wm(this.Tb())};q.jh=function(){return Array.from(Xm(this.pb()))};q.Jh=function(){return Array.from(Xm(this.Tb()))};
|
|
501
|
-
q.
|
|
502
|
+
q.we=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.D){this.Fa=new Le(a,b||"",c,"","");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.j;var e=this.Fa.create(this.i.variants);c=null;e=r(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||b(c,a)>b(f,a))c=f;c?(b=ke(c),this.yf(b,!0,d)):Tm(this)}else if(this.h&&this.h.audioTracks){e=Array.from(this.h.audioTracks);
|
|
502
503
|
d=Ob(a);c=a=null;e=r(e);for(f=e.next();!f.done;f=e.next()){f=f.value;var g=re(f);Ob(g.language)==d&&(a=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Vm(this,c):a&&Vm(this,a)}};
|
|
503
|
-
q.
|
|
504
|
+
q.wf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.eb=a,this.ld=b||"",this.ed=c,(a=ue(this.i.textStreams,this.eb,this.ld,this.ed)[0]||null)&&a!=this.j.o&&(Dl(this.C.h,a,!1),this.g.streaming.alwaysStreamText||this.jc()))ek(this.j,a),Um(this)}else{var d=Ob(a);(a=this.Tb().find(function(e){return Ob(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.xf(a)}};
|
|
504
505
|
q.xi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.D){for(var d=null,e=r(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.Fa=new Le(d.language,"",0,"",a),Tm(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Vm(this,b)}};
|
|
505
|
-
q.
|
|
506
|
+
q.jc=function(){var a=this.Z;return this.I?this.I.C.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Mm(this).some(function(b){return"showing"==b.mode}):a};q.mg=function(){return this.h&&this.h.src&&this.h.textTracks?Ym(this).map(function(a){return pe(a)}):[]};
|
|
506
507
|
q.nh=function(a){var b=Ob(a),c=Ym(this).filter(function(h){return Ob(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};
|
|
507
508
|
function Mm(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Pm(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function Ym(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
508
|
-
q.
|
|
509
|
+
q.Ff=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.l==wm)this.I.C.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.o||(a=ue(this.i.textStreams,this.eb,this.ld,this.ed),0<a.length&&(ek(this.j,a[0]),Um(this))):ak(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Mm(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")}Em(this)}};
|
|
509
510
|
q.Gh=function(){if(!this.S())return null;var a=this.za.l,b=0;if(this.D)b=this.D.Kd();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
510
|
-
q.
|
|
511
|
+
q.og=function(){if(!this.S())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.h&&this.h.getStartDate){var a=this.h.getStartDate();return isNaN(a.getTime())?null:a}return null};q.Cb=function(){if(this.l==wm)return this.I.Cb();var a={total:[],audio:[],video:[],text:[]};this.l==Km&&(a.total=Ih(this.h.buffered));return a};
|
|
511
512
|
q.getStats=function(){if(this.l!=wm&&this.l!=Km)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:[]};rm(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.C;b=
|
|
512
|
-
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.D&&(this.C.N=this.D.
|
|
513
|
+
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.D&&(this.C.N=this.D.Vf(),this.C.P=this.D.Wf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.C;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.K=d;this.C.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.C.B=c;if(this.l==wm){if(c=this.j.j)this.C.D=(this.J?this.J.i:1)*c.bandwidth;c&&c.video&&(b=this.C,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.S()&&(c=this.og().valueOf()+
|
|
513
514
|
1E3*this.Ba().end,this.C.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.C.I=this.i.presentationTimeline.g);c=this.B.getBandwidthEstimate();this.C.C=c}this.l==Km&&(c=this.C,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.C;a=e.o;c=e.l;b=e.D;d=e.K;var f=e.L,g=e.J,h=e.P,k=e.N,l=e.C,m=e.i,n=e.m,p=e.H,t=e.j,v=Al(e.g,"playing"),w=Al(e.g,"paused"),y=Al(e.g,"buffering"),x=e.B,A=e.G,z=e.I,B=Bl(e.g),E=[];e=r(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,E.push({timestamp:F.timestamp,
|
|
514
515
|
id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:t,playTime:v,pauseTime:w,bufferingTime:y,licenseTime:x,liveLatency:A,maxSegmentDuration:z,stateHistory:B,switchHistory:E}};
|
|
515
|
-
q.Wg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,w,y,x,A;return
|
|
516
|
-
Lb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){z.F(6);break}return C(z,an(h,a,h.H,h.g.streaming.retryParameters),7);case 7:t=z.h,v=bn(h,t,d,k),w=new Blob([v],{type:"text/vtt"}),a=ui(w),d="text/vtt";case 6:y={id:h.
|
|
516
|
+
q.Wg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,w,y,x,A;return H(function(z){switch(z.g){case 1:if(h.l!=wm&&h.l!=Km)throw new N(1,7,7004);if(d){z.F(2);break}return C(z,Zm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(B){}if(h.l!=Km){z.F(4);break}g&&(c="forced");return C(z,$m(h,a,b,c,d,f||"",k),5);case 5:l=h.Tb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return Hm(h),z.return(m);throw new N(1,2,2012);case 4:n=
|
|
517
|
+
Lb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){z.F(6);break}return C(z,an(h,a,h.H,h.g.streaming.retryParameters),7);case 7:t=z.h,v=bn(h,t,d,k),w=new Blob([v],{type:"text/vtt"}),a=ui(w),d="text/vtt";case 6:y={id:h.Tf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:tj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:n.oa,primary:!1,
|
|
517
518
|
trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0};x=cd(y.mimeType,y.codecs);A=kd(x);if(!A)throw new N(2,2,2014,d);h.i.textStreams.push(y);Hm(h);return z.return(le(y))}})};
|
|
518
|
-
q.Xg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A;return
|
|
519
|
-
segmentEnd:e,vttOffset:0};l=mc(f);m=h.parseMedia(l,k);n=[];p={};t=r(m);for(v=t.next();!v.done;p={Pc:p.Pc},v=t.next())w=v.value,p.Pc=Fb([a],[w.$])[0],y=new P(w.startTime,w.endTime,function(B){return function(){return[B.Pc]}}(p),0,null,null,0,0,Infinity),p.Pc.includes("#xywh")&&(x=p.Pc.split("#xywh=")[1].split(","),4===x.length&&y.Lg({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),n.push(y);A={id:c.
|
|
519
|
+
q.Xg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A;return H(function(z){switch(z.g){case 1:if(c.l!=wm&&c.l!=Km)throw new N(1,7,7004);if(c.l==Km)throw new N(1,2,2016);if(b){z.F(2);break}return C(z,Zm(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new N(1,2,2017,a);d=Lb;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new N(1,4,4045);return C(z,an(c,a,c.H,c.g.streaming.retryParameters),4);case 4:f=z.h;g=ld[b];if(!g)throw new N(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
|
|
520
|
+
segmentEnd:e,vttOffset:0};l=mc(f);m=h.parseMedia(l,k);n=[];p={};t=r(m);for(v=t.next();!v.done;p={Pc:p.Pc},v=t.next())w=v.value,p.Pc=Fb([a],[w.$])[0],y=new P(w.startTime,w.endTime,function(B){return function(){return[B.Pc]}}(p),0,null,null,0,0,Infinity),p.Pc.includes("#xywh")&&(x=p.Pc.split("#xywh=")[1].split(","),4===x.length&&y.Lg({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),n.push(y);A={id:c.Tf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
520
521
|
segmentIndex:new qj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Zc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0};c.i.imageStreams.push(A);Hm(c);return z.return(me(A))}})};
|
|
521
|
-
q.Vg=function(a,b,c){var d=this,e,f,g,h;return
|
|
522
|
-
case 5:throw new N(1,2,2012);}})};function Zm(a,b){var c,d;return
|
|
523
|
-
function $m(a,b,c,d,e,f,g){var h,k,l,m;return
|
|
524
|
-
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function an(a,b,c,d){var e,f,g;return
|
|
525
|
-
function bn(a,b,c,d){var e=ld[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=mc(b),b=c.parseMedia(b,a),Uk(b,d);throw new N(2,2,2014,c);}q.
|
|
526
|
-
q.Ah=function(){Xa("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.Bh=function(){return this.
|
|
527
|
-
function Gl(a){var b=vl();b.streaming.failureCallback=function(c){if(a.S()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.
|
|
528
|
-
function lm(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 uj,l=e.closedCaptions.get(g);h={id:a.
|
|
529
|
-
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Kb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1};b.textStreams.push(h);c.add(g)}}function km(a,b){return
|
|
530
|
-
function dn(a,b){var c;return
|
|
522
|
+
q.Vg=function(a,b,c){var d=this,e,f,g,h;return H(function(k){switch(k.g){case 1:if(d.l!=wm&&d.l!=Km)throw new N(1,7,7004);if(c){k.F(2);break}return C(k,Zm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return C(k,$m(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.mg();h=g.find(function(l){return l.language==b});if(!h){k.F(5);break}return C(k,new Promise(function(l,m){d.o.xa(f,"load",l);d.o.xa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k.return(h);
|
|
523
|
+
case 5:throw new N(1,2,2012);}})};function Zm(a,b){var c,d;return H(function(e){switch(e.g){case 1:c=uh(b);if(d=cn[c])return e.return(d);wa(e,2);return C(e,wh(b,a.H,a.g.streaming.retryParameters),4);case 4:d=e.h;ya(e,3);break;case 2:za(e);case 3:if(d)return e.return(d);throw new N(1,2,2011,c);}})}
|
|
524
|
+
function $m(a,b,c,d,e,f,g){var h,k,l,m;return H(function(n){if(1==n.g)return"text/vtt"!=e||g.length?C(n,an(a,b,a.H,a.g.streaming.retryParameters),3):n.F(2);2!=n.g&&(h=n.h,k=bn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ui(l),e="text/vtt");m=document.createElement("track");var p=a.U,t=b;try{if(p.g.enabled){var v=Xk(p);v.ot=il;v.su=!0;var w=$k(v);var y=al(t,w)}else y=t}catch(x){Ya("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),y=t}m.src=y;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
525
|
+
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function an(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g){e=tf;f=nf([b],d);f.method="GET";var k=a.U;try{k.g.enabled&&bl(k,f,{ot:il,su:!0})}catch(l){Ya("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return C(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
526
|
+
function bn(a,b,c,d){var e=ld[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=mc(b),b=c.parseMedia(b,a),Uk(b,d);throw new N(2,2,2014,c);}q.Cf=function(a,b){this.Sf.width=a;this.Sf.height=b};q.tf=function(a){if(this.l==wm){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.nd||d.Ma||d.vb||(d.nd=!1,Zj(b,d,a));b=!0}}else b=!1;return b};
|
|
527
|
+
q.Ah=function(){Xa("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.Bh=function(){return this.ue};
|
|
528
|
+
function Gl(a){var b=vl();b.streaming.failureCallback=function(c){if(a.S()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.tf(d))}};b.textDisplayFactory=function(){return a.ce?new Mk(a.h,a.ce):new Gk(a.h)};return b}q.Gf=function(a){this.ce=a};
|
|
529
|
+
function lm(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 uj,l=e.closedCaptions.get(g);h={id:a.Tf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
530
|
+
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Kb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1};b.textStreams.push(h);c.add(g)}}function km(a,b){return H(function(c){if(1==c.g)return C(c,dn(a,b),2);Sm(a,b);D(c)})}
|
|
531
|
+
function dn(a,b){var c;return H(function(d){if(1==d.g)return c=a.j?a.j.j:null,C(d,Ud(c,b),2);Gm(b);D(d)})}function Sm(a,b){if(a.l!=$l){for(var c=a.g.restrictions,d=a.Sf,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Td(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Hm(a);if((c=a.m?a.m.g:null)&&a.m.B)for(d=r(b.variants),e=d.next();!e.done;e=d.next())e=e.value,mm(a,c.keySystem,e.video),mm(a,c.keySystem,e.audio);en(a,b)}}
|
|
531
532
|
function mm(a,b,c){if(c){c=r(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=r(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Tg(a.m,e.initDataType,e.initData)}}}
|
|
532
|
-
function Cm(a,b){var c,d,e,f,g;return
|
|
533
|
+
function Cm(a,b){var c,d,e,f,g;return H(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return H(function(t){if(1==t.g)return k?C(t,k.createSegmentIndex(),2):t.return(null);n=(m=k.segmentIndex.ac(l))?m.next().value:null;if(!n)return t.return(null);p=n.startTime;return t.return(p)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(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)})}
|
|
533
534
|
function gm(a){var b=a.qd();if(a.C&&a.N&&a.D){var c=a.J;c.j=b;wj(c);a.U&&(c=a.U,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);rm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Vl("buffering",b))}function sm(a){var b=a.h.playbackRate;0!=b&&(a.J&&a.J.set(b),b=Vl("ratechange"),a.dispatchEvent(b))}function rm(a){if(a.C&&a.N){var b=a.C.g;a.N.g==Se?zl(b,"buffering"):a.h.paused?zl(b,"paused"):a.h.ended?zl(b,"ended"):zl(b,"playing")}}
|
|
534
535
|
function Im(a){if(a.S()){var b=a.Ba();if(Number.isFinite(b.end)&&!(a.h.currentTime<b.start)){if(a.g.streaming.liveSync){var c=a.g.streaming.liveSyncMaxLatency;var d=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.g.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);var e=a.h.playbackRate,f=b.end-a.h.currentTime,g=0;if(a.l==Km){var h=a.h.buffered;0<h.length&&(g=h.end(h.length-1),g=Math.max(d,
|
|
535
|
-
g-b.end))}c&&d&&f-g>c?e!=d&&a.
|
|
536
|
-
function Wl(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=r(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,
|
|
536
|
+
g-b.end))}c&&d&&f-g>c?e!=d&&a.ze(d):1!==e&&0!==e&&a.Pe()}}}function ym(a){try{en(a,a.i)}catch(c){return fm(a,c),!1}var b=te(a.i.variants);b=a.Fa.create(b);a.B.setVariants(Array.from(b.values()));return!0}
|
|
537
|
+
function Wl(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=r(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,db("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.ke.stop();d&&Tm(a,!0,void 0,!1,!1)}
|
|
537
538
|
function Tm(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=ym(a)?a.B.chooseVariant():null)&&um(a,f,e,b,c,d)}
|
|
538
539
|
function um(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&dk(a.j,b,d,e,!0);else{var h=a.C.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));dk(a.j,b,d,e,f,c);d=null;g&&(d=ke(g));b=ke(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&ni(a.L,b),c=Vl("adaptation",c),fn(a,c)):gn(a,d,b)}}
|
|
539
540
|
function Vm(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=re(c);b=re(b);gn(a,c,b)}function Dm(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Ob(a.g.preferredTextLanguage);c=Ob(c.language);if(2==a.g.autoShowText)return Nb(c,d);if(3==a.g.autoShowText)return a=Ob(b.language),Nb(c,d)&&!Nb(a,c);Xa("Invalid autoShowText setting!");return!1}function Hm(a){var b=Vl("trackschanged");fn(a,b)}
|
|
540
|
-
function gn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&ni(a.L,c);c=Vl("variantchanged",b);fn(a,c)}function Um(a){var b=Vl("textchanged");fn(a,b)}function Em(a){var b=Vl("texttrackvisibility");fn(a,b)}function Fm(a){a.g.abr.enabled||Kl(a);var b=(new Map).set("newStatus",a.g.abr.enabled);fn(a,Vl("abrstatuschanged",b))}function Kl(a,b){b=void 0===b?!0:b;if(a.l==wm){a.
|
|
541
|
-
q.
|
|
541
|
+
function gn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&ni(a.L,c);c=Vl("variantchanged",b);fn(a,c)}function Um(a){var b=Vl("textchanged");fn(a,b)}function Em(a){var b=Vl("texttrackvisibility");fn(a,b)}function Fm(a){a.g.abr.enabled||Kl(a);var b=(new Map).set("newStatus",a.g.abr.enabled);fn(a,Vl("abrstatuschanged",b))}function Kl(a,b){b=void 0===b?!0:b;if(a.l==wm){a.ke.stop();for(var c=r(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&ym(a)}}
|
|
542
|
+
q.Re=function(a,b){if(!this.g.abr.enabled||this.l===$l||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=r(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.ke.ka(1);b=this.Cb().video.reduce(function(f,g){return f+g.end-g.start},0);Tm(this,!0,b,!0,!1);return!0}return!1};
|
|
542
543
|
function fm(a,b){if(a.l!=$l){2===b.severity&&Kl(a,!1);var c=Vl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function jm(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(Vl(b,c))}
|
|
543
544
|
function em(a){if(!a.h.error)return null;var b=a.h.error.code;if(1==b)return null;var c=a.h.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.h.error.message)}
|
|
544
545
|
function pm(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&&!hn.includes(l)}h!=f.allowedByKeySystem&&
|
|
545
546
|
(e=!0)}}}if(!e||ym(a))(b=a.j.j)&&!b.allowedByKeySystem&&Tm(a),e&&Hm(a)}}function qm(a,b,c){if(a.K&&a.K.onExpirationUpdated)a.K.onExpirationUpdated(b,c);b=Vl("expirationupdated");a.dispatchEvent(b)}function tm(a,b,c){0<b&&(a.S()||a.Mg(b));b=a.getDuration();c<b&&(a.S()||a.Ra(c))}
|
|
546
547
|
function en(a,b){a=a.m?a.m.Vd():{};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 n=a[c?"00":m];n?hn.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
547
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new N(2,4,4012,a);}function Gm(a){if(!a.variants.some(se))throw new N(2,4,4032);}function fn(a,b){
|
|
548
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new N(2,4,4012,a);}function Gm(a){if(!a.variants.some(se))throw new N(2,4,4032);}function fn(a,b){H(function(c){if(1==c.g)return C(c,Promise.resolve(),2);a.l!=$l&&a.dispatchEvent(b);D(c)})}function Xm(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(Ob(c.language)):b.add("und");return b}
|
|
548
549
|
function Wm(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=Ob(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 n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
549
|
-
h.push({language:l,role:m,label:n})}});return h}function bm(){return new N(2,7,7E3)}function Ul(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function xk(){return{mediaElement:null,mimeType:null,startTime:null,
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
550
|
+
h.push({language:l,role:m,label:n})}});return h}function bm(){return new N(2,7,7E3)}function Ul(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function xk(){return{mediaElement:null,mimeType:null,startTime:null,ye:NaN,uri:null}}function cm(a){return new Promise(function(b,c){a.nc=function(){return c(bm())};a.le=function(){return b()};a.onError=function(d){return c(d)};a.oe=function(){return c(bm())}})}K("shaka.Player",S);
|
|
551
|
+
S.prototype.setVideoContainer=S.prototype.Gf;S.prototype.getManifestParserFactory=S.prototype.Bh;S.prototype.getManifest=S.prototype.Ah;S.prototype.retryStreaming=S.prototype.tf;S.prototype.setMaxHardwareResolution=S.prototype.Cf;S.prototype.addChaptersTrack=S.prototype.Vg;S.prototype.addThumbnailsTrack=S.prototype.Xg;S.prototype.addTextTrackAsync=S.prototype.Wg;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.Cb;S.prototype.getPresentationStartTimeAsDate=S.prototype.og;
|
|
552
|
+
S.prototype.getPlayheadTimeAsDate=S.prototype.Gh;S.prototype.setTextTrackVisibility=S.prototype.Ff;S.prototype.getChapters=S.prototype.nh;S.prototype.getChaptersTracks=S.prototype.mg;S.prototype.isTextTrackVisible=S.prototype.jc;S.prototype.selectVariantsByLabel=S.prototype.xi;S.prototype.selectTextLanguage=S.prototype.wf;S.prototype.selectAudioLanguage=S.prototype.we;S.prototype.getTextLanguages=S.prototype.Jh;S.prototype.getAudioLanguages=S.prototype.jh;S.prototype.getTextLanguagesAndRoles=S.prototype.Kh;
|
|
553
|
+
S.prototype.getAudioLanguagesAndRoles=S.prototype.kh;S.prototype.selectVariantTrack=S.prototype.yf;S.prototype.selectTextTrack=S.prototype.xf;S.prototype.getThumbnails=S.prototype.pg;S.prototype.getImageTracks=S.prototype.Ud;S.prototype.getTextTracks=S.prototype.Tb;S.prototype.getVariantTracks=S.prototype.pb;S.prototype.cancelTrickPlay=S.prototype.Pe;S.prototype.trickPlay=S.prototype.ze;S.prototype.getPlaybackRate=S.prototype.Sb;S.prototype.isBuffering=S.prototype.qd;S.prototype.getKeyStatuses=S.prototype.Vd;
|
|
554
|
+
S.prototype.getActiveSessionsMetadata=S.prototype.Te;S.prototype.getExpiration=S.prototype.gd;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.Qh;S.prototype.seekRange=S.prototype.Ba;S.prototype.isAudioOnly=S.prototype.Cc;S.prototype.isInProgress=S.prototype.hc;S.prototype.isLive=S.prototype.S;S.prototype.getAdManager=S.prototype.Rd;S.prototype.getAssetUri=S.prototype.Ue;S.prototype.getNetworkingEngine=S.prototype.bc;
|
|
555
|
+
S.prototype.getMediaElement=S.prototype.Eh;S.prototype.getManifestType=S.prototype.Ch;S.prototype.getLoadMode=S.prototype.Ve;S.prototype.resetConfiguration=S.prototype.ri;S.prototype.getBufferFullness=S.prototype.lh;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.updateStartTime=S.prototype.Hi;S.prototype.unload=S.prototype.Mf;S.prototype.detach=S.prototype.detach;S.prototype.attachCanvas=S.prototype.Yf;
|
|
556
|
+
S.prototype.attach=S.prototype.$c;
|
|
557
|
+
S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return H(function(h){if(1==h.g)return b={},a?C(h,lh(),3):h.F(2);2!=h.g&&(b=h.h);var k={};if(sd()){for(var l in th)k[l]=!0;for(var m in vh)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 n=m.next();!n.done;n=m.next())n=n.value,k[n]=sd()?!!th[n]:td(n);for(var p in l)k[p]=
|
|
557
558
|
sd()?!!vh[p]:td(l[p]);c=k;p='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(u(dd));
|
|
558
|
-
k={};p=r(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=sd()?kd(l)?!0:ec(l)||(Xc(l)?!0:!1):td(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=jn;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
559
|
+
k={};p=r(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=sd()?kd(l)?!0:ec(l)||(Xc(l)?!0:!1):td(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=jn;for(g in f)e[g]=f[g]();return h.return(e)})};S.isBrowserSupported=am;S.setAdManagerFactory=function(a){Jl=a};S.registerSupportPlugin=function(a,b){jn[a]=b};S.prototype.destroy=S.prototype.destroy;var $l=0,Fl=1,wm=2,Km=3;S.LoadMode={DESTROYED:$l,NOT_LOADED:Fl,MEDIA_SOURCE:wm,SRC_EQUALS:Km};S.version="v4.4.1";var kn=["4","4"];
|
|
559
560
|
De=new function(a){this.g=a;this.i=Ee;this.h=Fe}(new Be(Number(kn[0]),Number(kn[1])));
|
|
560
561
|
var hn=["output-restricted","internal-error"],jn={},Jl=null,Zl={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"},cn={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
561
|
-
ssa:"text/x-ssa",ass:"text/x-ssa"};function ln(){this.h=[];this.j=this.i=this.g=0};function
|
|
562
|
+
ssa:"text/x-ssa",ass:"text/x-ssa"};function ln(){this.h=[];this.j=this.i=this.g=0};function T(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.l=this.h.getVolume();this.j=new wf;this.j.s(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.s(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=T.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
562
563
|
q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){return this.h.setVolume(a)};q.isMuted=function(){return 0==this.h.getVolume()};
|
|
563
564
|
q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.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.g.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
564
565
|
q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};
|
|
565
|
-
q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};K("shaka.ads.ClientSideAd",
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
566
|
+
q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};K("shaka.ads.ClientSideAd",T);T.prototype.release=T.prototype.release;T.prototype.getPodIndex=T.prototype.getPodIndex;T.prototype.getTimeOffset=T.prototype.getTimeOffset;
|
|
567
|
+
T.prototype.getMediaUrl=T.prototype.getMediaUrl;T.prototype.getAdvertiserName=T.prototype.getAdvertiserName;T.prototype.getCreativeAdId=T.prototype.getCreativeAdId;T.prototype.getAdId=T.prototype.getAdId;T.prototype.getVastMediaWidth=T.prototype.getVastMediaWidth;T.prototype.getVastMediaHeight=T.prototype.getVastMediaHeight;T.prototype.getVastMediaBitrate=T.prototype.getVastMediaBitrate;T.prototype.getDescription=T.prototype.getDescription;T.prototype.getTitle=T.prototype.getTitle;
|
|
568
|
+
T.prototype.getPositionInSequence=T.prototype.getPositionInSequence;T.prototype.getSequenceLength=T.prototype.getSequenceLength;T.prototype.setMuted=T.prototype.setMuted;T.prototype.resize=T.prototype.resize;T.prototype.isLinear=T.prototype.isLinear;T.prototype.isMuted=T.prototype.isMuted;T.prototype.setVolume=T.prototype.setVolume;T.prototype.getVolume=T.prototype.getVolume;T.prototype.play=T.prototype.play;T.prototype.pause=T.prototype.pause;T.prototype.skip=T.prototype.skip;
|
|
569
|
+
T.prototype.canSkipNow=T.prototype.canSkipNow;T.prototype.getTimeUntilSkippable=T.prototype.getTimeUntilSkippable;T.prototype.isSkippable=T.prototype.isSkippable;T.prototype.isPaused=T.prototype.isPaused;T.prototype.getRemainingTime=T.prototype.getRemainingTime;T.prototype.getMinSuggestedDuration=T.prototype.getMinSuggestedDuration;T.prototype.getDuration=T.prototype.getDuration;function mn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.D=!1;this.B=this.G=null;this.H=NaN;this.m=e;this.j=null;this.h=new wf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.4.1");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.s(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
569
570
|
function(g){nn(f,g)});this.h.s(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){on(f,g)});this.h.s(this.i,"ended",function(){f.l.contentComplete()});this.h.xa(this.i,"play",function(){f.D=!0})}mn.prototype.configure=function(a){this.G=a};mn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Lk(this.o)};mn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
|
|
570
571
|
function on(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new M("ad-error",b));pn(a,null);a.m(new M("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
571
572
|
function nn(a,b){a.m(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.G.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.s(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.s(a.i,"volumechange",function(){a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume)})}else a.g=b.getAdsManager(a.i,a.C);a.m(new M("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -576,7 +577,7 @@ function(c){b(c,"ad-third-quartile")});a.h.s(a.g,google.ima.AdEvent.Type.COMPLET
|
|
|
576
577
|
a.h.s(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.s(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.s(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.s(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.s(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.s(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
|
|
577
578
|
a.h.s(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.s(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.s(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.s(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.s(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.s(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.s(a.g,
|
|
578
579
|
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.s(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.s(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.s(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
579
|
-
function sn(a,b){var c=b.getAd();c?(a.j=new
|
|
580
|
+
function sn(a,b){var c=b.getAd();c?(a.j=new T(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new M("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))):Xa("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
580
581
|
function pn(a,b){a.m(new M("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.g=a;this.i=null;this.h=b}q=W.prototype;q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
581
582
|
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.h.muted=a};
|
|
582
583
|
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};q.getAdId=function(){return this.g.getAdId()};
|
|
@@ -588,12 +589,12 @@ e.j.resolve(e.D):e.j.reject("IMA Stream request returned an error and there was
|
|
|
588
589
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.i=e.C)});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new M("ad-first-quartile"))});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new M("ad-midpoint"))});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new M("ad-third-quartile"))});
|
|
589
590
|
this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new M("ad-complete"));e.i(new M("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new M("ad-skipped"));e.i(new M("ad-stopped"))});this.h.s(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.G=
|
|
590
591
|
f;e.i(new M("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}tn.prototype.configure=function(){};tn.prototype.stop=function(){this.D="";this.o=null;this.G=[]};tn.prototype.release=function(){this.stop();this.h&&this.h.release()};tn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
|
|
591
|
-
function un(a,b){a.i(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.s(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(){
|
|
592
|
-
q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.h&&this.h.release();this.h=new mn(a,b,this.l,c,function(e){if(e&&e.type)switch(e.type){case "ads-loaded":d.i.h.push(e.loadTime);break;case "ad-started":d.i.g++;break;case "ad-complete":d.i.i++;break;case "ad-skipped":d.i.j++}d.dispatchEvent(e)});this.h.configure(this.j)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);
|
|
592
|
+
function un(a,b){a.i(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.s(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(){gb.call(this);this.g=this.h=null;this.i=new ln;this.l=navigator.language;this.j=null}qa(X,gb);q=X.prototype;q.setLocale=function(a){this.l=a};q.configure=function(a){this.j=a;this.h&&this.h.configure(this.j);this.g&&this.g.configure(this.j)};
|
|
593
|
+
q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.h&&this.h.release();this.h=new mn(a,b,this.l,c,function(e){if(e&&e.type)switch(e.type){case "ads-loaded":d.i.h.push(e.loadTime);break;case "ad-started":d.i.g++;break;case "ad-complete":d.i.i++;break;case "ad-skipped":d.i.j++}d.dispatchEvent(e)});this.h.configure(this.j)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);gb.prototype.release.call(this)};
|
|
593
594
|
q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new M("ad-stopped"));this.i=new ln};q.requestClientSideAds=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.H=Date.now()/1E3;b.l.requestAds(a)};q.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};
|
|
594
595
|
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new tn(a,b,this.l,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.i.h.push(d.loadTime);break;case "ad-started":c.i.g++;break;case "ad-complete":c.i.i++;break;case "ad-skipped":c.i.j++}c.dispatchEvent(d)});this.g.configure(this.j)};
|
|
595
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Xa('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.4.
|
|
596
|
-
(c.H=!0),c.j=new Xe,c.g.requestStream(a),c.D=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Xa('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.4.
|
|
596
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Xa('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.4.1";c=this.g;c.j?a=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
597
|
+
(c.H=!0),c.j=new Xe,c.g.requestStream(a),c.D=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Xa('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.4.1";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.G};
|
|
597
598
|
q.getStats=function(){var a=this.i;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)};K("shaka.ads.AdManager",X);
|
|
598
599
|
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;
|
|
599
600
|
X.prototype.updateClientSideAdsRenderingSettings=X.prototype.updateClientSideAdsRenderingSettings;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.configure=X.prototype.configure;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";
|
|
@@ -605,43 +606,43 @@ function xn(a){return{length:a.length,start:function(b){return a.start[b]},end:f
|
|
|
605
606
|
var yn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),zn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),An=["loop","playbackRate"],Bn=["pause","play"],Cn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
606
607
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Dn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},En={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Fn=[["getConfiguration","configure"]],Gn=[["isTextTrackVisible","setTextTrackVisibility"]],Hn="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
607
608
|
In=["attach","attachCanvas","detach","load","unload"];function Jn(a,b,c,d,e,f,g){var h=this;this.I=a;this.N=g;this.j=new O(b);this.P=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.L="";this.o=null;this.D=function(){return Kn(h)};this.G=function(k,l){k=wn(l);switch(k.type){case "event":var m=k.targetName,n=Ta(k.event);h.B(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.C&&(h.P(),h.C=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new N(p.severity,p.category,
|
|
608
|
-
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;Ln.add(this)}q=Jn.prototype;q.destroy=function(){Ln.delete(this);Mn(this);Nn&&On(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.D=this.l=this.i=this.g=this.o=null;return Promise.resolve()};q.ua=function(){return this.h};q.
|
|
609
|
+
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;Ln.add(this)}q=Jn.prototype;q.destroy=function(){Ln.delete(this);Mn(this);Nn&&On(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.D=this.l=this.i=this.g=this.o=null;return Promise.resolve()};q.ua=function(){return this.h};q.se=function(){return this.L};
|
|
609
610
|
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Da();var a=new chrome.cast.SessionRequest(this.I,[],null,this.N,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Ln),d=c.next();!d.done;d=c.next())Pn(d.value,b)},function(b){for(var c=r(Ln),d=c.next();!d.done;d=c.next())d=d.value,Qn="available"==b,d.j.Da()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Qn&&this.j.R(Rn);(a=Nn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
610
|
-
Pn(this,a):Nn=null}else window.__onGCastApiAvailable!==Sn&&(Tn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Sn)};q.
|
|
611
|
-
function Xn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Vn(a,b,c)},function(c){return Wn(a,c)})}}q.
|
|
611
|
+
Pn(this,a):Nn=null}else window.__onGCastApiAvailable!==Sn&&(Tn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Sn)};q.zf=function(a){this.o=a;this.h&&Un(this,{type:"appData",appData:this.o})};q.cast=function(a){var b=this;return H(function(c){if(!b.m)throw new N(1,8,8E3);if(!Qn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new Xe;chrome.cast.requestSession(function(d){return Vn(b,a,d)},function(d){return Wn(b,d)});return C(c,b.l,0)})};
|
|
612
|
+
function Xn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Vn(a,b,c)},function(c){return Wn(a,c)})}}q.xc=function(){if(this.h){Mn(this);if(Nn){On(this);try{Nn.stop(function(){},function(){})}catch(a){}Nn=null}Kn(this)}};
|
|
612
613
|
q.get=function(a,b){var c=this;if("video"==a){if(Bn.includes(b))return function(){return c.Dg.apply(c,[a,b].concat(u(Ma.apply(0,arguments))))}}else if("player"==a){if(En[b]&&!this.get("player","isLive")())return function(){};if(Hn.includes(b))return function(){return c.Dg.apply(c,[a,b].concat(u(Ma.apply(0,arguments))))};if(In.includes(b))return function(){return c.ni.apply(c,[a,b].concat(u(Ma.apply(0,arguments))))};if(Cn[b]||Dn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
613
614
|
q.set=function(a,b,c){this.g[a][b]=c;Un(this,{type:"set",targetName:a,property:b,value:c})};function Vn(a,b,c){Nn=c;c.addUpdateListener(a.D);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Kn(a);Un(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Wn(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 N(2,8,c,b))}
|
|
614
615
|
q.Dg=function(a,b){Un(this,{type:"call",targetName:a,methodName:b,args:Ma.apply(2,arguments)})};q.ni=function(a,b){var c=Ma.apply(2,arguments),d=new Xe,e=this.J.toString();this.J++;this.i[e]=d;try{Un(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Pn(a,b){var c=a.K();a.l=new Xe;a.C=!0;Vn(a,c,b)}function On(a){var b=Nn;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
615
|
-
function Kn(a){var b=Nn?"connected"==Nn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Mn(a)}a.h=b;a.L=b?Nn.receiver.friendlyName:"";a.j.Da()}function Mn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function Un(a,b){b=vn(b);var c=Nn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},ab)}catch(d){throw b=new N(2,8,8005,d),c=new M("error",(new Map).set("detail",b)),a.B("player",c),a.
|
|
616
|
-
function Sn(a){Tn?window.__onGCastApiAvailable=Tn:delete window.__onGCastApiAvailable;Tn=null;if(a)for(var b=r(Ln),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Yn(a,b,c,d){d=void 0===d?!1:d;
|
|
617
|
-
q.destroy=function(a){a&&this.g.
|
|
618
|
-
q.cast=function(){var a=this,b;return
|
|
619
|
-
q.
|
|
616
|
+
function Kn(a){var b=Nn?"connected"==Nn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Mn(a)}a.h=b;a.L=b?Nn.receiver.friendlyName:"";a.j.Da()}function Mn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function Un(a,b){b=vn(b);var c=Nn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},ab)}catch(d){throw b=new N(2,8,8005,d),c=new M("error",(new Map).set("detail",b)),a.B("player",c),a.xc(),b;}}var Rn=.02,Qn=!1,Nn=null,Tn=null,Ln=new Set;
|
|
617
|
+
function Sn(a){Tn?window.__onGCastApiAvailable=Tn:delete window.__onGCastApiAvailable;Tn=null;if(a)for(var b=r(Ln),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Yn(a,b,c,d){d=void 0===d?!1:d;gb.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.B=this.l=null;this.G=c;this.D=d;this.C=new Map;this.g=new Jn(c,function(){return Zn(e)},function(){return $n(e)},function(f,g){return ao(e,f,g)},function(){return bo(e)},function(){return co(e)},d);eo(this)}qa(Yn,gb);q=Yn.prototype;
|
|
618
|
+
q.destroy=function(a){a&&this.g.xc();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.B=this.l=this.i=null;gb.prototype.release.call(this);return Promise.all(a)};q.Ub=function(){return this.l};q.zc=function(){return this.B};q.$f=function(){return this.g.m&&Qn};q.ua=function(){return this.g.ua()};q.se=function(){return this.g.se()};
|
|
619
|
+
q.cast=function(){var a=this,b;return H(function(c){return 1==c.g?(b=co(a),C(c,a.g.cast(b),2)):a.h?C(c,a.h.Mf(),0):c.return()})};q.zf=function(a){this.g.zf(a)};q.Og=function(){Xn(this.g)};q.xc=function(){this.g.xc()};
|
|
620
|
+
q.dg=function(a,b){b=void 0===b?!1:b;var c=this;return H(function(d){if(1==d.g){if(a==c.G&&b==c.D)return d.return();c.G=a;c.D=b;c.g.xc();return C(d,c.g.destroy(),2)}c.g=null;c.g=new Jn(a,function(){return Zn(c)},function(){return $n(c)},function(e,f){return ao(c,e,f)},function(){return bo(c)},function(){return co(c)},b);c.g.init();D(d)})};
|
|
620
621
|
function eo(a){a.g.init();a.m=new wf;for(var b=r(yn),c=b.next();!c.done;c=b.next())a.m.s(a.i,c.value,function(f){a.g.ua()||(f=Ta(f),a.j.dispatchEvent(f))});for(var d in Ua)a.m.s(a.h,Ua[d],function(f){a.g.ua()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Qc=e,Object.defineProperty(a.l,b.Qc,{configurable:!1,enumerable:!0,get:function(f){return function(){return fo(a,f.Qc)}}(b),set:function(f){return function(g){var h=f.Qc;a.g.ua()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Qc:b.Qc};a.B={};go(a,
|
|
621
|
-
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return ho(a,f)}})});io(a);a.j=new
|
|
622
|
+
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return ho(a,f)}})});io(a);a.j=new gb;a.j.qe=a.l;a.o=new gb;a.o.qe=a.B}function io(a){var b=new Map;go(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
|
|
622
623
|
function go(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)}}
|
|
623
|
-
function co(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.
|
|
624
|
+
function co(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Ue(),startTime:null};a.i.pause();for(var c=r(An),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(Fn);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(Gn);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 Zn(a){var b=new M("caststatuschanged");a.dispatchEvent(b)}
|
|
624
625
|
function $n(a){var b=new M(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
625
626
|
function bo(a){for(var b=r(Fn),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(An);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(An),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(Gn);for(k=
|
|
626
627
|
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 M("error",h);a.h.dispatchEvent(h)})}
|
|
627
628
|
function fo(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.ua()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ua()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
628
|
-
function ho(a,b){a.C.has(b)&&(b=a.C.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.
|
|
629
|
-
if("setVideoContainer"==b)return function(c){return a.h.
|
|
630
|
-
function ao(a,b,c){a.g.ua()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}K("shaka.cast.CastProxy",Yn);Yn.prototype.changeReceiverId=Yn.prototype.
|
|
631
|
-
Yn.prototype.getVideo=Yn.prototype.Ub;Yn.prototype.destroy=Yn.prototype.destroy;function jo(a,b,c,d){
|
|
629
|
+
function ho(a,b){a.C.has(b)&&(b=a.C.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.bc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Rd()};
|
|
630
|
+
if("setVideoContainer"==b)return function(c){return a.h.Gf(c)};if(a.g.ua()){if("getManifest"==b||"drmInfo"==b)return function(){Xa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Xa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ua()&&0==Object.keys(a.g.g.video).length&&(Cn[b]||Dn[b])||!a.g.ua()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
631
|
+
function ao(a,b,c){a.g.ua()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}K("shaka.cast.CastProxy",Yn);Yn.prototype.changeReceiverId=Yn.prototype.dg;Yn.prototype.forceDisconnect=Yn.prototype.xc;Yn.prototype.suggestDisconnect=Yn.prototype.Og;Yn.prototype.setAppData=Yn.prototype.zf;Yn.prototype.cast=Yn.prototype.cast;Yn.prototype.receiverName=Yn.prototype.se;Yn.prototype.isCasting=Yn.prototype.ua;Yn.prototype.canCast=Yn.prototype.$f;Yn.prototype.getPlayer=Yn.prototype.zc;
|
|
632
|
+
Yn.prototype.getVideo=Yn.prototype.Ub;Yn.prototype.destroy=Yn.prototype.destroy;function jo(a,b,c,d){gb.call(this);var e=this;this.g=a;this.h=b;this.j=new wf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.o=!0;this.m=0;this.D=!1;this.C=!0;this.B=this.l=null;this.I=new O(function(){ko(e)});lo(this)}qa(jo,gb);q=jo.prototype;q.isConnected=function(){return this.H};q.Uh=function(){return this.o};q.Bi=function(a){this.i=a};q.dh=function(){this.i=null};
|
|
632
633
|
q.Ci=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Ai=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.zi=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
633
|
-
q.destroy=function(){var a=this,b,c;return
|
|
634
|
+
q.destroy=function(){var a=this,b,c;return H(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.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.o=!0,a.l=null,a.B=null,gb.prototype.release.call(a),C(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();D(d)})};
|
|
634
635
|
function lo(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return mo(a)};b.onSenderDisconnected=function(){return mo(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&no(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);no(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return oo(a,
|
|
635
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return po(a,e)};b.start();b=r(yn);for(var c=b.next();!c.done;c=b.next())a.j.s(a.g,c.value,function(e){return qo(a,"video",e)});for(var d in Ua)a.j.s(a.h,Ua[d],function(e){return qo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.
|
|
636
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return po(a,e)};b.start();b=r(yn);for(var c=b.next();!c.done;c=b.next())a.j.s(a.g,c.value,function(e){return qo(a,"video",e)});for(var d in Ua)a.j.s(a.h,Ua[d],function(e){return qo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Cf(3840,2160):a.h.Cf(1920,1080);a.j.s(a.g,"loadeddata",function(){a.D=!0});a.j.s(a.h,"loading",function(){a.o=
|
|
636
637
|
!1;ro(a)});a.j.s(a.g,"playing",function(){a.o=!1;ro(a)});a.j.s(a.g,"pause",function(){ro(a)});a.j.s(a.h,"unloading",function(){a.o=!0;ro(a)});a.j.s(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,ro(a))})).R(so)})}function mo(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;ro(a)}
|
|
637
|
-
function ro(a){var b;
|
|
638
|
-
function vo(a,b,c){var d,e,f,g,h,k,l,m,n,p;
|
|
638
|
+
function ro(a){var b;H(function(c){if(1==c.g)return C(c,Promise.resolve(),2);if(!a.h)return c.return();b=new M("caststatuschanged");a.dispatchEvent(b);to(a)||uo(a);D(c)})}
|
|
639
|
+
function vo(a,b,c){var d,e,f,g,h,k,l,m,n,p;H(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,wa(t,5),C(t,a.h.load(b.manifest,b.startTime),7)):C(t,Promise.resolve(),3);case 7:ya(t,3);break;case 5:return g=za(t),h=(new Map).set("detail",g),k=new M("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(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
|
|
639
640
|
a.g.autoplay=f;b.manifest&&(a.g.play(),uo(a));D(t)}})}function qo(a,b,c){a.h&&(ko(a),no(a,{type:"event",targetName:b,event:c},a.l))}
|
|
640
641
|
function ko(a){a.I.R(wo);for(var b={video:{},player:{}},c=r(zn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.S())for(var e in En)0==a.m%En[e]&&(b.player[e]=a.h[e]());for(var f in Cn)0==a.m%Cn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;no(a,{type:"update",update:b},a.l);for(var g in Dn)0==a.m%Dn[g]&&(b={player:{}},b.player[g]=a.h[g](),no(a,{type:"update",update:b},a.l));a.D&&(a.m+=
|
|
641
|
-
1);to(a)}function to(a){return a.C&&(a.g.duration||a.h.S())?(xo(a),a.C=!1,!0):!1}function xo(a,b){var c={contentId:a.h.
|
|
642
|
+
1);to(a)}function to(a){return a.C&&(a.g.duration||a.h.S())?(xo(a),a.C=!1,!0):!1}function xo(a,b){var c={contentId:a.h.Ue(),streamType:a.h.S()?"LIVE":"BUFFERED",contentType:""};a.h.S()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);uo(a,void 0===b?0:b,c)}
|
|
642
643
|
function po(a,b){var c=wn(b.data);switch(c.type){case "init":a.m=0;a.D=!1;a.C=!0;vo(a,c.initState,c.appData);ko(a);break;case "appData":a.G(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;
|
|
643
644
|
"player"==d&&"load"==e&&(a.m=0,a.D=!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.C=!0}));c.then(function(){return yo(a,g,f,null)},function(h){return yo(a,g,f,h)})}}
|
|
644
|
-
function oo(a,b){var c=wn(b.data);switch(c.type){case "PLAY":a.g.play();uo(a);break;case "PAUSE":a.g.pause();uo(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(),uo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),uo(a));break;case "STOP":a.h.
|
|
645
|
+
function oo(a,b){var c=wn(b.data);switch(c.type){case "PLAY":a.g.play();uo(a);break;case "PAUSE":a.g.pause();uo(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(),uo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),uo(a));break;case "STOP":a.h.Mf().then(function(){a.h&&uo(a)});break;case "GET_STATUS":xo(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));
|
|
645
646
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||uo(a);break;case "LOAD":a.m=0;a.D=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&xo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");no(a,{requestId:Number(c.requestId),type:h},a.B)});break;default:no(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
|
|
646
647
|
function yo(a,b,c,d){a.h&&no(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function no(a,b,c,d){a.H&&(a=vn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function uo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?zo:a.h.qd()?Ao:a.g.paused?Bo:Co,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);no(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
|
|
647
648
|
K("shaka.cast.CastReceiver",jo);jo.prototype.destroy=jo.prototype.destroy;jo.prototype.setContentArtist=jo.prototype.zi;jo.prototype.setContentImage=jo.prototype.Ai;jo.prototype.setContentTitle=jo.prototype.Ci;jo.prototype.clearContentMetadata=jo.prototype.dh;jo.prototype.setContentMetadata=jo.prototype.Bi;jo.prototype.isIdle=jo.prototype.Uh;jo.prototype.isConnected=jo.prototype.isConnected;var wo=.5,so=5,zo="IDLE",Co="PLAYING",Ao="BUFFERING",Bo="PAUSED";function Do(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",n=Eo(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].g.trim()){t=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].g.trim()){v=w;break}if(-1===
|
|
@@ -671,22 +672,22 @@ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&ip(g.g,String.fromCharCode(
|
|
|
671
672
|
K("shaka.cea.CeaDecoder",zp);tc=function(){return new zp};function Ep(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(u(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 Fp(){this.j=new Map;this.i=this.h=0;this.g=Gp}
|
|
672
673
|
Fp.prototype.init=function(a){function b(f){f=f.name;f in Hp&&(c.g=Hp[f])}var c=this,d=[],e=[];(new Pf).box("moov",Uf).box("mvex",Uf).T("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Uf).T("tkhd",function(f){f=Vh(f.reader,f.version);d.push(f.trackId)}).box("mdia",Uf).T("mdhd",function(f){f=Th(f.reader,f.version);e.push(f.timescale)}).box("minf",Uf).box("stbl",Uf).T("stsd",Wf).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",
|
|
673
674
|
b).box("encv",Xf).box("sinf",Uf).box("frma",function(f){f=Yh(f.reader).ib;f in Hp&&(c.g=Hp[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new N(2,2,2010);this.g==Gp&&Xa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
674
|
-
Fp.prototype.parse=function(a){var b=this;if(this.g==Gp)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Pf).box("moof",function(l){f=l.start;g=[];Uf(l)}).box("traf",Uf).T("trun",function(l){l=Uh(l.reader,l.version,l.flags);g.push(l)}).T("tfhd",function(l){l=Rh(l.reader,l.flags);d=l.
|
|
675
|
+
Fp.prototype.parse=function(a){var b=this;if(this.g==Gp)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Pf).box("moof",function(l){f=l.start;g=[];Uf(l)}).box("traf",Uf).T("trun",function(l){l=Uh(l.reader,l.version,l.flags);g.push(l)}).T("tfhd",function(l){l=Rh(l.reader,l.flags);d=l.ig||b.h;e=l.hh||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).T("tfdt",function(l){h=Sh(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Xa("Unable to find base media decode time for CEA captions!"),
|
|
675
676
|
new N(2,2,2010);Ip(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
676
|
-
function Ip(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(v){return v.Eg});n=[].concat.apply([],u(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].gh);b.wa();){g=b.O();var p=b.Ia(),t=null;t=!1;h=1;switch(a.g){case Jp:t=p&31;t=6==t;break;case Kp:h=2;b.skip(1);t=p>>1&63;t=39==t||40==t;break;default:return}if(t)for(p=0,l<n.length&&(p=n[l].
|
|
677
|
-
c+(n[l].
|
|
678
|
-
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{
|
|
677
|
+
function Ip(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(v){return v.Eg});n=[].concat.apply([],u(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].gh);b.wa();){g=b.O();var p=b.Ia(),t=null;t=!1;h=1;switch(a.g){case Jp:t=p&31;t=6==t;break;case Kp:h=2;b.skip(1);t=p>>1&63;t=39==t||40==t;break;default:return}if(t)for(p=0,l<n.length&&(p=n[l].ve||0),p=(c+p)/d,h=r(Ep(b.Jb(g-h))),t=h.next();!t.done;t=h.next())k.push({packet:t.value,pts:p});else try{b.skip(g-h)}catch(v){break}m-=g+4;0==m&&(c=l<n.length?
|
|
678
|
+
c+(n[l].uf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}K("shaka.cea.Mp4CeaParser",Fp);var Gp=0,Jp=1,Kp=2,Hp={avc1:Jp,avc3:Jp,hev1:Kp,hvc1:Kp,dvh1:Kp,dvhe:Kp};sc["video/mp4"]=function(){return new Fp};function Lp(){}Lp.prototype.init=function(){};Lp.prototype.parse=function(a){var b=[];a=mc(a);if(!li(a))return b;a=(new hi).parse(a).Xe();a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,6==c.type&&null!=c.time)for(var d=r(Ep(c.data)),e=d.next();!e.done;e=d.next())b.push({packet:e.value,pts:c.time});return b};K("shaka.cea.TsCeaParser",Lp);sc["video/mp2t"]=function(){return new Lp};function Mp(a,b,c){var d=Np(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 N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.vf?(e=h.init||e,!1):!0}),f.length&&(a=Op(e,f,c,g),0==a.length&&(a=[Gb("",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(Gb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
|
|
679
|
+
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{hg:g,ek:e,drmInfos:a,lg:!0}}function Pp(a,b,c,d){var e=Mp(a,c,d);if(b.lg){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.lg=!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 N(2,4,4008);return e.hg||b.hg}
|
|
679
680
|
function Qp(a){var b=0,c=pc(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=mc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
680
681
|
function Rp(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""}
|
|
681
682
|
function Sp(a){var b=jg(a.node,"https://dashif.org/CPS","Laurl");if(b&&b.textContent)return b.textContent;a=jg(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=bg(a.textContent);a=Qp(a).filter(function(c){return c.type===Tp})[0];if(!a)return"";a=Hf(a.value,!0);return(a=Ag(a,"WRMHEADER"))?Rp(a):""}
|
|
682
|
-
function Op(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.
|
|
683
|
+
function Op(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.vf];if(g){var h;if(h=jg(f.node,"urn:microsoft:playready","pro")){h=bg(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:gg(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.vf)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,
|
|
683
684
|
226,251,75]),m=new Uint8Array([]);k=[{initData:gg(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Gb(g,f.init||a||h||k);if(g=Up.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Np(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Vp(c.value))&&b.push(c);return b}
|
|
684
|
-
function Vp(a){var b=a.getAttribute("schemeIdUri"),c=mg(a,"urn:mpeg:cenc:2013","default_KID"),d=kg(a,"urn:mpeg:cenc:2013","pssh").map(og);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:bg(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,
|
|
685
|
+
function Vp(a){var b=a.getAttribute("schemeIdUri"),c=mg(a,"urn:mpeg:cenc:2013","default_KID"),d=kg(a,"urn:mpeg:cenc:2013","pssh").map(og);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:bg(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,vf:b,keyId:c,init:0<e.length?e:null}}
|
|
685
686
|
var Tp=1,Up=(new Map).set("com.widevine.alpha",function(a){var b=jg(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?b.textContent:(a=jg(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Sp).set("com.microsoft.playready.recommendation",Sp).set("com.microsoft.playready.software",Sp).set("com.microsoft.playready.hardware",Sp).set("org.w3.clearkey",function(a){var b=jg(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?
|
|
686
687
|
b.textContent:(a=jg(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Wp(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=
|
|
687
688
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
688
689
|
function Xp(a,b){var c=Yp(a,b,"timescale"),d=1;c&&(d=vg(c)||1);var e=Yp(a,b,"duration");c=vg(e||"");"image"==a.M.contentType&&(c=xg(e||""));c&&(c/=d);var f=Yp(a,b,"startNumber");e=Number(Yp(a,b,"presentationTimeOffset"))||0;var g=wg(f||"");if(null==f||null==g)g=1;f=Zp(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.ha.duration||Infinity;f=ig(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],n=f[l+1],p=qg(m,"t",wg),t=qg(m,"d",wg);m=qg(m,"r",ug);null!=p&&(p-=e);if(!t)break;p=null!=p?p:k;m=m||0;if(0>
|
|
689
|
-
m)if(n){n=qg(n,"t",wg);if(null==n)break;else if(p>=n)break;m=Math.ceil((n-p)/t)-1}else{if(Infinity==a)break;else if(p/b>=a)break;m=Math.ceil((a*b-p)/t)-1}0<h.length&&p!=k&&(h[h.length-1].end=p/b);for(n=0;n<=m;++n)k=p+t,h.push({start:p/b,end:k/b,
|
|
690
|
+
m)if(n){n=qg(n,"t",wg);if(null==n)break;else if(p>=n)break;m=Math.ceil((n-p)/t)-1}else{if(Infinity==a)break;else if(p/b>=a)break;m=Math.ceil((a*b-p)/t)-1}0<h.length&&p!=k&&(h[h.length-1].end=p/b);for(n=0;n<=m;++n)k=p+t,h.push({start:p/b,end:k/b,Of:p}),p=k}b=h}return{timescale:d,Ca:c,Kc:g,Kb:e/d||0,Nf:e,timeline:b}}function Yp(a,b,c){return[b(a.M),b(a.qa),b(a.va)].filter(Eb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
690
691
|
function Zp(a,b,c){return[b(a.M),b(a.qa),b(a.va)].filter(Eb).map(function(d){return hg(d,c)}).reduce(function(d,e){return d||e})}
|
|
691
692
|
function $p(a,b,c,d,e,f){for(var g=mg(a,"http://www.w3.org/1999/xlink","href"),h=mg(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 Ze(new N(2,4,4028));if("onLoad"!=h)return Ze(new N(2,4,4027));var m=Fb([d],[g]);return e.request(0,nf(m,b)).ra(function(n){n=Cg(n.data,a.tagName);if(!n)return Ze(new N(2,4,4001,g));
|
|
692
693
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return aq(a,b,c,m[0],e,f+1)})}
|
|
@@ -696,38 +697,38 @@ function eq(a){var b=fq(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=r(b);fo
|
|
|
696
697
|
d)}function fq(a){var b=a.g.sa(),c=a.g.Ia();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return mc(a.h,b,c)}var gq=[[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 hq(a,b){this.id=a;this.g=b}
|
|
697
698
|
function iq(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(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 jq(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new dq(a.g);for(var n=null,p=null;a.wa();){var t=eq(a);if(187==t.id){var v=kq(t);v&&(t=c*v.Gi,v=b+v.mi,null!=n&&m.push(new P(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new P(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
698
699
|
function kq(a){var b=new dq(a.g);a=eq(b);if(179!=a.id)throw new N(2,3,3013);a=iq(a);b=eq(b);if(183!=b.id)throw new N(2,3,3012);b=new dq(b.g);for(var c=0;b.wa();){var d=eq(b);if(241==d.id){c=iq(d);break}}return{Gi:a,mi:c}};function lq(a,b){b=Zp(a,b,"Initialization");if(!b)return null;var c=a.M.Ta,d=b.getAttribute("sourceURL");d&&(c=Fb(a.M.Ta,[d]));d=0;var e=null;if(b=qg(b,"range",tg))d=b.start,e=b.end;return new Bh(function(){return c},d,e,mq(a))}
|
|
699
|
-
function nq(a,b){var c=Number(Yp(a,oq,"presentationTimeOffset"))||0,d=Yp(a,oq,"timescale"),e=1;d&&(e=vg(d)||1);var f=c/e||0,g=lq(a,oq);pq(a,g);var h=ff(a);return{
|
|
700
|
-
function rq(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,w,y,x,A,z,B,E;return
|
|
701
|
-
G=
|
|
700
|
+
function nq(a,b){var c=Number(Yp(a,oq,"presentationTimeOffset"))||0,d=Yp(a,oq,"timescale"),e=1;d&&(e=vg(d)||1);var f=c/e||0,g=lq(a,oq);pq(a,g);var h=ff(a);return{yc:function(){var k=Zp(h,oq,"RepresentationIndex");var l=h.M.Ta;k&&(k=k.getAttribute("sourceURL"))&&(l=Fb(h.M.Ta,[k]));k=qq(h);return rq(h,b,g,l,k.start,k.end,f)}}}
|
|
701
|
+
function rq(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,w,y,x,A,z,B,E;return H(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.Rb||!a.ha.Ze,l=a.ha.start,m=a.ha.duration,n=a.M.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f,!1),"webm"==n?p(c.Oa(),c.Sa,c.Aa,!0):null],p=null,C(F,Promise.all(v),2);w=F.h;y=w[0];x=w[1]||null;A=null;z=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var G=bq(y,e,d,c,z,B,E);else{G=new dq(x);if(440786851!=eq(G).id)throw new N(2,3,3008);var I=eq(G);if(408125543!=I.id)throw new N(2,3,3009);
|
|
702
|
+
G=I.g.byteOffset;I=new dq(I.g);for(var J=null;I.wa();){var L=eq(I);if(357149030==L.id){J=L;break}}if(!J)throw new N(2,3,3010);J=new dq(J.g);L=1E6;for(I=null;J.wa();){var V=eq(J);if(2807729==V.id)L=iq(V);else if(17545==V.id)if(4==V.g.byteLength)I=V.g.getFloat32(0);else if(8==V.g.byteLength)I=V.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=L/1E9;I*=J;L=eq(new dq(y));if(475249515!=L.id)throw new N(2,3,3007);G=jq(L,G,J,I,d,c,z,B,E)}A=G;h.td(A);t=new qj(A);k&&t.wc(B,E,
|
|
702
703
|
!0);return F.return(t)})}function oq(a){return a.zd}function qq(a){var b=Zp(a,oq,"RepresentationIndex");a=Yp(a,oq,"indexRange");a=tg(a||"");b&&(a=qg(b,"range",tg,a));return a}function pq(a,b){sq(a,b);if(!qq(a))throw new N(2,4,4002);}function sq(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=Kb&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
|
|
703
|
-
function mq(a){var b=a.M;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.
|
|
704
|
-
Infinity,b);f&&(f.segmentIndex=e);return{
|
|
704
|
+
function mq(a){var b=a.M;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.je,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function tq(a,b){var c=lq(a,uq),d=vq(a);if(!d.Ca&&!d.timeline&&1<d.Fc.length)throw new N(2,4,4002);if(!d.Ca&&!a.ha.duration&&!d.timeline&&1==d.Fc.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.va.id&&a.M.id&&(f=b[a.va.id+","+a.M.id])&&(e=f.segmentIndex);var g=wq(a.ha.start,a.ha.duration,a.M.Ta,d,c);b=!e;e?e.sd(g,a.presentationTimeline.Eb()):e=new qj(g);a.presentationTimeline.td(g);a.Rb&&a.ha.Ze||e.wc(a.ha.start,a.ha.duration?a.ha.start+a.ha.duration:
|
|
705
|
+
Infinity,b);f&&(f.segmentIndex=e);return{yc:function(){e&&0!=e.hd()||e.fe(g);return Promise.resolve(e)}}}function uq(a){return a.Wb}function vq(a){var b=xq(a);a=Xp(a,uq);var c=a.Kc;0==c&&(c=1);var d=0;a.Ca?d=a.Ca*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ca:a.Ca,startTime:d,Kc:c,Kb:a.Kb,timeline:a.timeline,Fc:b}}
|
|
705
706
|
function wq(a,b,c,d,e){var f=d.Fc.length;d.timeline&&d.timeline.length!=d.Fc.length&&(f=Math.min(d.timeline.length,d.Fc.length));for(var g=a-d.Kb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Yc:m.Yc,Wc:m.Wc},n++){m.Wc=d.Fc[n];var p=void 0;p=null!=d.Ca?l+d.Ca:d.timeline?d.timeline[n].end:l+b;m.Yc=null;k.push(new P(a+l,a+p,function(t){return function(){null==t.Yc&&(t.Yc=Fb(c,[t.Wc.bi]));return t.Yc}}(m),m.Wc.start,m.Wc.end,e,g,a,h));l=p}return k}
|
|
706
|
-
function xq(a){return[a.M.Wb,a.qa.Wb,a.va.Wb].filter(Eb).map(function(b){return ig(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.ug&&(a.ug=!0);var c=b.getAttribute("media");b=qg(b,"mediaRange",tg,{start:0,end:null});return{bi:c,start:b.start,end:b.end}})};function yq(a,b,c,d,e,f){var g=zq(a),h=Aq(a);Bq(h);var k=ff(a);if(h.pd)return sq(a,g),{
|
|
707
|
-
p=!(a.Rb&&a.ha.
|
|
708
|
-
function Aq(a){var b=Xp(a,Fq),c=Yp(a,Fq,"media");a=Yp(a,Fq,"index");return{Ca:b.Ca,timescale:b.timescale,Kc:b.Kc,Kb:b.Kb,
|
|
709
|
-
function Cq(a,b,c,d,e){function f(J){var L=(J-t)*p,V=L+b.Kb,
|
|
710
|
-
b.timescale,w=b.
|
|
707
|
+
function xq(a){return[a.M.Wb,a.qa.Wb,a.va.Wb].filter(Eb).map(function(b){return ig(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.ug&&(a.ug=!0);var c=b.getAttribute("media");b=qg(b,"mediaRange",tg,{start:0,end:null});return{bi:c,start:b.start,end:b.end}})};function yq(a,b,c,d,e,f){var g=zq(a),h=Aq(a);Bq(h);var k=ff(a);if(h.pd)return sq(a,g),{yc:function(){var t=Wp(h.pd,k.M.id,null,k.bandwidth||null,null);t=Fb(k.M.Ta,[t]);return rq(k,b,g,t,0,null,h.Kb)}};if(h.Ca)return d||"image"===a.qa.contentType||(a.presentationTimeline.mf(h.Ca),a.presentationTimeline.ie(a.ha.start)),{yc:function(){return Cq(k,h,e,g,f)}};var l=null;d=d=null;a.va.id&&a.M.id&&(d=a.va.id+","+a.M.id,d=c[d])&&(l=d.segmentIndex);var m=a.ha.start,n=a.ha.duration?m+a.ha.duration:Infinity,
|
|
708
|
+
p=!(a.Rb&&a.ha.Ze);l?(c=l,Dq(c,h,m,n,p),c.ob(a.presentationTimeline.Eb())):l=new Eq(h,a.M.id,a.bandwidth,a.M.Ta,m,n,g,p);h.timeline&&"image"!==a.qa.contentType&&a.presentationTimeline.Bg(h.timeline,m);d&&a.Rb&&(d.segmentIndex=l);return{yc:function(){l instanceof Eq&&0==l.hd()&&Dq(l,h,m,n,p);return Promise.resolve(l)}}}function Fq(a){return a.Bd}
|
|
709
|
+
function Aq(a){var b=Xp(a,Fq),c=Yp(a,Fq,"media");a=Yp(a,Fq,"index");return{Ca:b.Ca,timescale:b.timescale,Kc:b.Kc,Kb:b.Kb,Nf:b.Nf,timeline:b.timeline,kf:c,pd:a}}function Bq(a){var b=a.pd?1:0;b+=a.timeline?1:0;b+=a.Ca?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.pd&&(a.timeline=null),a.Ca=null);if(!a.pd&&!a.kf)throw new N(2,4,4002);}
|
|
710
|
+
function Cq(a,b,c,d,e){function f(J){var L=(J-t)*p,V=L+b.Kb,U=L+l;L=U+p;var ka=Math.min(L,h());U=new P(U,ka,function(){var aa=Wp(w,x,J,y,V*v);return Fb(A,[aa])},0,null,d,z,l,h());U.l=L;return U}function g(){var J=[Math.max(k.Eb(),l),Math.min(k.cc(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(L){return L+t})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.ha.start,m=a.va.id,n=a.ha.duration,p=b.Ca,t=b.Kc,v=
|
|
711
|
+
b.timescale,w=b.kf,y=a.bandwidth||null,x=a.M.id,A=a.M.Ta,z=l-b.Kb,B=g();a=a.Rb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var F=f(E);c.push(F)}var G=new qj(c);c=k.cc()<h();E=k.S();if(c||E){var I=Math.max(a,B+1);G.Ae(p,function(){var J=k.Eb();G.ob(J);var L=r(g());L.next();L=L.next().value;for(var V=[];I<=L;){var U=f(I);V.push(U);I++}return J>h()&&!V.length?null:V})}return Promise.resolve(G)}
|
|
711
712
|
function zq(a){var b=Yp(a,Fq,"initialization");if(!b)return null;var c=a.M.id,d=a.bandwidth||null,e=a.M.Ta;return new Bh(function(){var f=Wp(b,c,null,d,null);return Fb(e,[f])},0,null,mq(a))}function Eq(a,b,c,d,e,f,g,h){qj.call(this,[]);this.h=a;this.G=b;this.B=c;this.C=d;this.j=e;this.o=f;this.D=g;h&&Gq(this)}qa(Eq,qj);q=Eq.prototype;q.hd=function(){return this.h?this.h.timeline.length:0};q.release=function(){qj.prototype.release.call(this);this.h=null};
|
|
712
713
|
q.ob=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.hd()&&this.release())}};function Dq(a,b,c,d,e){if(a.h){c=a.h.timeline;var f=c[c.length-1];b=b.timeline.filter(function(g){return g.start>=f.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,u(b));a.o!==d&&(a.o=d)}else a.h=b,a.j=c,a.o=d;e&&Gq(a)}
|
|
713
714
|
function Gq(a){if(!a.m){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.o)b.pop();else break;a.ob(a.j);0!==b.length&&Infinity!==a.o&&(b[b.length-1].end=a.o-a.j)}}
|
|
714
715
|
q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>this.o)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=e.end+this.j;d<c&&(e=b[d+1].start+this.j);if(a>=f&&a<e)return d+this.i}return null};
|
|
715
|
-
q.get=function(a){var b=this,c=a-this.i;if(0>c||c>=this.hd()||!this.h)return null;var d=this.g[c];if(!d){d=this.h.timeline[c];var e=a+this.h.Kc,f=this.h.
|
|
716
|
-
q.
|
|
717
|
-
n=a.map(function(
|
|
718
|
-
|
|
719
|
-
0,drmInfos:G.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=z;D(
|
|
716
|
+
q.get=function(a){var b=this,c=a-this.i;if(0>c||c>=this.hd()||!this.h)return null;var d=this.g[c];if(!d){d=this.h.timeline[c];var e=a+this.h.Kc,f=this.h.Nf+d.Of;d=new P(this.j+d.start,this.j+d.end,function(){return Hq(b.h.kf,b.G,e,b.B,f,b.C)},0,null,this.D,this.j-this.h.Kb,this.j,this.o);this.g[c]=d}return d};function Hq(a,b,c,d,e,f){a=Wp(a,b,c,d||null,e);return Fb(f,[a]).map(function(g){return g.toString()})};function Iq(){this.j=[];this.g=[];this.i=[];this.l=[];this.h=[];this.m=new Set}q=Iq.prototype;q.release=function(){for(var a=r(this.g.concat(this.i,this.l,this.h)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.i=[];this.l=[];this.h=[];this.j=[]};q.Oh=function(){return this.j};q.We=function(){return this.l.slice()};q.vh=function(){return this.h};
|
|
717
|
+
q.eg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,I,J,L,V,U,ka,aa,ha,ta;return H(function(Ca){switch(Ca.g){case 1:d=Lb;Jq(a);Kq(a);Lq(a);Mq(a);if(!b&&1==a.length){e=a[0];c.g=e.audioStreams;c.i=e.videoStreams;c.l=e.textStreams;c.h=e.imageStreams;Ca.F(2);break}f=-1;for(g=0;g<a.length;g++)h=a[g],c.m.has(h.id)||(c.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ca.return();k=a.map(function(ua){return ua.audioStreams});l=a.map(function(ua){return ua.videoStreams});m=a.map(function(ua){return ua.textStreams});
|
|
718
|
+
n=a.map(function(ua){return ua.imageStreams});p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Nq(d.oa));w=r(n);for(y=w.next();!y.done;y=w.next())x=y.value,x.push(Nq(d.Zc));return C(Ca,Oq(c.g,k,f,Pq,Qq),3);case 3:return C(Ca,Oq(c.i,l,f,Pq,Qq),4);case 4:return C(Ca,Oq(c.l,m,f,Pq,Qq),5);case 5:return C(Ca,Oq(c.h,n,f,Pq,Qq),2);case 2:A=0;z=[];if(c.i.length&&c.g.length)for(J=r(c.g),L=J.next();!L.done;L=J.next())for(V=L.value,U=r(c.i),ka=U.next();!ka.done;ka=U.next())aa=ka.value,ha=ph(V.drmInfos,
|
|
719
|
+
aa.drmInfos),V.drmInfos.length&&aa.drmInfos.length&&!ha.length||(ta=A++,z.push({id:ta,language:V.language,disabledUntilTime:0,primary:V.primary,audio:V,video:aa,bandwidth:(V.bandwidth||0)+(aa.bandwidth||0),drmInfos:ha,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=c.i.concat(c.g),E=r(B),F=E.next();!F.done;F=E.next())G=F.value,I=A++,z.push({id:I,language:G.language,disabledUntilTime:0,primary:G.primary,audio:G.type==d.Pb?G:null,video:G.type==d.Na?G:null,bandwidth:G.bandwidth||
|
|
720
|
+
0,drmInfos:G.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=z;D(Ca)}})};
|
|
720
721
|
function Jq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.audioStreams),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&&xc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.audioStreams=c}}
|
|
721
722
|
function Lq(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&&xc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
722
723
|
function Kq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.videoStreams),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&&xc(e.roles,h.roles)&&Ef(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.videoStreams=c}}
|
|
723
724
|
function Mq(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}}
|
|
724
|
-
function Rq(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,
|
|
725
|
-
h.value,k.push(Sq(b.oa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Sq(b.Zc));return C(
|
|
726
|
-
z.value,B.variantIds=[y++];return
|
|
727
|
-
function Oq(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,
|
|
728
|
-
z.next())for(B=t.value,E={},F=r(B),y=F.next();!y.done;E={Ob:E.Ob},y=F.next())if(E.Ob=y.value,G=E.Ob.type==f.oa&&!E.Ob.language,
|
|
729
|
-
function Yq(a,b){var c,d,e,f,g,h,k;return
|
|
730
|
-
function Wq(a,b,c,d,e){var f=c(a);Xq(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return
|
|
725
|
+
function Rq(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,I,J,L,V;return H(function(U){switch(U.g){case 1:b=Lb;if(1==a.length)return U.return(a[0]);c=a.map(function(ka){return ka.filter(function(aa){return aa.type==b.Pb})});d=a.map(function(ka){return ka.filter(function(aa){return aa.type==b.Na})});e=a.map(function(ka){return ka.filter(function(aa){return aa.type==b.oa})});f=a.map(function(ka){return ka.filter(function(aa){return aa.type==b.Zc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
|
|
726
|
+
h.value,k.push(Sq(b.oa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Sq(b.Zc));return C(U,Oq([],c,0,Tq,Uq),2);case 2:return p=U.h,C(U,Oq([],d,0,Tq,Uq),3);case 3:return t=U.h,C(U,Oq([],e,0,Tq,Uq),4);case 4:return v=U.h,C(U,Oq([],f,0,Tq,Uq),5);case 5:w=U.h;y=0;if(t.length&&p.length)for(E=r(p),F=E.next();!F.done;F=E.next())for(G=F.value,I=r(t),J=I.next();!J.done;J=I.next())L=J.value,V=y++,L.variantIds.push(V),G.variantIds.push(V);else for(x=t.concat(p),A=r(x),z=A.next();!z.done;z=A.next())B=
|
|
727
|
+
z.value,B.variantIds=[y++];return U.return(t.concat(p).concat(v).concat(w))}})}
|
|
728
|
+
function Oq(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,I,J;return H(function(L){switch(L.g){case 1:f=Lb;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){L.F(4);break}m=l.value;return C(L,Vq(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new N(2,4,4037);l=k.next();L.F(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,w=r(v),y=w.next();!y.done;y=w.next())x=y.value,(A=Wq(x,b,d,e,g))&&a.push(A);z=r(g);for(t=z.next();!t.done;t=
|
|
729
|
+
z.next())for(B=t.value,E={},F=r(B),y=F.next();!y.done;E={Ob:E.Ob},y=F.next())if(E.Ob=y.value,G=E.Ob.type==f.oa&&!E.Ob.language,I=E.Ob.type==f.Zc&&!E.Ob.tilesLayout,!G&&!I&&(J=a.some(function(V){return function(U){return U.mimeType==V.Ob.mimeType&&gd(U.codecs)==gd(V.Ob.codecs)}}(E))))throw new N(2,4,4037);return L.return(a)}})}function Vq(a,b,c,d,e){return H(function(f){if(1==f.g)return Xq(b,a),a.matchedStreams?a.segmentIndex?C(f,Yq(a,c),2):f.F(2):f.return(!1);Zq(a,c,d,e);return f.return(!0)})}
|
|
730
|
+
function Yq(a,b){var c,d,e,f,g,h,k;return H(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 C(l,Promise.all(c),2)}if(a.segmentIndex instanceof uj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);D(l)})}
|
|
731
|
+
function Wq(a,b,c,d,e){var f=c(a);Xq(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return H(function(g){if(f.segmentIndex)return g.F(0);f.segmentIndex=new uj;return C(g,Yq(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;Zq(f,0,d,e);return f}function Zq(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==Ub(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
|
|
731
732
|
function Pq(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}
|
|
732
733
|
function Tq(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
733
734
|
function Qq(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(u(f),u(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=ph(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
|
|
@@ -741,20 +742,20 @@ function dr(a,b,c){if(a.id==c.id)return!0;var d=hr(a.width*a.height,b.width*b.he
|
|
|
741
742
|
function er(a,b,c){if(a.id==c.id)return!0;var d=Ub(a.language,b.language),e=Ub(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!=
|
|
742
743
|
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function fr(a,b,c){return a.id==c.id?!0:hr(a.width*a.height,b.width*b.height,c.width*c.height)==ir?!0:!1}function Sq(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1}}
|
|
743
744
|
function Nq(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new qj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1}}
|
|
744
|
-
function hr(a,b,c){if(b==a&&a!=c)return jr;if(c==a&&a!=b)return ir;if(b>a){if(c<=a||c-a<b-a)return ir;if(c-a>b-a)return jr}else{if(c>a)return jr;if(a-c<a-b)return ir;if(a-c>a-b)return jr}return lr}function kr(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?ir:b<a?jr:lr}K("shaka.util.PeriodCombiner",Iq);Iq.prototype.combinePeriods=Iq.prototype.
|
|
745
|
-
var ir=1,lr=0,jr=-1,gr=new Map;function mr(){var a=this;this.h=this.g=null;this.B=[];this.i=null;this.J=1;this.l={};this.L={};this.j=new Iq;this.G=0;this.I=new bc(5);this.H=new O(function(){nr(a)});this.C=new gf;this.D=null;this.K=[];this.m=Infinity;this.o=!1}q=mr.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return
|
|
746
|
-
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.B=[];this.i=null;this.l={};this.j=null;null!=this.H&&(this.H.stop(),this.H=null);return this.C.destroy()};q.update=function(){var a=this,b;return
|
|
747
|
-
function or(a){var b,c,d,e,f,g,h;return
|
|
748
|
-
function qr(a,b,c){var d,e,f,g,h;return
|
|
749
|
-
function rr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,
|
|
750
|
-
"timeShiftBufferDepth",sg);w=a.g.dash.ignoreSuggestedPresentationDelay;y=null;w||(y=qg(b,"suggestedPresentationDelay",sg));x=a.g.dash.ignoreMaxSegmentDuration;A=null;x||(A=qg(b,"maxSegmentDuration",sg));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=r(Object.values(a.l)),F=E.next();!F.done;F=E.next())G=F.value,G.segmentIndex&&G.segmentIndex.ob(B.Eb());else
|
|
751
|
-
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.
|
|
752
|
-
B.
|
|
753
|
-
{maxLatency:gc,maxPlaybackRate:Pc}):gc=null}else gc=null;a.i={presentationTimeline:
|
|
754
|
-
function sr(a,b,c,d){var e=qg(d,"mediaPresentationDuration",sg),f=[],g=0;d=ig(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=qg(k,"start",sg,g),n=k.id,p=qg(k,"duration",sg),t=null;if(l){var v=qg(l,"start",sg);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.D&&null!==n&&null!==m&&m<a.D)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.D||m>a.D)&&(a.D=m);g=ur(a,b,c,{start:m,duration:t,node:k,
|
|
755
|
-
null;break}g=m+t}}a.K=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,
|
|
756
|
-
function ur(a,b,c,d){b.va=vr(d.node,null,c);b.ha=d;b.va.
|
|
757
|
-
}d=c.filter(function(m){return!m.
|
|
745
|
+
function hr(a,b,c){if(b==a&&a!=c)return jr;if(c==a&&a!=b)return ir;if(b>a){if(c<=a||c-a<b-a)return ir;if(c-a>b-a)return jr}else{if(c>a)return jr;if(a-c<a-b)return ir;if(a-c>a-b)return jr}return lr}function kr(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?ir:b<a?jr:lr}K("shaka.util.PeriodCombiner",Iq);Iq.prototype.combinePeriods=Iq.prototype.eg;Iq.prototype.getImageStreams=Iq.prototype.vh;Iq.prototype.getTextStreams=Iq.prototype.We;Iq.prototype.getVariants=Iq.prototype.Oh;
|
|
746
|
+
var ir=1,lr=0,jr=-1,gr=new Map;function mr(){var a=this;this.h=this.g=null;this.B=[];this.i=null;this.J=1;this.l={};this.L={};this.j=new Iq;this.G=0;this.I=new bc(5);this.H=new O(function(){nr(a)});this.C=new gf;this.D=null;this.K=[];this.m=Infinity;this.o=!1}q=mr.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return H(function(e){if(1==e.g)return c.o=b.isLowLatencyMode(),c.B=[a],c.h=b,C(e,or(c),2);d=e.h;c.h&&pr(c,d);if(!c.h)throw new N(2,7,7001);return e.return(c.i)})};
|
|
747
|
+
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.B=[];this.i=null;this.l={};this.j=null;null!=this.H&&(this.H.stop(),this.H=null);return this.C.destroy()};q.update=function(){var a=this,b;return H(function(c){if(1==c.g)return wa(c,2),C(c,or(a),4);if(2!=c.g)return ya(c,0);b=za(c);if(!a.h||!b)return c.return();a.h.onError(b);D(c)})};q.onExpirationUpdated=function(){};
|
|
748
|
+
function or(a){var b,c,d,e,f,g,h;return H(function(k){if(1==k.g)return b=nf(a.B,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:4}),hf(a.C,e),C(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.B.includes(f.uri)&&a.B.unshift(f.uri);return C(k,qr(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k.return(h)})}
|
|
749
|
+
function qr(a,b,c){var d,e,f,g,h;return H(function(k){if(1==k.g){d=Cg(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(rr(a,d,c));f=a.g.dash.xlinkFailGracefully;g=aq(d,a.g.retryParameters,f,c,a.h.networkingEngine);hf(a.C,g);return C(k,g.promise,2)}h=k.h;return k.return(rr(a,h,c))})}
|
|
750
|
+
function rr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,I,J,L,V,U,ka,aa,ha,ta,Ca,ua;return H(function(Ea){switch(Ea.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=ig(b,"Location").map(og).filter(Eb);0<f.length&&(g=Fb(e,f),e=a.B=g);h=ig(b,"BaseURL");k=h.map(og);l=Fb(e,k);m=0;h&&h.length&&(m=qg(h[0],"availabilityTimeOffset",xg)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=qg(b,"minBufferTime",sg)||0);a.G=qg(b,"minimumUpdatePeriod",sg,-1);t=qg(b,"availabilityStartTime",rg);v=qg(b,
|
|
751
|
+
"timeShiftBufferDepth",sg);w=a.g.dash.ignoreSuggestedPresentationDelay;y=null;w||(y=qg(b,"suggestedPresentationDelay",sg));x=a.g.dash.ignoreMaxSegmentDuration;A=null;x||(A=qg(b,"maxSegmentDuration",sg));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=r(Object.values(a.l)),F=E.next();!F.done;F=E.next())G=F.value,G.segmentIndex&&G.segmentIndex.ob(B.Eb());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=y?y:I,B=new Q(t,J,a.g.dash.autoCorrectDrift);B.Jc("static"==z);(L=B.S())&&
|
|
752
|
+
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.xe(v);V=b.getAttribute("profiles")||"";U={Rb:"static"!=z,presentationTimeline:B,va:null,ha:null,qa:null,M:null,bandwidth:0,ug:!1,vc:m,profiles:V.split(",")};ka=sr(a,U,l,b);aa=ka.duration;ha=ka.periods;"static"!=z&&ka.jg||B.Ra(aa||Infinity);a.m&&!a.o&&(ta=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.o=a.h.isLowLatencyMode());a.o?B.Fg(a.m):a.m&&Xa("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.");
|
|
753
|
+
B.mf(A||1);return C(Ea,a.j.eg(ha,U.Rb),2);case 2:a.o&&(p=0);a.o&&a.m&&(a.G=a.m);if(a.i){a.i.variants=a.j.j;a.i.textStreams=a.j.We();a.i.imageStreams=a.j.h;a.h.filter(a.i);Ea.F(3);break}var tb=B,Ia=a.j.j,La=a.j.We(),eb=a.j.h,Za=p||0,vc=a.g.dash.sequenceMode;var Pc=hg(b,"ServiceDescription");if(Pc){var gc=hg(Pc,"Latency");Pc=hg(Pc,"PlaybackRate");gc&&gc.getAttribute("max")||Pc?(gc=gc&&gc.getAttribute("max")?parseInt(gc.getAttribute("max"),10)/1E3:null,Pc=Pc?parseFloat(Pc.getAttribute("max")):null,gc=
|
|
754
|
+
{maxLatency:gc,maxPlaybackRate:Pc}):gc=null}else gc=null;a.i={presentationTimeline:tb,variants:Ia,textStreams:La,imageStreams:eb,offlineSessionIds:[],minBufferTime:Za,sequenceMode:vc,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:gc};if(!B.Qg()){Ea.F(4);break}Ca=ig(b,"UTCTiming");return C(Ea,tr(a,l,Ca),5);case 5:ua=Ea.h;if(!a.h)return Ea.return();B.Gg(ua);case 4:B.be();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),D(Ea)}})}
|
|
755
|
+
function sr(a,b,c,d){var e=qg(d,"mediaPresentationDuration",sg),f=[],g=0;d=ig(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=qg(k,"start",sg,g),n=k.id,p=qg(k,"duration",sg),t=null;if(l){var v=qg(l,"start",sg);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.D&&null!==n&&null!==m&&m<a.D)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.D||m>a.D)&&(a.D=m);g=ur(a,b,c,{start:m,duration:t,node:k,Ze:null==t||!l});f.push(g);b.va.id&&t&&(a.L[b.va.id]=t);if(null==t){g=
|
|
756
|
+
null;break}g=m+t}}a.K=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,jg:!1}:{periods:f,duration:g,jg:!0}}
|
|
757
|
+
function ur(a,b,c,d){b.va=vr(d.node,null,c);b.ha=d;b.va.vc=b.vc;b.va.id||(b.va.id="__shaka_period_"+d.start);var e=ig(d.node,"EventStream");c=b.presentationTimeline.Eb();e=r(e);for(var f=e.next();!f.done;f=e.next())wr(a,d.start,d.duration,f.value,c);c=ig(d.node,"AdaptationSet").map(function(m){return xr(a,b,m)}).filter(Eb);if(b.Rb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.pi);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
|
|
758
|
+
}d=c.filter(function(m){return!m.Kf});c=c.filter(function(m){return m.Kf});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Kf.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={Jd:h.Jd},l=k.next())h.Jd=l.value,h.Jd.trickModeVideo=e.streams.find(function(m){return function(n){return gd(m.Jd.codecs)==gd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:yr(d,"audio");g=a.g.disableVideo?[]:yr(d,"video");f=a.g.disableText?
|
|
758
759
|
[]:yr(d,Kb);c=a.g.disableThumbnails?[]:yr(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,u(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,u(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,u(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,u(h.value.streams));return{id:b.va.id,audioStreams:d,videoStreams:e,textStreams:g,imageStreams:f}}
|
|
759
760
|
function yr(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
760
761
|
function xr(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.qa=vr(c,b.va,null);var e=!1,f=ig(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Eb),h=void 0,k=b.qa.contentType==Kb;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=
|
|
@@ -762,24 +763,24 @@ l}}var n;m=ig(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.do
|
|
|
762
763
|
p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),10)));m=ig(c,"Accessibility");var v=new Map,w;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var y=r(t),x=y.next();!x.done;x=y.next()){var A=x.value,z=x=void 0;A.includes("=")?(A=A.split("="),x=A[0].startsWith("CC")?A[0]:"CC"+A[0],z=A[1]||"und"):(x="CC"+p,2==t.length?p+=2:p++,z=A);v.set(x,Ob(z))}}else v.set("CC1",
|
|
763
764
|
"und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=t)for(t=r(t.split(";")),x=t.next();!x.done;x=t.next())x=x.value,A=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],A=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,A=x),v.set(y,Ob(A));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p?null!=t&&(g.push(t),"captions"==t&&(h="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==t?w="visually impaired":"2"==t&&(w="hard of hearing"));if(l)return null;l=ig(c,"ContentProtection");
|
|
764
765
|
var B=Mp(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),E=Ob(b.qa.language||"und"),F=c.getAttribute("label");(l=ig(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(F=l.textContent));l=ig(c,"Representation");c=l.map(function(G){if(G=zr(a,b,B,h,E,F,e,g,v,G,w))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.qa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.qa.contentType||"application"==b.qa.contentType)for(b.qa.contentType=
|
|
765
|
-
Ar(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.qa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,p=r(B.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(u(t.keyIds),u(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Eb);return{id:b.qa.id||"__fake__"+a.J++,contentType:b.qa.contentType,language:E,fk:e,streams:c,drmInfos:B.drmInfos,
|
|
766
|
-
function zr(a,b,c,d,e,f,g,h,k,l,m){b.M=vr(l,b.qa,null);a.m=Math.min(a.m,b.M.
|
|
766
|
+
Ar(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.qa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,p=r(B.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(u(t.keyIds),u(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Eb);return{id:b.qa.id||"__fake__"+a.J++,contentType:b.qa.contentType,language:E,fk:e,streams:c,drmInfos:B.drmInfos,Kf:f,pi:k}}
|
|
767
|
+
function zr(a,b,c,d,e,f,g,h,k,l,m){b.M=vr(l,b.qa,null);a.m=Math.min(a.m,b.M.vc);if(!Br(b.M))return null;var n=b.ha.start;b.bandwidth=qg(l,"bandwidth",vg)||0;var p=b.M.contentType,t=p==Kb||"application"==p;p="image"==p;try{var v=function(G,I,J,L){return Cr(a,G,I,J,L)};if(b.M.zd)var w=nq(b,v);else if(b.M.Wb)w=tq(b,a.l);else if(b.M.Bd)w=yq(b,v,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.L);else{var y=b.M.Ta,x=b.ha.duration||0;w={yc:function(){return Promise.resolve(tj(n,x,y))}}}}catch(G){if((t||p)&&4002==
|
|
767
768
|
G.code)return null;throw G;}v=ig(l,"ContentProtection");v=Pp(v,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);v=new Set(v?[v]:[]);var A=!1;ig(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(A=!0);var z=!1;t&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(p&&((l=ig(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
|
|
768
769
|
(B=l.getAttribute("value")),!B))return null;var E;l=b.M.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"))&&(E="PQ");l=b.M.id?b.va.id+","+b.M.id:"";var F=l&&a.l[l]?a.l[l]:{id:a.J++,originalId:b.M.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){F.segmentIndex&&(F.segmentIndex.release(),F.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType,codecs:b.M.codecs,
|
|
769
|
-
frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.qa.language,label:f,type:b.qa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.M.
|
|
770
|
-
F.createSegmentIndex=function(){var G;return
|
|
770
|
+
frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.qa.language,label:f,type:b.qa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.M.je,audioSamplingRate:b.M.audioSamplingRate,spatialAudio:A,closedCaptions:k,hdr:E,tilesLayout:B,matchedStreams:[],accessibilityPurpose:m,external:!1};
|
|
771
|
+
F.createSegmentIndex=function(){var G;return H(function(I){if(1==I.g){if(F.segmentIndex)return I.F(0);G=F;return C(I,w.yc(),3)}G.segmentIndex=I.h;D(I)})};l&&b.Rb&&!a.l[l]&&(a.l[l]=F);return F}function nr(a){var b,c;H(function(d){switch(d.g){case 1:return b=0,wa(d,2),C(d,or(a),4);case 4:b=d.h;ya(d,3);break;case 2:if(c=za(d),a.h){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(c),d.return();c.severity=1;a.h.onError(c)}case 3:if(!a.h)return d.return();pr(a,b);D(d)}})}
|
|
771
772
|
function pr(a,b){0>a.G||a.H.R(Math.max(a.G-b,cc(a.I)))}
|
|
772
|
-
function vr(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,
|
|
773
|
-
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=ig(a,"AudioChannelConfiguration");m=Dr(m)||b.
|
|
774
|
-
"height",wg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),language:a.getAttribute("lang"),
|
|
773
|
+
function vr(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,je:null,audioSamplingRate:null,vc:0};c=c||b.Ta;var d=ig(a,"BaseURL"),e=d.map(og),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=qg(a,"frameRate",zg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=ig(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
|
|
774
|
+
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=ig(a,"AudioChannelConfiguration");m=Dr(m)||b.je;p=qg(a,"audioSamplingRate",wg)||b.audioSamplingRate;f||(f=Ar(g,h));var t=hg(a,"SegmentBase"),v=hg(a,"SegmentTemplate"),w=t?qg(t,"availabilityTimeOffset",xg)||0:0,y=v?qg(v,"availabilityTimeOffset",xg)||0:0;d=d&&d.length?qg(d[0],"availabilityTimeOffset",xg)||0:0;d=b.vc+d+w+y;return{Ta:Fb(c,e),zd:t||b.zd,Wb:hg(a,"SegmentList")||b.Wb,Bd:v||b.Bd,width:qg(a,"width",wg)||b.width,height:qg(a,
|
|
775
|
+
"height",wg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),language:a.getAttribute("lang"),je:m,audioSamplingRate:p,vc:d}}
|
|
775
776
|
function Dr(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=
|
|
776
777
|
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 Br(a){var b=a.zd?1:0;b+=a.Wb?1:0;b+=a.Bd?1:0;if(0==b)return a.contentType==Kb||"application"==a.contentType?!0:!1;1!=b&&(a.zd&&(a.Wb=null),a.Bd=null);return!0}
|
|
777
|
-
function Er(a,b,c,d){var e,f,g,h,k,l;return
|
|
778
|
-
function tr(a,b,c){var d,e,f,g,h,k,l,m;return
|
|
779
|
-
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.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":Xa("NTP UTCTiming scheme is not supported");break;default:Xa("Unrecognized scheme in UTCTiming element",k)}n.F(9);break;case 7:return C(n,Er(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,Er(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:
|
|
780
|
-
3);break;case 5:
|
|
778
|
+
function Er(a,b,c,d){var e,f,g,h,k,l;return H(function(m){if(1==m.g)return e=Fb(b,[c]),f=nf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),hf(a.C,g),C(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=Gf(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
|
|
779
|
+
function tr(a,b,c){var d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.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){n.F(4);break}h=g.value;wa(n,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 n.F(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 n.F(8);
|
|
780
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.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":Xa("NTP UTCTiming scheme is not supported");break;default:Xa("Unrecognized scheme in UTCTiming element",k)}n.F(9);break;case 7:return C(n,Er(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,Er(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ya(n,
|
|
781
|
+
3);break;case 5:za(n);case 3:g=f.next();n.F(2);break;case 4:return Xa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
781
782
|
function wr(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=qg(d,"timescale",wg)||1;d=r(ig(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=qg(k,"presentationTime",wg)||0,m=qg(k,"duration",wg)||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))}}
|
|
782
|
-
function Cr(a,b,c,d,e){var f,g,h,k,l,m;return
|
|
783
|
+
function Cr(a,b,c,d,e){var f,g,h,k,l,m;return H(function(n){if(1==n.g)return f=tf,g=e?0:1,h=Qj(b,c,d,a.g.retryParameters),k=a.h.networkingEngine,l=k.request(f,h,{type:g}),hf(a.C,l),C(n,l.promise,2);m=n.h;return n.return(m.data)})}function Ar(a,b){b=cd(a,b);return kd(b)?Kb:a.split("/")[0]}K("shaka.dash.DashParser",mr);vh.mpd=function(){return new mr};th["application/dash+xml"]=function(){return new mr};th["video/vnd.mpeg.dash.mpd"]=function(){return new mr};function Fr(){}K("shaka.dependencies",Fr);Fr.has=function(a){return Gr.has(a)};Fr.add=function(a,b){if(!Hr[a])throw Error(a+" is not supported");Gr.set(a,function(){return b})};var Hr={muxjs:"muxjs",ISOBoxer:"ISOBoxer"};Fr.Allowed=Hr;var Gr=new Map([["muxjs",function(){return window.muxjs}],["ISOBoxer",function(){return window.ISOBoxer}]]);function Ir(a,b){return a.filter(function(c){return c.name==b})}function Jr(a,b){return a.filter(function(c){return Kr(c,"TYPE")==b})}function Lr(a,b){a=Ir(a,b);return a.length?a[0]:null}function Mr(a,b,c){c=void 0===c?0:c;return(a=Lr(a,b))?Number(a.value):c}function Nr(a,b){return Fb([a],[b])[0]};function Or(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Pr(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Pr.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};
|
|
783
784
|
Pr.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Y(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Kr(a,b){a=a.getAttribute(b);if(!a)throw new N(2,4,4023,b);return a.value}function Qr(a,b,c,d){d=void 0===d?[]:d;this.g=c;this.l=null;this.j=a;this.m=b;this.h=d}
|
|
784
785
|
ea.Object.defineProperties(Qr.prototype,{i:{configurable:!0,enumerable:!0,get:function(){!this.l&&this.j&&this.m&&(this.l=Nr(this.j,this.m),this.m=this.j=null);return this.l||""}}});function Rr(a,b){this.name=a;this.value=b};function Sr(a){this.h=a||"";this.g=0}function Tr(a){Ur(a,/[ \t]+/gm)}function Ur(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 Vr(a){return a.g==a.h.length?null:(a=Ur(a,/[^ \t\n]*/gm))?a[0]:null};function Wr(){this.g=0}
|
|
785
786
|
function Xr(a,b,c){b=Gf(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 N(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=Yr(a,g),--a.g,Zr.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=Yr(a,h);if($r.includes(h.name)){if(1!=b)throw new N(2,4,4017);
|
|
@@ -787,210 +788,211 @@ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next()
|
|
|
787
788
|
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Rr("URI",k)),e=!0)}}return new Or(c,b,f)}function Yr(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new N(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Sr(d);var f;(f=Ur(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Ur(d,g);)c.push(new Rr(f[1],f[2]||f[3])),Tr(d)}return new Pr(a,b,c,e)}
|
|
788
789
|
var Zr="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(" "),$r="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function as(){}function bs(a){try{var b=cs(a);return af({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ze(c)}}
|
|
789
790
|
function cs(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(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=bg(a):e=Kf(a);return{data:e,contentType:c}}K("shaka.net.DataUriPlugin",as);as.parse=bs;kf("data",bs);function ds(){var a=this;this.g=this.i=null;this.ya=1;this.B=new Map;this.D=new Map;this.I=new Map;this.I.set("video",new Map);this.I.set("audio",new Map);this.I.set(Kb,new Map);this.I.set("image",new Map);this.ba=new Set;this.h=new Map;this.j=null;this.P="";this.X=new Wr;this.G=-1;this.L=Infinity;this.Fa=!1;this.m=new O(function(){es(a)});this.aa=fs;this.H=null;this.ea=0;this.l=Infinity;this.W=this.U=this.J=0;this.K=new gf;this.N=new Map;this.C=new Map;this.Z=new Map;this.za=this.o=!1}q=ds.prototype;
|
|
790
|
-
q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return
|
|
791
|
-
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return
|
|
792
|
-
h&&ns(a);D(m)})};function os(a,b){return is(a)?a.I.get(b.type):b.
|
|
793
|
-
function js(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,
|
|
794
|
-
t=n.drmInfos;v=function(ka,
|
|
795
|
-
L.endTime;if(V=Lr(g.g,"EXT-X-ENDLIST"))b.md=!0;ts(a,g);D(
|
|
796
|
-
function us(a,b){for(var c=-1==a.G,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=os(a,e);if(f=f.g[0]||null){g=r(g);for(var h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.G=Math.max(a.G,k));e.
|
|
797
|
-
function ws(a,b){if(Infinity==a.L){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.L=Math.min(a.L,d.g))}}b=a.L;if(Infinity!=b)for(d=r(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Wa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.Cd,"Expect AV sync issues!");else for(vs(a,c,f.g-b-f.startTime),c=r(e),e=c.next();!e.done;e=c.next())e.value.
|
|
798
|
-
function vs(a,b,c){b.
|
|
799
|
-
function hs(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,
|
|
800
|
-
|
|
801
|
-
A),z&&B.set("value",z),E=new M("sessiondata",B),a.i)a.i.onEvent(E);zs(a,k);
|
|
802
|
-
C(
|
|
803
|
-
Gs(a,
|
|
804
|
-
function xs(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z;return
|
|
805
|
-
n=[h.i];(p=Is(a,b.h,h.g,new Map))&&(n=p.Oa());t=tf;v=nf(n,a.g.retryParameters);w=p?0:1;return C(B,Js(a,v,t,{type:w}),2)}y=B.h;(x=y.headers["content-type"])&&(x=x.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==x){var E=mc(y.data);var F=(new hi).parse(E),G=F.Sd();E=[];var
|
|
806
|
-
J=!0;break;case "hvc":E.push("hvc1.1.6.L93.90"),J=!0}E.length?(G=
|
|
791
|
+
q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return H(function(e){return 1==e.g?(c.i=b,c.o=b.isLowLatencyMode(),C(e,gs(c,a),2)):3!=e.g?(d=e.h,c.P=d.uri,C(e,hs(c,d.data,a),3)):e.return(c.H)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.K&&(a.push(this.K.destroy()),this.K=null);this.g=this.i=null;this.ba.clear();this.H=null;this.h.clear();this.D.clear();this.C.clear();this.B.clear();return Promise.all(a)};
|
|
792
|
+
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return H(function(m){if(1==m.g){if(!is(a))return m.return();b=[];c=Array.from(a.h.values());a.l=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(js(a,g));return C(m,Promise.all(b),2)}ks(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.md});d.length&&!h&&(k=ls,ms(a,k.Ug),l=d.map(function(n){return n.Hb}),a.j.Ra(Math.min.apply(Math,u(l))),a.i.updateDuration());
|
|
793
|
+
h&&ns(a);D(m)})};function os(a,b){return is(a)?a.I.get(b.type):b.ee}
|
|
794
|
+
function js(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,I,J,L,V;return H(function(U){if(1==U.g)return c=b.Ld,d=new mb(c),e=new rb,b.Od&&(0<=b.Wa&&e.add("_HLS_msn",String(b.Wa)),0<=b.Xa&&e.add("_HLS_part",String(b.Xa))),b.Pd&&e.add("_HLS_skip","YES"),Ab(e),e.dd&&pb(d,e),C(U,gs(a,d.toString(),!0),2);f=U.h;if(!b.stream.segmentIndex)return U.return();g=Xr(a.X,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=Ir(g.g,"EXT-X-DEFINE");k=ps(a,h);l=b.stream;m=os(a,b);n=qs(g,l.mimeType);p=n.keyIds;
|
|
795
|
+
t=n.drmInfos;v=function(ka,aa){return ka.size===aa.size&&[].concat(u(ka)).every(function(ha){return aa.has(ha)})};v(l.keyIds,p)||(l.keyIds=p,l.drmInfos=t,a.i.newDrmInfo(l));w=rs(a,g,l.type,l.mimeType,m,k);y=w.segments;x=w.bandwidth;l.bandwidth=x;l.segmentIndex.sd(y,a.j.Eb());y.length&&(A=Mr(g.g,"EXT-X-MEDIA-SEQUENCE",0),B=(z=Lr(g.g,"EXT-X-SKIP"))?Number(Y(z,"SKIPPED-SEGMENTS")):0,E=ss(A,y),F=E.Wa,G=E.Xa,b.Wa=F+B,b.Xa=G,I=m.get(A),l.segmentIndex.ob(I));J=y[0];b.kc=J.startTime;L=y[y.length-1];b.Hb=
|
|
796
|
+
L.endTime;if(V=Lr(g.g,"EXT-X-ENDLIST"))b.md=!0;ts(a,g);D(U)})}q.onExpirationUpdated=function(){};
|
|
797
|
+
function us(a,b){for(var c=-1==a.G,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=os(a,e);if(f=f.g[0]||null){g=r(g);for(var h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.G=Math.max(a.G,k));e.Se=k;break}}}}if(!(0>a.G))for(b=r(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.G-c.Se),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),vs(a,c,d)}
|
|
798
|
+
function ws(a,b){if(Infinity==a.L){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.L=Math.min(a.L,d.g))}}b=a.L;if(Infinity!=b)for(d=r(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Wa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.Cd,"Expect AV sync issues!");else for(vs(a,c,f.g-b-f.startTime),c=r(e),e=c.next();!e.done;e=c.next())e.value.Hf(b)}}}
|
|
799
|
+
function vs(a,b,c){b.kc+=c;b.Hb+=c;a=os(a,b);b=r(a);for(var d=b.next();!d.done;d=b.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
|
|
800
|
+
function hs(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,I,J,L,V,U,ka,aa,ha,ta,Ca,ua;return H(function(Ea){switch(Ea.g){case 1:d=Xr(a.X,b,a.P);e=Ir(d.g,"EXT-X-DEFINE");for(var tb=r(e),Ia=tb.next();!Ia.done;Ia=tb.next()){var La=Ia.value;Ia=Y(La,"NAME");La=Y(La,"VALUE");Ia&&La&&(a.B.has(Ia)||a.B.set(Ia,La))}f=[];g=[];h=[];if(1==d.type)return C(Ea,xs(a,d),5);k=Ir(d.g,"EXT-X-MEDIA");l=Ir(d.g,"EXT-X-STREAM-INF");m=Ir(d.g,"EXT-X-IMAGE-STREAM-INF");n=Ir(d.g,"EXT-X-SESSION-KEY");tb=r(l);for(Ia=tb.next();!Ia.done;Ia=
|
|
801
|
+
tb.next()){var eb=Ia.value;La=Y(eb,"AUDIO");Ia=Y(eb,"VIDEO");var Za=Y(eb,"SUBTITLES");eb=ys(a,eb);if(Za){var vc=Ib(Kb,eb);a.C.set(Za,vc);wc(eb,vc)}La&&(Za=Ib("audio",eb),Za||(Za=a.g.hls.defaultAudioCodec),a.C.set(La,Za));Ia&&(La=Ib("video",eb),La||(La=a.g.hls.defaultVideoCodec),a.C.set(Ia,La))}p=Ir(d.g,"EXT-X-SESSION-DATA");t=r(p);for(v=t.next();!v.done;v=t.next())if(w=v.value,y=Y(w,"DATA-ID"),x=Y(w,"URI"),A=Y(w,"LANGUAGE"),z=Y(w,"VALUE"),B=(new Map).set("id",y),x&&B.set("uri",Nr(a.P,x)),A&&B.set("language",
|
|
802
|
+
A),z&&B.set("value",z),E=new M("sessiondata",B),a.i)a.i.onEvent(E);zs(a,k);tb=Jr(k,"CLOSED-CAPTIONS");tb=r(tb);for(Ia=tb.next();!Ia.done;Ia=tb.next())Ia=Ia.value,La=Y(Ia,"LANGUAGE"),La=Ob(La||"und"),Za=Kr(Ia,"GROUP-ID"),Ia=Kr(Ia,"INSTREAM-ID"),a.N.get(Za)||a.N.set(Za,new Map),a.N.get(Za).set(Ia,La);f=As(a,l,n);g=Bs(a,k);return C(Ea,Cs(a,m),4);case 4:h=Ea.h;Ea.F(3);break;case 5:return F=Ea.h,G=F.type,I=F.mimeType,J=F.codecs,L=F.language,V=F.height,U=F.width,ka=F.channelCount,aa=F.sampleRate,ha=new Map,
|
|
803
|
+
C(Ea,Ds(a,d,c,c,J,G,L,!0,"Media Playlist",ka,ha,null,!1,aa,!1,I),6);case 6:ta=Ea.h,a.h.set(c,ta),"video"==G&&Es(ta.stream,U,V,null,null),f.push({id:0,language:Ob(L||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==G?ta.stream:null,video:"video"==G?ta.stream:null,bandwidth:ta.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new N(2,7,7001);a.j=new Q(null,0);a.j.Jc(!0);1==d.type&&(is(a)&&(Fs(a),Ca=a.l,a.m.R(Ca)),ua=Array.from(a.h.values()),
|
|
804
|
+
Gs(a,ua),ns(a));a.H={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null};a.i.makeTextStreamsForClosedCaptions(a.H);D(Ea)}})}
|
|
805
|
+
function xs(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z;return H(function(B){if(1==B.g){c=a.g.hls.mediaPlaylistFullMimeType;d=c.split(";")[0];e=d.split("/")[0];f=id(c);g={type:e,mimeType:d,codecs:f,language:null,height:null,width:null,channelCount:null,sampleRate:null};if(!b.segments.length)return B.return(g);h=b.segments[0];k=new mb(h.i);l=k.La.split(".").pop();if(m=Hs[l])return B.return({type:"audio",mimeType:m,codecs:"",language:null,height:null,width:null,channelCount:null,sampleRate:null});
|
|
806
|
+
n=[h.i];(p=Is(a,b.h,h.g,new Map))&&(n=p.Oa());t=tf;v=nf(n,a.g.retryParameters);w=p?0:1;return C(B,Js(a,v,t,{type:w}),2)}y=B.h;(x=y.headers["content-type"])&&(x=x.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==x){var E=mc(y.data);var F=(new hi).parse(E),G=F.Sd();E=[];var I=!1,J=!1;switch(G.audio){case "aac":E.push("mp4a.40.2");I=!0;break;case "mp3":E.push("mp4a.40.34");I=!0;break;case "ac3":E.push("ac-3");I=!0;break;case "ec3":E.push("ec-3"),I=!0}switch(G.video){case "avc":E.push("avc1.42E01E");
|
|
807
|
+
J=!0;break;case "hvc":E.push("hvc1.1.6.L93.90"),J=!0}E.length?(G=I&&!J,F=F.qg(),E={type:G?"audio":"video",mimeType:"video/mp2t",codecs:E.join(", "),language:null,height:F.height,width:F.width,channelCount:null,sampleRate:null}):E=null;if(A=E)return B.return(A)}else if("mp4"==l||"video/mp4"==x||"audio/mp4"==x)if(z=Ks(y))return B.return(z);return B.return(g)})}
|
|
807
808
|
function Ks(a){function b(n){return c(n.name)}function c(n){n=n.toLowerCase();switch(n){case "avc1":case "avc3":d.push(n+".42E01E");f=!0;break;case "hev1":case "hvc1":d.push(n+".1.6.L93.90");f=!0;break;case "dvh1":case "dvhe":d.push(n+".05.04");f=!0;break;case "vp09":d.push(n+".00.10.08");f=!0;break;case "av01":d.push(n+".0.01M.08");f=!0;break;case "mp4a":d.push("mp4a.40.2");e=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":d.push(n),e=!0}}var d=[],e=!1,f=!1,g=null,h=null,k=null,l=null,m=
|
|
808
809
|
null;(new Pf).box("moov",Uf).box("trak",Uf).T("tkhd",function(n){n=Vh(n.reader,n.version);h=String(n.height);k=String(n.width)}).box("mdia",Uf).T("mdhd",function(n){g=Th(n.reader,n.version).language}).box("minf",Uf).box("stbl",Uf).T("stsd",Wf).box("mp4a",function(n){var p=n.reader;p.skip(6);p.skip(2);p.skip(8);var t=p.Ya();p.skip(2);p.skip(2);p.skip(2);p=p.Ya()+p.Ya()/65536;l=t;m=p;n.reader.wa()?Uf(n):b(n)}).box("esds",function(n){n=Wh(n.reader);d.push(n.ib);e=!0}).box("ac-3",b).box("ec-3",b).box("opus",
|
|
809
810
|
b).box("Opus",b).box("fLaC",b).box("avc1",function(n){n=Xh(n.reader,n.name);d.push(n.ib);f=!0}).box("avc3",function(n){n=Xh(n.reader,n.name);d.push(n.ib);f=!0}).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vp09",b).box("av01",b).box("enca",Xf).box("encv",Xf).box("sinf",Uf).box("frma",function(n){n=Yh(n.reader).ib;c(n)}).parse(a.data,!0);if(!d.length)return null;a=e&&!f;return{type:a?"audio":"video",mimeType:a?"audio/mp4":"video/mp4",codecs:Ls(d).join(", "),language:g,height:h,width:k,
|
|
810
|
-
channelCount:l,sampleRate:m}}function ns(a){if(is(a)){if(a.aa==Ms){for(var b,c=b=Infinity,d=r(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Hb),c=Math.min(c,e.
|
|
811
|
+
channelCount:l,sampleRate:m}}function ns(a){if(is(a)){if(a.aa==Ms){for(var b,c=b=Infinity,d=r(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Hb),c=Math.min(c,e.kc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.xe(b)}}else a.j.Ra(Ns(a));a.j.be()}
|
|
811
812
|
function ps(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Y(e,"NAME");var f=Y(e,"VALUE");e=Y(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.B.get(e))&&c.set(e,d)}return c}
|
|
812
813
|
function Bs(a,b){var c=Jr(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Os(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=Kr(d.value,"GROUP-ID");if(d=a.C.get(e))if(e=a.D.get(e)){e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Ps(Kb,d)||Qs(Kb)}}return b.filter(function(g){return g})}
|
|
813
|
-
function Cs(a,b){var c,d;return
|
|
814
|
+
function Cs(a,b){var c,d;return H(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return H(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);wa(l,2);return C(l,Rs(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=za(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),C(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
|
|
814
815
|
function zs(a,b){b=b.filter(function(d){var e=Y(d,"URI")||"";return"SUBTITLES"!=Y(d,"TYPE")&&""!=e});b=r(b);for(var c=b.next();!c.done;c=b.next())Os(a,c.value)}
|
|
815
816
|
function As(a,b,c){var d=[],e=new Set;if(0<c.length){c=r(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=Kr(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=Y(f,"KEYFORMAT")||"identity",f=(g=Ss[g])?g(f,""):null)){if(f.keyIds){g=r(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=Y(k,"FRAME-RATE"),m=Number(Y(k,"AVERAGE-BANDWIDTH"))||Number(Kr(k,"BANDWIDTH")),n=Y(k,"RESOLUTION");n=r(n?n.split("x"):[null,null]);var p=n.next().value,t=n.next().value,
|
|
816
817
|
v=Y(k,"VIDEO-RANGE");k=Ts(a,k);n=k.audio;k=k.video;for(var w=r(k),y=w.next();!y.done;y=w.next())Es(y.value.stream,p,t,l,v);l=a.g.disableAudio;if(!n.length||l)n=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];n=r(n);for(p=n.next();!p.done;p=n.next())for(p=p.value,t=r(k),v=t.next();!v.done;v=t.next()){var x=v.value;if(v=p?p.stream:null)v.drmInfos=d,v.keyIds=e;if(w=x?x.stream:null)w.drmInfos=d,w.keyIds=e;y=p?p.stream.drmInfos:null;var A=x?x.stream.drmInfos:null;x=(x?x.Cd:"")+" - "+(p?p.Cd:"");
|
|
817
818
|
v&&w&&!oh(y,A)||a.ba.has(x)||(v={id:a.ya++,language:v?v.language:"und",disabledUntilTime:0,primary:!!v&&v.primary||!!w&&w.primary,audio:v,video:w,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(v),a.ba.add(x))}return l}).reduce(Cb,[]);return b=b.filter(function(k){return null!=k})}
|
|
818
|
-
function Ts(a,b){var c=ys(a,b),d=Y(b,"AUDIO"),e=Y(b,"VIDEO"),f=d||e;f=f&&a.D.has(f)?a.D.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Kr(b,"URI"),h=d.audio.find(function(m){return m&&m.Cd==g}),k=Ib("video",c),l=Ib("audio",c);l&&!k?f="audio":!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Us(a,b,c,f),d[a.stream.type]=[a]);return d}
|
|
819
|
+
function Ts(a,b){var c=ys(a,b),d=Y(b,"AUDIO"),e=Y(b,"VIDEO"),f=d||e;f=f&&a.D.has(f)?a.D.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Kr(b,"URI"),h=d.audio.find(function(m){return m&&m.Cd==g}),k=Ib("video",c),l=Ib("audio",c);l&&!k?(f="audio",e=0<d.audio.length):!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Us(a,b,c,f),d[a.stream.type]=[a]);return d}
|
|
819
820
|
function ys(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);a=Y(b,"CODECS",c.join(",")).split(/\s*,\s*/);return Ls(a)}function Ls(a){var b=new Set,c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=hd(d)[0];b.has(e)||(c.push(d),b.add(e))}return c}
|
|
820
821
|
function Os(a,b){var c=Kr(b,"GROUP-ID"),d="",e=Kr(b,"TYPE").toLowerCase();"subtitles"==e&&(e=Kb);var f=e;f==Kb?d=Y(b,"CODECS")||"":c&&a.C.has(c)&&(d=a.C.get(c));e=Vs(Kr(b,"URI"),a.B);if(a.h.has(e))return a.h.get(e);var g=Y(b,"LANGUAGE"),h=Y(b,"NAME"),k="YES"==Y(b,"DEFAULT");var l="audio"==f?(l=Y(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=Y(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var n=Y(b,"CHARACTERISTICS"),p="YES"==Y(b,"FORCED");"audio"==f?b=(b=Y(b,"SAMPLE-RATE"))?
|
|
821
822
|
parseInt(b,10):null:b=null;d=Ws(a,e,d,f,g,k,h,l,null,n,p,b,m);a.D.has(c)?a.D.get(c).push(d):a.D.set(c,[d]);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
|
|
822
|
-
function Rs(a,b){var c,d,e,f,g,h,k,l,m,n;return
|
|
823
|
+
function Rs(a,b){var c,d,e,f,g,h,k,l,m,n;return H(function(p){if(1==p.g){c=Vs(Kr(b,"URI"),a.B);d=Y(b,"CODECS","jpeg")||"";if(a.h.has(c))return p.return(a.h.get(c));e=Y(b,"LANGUAGE");f=Y(b,"NAME");g=Y(b,"CHARACTERISTICS");h=Ws(a,c,d,"image",e,!1,f,null,null,g,!1,null,!1);return a.h.has(c)?p.return(a.h.get(c)):(k=Y(b,"RESOLUTION"))?C(p,h.stream.createSegmentIndex(),3):p.F(2)}2!=p.g&&(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=
|
|
823
824
|
Number(k.split("x")[1])*Number(m.split("x")[1]));if(n=Y(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p.return(h)})}function Us(a,b,c,d){var e=Vs(Kr(b,"URI"),a.B);if(a.h.has(e))return a.h.get(e);b=Y(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.N.get(b):null;c=Hb(d,c);d=Ws(a,e,c,d,null,!1,null,null,b,null,!1,null,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
|
|
824
|
-
function Ws(a,b,c,d,e,f,g,h,k,l,m,n,p){function t(z){var B,E,F,G,
|
|
825
|
-
w.drmInfos=J.drmInfos;w.keyIds=J.keyIds;w.mimeType=J.mimeType;w.bandwidth=J.bandwidth;w.drmInfos.length&&a.i.newDrmInfo(w);L=Lb;if(d==L.Na||d==L.Pb)for(V=r(a.h.values()),
|
|
826
|
-
var v=Nr(a.P,b),w=Ys(a,c,d,e,f,g,h,k,l,m,n,p),y={stream:w,type:d,Cd:b,Ld:v,
|
|
825
|
+
function Ws(a,b,c,d,e,f,g,h,k,l,m,n,p){function t(z){var B,E,F,G,I,J,L,V,U,ka,aa,ha,ta,Ca;return H(function(ua){if(1==ua.g)return C(ua,gs(a,y.Ld,!0),2);if(3!=ua.g){B=ua.h;if(z.aborted)return ua.return();E=B.uri;F=Xr(a.X,B.data,E);G=is(a);return C(ua,Ds(a,F,b,E,c,d,e,f,g,h,k,l,m,n,p),3)}I=ua.h;if(z.aborted)return ua.return();J=I.stream;is(a)&&!G&&Fs(a);y.Ld=E;y.kc=I.kc;y.Hb=I.Hb;y.Pd=I.Pd;y.Od=I.Od;y.md=I.md;y.ee=I.ee;y.Wa=I.Wa;y.Xa=I.Xa;y.gf=!0;w.segmentIndex=J.segmentIndex;w.encrypted=J.encrypted;
|
|
826
|
+
w.drmInfos=J.drmInfos;w.keyIds=J.keyIds;w.mimeType=J.mimeType;w.bandwidth=J.bandwidth;w.drmInfos.length&&a.i.newDrmInfo(w);L=Lb;if(d==L.Na||d==L.Pb)for(V=r(a.h.values()),U=V.next();!U.done;U=V.next())ka=U.value,ka.gf||ka.type!=d||(ka.stream.mimeType=J.mimeType);d==L.oa&&(aa=J.segmentIndex.get(0))&&aa.h&&(w.mimeType="application/mp4");Xs(a)&&(a.Fa?Gs(a,[y]):(a.Fa=!0,ha=Array.from(a.h.values()),ta=ha.filter(function(Ea){return Ea.stream.segmentIndex}),Gs(a,ta),ns(a),Ca=a.l,0<Ca&&a.m.R(Ca)));D(ua)})}
|
|
827
|
+
var v=Nr(a.P,b),w=Ys(a,c,d,e,f,g,h,k,l,m,n,p),y={stream:w,type:d,Cd:b,Ld:v,kc:0,Hb:0,ee:new Map,Pd:!1,Od:!1,md:!1,Se:-1,Wa:-1,Xa:-1,gf:!1},x=null,A=new AbortController;w.createSegmentIndex=function(){if(x)return x;A=new AbortController;return x=new Promise(function(z){z(t(A.signal))})};w.closeSegmentIndex=function(){x&&!w.segmentIndex&&A.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);x=null};return y}
|
|
827
828
|
function Ns(a){var b=Infinity;a=r(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Hb));return b}function ks(a,b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&rj(d.segmentIndex,function(e){c.push(e)});a.j.td(c)}
|
|
828
|
-
function Gs(a,b){if(!is(a))for(var c=Ns(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.
|
|
829
|
-
function Ds(a,b,c,d,e,f,g,h,k,l,m,n,p,t,v,w){var y,x,A,z,B,E,F,G,
|
|
830
|
-
if(E&&!z.length&&!F)throw new N(2,4,4026);G=is(a)?a.I.get(f):new Map;
|
|
831
|
-
L;return
|
|
829
|
+
function Gs(a,b){if(!is(a))for(var c=Ns(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.wc(0,c);ks(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?us(a,b):ws(a,b)}function Xs(a){if(!a.H)return!1;var b=[],c=[];a=r(a.H.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
830
|
+
function Ds(a,b,c,d,e,f,g,h,k,l,m,n,p,t,v,w){var y,x,A,z,B,E,F,G,I,J,L,V,U,ka,aa,ha,ta,Ca,ua,Ea,tb,Ia,La;return H(function(eb){if(1==eb.g){if(1!=b.type)throw new N(2,4,4017);y=Ir(b.g,"EXT-X-DEFINE");x=ps(a,y);var Za=Lr(b.g,"EXT-X-PLAYLIST-TYPE"),vc=Lr(b.g,"EXT-X-ENDLIST");vc=Za&&"VOD"==Za.value||vc;Za=Za&&"EVENT"==Za.value&&!vc;Za=!vc&&!Za;vc?ms(a,fs):Za?ms(a,Ms):ms(a,Zs);is(a)&&ts(a,b);return w?eb.F(2):C(eb,$s(a,f,e,b,x),3)}2!=eb.g&&(w=eb.h);A=qs(b,w);z=A.drmInfos;B=A.keyIds;E=A.encrypted;F=A.Yg;
|
|
831
|
+
if(E&&!z.length&&!F)throw new N(2,4,4026);G=is(a)?a.I.get(f):new Map;I=rs(a,b,f,w,G,x);J=I.segments;L=I.bandwidth;is(a)&&ts(a,b);V=J[0].startTime;U=J[J.length-1];ka=U.endTime;aa=new qj(J);ta=(ha=Lr(b.g,"EXT-X-SERVER-CONTROL"))?null!=ha.getAttribute("CAN-SKIP-UNTIL"):!1;Ca=ha?null!=ha.getAttribute("CAN-BLOCK-RELOAD"):!1;ua=Mr(b.g,"EXT-X-MEDIA-SEQUENCE",0);Ea=ss(ua,J);tb=Ea.Wa;Ia=Ea.Xa;La=Ys(a,e,f,g,h,k,l,m,n,p,t,v);La.segmentIndex=aa;La.encrypted=E;La.drmInfos=z;La.keyIds=B;La.mimeType=w;La.bandwidth=
|
|
832
|
+
L;return eb.return({stream:La,type:f,Cd:c,Ld:d,kc:V,Hb:ka,Pd:ta,Od:Ca,md:!1,Se:-1,Wa:tb,Xa:Ia,ee:G,gf:!1})})}function ss(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Wa:a,Xa:c};b=b[b.length-1];var d=b.i;if(!b.i.length)return a++,b.o&&(c=0),{Wa:a,Xa:c};c=d.length-1;d[d.length-1].m||(a++,c=0);return{Wa:a,Xa:c}}
|
|
832
833
|
function Ys(a,b,c,d,e,f,g,h,k,l,m,n){var p=Ps(c,b)||Qs(c),t=[];if(k){k=r(k.split(","));for(var v=k.next();!v.done;v=k.next())t.push(v.value)}k=c==Kb?"subtitle":void 0;t.length||"subtitle"!==k||t.push("subtitle");return{id:a.ya++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:b,kind:c==Kb?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Ob(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,
|
|
833
834
|
frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:t,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,tilesLayout:void 0,accessibilityPurpose:null,external:!1}}
|
|
834
835
|
function qs(a,b){var c=[];if(a.segments){a=r(a.segments);for(var d=a.next();!d.done;d=a.next())d=Ir(d.value.g,"EXT-X-KEY"),c.push.apply(c,u(d))}d=a=!1;var e=[],f=new Set;c=r(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Kr(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Y(g,"KEYFORMAT")||"identity",g=(h=Ss[h])?h(g,b):null){if(g.keyIds){h=r(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,Yg:d}}
|
|
835
|
-
function at(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Xa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new N(2,4,4042);var d=0,e=Y(b,"IV","");if(e){var f=cg(e.substr(2));if(16!=f.byteLength)throw new N(2,4,4043);}else d=Mr(c.g,"EXT-X-MEDIA-SEQUENCE",0);b=Nr(c.h,Kr(b,"URI"));var g=nf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return
|
|
836
|
+
function at(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Xa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new N(2,4,4042);var d=0,e=Y(b,"IV","");if(e){var f=cg(e.substr(2));if(16!=f.byteLength)throw new N(2,4,4043);}else d=Mr(c.g,"EXT-X-MEDIA-SEQUENCE",0);b=Nr(c.h,Kr(b,"URI"));var g=nf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return H(function(n){if(1==n.g)return C(n,
|
|
836
837
|
Js(a,g,6),2);if(3!=n.g){k=n.h;if(!k.data||16!=k.data.byteLength)throw new N(2,4,4044);l={name:"AES-CBC"};m=h;return C(n,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=n.h;h.fetchKey=void 0;D(n)})}};return h}
|
|
837
838
|
function ts(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Lr(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Lr(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Lr(b.g,"EXT-X-PART-INF"))a.J=Number(Kr(e,"PART-TARGET"));b=Lr(b.g,"EXT-X-SERVER-CONTROL");a.o&&a.J?(a.l=a.za?5*a.J<=c?Math.min(a.J,a.l):Math.min(c,a.l):Math.min(a.J,a.l),a.W=b?Number(Kr(b,"PART-HOLD-BACK")):0):(a.l=Math.min(c,a.l),c=b?
|
|
838
839
|
b.getAttribute("HOLD-BACK"):null,a.U=c?Number(c.value):0);a.ea=Math.max(d,a.ea)}function Fs(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.W?a.W:a.U?a.U:a.ea*a.g.hls.liveSegmentsDelay;a.j.Kg(0);a.j.Hg(b);a.j.Jc(!1)}function Is(a,b,c,d){c=Lr(c,"EXT-X-MAP");if(!c)return null;var e=Kr(c,"URI");d=Vs(Nr(b,e),d);b=[d,Y(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=bt(d,c),a.Z.set(b,c));return a.Z.get(b)}
|
|
839
840
|
function bt(a,b){var c=0,d=null;if(b=Y(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new Bh(function(){return[a]},c,d)}
|
|
840
841
|
function ct(a,b,c,d,e,f,g,h,k,l,m){var n=d.g,p=Lr(n,"EXTINF"),t=0,v=0,w=null;d.h.length&&!a.o&&Xa("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=Lr(n,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(y=rg(x.value))}var A=Dh;Lr(n,"EXT-X-GAP")&&(A=2);if(!p){if(0==d.h.length)throw new N(2,4,4024,"EXTINF");
|
|
841
|
-
if(!a.o)return null}var z=[];x=!1;var B=null,E=!1,F=!1;if(a.o&&d.h.length){t=("video/mp4"==k||"audio/mp4"==k)&&window.ReadableStream;k=y;for(var G={},
|
|
842
|
-
|
|
843
|
-
!1,B=null):z=[]);(p=Lr(n,"EXT-X-BYTERANGE"))?(w=r(dt(c,p.value)),v=w.next().value,w=w.next().value):z.length&&(v=z[0].Sa,w=z[z.length-1].Aa);c="";p=null;"image"==h&&(c="1x1",h=Lr(n,"EXT-X-TILES"))&&(c=Kr(h,"LAYOUT"),(h=Y(h,"DURATION"))&&(p=Number(h)));var
|
|
842
|
+
if(!a.o)return null}var z=[];x=!1;var B=null,E=!1,F=!1;if(a.o&&d.h.length){t=("video/mp4"==k||"audio/mp4"==k)&&window.ReadableStream;k=y;for(var G={},I=0;I<d.h.length;G={Sc:G.Sc,Hd:G.Hd},I++){var J=d.h[I],L=0==I?c:z[z.length-1],V=0==I?e:L.endTime,U=Number(Y(J,"DURATION"))||a.J;if(U){var ka=V+U,aa=0,ha=null;"EXT-X-PRELOAD-HINT"==J.name?(aa=(aa=Y(J,"BYTERANGE-START"))?Number(aa):0,(L=Y(J,"BYTERANGE-LENGTH"))?ha=aa+Number(L)-1:aa&&(ha=Number.MAX_SAFE_INTEGER)):(aa=Y(J,"BYTERANGE"),ha=r(dt(L,aa)),aa=
|
|
843
|
+
ha.next().value,ha=ha.next().value);G.Hd=Y(J,"URI");if(G.Hd){L=Dh;"YES"==Y(J,"GAP")&&(L=2,E=!0);G.Sc=null;var ta=function(ua){return function(){null==ua.Sc&&(ua.Sc=Nr(g,ua.Hd));return[ua.Sc]}}(G);t&&0<=aa&&null!=ha&&(B=ta,x=!0);V=new P(V,ka,ta,aa,ha,b,0,0,Infinity,[],"",null,k,L,m);"EXT-X-PRELOAD-HINT"==J.name&&(V.hf(),F=!0);"YES"!=Y(J,"INDEPENDENT")&&0<I&&V.yg();z.push(V);k&&(k+=U)}}}}if(p){p=Number(p.value.split(",")[0]);if(0==p)return null;t=e+p}else t=z[z.length-1].endTime;x&&(E||0!=z[0].Sa?(x=
|
|
844
|
+
!1,B=null):z=[]);(p=Lr(n,"EXT-X-BYTERANGE"))?(w=r(dt(c,p.value)),v=w.next().value,w=w.next().value):z.length&&(v=z[0].Sa,w=z[z.length-1].Aa);c="";p=null;"image"==h&&(c="1x1",h=Lr(n,"EXT-X-TILES"))&&(c=Kr(h,"LAYOUT"),(h=Y(h,"DURATION"))&&(p=Number(h)));var Ca=null;b=new P(e,t,function(){if(B)return B();null==Ca&&(Ca=Vs(d.i,f));return Ca.length?[Ca]:[]},v,w,b,l,0,Infinity,z,c,p,y,A,m);x&&(a.za=!0,b.xg(),F&&b.hf());return b}
|
|
844
845
|
function dt(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Aa+1,d=c+b-1);return[c,d]}
|
|
845
846
|
function rs(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Mr(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Mr(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Lr(b.g,"EXT-X-SKIP"),n=m?Number(Y(m,"SKIPPED-SEGMENTS")):0,p=l+n,t=0;is(a)&&e.has(p)&&(t=e.get(p));var v=[],w=null,y=t;m=[];for(var x=0;x<g.length;x++){var A=g[x],z=0==x?t:w.endTime;p=l+n+x;Lr(A.g,"EXT-X-DISCONTINUITY")&&(k++,y=z);var B=r(A.g);for(var E=B.next();!E.done;E=B.next())E=E.value,"EXT-X-KEY"==E.name&&("AES-128"==Kr(E,"METHOD")?h=at(a,E,b):h=void 0);e.set(p,
|
|
846
847
|
z);B=Is(a,b.h,A.g,f);!a.o&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.o=a.i.isLowLatencyMode());if(z=ct(a,B,w,A,z,f,b.h,c,d,y,h))(w=Mr(A.g,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:z.endTime-z.startTime}):m.length&&(w=m.pop(),w.duration+=z.endTime-z.startTime,m.push(w)),w=z,z.j=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.G&&p<a.G||v.push(z)}b=void 0;m.length&&(b=m.reduce(function(F,G){return F+G.duration},0),b=Math.round(m.reduce(function(F,G){return F+G.bitrate*G.duration},
|
|
847
848
|
0)/b*1E3));if(m=v.some(function(F){return null!=F.g}))for(c={},d=0;d<v.length;c={Oc:c.Oc,Nc:c.Nc,Dd:c.Dd,Mb:c.Mb,Mc:c.Mc},d++)if(c.Mb=v[d],null==c.Mb.g)for(c.Nc=0,c.Oc=d,e=function(F){return function(){var G=v[F.Oc];if(G){if(null!=G.g)return G.g+F.Nc;F.Nc-=G.endTime-G.startTime;F.Oc+=1}return null}}(c),c.Mc=0,c.Dd=d,f=function(F){return function(){var G=v[F.Dd];if(G){G!=F.Mb&&(F.Mc+=G.endTime-G.startTime);if(null!=G.g)return G.g+F.Mc;--F.Dd}return null}}(c);null==c.Mb.g;)c.Mb.g=f(),null==c.Mb.g&&
|
|
848
|
-
(c.Mb.g=e());if(m)for(c=r(v),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.L;if(m&&Infinity!=a)for(m=r(v),d=m.next();!d.done;d=m.next())d.value.
|
|
849
|
+
(c.Mb.g=e());if(m)for(c=r(v),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.L;if(m&&Infinity!=a)for(m=r(v),d=m.next();!d.done;d=m.next())d.value.Hf(a);return{segments:v,bandwidth:b}}
|
|
849
850
|
function Vs(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 N(2,4,4039,e);}}return a}function Ps(a,b){if(a==Kb){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
|
|
850
|
-
function Qs(a){return a==Kb?"text/vtt":et[a].mp4}function $s(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v;return
|
|
851
|
+
function Qs(a){return a==Kb?"text/vtt":et[a].mp4}function $s(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v;return H(function(w){if(1==w.g){f=tf;g=Math.trunc((d.segments.length-1)/2);h=Vs(d.segments[g].i,e);k=new mb(h);l=k.La.split(".").pop();m=et[b];if((n=m[l])||(n=Hs[l])||(n=Ps(b,c)))return w.return(n);p=nf([h],a.g.retryParameters);p.method="HEAD";return C(w,Js(a,p,f,{type:1}),2)}t=w.h;return(v=t.headers["content-type"])?w.return(v.split(";")[0]):w.return(Qs(b))})}
|
|
851
852
|
function Es(a,b,c,d,e){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0)}function gs(a,b,c){return Js(a,nf([b],a.g.retryParameters),0,{type:c?2:3})}
|
|
852
|
-
function es(a){var b,c;
|
|
853
|
+
function es(a){var b,c;H(function(d){if(1==d.g){if(!a.i)return d.return();wa(d,2);return C(d,a.update(),4)}if(2!=d.g)return is(a)&&(b=a.l,a.m.R(b)),ya(d,0);c=za(d);if(!a.i)return d.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c);a.m.R(.1);D(d)})}function is(a){return a.aa!=fs}function ms(a,b){a.aa=b;a.j&&a.j.Jc(!is(a));is(a)||a.m.stop()}
|
|
853
854
|
function Js(a,b,c,d){if(!a.K)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b,d);hf(a.K,b);return b.promise}K("shaka.hls.HlsParser",ds);
|
|
854
855
|
var Hs={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},et={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",
|
|
855
856
|
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"}},Ss={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new N(2,4,4041);return Gb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Kr(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
856
857
|
b=Kr(a,"URI");b=cs(b);b=mc(b.data);b=Gb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Y(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Kr(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Kr(a,"URI");a=cs(a);a=mc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=gg(a,b,new Set,0);return Gb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
|
|
857
858
|
Kr(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Gb("org.w3.clearkey",null):null}},fs="VOD",Zs="EVENT",Ms="LIVE",ls={Ug:fs,Yi:Zs,Sg:Ms};vh.m3u8=function(){return new ds};th["application/x-mpegurl"]=function(){return new ds};th["application/vnd.apple.mpegurl"]=function(){return new ds};function ft(a){var b=0,c=pc(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=mc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function gt(a){if(a=ht(a))a:{a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=hg(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
|
|
858
859
|
function ht(a){a=bg(a.textContent);a=ft(a).filter(function(b){return b.type===it})[0];if(!a)return null;a=Hf(a.value,!0);return(a=Ag(a,"WRMHEADER"))?a:null}var it=1,jt=(new Map).set("com.microsoft.playready",gt).set("com.microsoft.playready.recommendation",gt).set("com.microsoft.playready.software",gt).set("com.microsoft.playready.hardware",gt);function kt(a){if(!lt){lt=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);mt=nt("ftyp",b,d,b,c);b=nt("dref",ot);pt=nt("dinf",b)}this.g=a}
|
|
859
|
-
kt.prototype.initSegment=function(){var a=new Uint8Array([]);var b=r(this.g);for(var c=b.next();!c.done;c=b.next()){var d=a;a=c.value;c=nt;var e=a.stream.width||0
|
|
860
|
-
2)),[0,0]));e=nt("tkhd",e);f=nt;
|
|
861
|
-
case "audio":a=nt("minf",nt("smhd",wt),pt,vt(a));break a}a=new Uint8Array([])}a=f("mdia",
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
a.encrypted&&(e=yt(a),d="enca"),a=nt(d,zt(a),c,e);else{if(0<a.ma.byteLength)c=nt("esds",a.ma);else{c=nt;d=a.id+1;e=a.stream.bandwidth||0;h=a.stream.channelsCount||2;k=a.stream.audioSamplingRate||44100;l=Hb("audio",a.
|
|
868
|
-
u(rt(e,4)),u(rt(e,4)),[5,2,k<<3|g>>>1,g<<7|h<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=yt(a),d="enca");a=nt(d,zt(a),c,e)}c=a}a=nt("stsd",At,c);return b("stbl",a,nt("stts",Bt),nt("stsc",Ct),nt("stsz",Dt),nt("stco",
|
|
869
|
-
function
|
|
870
|
-
new Uint8Array([
|
|
860
|
+
kt.prototype.initSegment=function(){var a=new Uint8Array([]);var b=r(this.g);for(var c=b.next();!c.done;c=b.next()){var d=a;a=c.value;c=nt;var e=a.id+1;var f=a.stream.width||0,g=a.stream.height||0;"audio"==a.type&&(g=f=0);var h=a.duration*a.timescale,k=Math.floor(h/(qt+1));h=Math.floor(h%(qt+1));e=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(u(rt(e,4)),[0,0,0,0],u(rt(k,4)),u(rt(h,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
861
|
+
0,64,0,0,0],u(rt(f,2)),[0,0],u(rt(g,2)),[0,0]));e=nt("tkhd",e);f=nt;k=a.duration*a.timescale;g=Math.floor(k/(qt+1));k=Math.floor(k%(qt+1));h=a.stream.language;h=h.charCodeAt(0)-96<<10|h.charCodeAt(1)-96<<5|h.charCodeAt(2)-96;g=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(u(rt(a.timescale,4)),u(rt(g,4)),u(rt(k,4)),u(rt(h,2)),[0,0]));g=nt("mdhd",g);k=a;h=new Uint8Array([]);switch(k.type){case "video":h=st;break;case "audio":h=tt}k=nt("hdlr",h);a:{switch(a.type){case "video":a=nt("minf",
|
|
862
|
+
nt("vmhd",ut),pt,vt(a));break a;case "audio":a=nt("minf",nt("smhd",wt),pt,vt(a));break a}a=new Uint8Array([])}a=f("mdia",g,k,a);c=c("trak",e,a);a=eg(d,c)}c=this.g[0];b=nt;e=c.duration*c.timescale;d=Math.floor(e/(qt+1));e=Math.floor(e%(qt+1));d=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(u(rt(c.timescale,4)),u(rt(d,4)),u(rt(e,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
863
|
+
0,0,255,255,255,255]));d=nt("mvhd",d);f=new Uint8Array([]);e=r(this.g);for(g=e.next();!g.done;g=e.next())g=new Uint8Array([0,0,0,0].concat(u(rt(g.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),g=nt("trex",g),f=eg(f,g);e=nt("mvex",f);f=new Uint8Array([]);if(c.encrypted)for(c=r(c.stream.drmInfos),g=c.next();!g.done;g=c.next())if(g=g.value,g.initData)for(g=r(g.initData),k=g.next();!k.done;k=g.next())f=eg(f,k.value.initData);b=b("moov",d,a,e,f);d=new Uint8Array(mt.byteLength+b.byteLength);d.set(mt);
|
|
864
|
+
d.set(b,mt.byteLength);return d};
|
|
865
|
+
function vt(a){var b=nt,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.Ea.byteLength)var e=nt("avcC",a.Ea);else{e=nt;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.$a.length;n++){var p=xt(a.$a[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
866
|
+
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(u(rt(c,2)),u(rt(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=new Uint8Array([]);
|
|
867
|
+
a.encrypted&&(h=yt(a),d="encv");c=nt(d,c,e,h)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.Ea.byteLength&&(c=nt("hvcC",a.Ea)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(u(rt(d,2)),u(rt(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=new Uint8Array([]),a.encrypted&&(h=yt(a),e="encv"),c=nt(e,d,c,h));break;
|
|
868
|
+
case "audio":if(a.codecs.includes("mp3"))a=nt(".mp3",zt(a));else if(a.codecs.includes("ac-3"))c=nt("dac3",a.ma),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=yt(a),d="enca"),a=nt(d,zt(a),c,e);else if(a.codecs.includes("ec-3"))c=nt("dec3",a.ma),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=yt(a),d="enca"),a=nt(d,zt(a),c,e);else{if(0<a.ma.byteLength)c=nt("esds",a.ma);else{c=nt;d=a.id+1;e=a.stream.bandwidth||0;h=a.stream.channelsCount||2;k=a.stream.audioSamplingRate||44100;l=Hb("audio",a.codecs.split(","));
|
|
869
|
+
m={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};g=m[k];if("mp4a.40.5"===l||"mp4a.40.29"===l)g=m[2*k];k=parseInt(l.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(u(rt(d,2)),[0,4,17,64,21,0,6,0],u(rt(e,4)),u(rt(e,4)),[5,2,k<<3|g>>>1,g<<7|h<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=yt(a),d="enca");a=nt(d,zt(a),c,e)}c=a}a=nt("stsd",At,c);return b("stbl",a,nt("stts",Bt),nt("stsc",Ct),nt("stsz",Dt),nt("stco",
|
|
870
|
+
Et))}function zt(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(u(rt(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
871
|
+
function yt(a){var b=nt;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(u(rt(d,4))));c=nt("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=nt("schm",d);e=nt;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=r(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=r(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=xt(h.value)}a=new Uint8Array([0,
|
|
872
|
+
0,0,0,0,0,1,8]);f=nt("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
871
873
|
function Ft(a){var b=new Uint8Array([]);a=r(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=nt,e=new Uint8Array([0,0,0,0].concat(u(rt(c.data?c.data.Lb:0,4))));e=nt("mfhd",e);var f;var g=c.data?c.data.Za:[];var h=new Uint8Array(4+g.length);for(f=0;f<g.length;f++){var k=g[f].flags;h[f+4]=k.kb<<4|k.rb<<2|k.qb}g=nt("sdtp",h);var l=g.length+92;h=nt;f=new Uint8Array([0,0,0,58].concat(u(rt(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));f=nt("tfhd",f);k=c.data?c.data.baseMediaDecodeTime:0;var m=
|
|
872
874
|
Math.floor(k%(qt+1));k=new Uint8Array([1,0,0,0].concat(u(rt(Math.floor(k/(qt+1)),4)),u(rt(m,4))));k=nt("tfdt",k);var n=l;l=c.data?c.data.Za:[];m=l.length;var p=12+16*m,t=new Uint8Array(p);n+=8+p;t.set(["video"===c.type?1:0,0,15,1].concat(u(rt(m,4)),u(rt(n,4))),0);for(n=0;n<m;n++){var v=l[n];p=rt(v.duration,4);var w=rt(v.size,4),y=v.flags;v=rt(v.Ab,4);t.set([].concat(u(p),u(w),[y.Fb<<2|y.kb,y.rb<<6|y.qb<<4|y.Gb,y.jb&61440,y.jb&15],u(v)),12+16*n)}l=nt("trun",t);g=h("traf",f,k,l,g);d=d("moof",e,g);e=
|
|
873
875
|
c.data?c.data.Za:[];c=new Uint8Array([]);e=r(e);for(g=e.next();!g.done;g=e.next())c=eg(c,g.value.data);c=nt("mdat",c);b=eg(b,d,c)}return b}function rt(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function xt(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
|
|
874
876
|
function nt(a){var b=Ma.apply(1,arguments),c=Gt[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Gt[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
875
877
|
var lt=!1,qt=Math.pow(2,32)-1,Gt={},st=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),tt=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Bt=new Uint8Array([0,0,0,0,0,0,0,0]),Ct=new Uint8Array([0,0,0,0,0,0,0,0]),Et=new Uint8Array([0,0,0,0,0,0,0,0]),Dt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ut=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),wt=new Uint8Array([0,
|
|
876
|
-
0,0,0,0,0,0,0]),At=new Uint8Array([0,0,0,0,0,0,0,1]),mt=new Uint8Array([]),ot=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),pt=new Uint8Array([]);function Ht(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.B=1;this.i=null;this.D=new bc(5);this.o=new O(function(){It(a)});this.C=new gf;this.m=new Map}q=Ht.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return
|
|
877
|
-
function It(a){var b;
|
|
878
|
-
q.update=function(){var a=this,b;return
|
|
879
|
-
function Jt(a){var b,c,d,e,f,g,h;return
|
|
880
|
-
p=qg(m,"DVRWindowLength",wg);l&&(0===p||isNaN(p))&&(p=Infinity);var t=qg(m,"CanSeek",yg,!1);0===p&&t&&(p=Infinity);t=null;p&&0<p&&(t=p/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(t=a.g.availabilityWindowOverride);null==t&&(t=Infinity);a.i.
|
|
878
|
+
0,0,0,0,0,0,0]),At=new Uint8Array([0,0,0,0,0,0,0,1]),mt=new Uint8Array([]),ot=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),pt=new Uint8Array([]);function Ht(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.B=1;this.i=null;this.D=new bc(5);this.o=new O(function(){It(a)});this.C=new gf;this.m=new Map}q=Ht.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return H(function(d){if(1==d.g)return c.l=[a],c.h=b,C(d,Jt(c),2);if(!c.h)throw new N(2,7,7001);return d.return(c.j)})};
|
|
879
|
+
function It(a){var b;H(function(c){switch(c.g){case 1:return wa(c,2),C(c,Jt(a),4);case 4:ya(c,3);break;case 2:b=za(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();D(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.C.destroy()};
|
|
880
|
+
q.update=function(){var a=this,b;return H(function(c){if(1==c.g)return wa(c,2),C(c,Jt(a),4);if(2!=c.g)return ya(c,0);b=za(c);if(!a.h||!b)return c.return();a.h.onError(b);D(c)})};q.onExpirationUpdated=function(){};
|
|
881
|
+
function Jt(a){var b,c,d,e,f,g,h;return H(function(k){if(1==k.g)return b=nf(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),hf(a.C,e),C(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=Cg(f.data,"SmoothStreamingMedia");if(!m)throw new N(2,4,4046,l);(l=a.g.mss.manifestPreprocessor)&&l(m);a.i||(a.i=new Q(null,0));if(l=qg(m,"IsLive",yg,!1))throw new N(2,4,4047);a.i.Jc(!l);var n=qg(m,"TimeScale",wg,1E7),
|
|
882
|
+
p=qg(m,"DVRWindowLength",wg);l&&(0===p||isNaN(p))&&(p=Infinity);var t=qg(m,"CanSeek",yg,!1);0===p&&t&&(p=Infinity);t=null;p&&0<p&&(t=p/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(t=a.g.availabilityWindowOverride);null==t&&(t=Infinity);a.i.xe(t);p=qg(m,"Duration",wg,Infinity);l||a.i.Ra(p/n);l={variants:[],textStreams:[],timescale:n,duration:p/n};t=ig(m,"Protection");var v;n=a.g.mss.keySystemsBySystemId;p=[];t=r(t);for(v=t.next();!v.done;v=t.next())p=p.concat(ig(v.value,"ProtectionHeader"));if(p.length){t=
|
|
881
883
|
[];for(v=0;v<p.length;v++){var w=p[v],y=w.getAttribute("SystemID").toLowerCase(),x=n[y];if(x){var A=ht(w);if(A)a:{A=r(A.getElementsByTagName("DATA"));for(var z=A.next();!z.done;z=A.next())if(z=hg(z.value,"KID")){A=bg(z.textContent);A=new Uint8Array([A[3],A[2],A[1],A[0],A[5],A[4],A[7],A[6]].concat(u(A.slice(8))));A=dg(A);break a}A=null}else A=null;z=bg(w.textContent);y=cg(y.replace(/-/g,""));y=[{initData:gg(z,y,new Set,0),initDataType:"cenc",keyId:A}];y=Gb(x,y);A&&y.keyIds.add(A);if(x=jt.get(x))y.licenseServerUri=
|
|
882
|
-
x(w);t.push(y)}}n=t}else n=[];v=n;t=[];n=[];p=[];m=ig(m,"StreamIndex");m=r(m);for(w=m.next();!w.done;w=m.next()){w=w.value;x=ig(w,"QualityLevel");y=l.timescale;A=l.duration;z=ig(w,"c");for(var B=[],E=0,F=0;F<z.length;++F){var G=z[F],
|
|
883
|
-
B.push({start:J/y,end:E/y,
|
|
884
|
+
x(w);t.push(y)}}n=t}else n=[];v=n;t=[];n=[];p=[];m=ig(m,"StreamIndex");m=r(m);for(w=m.next();!w.done;w=m.next()){w=w.value;x=ig(w,"QualityLevel");y=l.timescale;A=l.duration;z=ig(w,"c");for(var B=[],E=0,F=0;F<z.length;++F){var G=z[F],I=z[F+1],J=qg(G,"t",wg),L=qg(G,"d",wg);G=qg(G,"r",ug);if(!L)break;J=null!=J?J:E;G=G||0;if(0>G)if(I){I=qg(I,"t",wg);if(null==I)break;else if(J>=I)break;G=Math.ceil((I-J)/L)-1}else{if(Infinity==A)break;else if(J/y>=A)break;G=Math.ceil((A*y-J)/L)-1}for(I=0;I<=G;++I)E=J+L,
|
|
885
|
+
B.push({start:J/y,end:E/y,Of:J}),J=E}y=B;x=r(x);for(A=x.next();!A.done;A=x.next())(A=Kt(a,w,A.value,y,v,l))&&("audio"!=A.type||a.g.disableAudio?"video"!=A.type||a.g.disableVideo?A.type!=Kb||a.g.disableText||p.push(A):n.push(A):t.push(A))}m=[];t=r(0<t.length?t:[null]);for(v=t.next();!v.done;v=t.next())for(v=v.value,w=r(0<n.length?n:[null]),A=w.next();!A.done;A=w.next())x=m,y=x.push,A=A.value,z=0,v&&v.bandwidth&&0<v.bandwidth&&(z+=v.bandwidth),A&&A.bandwidth&&0<A.bandwidth&&(z+=A.bandwidth),A={id:a.B++,
|
|
884
886
|
language:v?v.language:"und",disabledUntilTime:0,primary:!!v&&v.primary||!!A&&A.primary,audio:v,video:A,bandwidth:z,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},y.call(x,A);l.variants=m;l.textStreams=p;a.j?(a.j.variants=l.variants,a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,
|
|
885
|
-
type:"MSS",serviceDescription:null},a.i.
|
|
887
|
+
type:"MSS",serviceDescription:null},a.i.be());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.D.sample(1,h);D(k)})}
|
|
886
888
|
function Kt(a,b,c,d,e,f){var g=b.getAttribute("Type");if("audio"!==g&&"video"!==g&&"text"!==g)return Xa("Ignoring unrecognized type:",g),null;var h=b.getAttribute("Language"),k=a.B++,l=qg(c,"Bitrate",vg),m=qg(c,"MaxWidth",vg),n=qg(c,"MaxHeight",vg),p=qg(c,"Channels",vg),t=qg(c,"SamplingRate",vg),v=f.duration;d.length&&(v=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.Ra(Math.min(v,w));var y={id:k,originalId:b.getAttribute("Name")||String(k),createSegmentIndex:function(){return Promise.resolve()},
|
|
887
889
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:Ob(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:t,spatialAudio:!1,closedCaptions:null,hdr:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:v,
|
|
888
890
|
timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1};if(e=b.getAttribute("Subtype"))(e=Lt[e])&&y.roles.push(e),"main"===e&&(y.primary=!0);e=c.getAttribute("FourCC");if(null===e||""===e)e=b.getAttribute("FourCC");if(!e)if("audio"===g)e="AAC";else if("video"===g)return Xa('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!Mt.includes(e.toUpperCase()))return Xa("Codec not supported:",e),null;c=Nt(c,g,e,
|
|
889
891
|
y);y.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Xa("Quality unsupported without CodecPrivateData",g),null;y.type="audio";y.mimeType="mss/audio/mp4";y.codecs=Ot(e,c);break;case "video":if(!c)return Xa("Quality unsupported without CodecPrivateData",g),null;y.type="video";y.mimeType="mss/video/mp4";y.codecs=Pt(c);break;case "text":if(y.type=Kb,y.mimeType="application/mp4","TTML"===e||"DFXP"===e)y.codecs="stpp"}y.createSegmentIndex=function(){if(y.segmentIndex)return Promise.resolve();
|
|
890
|
-
if(a.m.has(y.id))var x=a.m.get(y.id);else x=[],"video"==y.type&&(x=y.mssPrivateData.codecPrivateData.split("00000001").slice(1)),x={id:y.id,type:y.type,encrypted:y.encrypted,timescale:y.mssPrivateData.timescale,duration:y.mssPrivateData.duration,$a:x,ma:new Uint8Array([]),Ea:new Uint8Array([]),data:null,stream:y},x=(new kt([x])).initSegment(),a.m.set(y.id,x);x=Qt(a,new Bh(function(){return[]},0,null,null,void 0,x),y,b,d);y.segmentIndex=new qj(x);return Promise.resolve()};y.closeSegmentIndex=
|
|
891
|
-
(y.segmentIndex.release(),y.segmentIndex=null)};return y}
|
|
892
|
+
if(a.m.has(y.id))var x=a.m.get(y.id);else x=[],"video"==y.type&&(x=y.mssPrivateData.codecPrivateData.split("00000001").slice(1)),x={id:y.id,type:y.type,codecs:y.codecs,encrypted:y.encrypted,timescale:y.mssPrivateData.timescale,duration:y.mssPrivateData.duration,$a:x,ma:new Uint8Array([]),Ea:new Uint8Array([]),data:null,stream:y},x=(new kt([x])).initSegment(),a.m.set(y.id,x);x=Qt(a,new Bh(function(){return[]},0,null,null,void 0,x),y,b,d);y.segmentIndex=new qj(x);return Promise.resolve()};y.closeSegmentIndex=
|
|
893
|
+
function(){y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null)};return y}
|
|
892
894
|
function Nt(a,b,c,d){if(a=a.getAttribute("CodecPrivateData"))return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|
|
|
893
895
|
b<<3;b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Ot(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function Pt(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
894
|
-
function Qt(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=r(e);for(var h=e.next();!h.done;g={Xc:g.Xc},h=e.next())g.Xc=h.value,d.push(new P(g.Xc.start,g.Xc.end,function(k){return function(){return Fb(a.l,[f.replace("{start time}",String(k.Xc.
|
|
895
|
-
th["application/vnd.ms-sstr+xml"]=function(){return new Ht};function Rt(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=Jf(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function St(){}function Tt(a,b,c,d,e){var f=new Ut;Cf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Vt,h={
|
|
896
|
-
function Wt(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,w,y,x,A,z;return
|
|
897
|
-
G.value.byteLength;if(!g){J.F(5);break}return C(J,g(G.value),5);case 5:
|
|
896
|
+
function Qt(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=r(e);for(var h=e.next();!h.done;g={Xc:g.Xc},h=e.next())g.Xc=h.value,d.push(new P(g.Xc.start,g.Xc.end,function(k){return function(){return Fb(a.l,[f.replace("{start time}",String(k.Xc.Of))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}K("shaka.mss.MssParser",Ht);var Mt="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Lt={CAPT:"main",SUBT:"alternate",DESC:"main"};vh.ism=function(){return new Ht};
|
|
897
|
+
th["application/vnd.ms-sstr+xml"]=function(){return new Ht};function Rt(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=Jf(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function St(){}function Tt(a,b,c,d,e){var f=new Ut;Cf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Vt,h={ag:!1,Pg:!1};a=Wt(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 Ye(a,function(){h.ag=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Pg=!0;g.abort()});k.R(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
898
|
+
function Wt(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,w,y,x,A,z;return H(function(B){switch(B.g){case 1:return h=Xt,k=Yt,p=n=0,t=Date.now(),wa(B,2),C(B,h(a,c),4);case 4:l=B.h;f(Zt(l.headers));if("HEAD"==c.method){B.F(5);break}v=l.clone().body.getReader();y=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;x=function(E){function F(){var G,I;return H(function(J){switch(J.g){case 1:return wa(J,2),C(J,v.read(),4);case 4:G=J.h;ya(J,3);break;case 2:return za(J),J.return();case 3:if(G.done){J.F(5);break}n+=
|
|
899
|
+
G.value.byteLength;if(!g){J.F(5);break}return C(J,g(G.value),5);case 5:I=Date.now();if(100<I-t||G.done)e(I-t,n-p,y-n),p=n,t=I;G.done?E.close():(E.enqueue(G.value),F());D(J)}})}F()};new k({start:x});return C(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:ya(B,3);break;case 2:A=za(B);if(d.ag)throw new N(1,1,7001,a,b);if(d.Pg)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,A,b);case 3:return z=Zt(l.headers),B.return(Rt(z,m,l.status,a,l.url,b))}})}
|
|
898
900
|
function Zt(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function $t(){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)}K("shaka.net.HttpFetchPlugin",St);St.isSupported=$t;St.parse=Tt;var Xt=window.fetch,Vt=window.AbortController,Yt=window.ReadableStream,Ut=window.Headers;
|
|
899
901
|
$t()&&(kf("http",Tt,2,!0),kf("https",Tt,2,!0),kf("blob",Tt,2,!0));function au(){}
|
|
900
902
|
function bu(a,b,c,d,e){var f=new cu,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 N(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=du(f);e(t);n=!0}};f.onload=function(){var t=du(f),v=f.response;try{var w=Rt(t,v,f.status,a,f.responseURL,c);l(w)}catch(y){m(y)}};f.onerror=function(t){m(new N(1,1,1002,a,t,
|
|
901
903
|
c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Ye(k,function(){f.abort();return Promise.resolve()})}
|
|
902
904
|
function du(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}K("shaka.net.HttpXHRPlugin",au);au.parse=bu;var cu=window.XMLHttpRequest;kf("http",bu,1,!0);kf("https",bu,1,!0);kf("blob",bu,1,!0);function eu(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function fu(a){return a.Oa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Sa+":"+a.Aa}function gu(a,b){return Qj(a.g.Oa(),a.g.Sa,a.g.Aa,b.streaming.retryParameters)};function hu(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function iu(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}hu.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 ju(a){var b=this;this.o=a;this.j=new Map;this.i=new uf(function(){return ku(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new hu}ju.prototype.destroy=function(){return this.i.destroy()};function lu(a,b,c){a.m=b;a.l=c}function ku(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
903
|
-
function mu(a,b,c,d,e,f){vf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return
|
|
904
|
-
function nu(a,b){var c,d,e,f;return
|
|
905
|
-
function qu(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return
|
|
905
|
+
function mu(a,b,c,d,e,f){vf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return H(function(v){if(1==v.g)return C(v,nu(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=mc(h),l=new fg(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.l(p,t);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return v.return(f(h))})});a.j.set(b,g)}function ou(a){return H(function(b){return 1==b.g?C(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
906
|
+
function nu(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=tf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),C(g,d.promise,2);f=g.h;wc(a.h,e);return g.return(f.data)})};function pu(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Xe;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}pu.prototype.abort=function(){var a=this;return H(function(b){if(1==b.g){try{a.i.abort()}catch(c){}wa(b,2);return C(b,a.g,4)}if(2!=b.g)return ya(b,0);za(b);D(b)})};
|
|
907
|
+
function qu(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return H(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return C(g,b(f.key,f.value,f),2)}f.continue();D(g)})}})}pu.prototype.store=function(){return this.h};pu.prototype.promise=function(){return this.g};function ru(a){this.h=a;this.g=[]}ru.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function su(a,b){return tu(a,b,"readwrite")}function tu(a,b,c){c=a.h.transaction([b],c);var d=new pu(c,b);a.g.push(d);d.promise().then(function(){wc(a.g,d)},function(){wc(a.g,d)});return d};function uu(a,b,c){this.h=new ru(a);this.i=b;this.g=c}q=uu.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return vu(this.i)};q.removeSegments=function(a,b){return wu(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return H(function(d){if(1==d.g)return C(d,xu(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.fg(e)}))})};q.addManifests=function(){return vu(this.g)};
|
|
906
908
|
q.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function yu(a,b,c){a=su(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=su(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 wu(this,this.g,a,b)};
|
|
907
|
-
q.getManifests=function(a){var b=this,c;return
|
|
908
|
-
function vu(a){return Promise.reject(new N(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
|
|
909
|
+
q.getManifests=function(a){var b=this,c;return H(function(d){if(1==d.g)return C(d,xu(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.cd(e)})))})};q.getAllManifests=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=tu(a.h,a.g,"readonly"),c=new Map,C(d,qu(b,function(e,f){var g;return H(function(h){if(1==h.g)return C(h,a.cd(f),2);g=h.h;c.set(e,g);D(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};q.fg=function(a){return a};q.cd=function(a){return Promise.resolve(a)};
|
|
910
|
+
function vu(a){return Promise.reject(new N(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 H(function(m){if(1==m.g){d=su(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Id:g.Id},k=h.next())l=k.value,g.Id=e.add(l),g.Id.onsuccess=function(n){return function(){f.push(n.Id.result)}}(g);return C(m,d.promise(),2)}return m.return(f)})};
|
|
909
911
|
function wu(a,b,c,d){a=su(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Gd:e.Gd},f=c.next())e.Gd=f.value,b.delete(e.Gd).onsuccess=function(g){return function(){return d(g.Gd)}}(e);return a.promise()}
|
|
910
|
-
function xu(a,b,c){var d,e,f,g,h,k,l;return
|
|
911
|
-
zu.prototype.remove=function(a){var b=this,c;return
|
|
912
|
+
function xu(a,b,c){var d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=tu(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Vc:h.Vc,Rc:h.Rc},l=k.next())h.Rc=l.value,h.Vc=e.get(h.Rc),h.Vc.onsuccess=function(n){return function(){void 0==n.Vc.result&&g.push(n.Rc);f[n.Rc]=n.Vc.result}}(h);return C(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function zu(a){this.g=new ru(a)}zu.prototype.destroy=function(){return this.g.destroy()};zu.prototype.getAll=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=tu(a.g,"session-ids","readonly"),c=[],C(d,qu(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};zu.prototype.add=function(a){var b=su(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()};
|
|
913
|
+
zu.prototype.remove=function(a){var b=this,c;return H(function(d){return 1==d.g?(c=su(b.g,"session-ids"),C(d,qu(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function Au(){this.g=new Map}Au.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)};Au.prototype.init=function(){var a=this;Bu.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)};
|
|
912
914
|
function Cu(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Va:d,Ga:f},Ga:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function Du(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Va:d,Ga:f},e)})})}
|
|
913
915
|
function Eu(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function Fu(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Gu(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
914
|
-
function Hu(a){var b,c,d;return
|
|
915
|
-
Ju.prototype.cd=function(a){var b,c,d,e,f,g;return
|
|
916
|
+
function Hu(a){var b,c,d;return H(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Bu,d.forEach(function(f){(f=f())&&b.push(f)})),C(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.F(0):C(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Iu(a,b){Bu.set(a,b)}K("shaka.offline.StorageMuxer",Au);Au.unregister=function(a){Bu.delete(a)};Au.register=Iu;Au.prototype.destroy=Au.prototype.destroy;var Bu=new Map;function Ju(){uu.apply(this,arguments)}qa(Ju,uu);Ju.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return H(function(g){d=su(c.h,c.g);e=d.store();f=new Xe;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return C(g,Promise.all([d.promise(),f]),0)})};
|
|
917
|
+
Ju.prototype.cd=function(a){var b,c,d,e,f,g;return H(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=Ku(a.periods[c],e),b.push(f);return C(h,Rq(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})})};
|
|
916
918
|
function Ku(a,b){Lu(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Mu(e,a.startTime,b)})}
|
|
917
919
|
function Mu(a,b,c){var d=a.initSegmentUri?Nu(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,originalLanguage:a.language||null,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=Nu(g.uri);return{startTime:b+
|
|
918
|
-
g.startTime,endTime:b+g.endTime,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,external:!1}}Ju.prototype.
|
|
920
|
+
g.startTime,endTime:b+g.endTime,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,external:!1}}Ju.prototype.fg=function(a){return{data:a.data}};
|
|
919
921
|
function Nu(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 N(2,9,9004,"Could not parse uri "+a);}
|
|
920
922
|
function Lu(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++,
|
|
921
923
|
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 Ou(){uu.apply(this,arguments)}qa(Ou,uu);
|
|
922
|
-
Ou.prototype.cd=function(a){var b,c,d,e,f,g;return
|
|
924
|
+
Ou.prototype.cd=function(a){var b,c,d,e,f,g;return H(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),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Pu(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,Rq(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
923
925
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
924
926
|
function Pu(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,originalLanguage:a.language||null,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,
|
|
925
927
|
timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}};function Qu(){uu.apply(this,arguments)}qa(Qu,uu);q=Qu.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 yu(this,a,b)};q.cd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Ru(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Ru.prototype;
|
|
926
928
|
q.init=function(){var a=this,b=new Xe,c=!1,d=new O(function(){c=!0;b.reject(new N(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 Ju(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Ou(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
927
929
|
new Ou(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Qu(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new zu(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 N(2,
|
|
928
|
-
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return
|
|
930
|
+
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(!a.g){b.F(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.F(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.F(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.F(8);break}return C(b,a.j.destroy(),8);case 8:if(!a.m){b.F(10);break}return C(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),D(b)}})};
|
|
929
931
|
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};
|
|
930
|
-
q.erase=function(){var a=this;return
|
|
932
|
+
q.erase=function(){var a=this;return H(function(b){switch(b.g){case 1:if(!a.g){b.F(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.F(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.F(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.F(8);break}return C(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),C(b,Su(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,C(b,a.init(),0)}})};
|
|
931
933
|
function Su(){var a=new Xe,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}Iu("idb",function(){return xd("CrKey")||wd()||!window.indexedDB?null:new Ru});function Tu(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Tu.prototype.Va=function(){return this.i};Tu.prototype.Ga=function(){return this.h};Tu.prototype.key=function(){return this.l};Tu.prototype.toString=function(){return this.j};
|
|
932
934
|
function Uu(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 Tu(b,c,d,Number(a[4])):null};function Vu(a,b){this.h=a;this.g=b}
|
|
933
|
-
function Wu(a,b){var c=new
|
|
935
|
+
function Wu(a,b){var c=new Q(null,0);c.Ra(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Xu(a,d,e,c);e=b.streams.filter(function(l){return l.type==Kb}).map(function(l){return Yu(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Yu(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=
|
|
934
936
|
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,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null}}
|
|
935
937
|
function Xu(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=
|
|
936
938
|
b.next())for(e=e.value,g=Yu(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=Yu(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}
|
|
937
939
|
function Yu(a,b,c){var d=b.segments.map(function(e){return Zu(a,e)});c.td(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new qj(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,originalLanguage:b.originalLanguage||null,label:b.label,type:b.type,primary:b.primary,
|
|
938
940
|
trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external}}
|
|
939
941
|
function Zu(a,b){var c=new Tu("segment",a.h,a.g,b.dataKey);return new P(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?$u(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}function $u(a,b){var c=new Tu("segment",a.h,a.g,b);return new Bh(function(){return[c.toString()]},0,null)};function av(){this.g=null}q=av.prototype;q.configure=function(){};
|
|
940
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
942
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:d=Uu(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Au;xa(m);return C(m,e.init(),4);case 4:return C(m,Eu(e,d.Va(),d.Ga()),5);case 5:return f=m.h,C(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Vu(d.Va(),d.Ga()),l=Wu(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Aa(m),C(m,e.destroy(),7);case 7:Ba(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
941
943
|
q.update=function(){};
|
|
942
|
-
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
944
|
+
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:return d=c.g,e=new Au,wa(m,2,3),C(m,e.init(),5);case 5:return C(m,Eu(e,d.Va(),d.Ga()),6);case 6:return f=m.h,C(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.F(3);break}return C(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Aa(m),C(m,e.destroy(),10);case 10:Ba(m,0);break;case 2:za(m),m.F(3)}})};
|
|
943
945
|
th["application/x-offline-manifest"]=function(){return new av};function bv(){}function cv(a){var b=Uu(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=af(a)):a=b&&"segment"==b.g?dv(b.key(),b):Ze(new N(2,1,9004,a));return a}
|
|
944
|
-
function dv(a,b){var c=new Au;return af(void 0).ra(function(){return c.init()}).ra(function(){return Eu(c,b.Va(),b.Ga())}).ra(function(d){return d.getSegments([b.key()])}).ra(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}K("shaka.offline.OfflineScheme",bv);bv.plugin=cv;kf("offline",cv);function ev(a,b,c){var d,e,f,g,h,k;return
|
|
945
|
-
function gv(a,b,c){var d,e;return
|
|
946
|
-
9);case 9:return f.return([]);case 7:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return
|
|
946
|
+
function dv(a,b){var c=new Au;return af(void 0).ra(function(){return c.init()}).ra(function(){return Eu(c,b.Va(),b.Ga())}).ra(function(d){return d.getSegments([b.key()])}).ra(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}K("shaka.offline.OfflineScheme",bv);bv.plugin=cv;kf("offline",cv);function ev(a,b,c){var d,e,f,g,h,k;return H(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),w=v.next();!w.done;w=v.next())if(w=w.value,fv(w.info,p)){w.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.F(4);break}g=f.value;h=gv(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.F(2);break;case 4:return l.return(d)}})}
|
|
947
|
+
function gv(a,b,c){var d,e;return H(function(f){switch(f.g){case 1:return d=new Dg({lc:b,onError:function(){},me:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),wa(f,2),d.configure(a),C(f,Lg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ya(f,3);break;case 2:return za(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return wa(f,6),C(f,Wg(d),8);case 8:ya(f,7);break;case 6:return za(f),C(f,d.destroy(),
|
|
948
|
+
9);case 9:return f.return([]);case 7:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return H(function(h){if(1==h.g)return wa(h,2),C(h,Xg(d,g),4);if(2!=h.g)return e.push(g),ya(h,0);za(h);D(h)})})),10);case 10:return C(f,d.destroy(),11);case 11:return f.return(e)}})}
|
|
947
949
|
function fv(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&xc(a.audioCapabilities,b.audioCapabilities,c)&&xc(a.videoCapabilities,b.videoCapabilities,c)};function hv(a,b,c){var d=b.presentationTimeline.getDuration();b=iv(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function jv(a,b){var c=Wu(new Vu(a.Va(),a.Ga()),b),d=b.appMetadata||{};c=iv(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}}
|
|
948
|
-
function iv(a){var b=[],c=te(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(ke(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(le(c.value));return b};function kv(){this.g={}}function lv(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 mv(a,b){a.g[b.id]=b.bandwidth||2048}function nv(a,b){a=a.g[b];null==a&&(a=0);return a};function ov(a){var b=this;if(a&&a.constructor!=
|
|
949
|
-
case 4:b.h=null,b.g=null,D(k)}})})}function pv(){if(sd())a:{var a=r(Bu.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=ov.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=nl(a,b));return xl(this.h,a)};q.getConfiguration=function(){var a=vl();xl(a,this.h,vl());return a};q.
|
|
950
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new ju(this.g);this.j.push(f);b=qv(this,a,b||{},function(){var g;return
|
|
951
|
-
function qv(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,w,y,x,A,z;return
|
|
952
|
-
p,b,c,e,f),w=v.Zh,y=v.
|
|
953
|
-
function yv(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,w,y,x,A;return
|
|
954
|
-
return C(ka,ou(e),2)}if(!E)return ka.F(0);uv(a);Av(h,d,k,f);return C(ka,g.updateManifest(c,d),0)})};p=!1;wa(z,2);if(!Bv(h)||!p||Cv(h)){z.F(4);break}return C(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return uv(a),b=b.filter(function(B){return!B.h}),t=l,v=m,l={},m=0,C(z,Dv(g,c,d,t,v,function(){return uv(a)}),6);case 6:uv(a);case 4:if(p){z.F(7);break}return C(z,n(b,!1),8);case 8:return uv(a),w=l,y=m,l={},m=0,C(z,Dv(g,c,d,w,y,function(){return uv(a)}),9);case 9:uv(a);case 7:
|
|
955
|
-
|
|
956
|
-
function Dv(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,w,y;return
|
|
957
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(x,a.updateManifest(b,c),4);case 4:g=!0;f();
|
|
958
|
-
function wv(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,
|
|
959
|
-
p.value,d.push(le(t));v=r(a.imageStreams);for(w=v.next();!w.done;w=v.next())y=w.value,d.push(me(y));return C(
|
|
960
|
-
r(x);for(E=ka.next();!E.done;E=ka.next())
|
|
961
|
-
function xv(a,b,c,d,e,f){var g=hv(c,b,d),h=e.offline.progressCallback;lu(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Tg(a,"cenc",t)});var k=Bv(b)&&!Cv(b),l=null;k&&(l=Fv.get(a.g.keySystem));for(var m=new kv,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())mv(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())lv(m,n.value);m=Gv(f,m,b,e);f=m.streams;m=m.
|
|
962
|
-
p&&n&&(p.initData=[]);return{Zh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.gd(),streams:f,sessionIds:n?ch(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},
|
|
950
|
+
function iv(a){var b=[],c=te(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(ke(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(le(c.value));return b};function kv(){this.g={}}function lv(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 mv(a,b){a.g[b.id]=b.bandwidth||2048}function nv(a,b){a=a.g[b];null==a&&(a=0);return a};function ov(a){var b=this;if(a&&a.constructor!=S)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.bc()):(this.h=vl(),this.g=new jf);this.i=[];this.j=[];var c=!a;this.l=new uf(function(){var d,e,f,g,h;return H(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return ku(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 C(k,Promise.all(e),3);case 3:if(!c){k.F(4);break}return C(k,b.g.destroy(),4);
|
|
951
|
+
case 4:b.h=null,b.g=null,D(k)}})})}function pv(){if(sd())a:{var a=r(Bu.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=ov.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=nl(a,b));return xl(this.h,a)};q.getConfiguration=function(){var a=vl();xl(a,this.h,vl());return a};q.bc=function(){return this.g};
|
|
952
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new ju(this.g);this.j.push(f);b=qv(this,a,b||{},function(){var g;return H(function(h){if(1==h.g)return C(h,sh(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Ye(b,function(){return ku(f)});b.finally(function(){wc(d.j,f)});return rv(this,b)};
|
|
953
|
+
function qv(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,w,y,x,A,z;return H(function(B){switch(B.g){case 1:return sv(),h=g=null,k=new Au,n=m=l=null,wa(B,2,3),C(B,d(),5);case 5:return g=B.h,C(B,tv(a,b,g,e),6);case 6:p=B.h;uv(a);t=!p.presentationTimeline.S()&&!p.presentationTimeline.hc();if(!t)throw new N(2,9,9005,b);return C(B,vv(a,p,function(E){n=n||E},e),7);case 7:h=B.h;uv(a);if(n)throw n;return C(B,wv(p,e),8);case 8:return C(B,k.init(),9);case 9:return uv(a),C(B,Cu(k),10);case 10:return l=B.h,uv(a),v=xv(h,
|
|
954
|
+
p,b,c,e,f),w=v.Zh,y=v.If,C(B,l.Ga.addManifests([w]),11);case 11:x=B.h;uv(a);m=x[0];uv(a);if(n)throw n;return C(B,yv(a,y,m,w,f,e,l.Ga,p,h),12);case 12:return uv(a),A=new Tu("manifest",l.path.Va,l.path.Ga,m),B.return(jv(A,w));case 3:return Aa(B),C(B,k.destroy(),13);case 13:if(!g){B.F(14);break}return C(B,g.stop(),14);case 14:if(!h){B.F(16);break}return C(B,h.destroy(),16);case 16:Ba(B,0);break;case 2:z=za(B);if(null==m){B.F(18);break}return C(B,zv(m),18);case 18:throw n||z;}})}
|
|
955
|
+
function yv(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,w,y,x,A;return H(function(z){switch(z.g){case 1:l={};m=0;n=function(B,E){var F,G,I,J,L,V,U;return H(function(ka){if(1==ka.g){F={};G=r(B);for(I=G.next();!I.done;F={Yb:F.Yb},I=G.next())F.Yb=I.value,J=gu(F.Yb,f),L=F.Yb.i,V=F.Yb.h,U=function(aa){return function(ha){var ta,Ca,ua;return H(function(Ea){if(1==Ea.g)return C(Ea,g.addSegments([{data:ha}]),2);ta=Ea.h;uv(a);Ca=aa.Yb.g;ua=fu(Ca);l[ua]=ta[0];m+=ha.byteLength;D(Ea)})}}(F),mu(e,F.Yb.groupId,J,L,V,U);
|
|
956
|
+
return C(ka,ou(e),2)}if(!E)return ka.F(0);uv(a);Av(h,d,k,f);return C(ka,g.updateManifest(c,d),0)})};p=!1;wa(z,2);if(!Bv(h)||!p||Cv(h)){z.F(4);break}return C(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return uv(a),b=b.filter(function(B){return!B.h}),t=l,v=m,l={},m=0,C(z,Dv(g,c,d,t,v,function(){return uv(a)}),6);case 6:uv(a);case 4:if(p){z.F(7);break}return C(z,n(b,!1),8);case 8:return uv(a),w=l,y=m,l={},m=0,C(z,Dv(g,c,d,w,y,function(){return uv(a)}),9);case 9:uv(a);case 7:ya(z,0);break;case 2:return x=
|
|
957
|
+
za(z),A=Object.values(l),C(z,g.removeSegments(A,function(){}),10);case 10:throw x;}})}function zv(a){var b,c,d,e;return H(function(f){switch(f.g){case 1:return b=new Au,C(f,b.init(),2);case 2:return C(f,Cu(b),3);case 3:return c=f.h,d=new Tu("manifest",c.path.Va,c.path.Ga,a),C(f,b.destroy(),4);case 4:return e=new ov,C(f,e.remove(d.toString()),0)}})}
|
|
958
|
+
function Dv(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,w,y;return H(function(x){switch(x.g){case 1:g=!1;wa(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=r(m.segments),p=n.next();!p.done;p=n.next())t=p.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
|
|
959
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(x,a.updateManifest(b,c),4);case 4:g=!0;f();ya(x,0);break;case 2:return w=za(x),C(x,zv(b),5);case 5:if(g){x.F(6);break}y=Object.values(d);return C(x,a.removeSegments(y,function(){}),6);case 6:throw w;}})}
|
|
960
|
+
function wv(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B,E,F,G,I,J,L,V,U,ka,aa;return H(function(ha){switch(ha.g){case 1:return c={width:Infinity,height:Infinity},Sd(a,b.restrictions,c),C(ha,Vd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Gd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(ke(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=
|
|
961
|
+
p.value,d.push(le(t));v=r(a.imageStreams);for(w=v.next();!w.done;w=v.next())y=w.value,d.push(me(y));return C(ha,b.offline.trackSelectionCallback(d),3);case 3:x=ha.h;A=a.presentationTimeline.getDuration();z=0;B=r(x);for(E=B.next();!E.done;E=B.next())F=E.value,G=F.bandwidth*A/8,z+=G;wa(ha,4);return C(ha,b.offline.downloadSizeCallback(z),6);case 6:I=ha.h;if(!I)throw new N(2,9,9014);ya(ha,5);break;case 4:J=za(ha);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:L=new Set;V=new Set;U=new Set;ka=
|
|
962
|
+
r(x);for(E=ka.next();!E.done;E=ka.next())aa=E.value,"variant"==aa.type&&L.add(aa.id),"text"==aa.type&&V.add(aa.id),"image"==aa.type&&U.add(aa.id);a.variants=a.variants.filter(function(ta){return L.has(ta.id)});a.textStreams=a.textStreams.filter(function(ta){return V.has(ta.id)});a.imageStreams=a.imageStreams.filter(function(ta){return U.has(ta.id)});Ev(a);D(ha)}})}
|
|
963
|
+
function xv(a,b,c,d,e,f){var g=hv(c,b,d),h=e.offline.progressCallback;lu(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Tg(a,"cenc",t)});var k=Bv(b)&&!Cv(b),l=null;k&&(l=Fv.get(a.g.keySystem));for(var m=new kv,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())mv(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())lv(m,n.value);m=Gv(f,m,b,e);f=m.streams;m=m.If;p=a.g;n=e.offline.usePersistentLicense;
|
|
964
|
+
p&&n&&(p.initData=[]);return{Zh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.gd(),streams:f,sessionIds:n?ch(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},If:m}}function Bv(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
963
965
|
function Cv(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 Av(a,b,c,d){b.expiration=c.gd();c=ch(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Bv(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}q.remove=function(a){return Hv(this,Iv(this,a))};
|
|
964
|
-
function Iv(a,b){var c,d,e,f,g,h;return
|
|
965
|
-
function Lv(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:cd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:cd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Jv(a,b,c){return
|
|
966
|
+
function Iv(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:sv();c=Uu(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Au;xa(k);return C(k,e.init(),4);case 4:return C(k,Eu(e,d.Va(),d.Ga()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([Jv(a,h,e),Kv(f,d,h)]),2);case 2:return Aa(k),C(k,e.destroy(),8);case 8:Ba(k,0)}})}
|
|
967
|
+
function Lv(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:cd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:cd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Jv(a,b,c){return H(function(d){return C(d,Mv(a.g,a.h.drm,c,b),0)})}
|
|
966
968
|
function Kv(a,b,c){function d(){}var e=Nv(c);jv(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.oi=function(){return Hv(this,Ov(this))};
|
|
967
|
-
function Ov(a){var b,c,d,e,f,g,h,k,l,m;return
|
|
968
|
-
q.list=function(){return Hv(this,Pv())};function Pv(){var a,b,c;return
|
|
969
|
-
function tv(a,b,c,d){var e,f,g,h,k;return
|
|
970
|
-
l.g)return h=l.h,uv(a),k=Qv(h),C(l,Promise.all(
|
|
971
|
-
function Gv(a,b,c,d){var e=new Map,f=Qv(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Rv(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()),
|
|
969
|
+
function Ov(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return sv(),b=a.g,c=a.h.drm,d=new Au,e=!1,xa(n),C(n,d.init(),4);case 4:f=[],Fu(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.F(2);break}k=h.value;return C(n,k.getAll(),8);case 8:return l=n.h,C(n,ev(c,b,l),9);case 9:return m=n.h,C(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.F(5);break;case 2:return Aa(n),C(n,d.destroy(),11);case 11:Ba(n,3);break;case 3:return n.return(!e)}})}
|
|
970
|
+
q.list=function(){return Hv(this,Pv())};function Pv(){var a,b,c;return H(function(d){switch(d.g){case 1:return sv(),a=[],b=new Au,xa(d),C(d,b.init(),4);case 4:return c=Promise.resolve(),Du(b,function(e,f){c=c.then(function(){var g;return H(function(h){if(1==h.g)return C(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=jv(new Tu("manifest",e.Va,e.Ga,l),k);a.push(k)});D(h)})})}),C(d,c,2);case 2:return Aa(d),C(d,b.destroy(),6);case 6:Ba(d,3);break;case 3:return d.return(a)}})}
|
|
971
|
+
function tv(a,b,c,d){var e,f,g,h,k;return H(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,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(){},newDrmInfo:function(){}},c.configure(d.manifest),uv(a),C(l,c.start(b,g),2);if(3!=
|
|
972
|
+
l.g)return h=l.h,uv(a),k=Qv(h),C(l,Promise.all(hb(k,function(m){return m.createSegmentIndex()})),3);uv(a);if(e)throw e;return l.return(h)})}function vv(a,b,c,d){var e;return H(function(f){switch(f.g){case 1:return e=new Dg({lc:a.g,onError:c,me:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),C(f,Ig(e,b.variants,d.offline.usePersistentLicense),2);case 2:return C(f,Wg(e),3);case 3:return C(f,Vg(e),4);case 4:return f.return(e)}})}
|
|
973
|
+
function Gv(a,b,c,d){var e=new Map,f=Qv(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Rv(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()),If:Array.from(e.values())}}
|
|
972
974
|
function Rv(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,originalLanguage:d.originalLanguage,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,
|
|
973
975
|
closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external},h=e.offline.numberOfParallelDownloads,k=0;Sv(d,c.presentationTimeline.Eb(),function(l){var m=fu(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=nv(b,d.id)*p;p=iu(a.g,p);f.set(m,new eu(l,p,k,!1))}l.h&&(n=fu(l.h),f.has(n)||(p=.5*nv(b,d.id),p=iu(a.g,p),f.set(n,new eu(l.h,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,
|
|
974
976
|
appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Sv(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 uv(a){if(a.l.g)throw new N(2,9,7001);}function sv(){if(!pv())throw new N(2,9,9E3);}
|
|
975
|
-
function Hv(a,b){return
|
|
976
|
-
function Mv(a,b,c,d){var e,f,g;return
|
|
977
|
+
function Hv(a,b){return H(function(c){if(1==c.g)return a.i.push(b),xa(c),C(c,b,4);if(2!=c.g)return c.return(c.h);Aa(c);wc(a.i,b);return Ba(c,0)})}function rv(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){wc(a.i,c)})}function Nv(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)}
|
|
978
|
+
function Mv(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Gu(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Lv(d,!1),videoCapabilities:Lv(d,!0)}});return C(h,ev(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
977
979
|
function Qv(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}
|
|
978
|
-
function Ev(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());}K("shaka.offline.Storage",ov);ov.deleteAll=function(){var a;return
|
|
979
|
-
ov.prototype.removeEmeSessions=ov.prototype.oi;ov.prototype.remove=ov.prototype.remove;ov.prototype.store=ov.prototype.store;ov.prototype.getNetworkingEngine=ov.prototype.
|
|
980
|
+
function Ev(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());}K("shaka.offline.Storage",ov);ov.deleteAll=function(){var a;return H(function(b){return 1==b.g?(a=new Au,xa(b),C(b,Hu(a),2)):5!=b.g?(Aa(b),C(b,a.destroy(),5)):Ba(b,0)})};ov.prototype.list=ov.prototype.list;
|
|
981
|
+
ov.prototype.removeEmeSessions=ov.prototype.oi;ov.prototype.remove=ov.prototype.remove;ov.prototype.store=ov.prototype.store;ov.prototype.getNetworkingEngine=ov.prototype.bc;ov.prototype.getConfiguration=ov.prototype.getConfiguration;ov.prototype.configure=ov.prototype.configure;ov.prototype.destroy=ov.prototype.destroy;ov.support=pv;
|
|
980
982
|
var Fv=(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");
|
|
981
983
|
jn.offline=pv;function Tv(){}function Uv(){for(var a=r(Vv),b=a.next();!b.done;b=a.next()){b=b.value;try{b.$g()}catch(c){Xa("Error installing polyfill!",c)}}}function Wv(a,b){a={priority:b||0,$g:a};for(b=0;b<Vv.length;b++)if(Vv[b].priority<a.priority){Vv.splice(b,0,a);return}Vv.push(a)}K("shaka.polyfill",Tv);Tv.register=Wv;Tv.installAll=Uv;var Vv=[];function Xv(){this.g=new Yv}function Zv(){window.AbortController||(window.AbortController=Xv,window.AbortSignal=Yv)}Xv.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 M("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};ea.Object.defineProperties(Xv.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Tv.AbortController=Xv;Xv.install=Zv;
|
|
982
|
-
function Yv(){
|
|
984
|
+
function Yv(){gb.call(this);this.h=!1;this.g=void 0;this.onabort=null}qa(Yv,gb);ea.Object.defineProperties(Yv.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Wv(Zv);function $v(){}function aw(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())bw(b.value)}function bw(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)}})}Tv.Aria=$v;$v.install=aw;Wv(aw);function cw(){}function dw(){ew()}Tv.EncryptionScheme=cw;cw.install=dw;Wv(dw,-2);function fw(){}
|
|
983
985
|
function gw(){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}}),
|
|
984
986
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",hw);document.addEventListener("webkitfullscreenerror",hw);document.addEventListener("mozfullscreenchange",hw);document.addEventListener("mozfullscreenerror",hw);document.addEventListener("MSFullscreenChange",hw);document.addEventListener("MSFullscreenError",hw)}}
|
|
985
987
|
function hw(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)}Tv.Fullscreen=fw;fw.install=gw;Wv(gw);function iw(){}function jw(){var a=!0;if(Ad()||xd("PlayStation 5")||Bd()||xd("Web0S")||yd()||xd("CrKey")||xd("PC=EOS")||xd("Hisense")||xd("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),kw=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=lw)}
|
|
986
|
-
function lw(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z;return
|
|
988
|
+
function lw(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z;return H(function(B){switch(B.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return B.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!sd())return B.return(b);if(c){if(xd("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var E=c.contentType;c.width&&c.height&&(E+="; width="+c.width+"; height="+c.height);c.framerate&&(E+="; framerate="+c.framerate);"pq"===
|
|
987
989
|
c.transferFunction&&(E+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(E)}else e=ec(c.contentType);else yd()?(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=ec(f)):e=ec(c.contentType);if(!e)return B.return(b)}if(d&&(g=d.contentType,h=ec(g),!h))return B.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=td(k),!l)||d&&(m=d.contentType,n=td(m),!n))return B.return(b)}else return B.return(b);
|
|
988
990
|
if(!a.keySystemConfiguration)return b.supported=!0,B.return(Promise.resolve(b));p=a.keySystemConfiguration;t=[];v=[];p.audio&&(w={robustness:p.audio.robustness||"",contentType:a.audio.contentType},t.push(w));p.video&&(y={robustness:p.video.robustness||"",contentType:a.video.contentType},v.push(y));x={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};t.length&&(x.audioCapabilities=t);v.length&&(x.videoCapabilities=
|
|
989
|
-
v);A=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;wa(B,3);if(A in mw){z=mw[A];B.F(5);break}return C(B,navigator.requestMediaKeySystemAccess(p.keySystem,[x]),6);case 6:z=B.h,mw[A]=z;case 5:
|
|
991
|
+
v);A=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;wa(B,3);if(A in mw){z=mw[A];B.F(5);break}return C(B,navigator.requestMediaKeySystemAccess(p.keySystem,[x]),6);case 6:z=B.h,mw[A]=z;case 5:ya(B,4);break;case 3:za(B);case 4:z&&(b.supported=!0,b.keySystemAccess=z);case 2:return B.return(b)}})}Tv.MediaCapabilities=iw;iw.install=jw;var kw=null;iw.originalMcap=kw;var mw={};iw.memoizedMediaKeySystemAccessRequests_=mw;Wv(jw,-1);function nw(){}function ow(){var a=Cd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?pw():a?12>=a?(qw(),rw()):15>=a&&qw():vd()?sw():(xd("Tizen 2")||xd("Tizen 3")||xd("Tizen 4"))&&tw());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&uw()}
|
|
990
992
|
function qw(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ma.apply(0,arguments));b.abort=function(){};return b}}function rw(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function sw(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
|
|
991
993
|
function tw(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=hd(b)[0]&&a(b)}}function pw(){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)}}
|
|
992
994
|
function uw(){var a=MediaSource.isTypeSupported;xd("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)})}Tv.MediaSource=nw;nw.install=ow;Wv(ow);function vw(){}function ww(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?xw():void 0!=window.orientation&&yw())}function xw(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
993
|
-
function yw(){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 zw;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new M("change");b.dispatchEvent(c)})}Tv.Orientation=vw;vw.install=ww;function zw(){
|
|
995
|
+
function yw(){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 zw;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new M("change");b.dispatchEvent(c)})}Tv.Orientation=vw;vw.install=ww;function zw(){gb.call(this);this.type="";this.angle=0}qa(zw,gb);
|
|
994
996
|
zw.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)};
|
|
995
997
|
zw.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Wv(ww);function Aw(){}var Bw,Cw,Dw,Ew,Fw,Gw;function Hw(a,b){try{var c=new Iw(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Jw(a){var b=this.mediaKeys;b&&b!=a&&Kw(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Kw(a,this):Promise.resolve()}
|
|
996
998
|
function Lw(a){a=mc(a.initData);if(pc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Hf(a.subarray(4),!0);a=Kf(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=nc(a);this.dispatchEvent(b)}Tv.PatchedMediaKeysApple=Aw;
|
|
@@ -1000,11 +1002,11 @@ Hw;window.shakaMediaKeysPolyfill=!0}};
|
|
|
1000
1002
|
function Iw(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,
|
|
1001
1003
|
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;}
|
|
1002
1004
|
Iw.prototype.createMediaKeys=function(){var a=new Mw(this.keySystem);return Promise.resolve(a)};Iw.prototype.getConfiguration=function(){return this.g};function Mw(a){this.h=new WebKitMediaKeys(a);this.g=new wf}Mw.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Nw(this.h,a)};Mw.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1003
|
-
function Kw(a,b){a.g.Vb();if(!b)return Promise.resolve();a.g.s(b,"webkitneedkey",Lw);try{return bj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Mw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Nw(a){
|
|
1004
|
-
q.generateRequest=function(a,b){var c=this;this.h=new Xe;try{var d=this.l.createSession("video/mp4",mc(b));this.i=d;this.sessionId=d.sessionId||"";this.j.s(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.
|
|
1005
|
+
function Kw(a,b){a.g.Vb();if(!b)return Promise.resolve();a.g.s(b,"webkitneedkey",Lw);try{return bj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Mw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Nw(a){gb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new wf;this.sessionId="";this.expiration=NaN;this.closed=new Xe;this.keyStatuses=new Ow}qa(Nw,gb);q=Nw.prototype;
|
|
1006
|
+
q.generateRequest=function(a,b){var c=this;this.h=new Xe;try{var d=this.l.createSession("video/mp4",mc(b));this.i=d;this.sessionId=d.sessionId||"";this.j.s(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.dc()?"license-request":"license-renewal").set("message",nc(e.message));e=new M("message",e);c.dispatchEvent(e)});this.j.s(d,"webkitkeyadded",function(){c.g&&(Pw(c,"usable"),c.g.resolve(),c.g=null)});this.j.s(d,"webkitkeyerror",
|
|
1005
1007
|
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:Pw(c,"output-not-allowed");break;default:Pw(c,"internal-error")}});Pw(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1006
1008
|
q.update=function(a){this.g=new Xe;try{this.i.update(mc(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Vb()}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 Pw(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new M("keystatuseschange");a.dispatchEvent(b)}
|
|
1007
|
-
function Ow(){this.size=0;this.g=void 0}q=Ow.prototype;q.
|
|
1009
|
+
function Ow(){this.size=0;this.g=void 0}q=Ow.prototype;q.dc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,qh.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=qh.value();return this.g&&kc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function Qw(){}function Rw(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Sw,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Tw,window.MediaKeys=Uw,window.MediaKeySystemAccess=Vw,window.shakaMediaKeysPolyfill=!0)}function Sw(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1008
1010
|
function Tw(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Tv.PatchedMediaKeysNop=Qw;Qw.install=Rw;function Uw(){throw new TypeError("Illegal constructor.");}Uw.prototype.createSession=function(){};Uw.prototype.setServerCertificate=function(){};Uw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Vw(){this.keySystem="";throw new TypeError("Illegal constructor.");}Vw.prototype.getConfiguration=function(){};
|
|
1009
1011
|
Vw.prototype.createMediaKeys=function(){};Wv(Rw,-10);function Ww(){}
|
|
1010
1012
|
function Xw(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Yw="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Zw;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=$w;window.MediaKeys=ax;window.MediaKeySystemAccess=bx;window.shakaMediaKeysPolyfill=!0}}
|
|
@@ -1012,14 +1014,14 @@ function cx(a){var b=Yw;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}functi
|
|
|
1012
1014
|
function bx(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),
|
|
1013
1015
|
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"]):
|
|
1014
1016
|
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;}bx.prototype.createMediaKeys=function(){var a=new ax(this.g);return Promise.resolve(a)};bx.prototype.getConfiguration=function(){return this.h};function ax(a){this.l=a;this.h=null;this.g=new wf;this.i=[];this.j=new Map}
|
|
1015
|
-
function dx(a,b){a.h=b;a.g.Vb();var c=Yw;b&&(a.g.s(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=nc(d.initData);a.h.dispatchEvent(e)}),a.g.s(b,c+"keymessage",function(d){var e=ex(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.
|
|
1017
|
+
function dx(a,b){a.h=b;a.g.Vb();var c=Yw;b&&(a.g.s(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=nc(d.initData);a.h.dispatchEvent(e)}),a.g.s(b,c+"keymessage",function(d){var e=ex(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.dc()?"licenserequest":"licenserenewal").set("message",d.message),d=new M("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.s(b,c+"keyadded",function(d){if(d=ex(a,d.sessionId))fx(d,"usable"),
|
|
1016
1018
|
d.g&&d.g.resolve(),d.g=null}),a.g.s(b,c+"keyerror",function(d){var e=ex(a,d.sessionId);e&&e.handleError(d)}))}ax.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 gx(b,this.l,a);this.i.push(a);return a};ax.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1017
|
-
ax.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function ex(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 gx(a,b,c){
|
|
1019
|
+
ax.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function ex(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 gx(a,b,c){gb.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 Xe;this.keyStatuses=new hx}qa(gx,gb);q=gx.prototype;
|
|
1018
1020
|
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?fx(this,"output-restricted"):1==b?fx(this,"expired"):fx(this,"internal-error"))};
|
|
1019
1021
|
function ix(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=mc(Kf("LOAD_SESSION|"+c));else{var e=Kf("PERSISTENT|");d=eg(e,b)}else d=mc(b)}catch(g){return Promise.reject(g)}a.h=new Xe;var f=cx("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}
|
|
1020
1022
|
function jx(a,b,c){if(a.g)a.g.then(function(){return jx(a,b,c)}).catch(function(){return jx(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Gf(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=bg(e.keys[0].k);e=bg(e.keys[0].kid)}else d=mc(c),e=null;var f=cx("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1021
1023
|
function fx(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new M("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return ix(this,b,null)};q.load=function(a){return"persistent-license"==this.l?ix(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Xe;jx(this,b,a);return b};
|
|
1022
|
-
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=cx("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 hx(){this.size=0;this.g=void 0}q=hx.prototype;q.
|
|
1024
|
+
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=cx("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 hx(){this.size=0;this.g=void 0}q=hx.prototype;q.dc=function(){return this.g};
|
|
1023
1025
|
q.forEach=function(a){this.g&&a(this.g,qh.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=qh.value();return this.g&&kc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Yw="";Wv(Xw);function kx(){}function lx(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=mx,Object.defineProperty(a,"disablePictureInPicture",{get:nx,set:ox,enumerable:!0,configurable:!0}),document.exitPictureInPicture=px,document.addEventListener("webkitpresentationmodechanged",qx,!0))}}
|
|
1024
1026
|
function qx(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)}
|
|
1025
1027
|
function mx(){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 px(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
@@ -1064,37 +1066,37 @@ function ty(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exe
|
|
|
1064
1066
|
b?"line-right":"center"==b||"middle"==b?"center":Bc);else if(d=/^region:(.*)$/.exec(b)){if(b=yy(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.J=1,a.m=Number(c[1]),c[2]&&(a.B=Nc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.J=Fc,a.m=Number(c[1]),c[2]&&(a.B=Nc[c[2].toUpperCase()])}function yy(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
|
|
1065
1067
|
function qy(a){a=Ur(a,uy);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 vy(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||""}K("shaka.text.VttTextParser",py);py.prototype.parseMedia=py.prototype.parseMedia;
|
|
1066
1068
|
py.prototype.setSequenceMode=py.prototype.setSequenceMode;py.prototype.parseInit=py.prototype.parseInit;var uy=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;ld["text/vtt"]=function(){return new py};ld['text/vtt; codecs="vtt"']=function(){return new py};ld['text/vtt; codecs="wvtt"']=function(){return new py};function zy(){this.g=null}zy.prototype.parseInit=function(a){var b=this,c=!1;(new Pf).box("moov",Uf).box("trak",Uf).box("mdia",Uf).T("mdhd",function(d){d=Th(d.reader,d.version);b.g=d.timescale}).box("minf",Uf).box("stbl",Uf).T("stsd",Wf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};zy.prototype.setSequenceMode=function(){};
|
|
1067
|
-
zy.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Pf).box("moof",Uf).box("traf",Uf).T("tfdt",function(z){g=!0;c=Sh(z.reader,z.version).baseMediaDecodeTime}).T("tfhd",function(z){l=Rh(z.reader,z.flags).
|
|
1068
|
-
p.value;var t=p.
|
|
1069
|
+
zy.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Pf).box("moof",Uf).box("traf",Uf).T("tfdt",function(z){g=!0;c=Sh(z.reader,z.version).baseMediaDecodeTime}).T("tfhd",function(z){l=Rh(z.reader,z.flags).ig}).T("trun",function(z){h=!0;d=Uh(z.reader,z.version,z.flags).Eg}).box("mdat",Yf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);a=c;for(var m=new Mf(e,0),n=r(d),p=n.next();!p.done;p=n.next()){p=
|
|
1070
|
+
p.value;var t=p.uf||l,v=p.ve?c+p.ve:a;a=v+(t||0);var w=0;do{var y=m.O();w+=y;var x=m.O(),A=null;"vttc"==Tf(x)?8<y&&(A=m.Jb(y-8)):m.skip(y-8);t&&A&&(y=Ay(A,b.periodStart+v/this.g,b.periodStart+a/this.g),f.push(y))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(Eb)};function Ay(a,b,c){var d,e,f;(new Pf).box("payl",Yf(function(g){d=Gf(g)})).box("iden",Yf(function(g){e=Gf(g)})).box("sttg",Yf(function(g){f=Gf(g)})).parse(a);return d?By(d,e,f,b,c):null}
|
|
1069
1071
|
function By(a,b,c,d,e){d=new zc(d,e,"");sy(a,d,new Map);b&&(d.id=b);if(c)for(a=new Sr(c),b=Vr(a);b;)ty(d,b,[]),Tr(a),b=Vr(a);return d}K("shaka.text.Mp4VttParser",zy);zy.prototype.parseMedia=zy.prototype.parseMedia;zy.prototype.setSequenceMode=zy.prototype.setSequenceMode;zy.prototype.parseInit=zy.prototype.parseInit;ld['application/mp4; codecs="wvtt"']=function(){return new zy};function Cy(){}Cy.prototype.parseInit=function(){};Cy.prototype.setSequenceMode=function(){};Cy.prototype.parseMedia=function(a){var b=Gf(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 Sr(c[0]),e=Dy(d),f=Ur(d,/,/g);d=Dy(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new zc(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1070
1072
|
function Dy(a){a=Ur(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)}K("shaka.text.SbvTextParser",Cy);Cy.prototype.parseMedia=Cy.prototype.parseMedia;Cy.prototype.setSequenceMode=Cy.prototype.setSequenceMode;Cy.prototype.parseInit=Cy.prototype.parseInit;ld["text/x-subviewer"]=function(){return new Cy};function Ey(){this.g=new py}Ey.prototype.parseInit=function(){};Ey.prototype.setSequenceMode=function(){};Ey.prototype.parseMedia=function(a,b){a=Gf(a);a=Fy(a);a=mc(Kf(a));return this.g.parseMedia(a,b)};
|
|
1071
1073
|
function Fy(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").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}K("shaka.text.SrtTextParser",Ey);Ey.srt2webvtt=Fy;Ey.prototype.parseMedia=Ey.prototype.parseMedia;
|
|
1072
1074
|
Ey.prototype.setSequenceMode=Ey.prototype.setSequenceMode;Ey.prototype.parseInit=Ey.prototype.parseInit;ld["text/srt"]=function(){return new Ey};function Gy(){}Gy.prototype.parseInit=function(){};Gy.prototype.setSequenceMode=function(){};
|
|
1073
1075
|
Gy.prototype.parseMedia=function(a){var b="",c="";a=Gf(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Hy.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=Iy.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Jy);else if("Style"==e){e=f.split(Jy);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
1074
|
-
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={
|
|
1076
|
+
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Je:e.Je},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Iy.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Jy);else if("Dialogue"==f){g=g.split(Jy);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Ky(f.Start);var k=Ky(f.End);g=new zc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Je=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Je}}(e)))&&Ly(g,f);d.push(g)}return d};
|
|
1075
1077
|
function Ly(a,b){var c=b.Fontname;c&&(a.l=c);if(c=b.Fontsize)a.D=c+"px";if(c=b.PrimaryColour)if(c=My(c))a.j=c;if(c=b.BackColour)if(c=My(c))a.backgroundColor=c;b.Bold&&(a.C=700);b.Italic&&(a.o="italic");b.Underline&&a.h.push("underline");if(c=b.Spacing)a.W=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.i=Hc;a.textAlign="start";break;case 2:a.i=Hc;a.textAlign=Cc;break;case 3:a.i=Hc;a.textAlign="end";break;case 5:a.i="before";a.textAlign="start";break;case 6:a.i="before";a.textAlign=Cc;break;
|
|
1076
1078
|
case 7:a.i="before";a.textAlign="end";break;case 9:a.i="center";a.textAlign="start";break;case 10:a.i="center";a.textAlign=Cc;break;case 11:a.i="center",a.textAlign="end"}if(b=b.AlphaLevel)a.G=parseFloat(b)}function My(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 Ky(a){a=Ny.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}K("shaka.text.SsaTextParser",Gy);
|
|
1077
|
-
Gy.prototype.parseMedia=Gy.prototype.parseMedia;Gy.prototype.setSequenceMode=Gy.prototype.setSequenceMode;Gy.prototype.parseInit=Gy.prototype.parseInit;var Hy=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Iy=/^\s*([^:]+):\s*(.*)/,Jy=/\s*,\s*/,Ny=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ld["text/x-ssa"]=function(){return new Gy};function Oy(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{
|
|
1079
|
+
Gy.prototype.parseMedia=Gy.prototype.parseMedia;Gy.prototype.setSequenceMode=Gy.prototype.setSequenceMode;Gy.prototype.parseInit=Gy.prototype.parseInit;var Hy=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Iy=/^\s*([^:]+):\s*(.*)/,Jy=/\s*,\s*/,Ny=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ld["text/x-ssa"]=function(){return new Gy};function Oy(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Zd:c,V:a}:null}function Py(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,ib:"mp4a.40."+e}}
|
|
1078
1080
|
function Qy(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1};function Ry(a){this.i=a;this.h=0;this.g=new Map}q=Ry.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?ec(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(id(b)||"mp4a.40.2")+'"':b};q.getOrginalMimeType=function(){return this.i};
|
|
1079
|
-
q.transmux=function(a,b,c,d){for(var e=mc(a),f=Qh(e),g=f.length;g<e.length&&!Qy(e,g);g++);a=1E3*c.endTime;f=Ph(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);
|
|
1080
|
-
|
|
1081
|
+
q.transmux=function(a,b,c,d){for(var e=mc(a),f=Qh(e),g=f.length;g<e.length&&!Qy(e,g);g++);a=1E3*c.endTime;f=Ph(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=Py(e,g);if(!c)return Promise.reject(new N(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=Oy(e,g);if(!h)return Promise.reject(new N(2,3,3018));var k=h.Zd+h.V;g+k<=e.length&&f.push({data:e.subarray(g+h.Zd,g+k),size:h.V,
|
|
1082
|
+
duration:1024,Ab:0,flags:{Fb:0,rb:0,qb:0,jb:0,kb:2,Gb:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.ib,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,$a:[],ma:new Uint8Array([]),Ea:new Uint8Array([]),data:{Lb:this.h,baseMediaDecodeTime:a,Za:f},stream:b};a=new kt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=a.initSegment(),this.g.set(b.id,d));b=Ft(a);this.h++;b=eg(d,b);return Promise.resolve(b)};K("shaka.transmuxer.AacTransmuxer",Ry);
|
|
1081
1083
|
Ry.prototype.transmux=Ry.prototype.transmux;Ry.prototype.getOrginalMimeType=Ry.prototype.getOrginalMimeType;Ry.prototype.convertCodecs=Ry.prototype.convertCodecs;Ry.prototype.isSupported=Ry.prototype.isSupported;Ry.prototype.destroy=Ry.prototype.destroy;Vc("audio/aac",function(){return new Ry("audio/aac")},ad);function Sy(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1082
1084
|
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,ma:a,V:e}}
|
|
1083
1085
|
function Ty(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function Uy(a){this.i=a;this.h=0;this.g=new Map}q=Uy.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?ec(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOrginalMimeType=function(){return this.i};
|
|
1084
1086
|
q.transmux=function(a,b,c,d){a=mc(a);for(var e=Qh(a),f=e.length;f<a.length&&!Ty(a,f);f++);var g=1E3*c.endTime;e=Ph(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Sy(a,f);if(!k)return Promise.reject(new N(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ma;h.push({data:a.subarray(f,f+k.V),size:k.V,duration:1536,Ab:0,flags:{Fb:0,
|
|
1085
|
-
rb:0,qb:0,jb:0,kb:2,Gb:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,$a:[],ma:e,Ea:new Uint8Array([]),data:{Lb:this.h,baseMediaDecodeTime:a,Za:h},stream:b};a=new kt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=a.initSegment(),this.g.set(b.id,d));b=Ft(a);this.h++;b=eg(d,b);return Promise.resolve(b)};K("shaka.transmuxer.Ac3Transmuxer",Uy);Uy.prototype.transmux=Uy.prototype.transmux;
|
|
1086
|
-
Uy.prototype.convertCodecs=Uy.prototype.convertCodecs;Uy.prototype.isSupported=Uy.prototype.isSupported;Uy.prototype.destroy=Uy.prototype.destroy;Vc("audio/ac3",function(){return new Uy("audio/ac3")},ad);function Vy(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Zh(a.subarray(b+2));ai(c,2);ai(c,3);var d=bi(c,11)+1<<1,e=bi(c,2);if(3==e){e=bi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=bi(c,2);var g=bi(c,3),h=bi(c,1);c=bi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ma:a,V:d}};function Wy(a){this.i=a;this.h=0;this.g=new Map}q=Wy.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?ec(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOrginalMimeType=function(){return this.i};
|
|
1087
|
+
rb:0,qb:0,jb:0,kb:2,Gb:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,$a:[],ma:e,Ea:new Uint8Array([]),data:{Lb:this.h,baseMediaDecodeTime:a,Za:h},stream:b};a=new kt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=a.initSegment(),this.g.set(b.id,d));b=Ft(a);this.h++;b=eg(d,b);return Promise.resolve(b)};K("shaka.transmuxer.Ac3Transmuxer",Uy);Uy.prototype.transmux=Uy.prototype.transmux;
|
|
1088
|
+
Uy.prototype.getOrginalMimeType=Uy.prototype.getOrginalMimeType;Uy.prototype.convertCodecs=Uy.prototype.convertCodecs;Uy.prototype.isSupported=Uy.prototype.isSupported;Uy.prototype.destroy=Uy.prototype.destroy;Vc("audio/ac3",function(){return new Uy("audio/ac3")},ad);function Vy(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Zh(a.subarray(b+2));ai(c,2);ai(c,3);var d=bi(c,11)+1<<1,e=bi(c,2);if(3==e){e=bi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=bi(c,2);var g=bi(c,3),h=bi(c,1);c=bi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ma:a,V:d}};function Wy(a){this.i=a;this.h=0;this.g=new Map}q=Wy.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?ec(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOrginalMimeType=function(){return this.i};
|
|
1087
1089
|
q.transmux=function(a,b,c,d){a=mc(a);for(var e=Qh(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ph(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Vy(a,f);if(!k)return Promise.reject(new N(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ma;h.push({data:a.subarray(f,f+k.V),size:k.V,duration:1536,
|
|
1088
|
-
Ab:0,flags:{Fb:0,rb:0,qb:0,jb:0,kb:2,Gb:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,$a:[],ma:e,Ea:new Uint8Array([]),data:{Lb:this.h,baseMediaDecodeTime:a,Za:h},stream:b};a=new kt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=a.initSegment(),this.g.set(b.id,d));b=Ft(a);this.h++;b=eg(d,b);return Promise.resolve(b)};K("shaka.transmuxer.Ec3Transmuxer",Wy);Wy.prototype.transmux=Wy.prototype.transmux;
|
|
1090
|
+
Ab:0,flags:{Fb:0,rb:0,qb:0,jb:0,kb:2,Gb:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,$a:[],ma:e,Ea:new Uint8Array([]),data:{Lb:this.h,baseMediaDecodeTime:a,Za:h},stream:b};a=new kt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=a.initSegment(),this.g.set(b.id,d));b=Ft(a);this.h++;b=eg(d,b);return Promise.resolve(b)};K("shaka.transmuxer.Ec3Transmuxer",Wy);Wy.prototype.transmux=Wy.prototype.transmux;
|
|
1089
1091
|
Wy.prototype.getOrginalMimeType=Wy.prototype.getOrginalMimeType;Wy.prototype.convertCodecs=Wy.prototype.convertCodecs;Wy.prototype.isSupported=Wy.prototype.isSupported;Wy.prototype.destroy=Wy.prototype.destroy;Vc("audio/ec3",function(){return new Wy("audio/ec3")},ad);function Xy(a){if(!a.length)return null;var b=a.find(function(m){return 7==m.type});a=a.find(function(m){return 8==m.type});if(!b||!a)return null;var c=new Zh(b.data),d=bi(c,8);bi(c,8);bi(c,8);di(c);if(Yy.includes(d)&&(d=ei(c),3===d&&ai(c,1),di(c),di(c),ai(c,1),1===bi(c,1))){d=3!==d?8:12;for(var e=0;e<d;e++)1===bi(c,1)&&(6>e?fi(c,16):fi(c,64))}di(c);d=ei(c);if(0===d)ei(c);else if(1===d)for(ai(c,1),di(c),di(c),d=ei(c),e=0;e<d;e++)di(c);di(c);ai(c,1);d=ei(c);var f=ei(c),g=bi(c,1);0===g&&ai(c,1);ai(c,
|
|
1090
1092
|
1);var h=e=0,k=0,l=0;1===bi(c,1)&&(e=ei(c),h=ei(c),k=ei(c),l=ei(c));c=(2-g)*(f+1)*16-2*k-2*l;d=16*(d+1)-2*e-2*h;e=[];b=b.Bb;e.push(b.byteLength>>>8&255);e.push(b.byteLength&255);e=e.concat.apply(e,u(b));b=[];a=a.Bb;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,u(a));a=new Uint8Array([1,e[3],e[4],e[5],255,225].concat(e,[1],b));return{height:c,width:d,Ea:a}}
|
|
1091
1093
|
function Zy(a){var b=!1,c=new Uint8Array([]),d=a.find(function(k){return 7==k.type}),e=!1;a=r(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=gi(new Zh(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.Bb.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c=
|
|
1092
1094
|
eg(c,h,f.Bb))}return c.byteLength?{data:c,wg:b}:null}var Yy=[100,110,122,244,44,83,86,118,128,138,139,134];function $y(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*az[14*(3===c?3-d:3===d?3:4)+e-1];f=bz[3*(3===c?0:2===c?1:2)+f];c=cz[c][d];var h=dz[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,V:k,wi:8*c*h}}return null}
|
|
1093
1095
|
function ez(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var az=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],bz=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],cz=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],dz=[0,1,1,4];function fz(a){this.i=a;this.h=0;this.g=new Map}q=fz.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?ec(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOrginalMimeType=function(){return this.i};
|
|
1094
1096
|
q.transmux=function(a,b,c,d){a=mc(a);for(c=Qh(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&ez(a,e)){var f=$y(a,e),g=4;f&&f.V&&(g=f.V);e+=g;e=e===a.length||e+1<a.length&&ez(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=$y(a,c);if(!f)return Promise.reject(new N(2,3,3018));h||(h=f);c+f.V<=a.length&&e.push({data:a.subarray(c,c+f.V),size:f.V,duration:1152,Ab:0,flags:{Fb:0,rb:0,qb:0,jb:0,kb:2,Gb:0}});c+=f.V}if(!h)return Promise.reject(new N(2,3,3018));a=9E4*h.wi/h.sampleRate*this.h;d={id:b.id,
|
|
1095
|
-
type:"audio",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,$a:[],ma:new Uint8Array([]),Ea:new Uint8Array([]),data:{Lb:this.h,baseMediaDecodeTime:a,Za:e},stream:b};h=new kt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=h.initSegment(),this.g.set(b.id,d));b=Ft(h);this.h++;b=eg(d,b);return Promise.resolve(b)};K("shaka.transmuxer.Mp3Transmuxer",fz);fz.prototype.transmux=fz.prototype.transmux;fz.prototype.getOrginalMimeType=fz.prototype.getOrginalMimeType;
|
|
1097
|
+
type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,$a:[],ma:new Uint8Array([]),Ea:new Uint8Array([]),data:{Lb:this.h,baseMediaDecodeTime:a,Za:e},stream:b};h=new kt([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=h.initSegment(),this.g.set(b.id,d));b=Ft(h);this.h++;b=eg(d,b);return Promise.resolve(b)};K("shaka.transmuxer.Mp3Transmuxer",fz);fz.prototype.transmux=fz.prototype.transmux;fz.prototype.getOrginalMimeType=fz.prototype.getOrginalMimeType;
|
|
1096
1098
|
fz.prototype.convertCodecs=fz.prototype.convertCodecs;fz.prototype.isSupported=fz.prototype.isSupported;fz.prototype.destroy=fz.prototype.destroy;Vc("audio/mpeg",function(){return new fz("audio/mpeg")},ad);function gz(a){this.h=a;this.g=null}q=gz.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=id(a).split(","),c=Ib("audio",b);b=Ib("video",b);return!c||b||"mp3"!=gd(c)?!1:ec(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOrginalMimeType=function(){return this.h};
|
|
1097
|
-
q.transmux=function(a){this.g?this.g.clearData():this.g=new hi;a=mc(a);var b=this.g.parse(a);a=b.Sd();if("mp3"!=a.audio||a.video)return Promise.reject(new N(2,3,3018));a=new Uint8Array([]);b=r(b
|
|
1099
|
+
q.transmux=function(a){this.g?this.g.clearData():this.g=new hi;a=mc(a);var b=this.g.parse(a);a=b.Sd();if("mp3"!=a.audio||a.video)return Promise.reject(new N(2,3,3018));a=new Uint8Array([]);b=r(b.$b());for(var c=b.next();!c.done;c=b.next())if(c=c.value.data)for(var d=0;d<c.length;){var e=$y(c,d);e?(d+e.V<=c.length&&(a=eg(a,c.subarray(d,d+e.V))),d+=e.V):d++}return Promise.resolve(a)};K("shaka.transmuxer.MpegTsTransmuxer",gz);gz.prototype.transmux=gz.prototype.transmux;
|
|
1098
1100
|
gz.prototype.getOrginalMimeType=gz.prototype.getOrginalMimeType;gz.prototype.convertCodecs=gz.prototype.convertCodecs;gz.prototype.isSupported=gz.prototype.isSupported;gz.prototype.destroy=gz.prototype.destroy;Vc("video/mp2t",function(){return new gz("video/mp2t")},$c);/*
|
|
1099
1101
|
@license
|
|
1100
1102
|
MSS Transmuxer
|
|
@@ -1114,32 +1116,32 @@ q.isSupported=function(a,b){var c="mp2t"==a.toLowerCase().split(";")[0].split("/
|
|
|
1114
1116
|
function mz(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}q.getOrginalMimeType=function(){return this.m};q.transmux=function(a){this.i=!0;this.h=new Xe;this.l=[];a=mc(a);this.g.push(a);this.g.flush();this.i&&this.h.reject(new N(2,3,3018));return this.h};
|
|
1115
1117
|
K("shaka.transmuxer.MuxjsTransmuxer",lz);lz.prototype.transmux=lz.prototype.transmux;lz.prototype.getOrginalMimeType=lz.prototype.getOrginalMimeType;lz.prototype.convertCodecs=lz.prototype.convertCodecs;lz.prototype.isSupported=lz.prototype.isSupported;lz.prototype.destroy=lz.prototype.destroy;Vc("video/mp2t",function(){return new lz("video/mp2t")},ad);function nz(a){this.j=a;this.g=0;this.h=new Map;this.i=null}q=nz.prototype;q.destroy=function(){this.h.clear()};q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=id(a).split(","),d=Ib("audio",c);c=Ib("video",c);if(d&&c||d&&(d=gd(d),!oz.includes(d))||c&&(d=gd(c),!pz.includes(d)))return!1;if(b)return ec(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return ec(b)||ec(a)};
|
|
1116
1118
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=id(b).replace("mp4a.40.34","mp3"),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOrginalMimeType=function(){return this.j};
|
|
1117
|
-
q.transmux=function(a,b,c,d){this.i?this.i.clearData():this.i=new hi;a=mc(a);var
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
function qz(a,b,c,d){for(var e=[],f=null,g=[],h=b.
|
|
1125
|
-
3,3018);c.height=b.height;c.width=b.width;return{id:c.id,type:"video",encrypted:c.encrypted&&0<c.drmInfos.length,timescale:9E4,duration:d,$a:[],ma:new Uint8Array([]),Ea:b.Ea,data:{Lb:a.g,baseMediaDecodeTime:f,Za:e},stream:c}}K("shaka.transmuxer.TsTransmuxer",nz);nz.prototype.transmux=nz.prototype.transmux;nz.prototype.getOrginalMimeType=nz.prototype.getOrginalMimeType;nz.prototype.convertCodecs=nz.prototype.convertCodecs;nz.prototype.isSupported=nz.prototype.isSupported;
|
|
1126
|
-
var oz=["aac","ac-3","ec-3","mp3"],pz=["avc"];Vc("video/mp2t",function(){return new nz("video/mp2t")},Zc);/*
|
|
1119
|
+
q.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new hi;a=mc(a);var f=1E3*c.endTime,g=this.i.parse(a);c=g.getStartTime();null!=c.audio&&(f=c.audio);null!=c.video&&(f=c.video);c=[];var h=g.Sd();try{a=null;if("video"==e){switch(h.video){case "avc":a=qz(this,g,b,d)}a&&(c.push(a),a=null)}if("audio"==e){switch(h.audio){case "aac":for(var k=f,l=[],m,n=r(g.$b()),p=n.next();!p.done;p=n.next()){var t=p.value.data;if(t){g=0;m=Py(t,g);if(!m)throw new N(2,3,3018);b.audioSamplingRate=m.sampleRate;
|
|
1120
|
+
for(b.channelsCount=m.channelCount;g<t.length;){var v=Oy(t,g);if(v){var w=v.Zd+v.V;g+w<=t.length&&l.push({data:t.subarray(g+v.Zd,g+w),size:v.V,duration:1024,Ab:0,flags:{Fb:0,rb:0,qb:0,jb:0,kb:2,Gb:0}});g+=w}else g++}}}if(!m)throw new N(2,3,3018);var y=m.sampleRate,x=Math.floor(k*y/1E3);a={id:b.id,type:"audio",codecs:m.ib,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:y,duration:d,$a:[],ma:new Uint8Array([]),Ea:new Uint8Array([]),data:{Lb:this.g,baseMediaDecodeTime:x,Za:l},stream:b};break;case "ac3":var A=
|
|
1121
|
+
f,z=[],B=0;k=new Uint8Array([]);l=r(g.$b());for(var E=l.next();!E.done;E=l.next()){var F=E.value.data;for(g=0;g<F.length;){var G=Sy(F,g);G?(b.audioSamplingRate=G.sampleRate,b.channelsCount=G.channelCount,B=G.sampleRate,k=G.ma,z.push({data:F.subarray(g,g+G.V),size:G.V,duration:1536,Ab:0,flags:{Fb:0,rb:0,qb:0,jb:0,kb:2,Gb:0}}),g+=G.V):g++}}if(0==B||0==k.byteLength)throw new N(2,3,3018);var I=Math.floor(A*B/1E3);a={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:B,
|
|
1122
|
+
duration:d,$a:[],ma:k,Ea:new Uint8Array([]),data:{Lb:this.g,baseMediaDecodeTime:I,Za:z},stream:b};break;case "ec3":k=f;l=[];E=0;A=new Uint8Array([]);z=r(g.$b());for(B=z.next();!B.done;B=z.next()){var J=B.value.data;for(g=0;g<J.length;){var L=Vy(J,g);L?(b.audioSamplingRate=L.sampleRate,b.channelsCount=L.channelCount,E=L.sampleRate,A=L.ma,l.push({data:J.subarray(g,g+L.V),size:L.V,duration:1536,Ab:0,flags:{Fb:0,rb:0,qb:0,jb:0,kb:2,Gb:0}}),g+=L.V):g++}}if(0==E||0==A.byteLength)throw new N(2,3,3018);var V=
|
|
1123
|
+
Math.floor(k*E/1E3);a={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:E,duration:d,$a:[],ma:A,Ea:new Uint8Array([]),data:{Lb:this.g,baseMediaDecodeTime:V,Za:l},stream:b};break;case "mp3":k=f;l=[];for(var U,ka=r(g.$b()),aa=ka.next();!aa.done;aa=ka.next()){var ha=aa.value.data;if(ha)for(g=0;g<ha.length;){var ta=$y(ha,g);ta?(U||(U=ta),g+ta.V<=ha.length&&l.push({data:ha.subarray(g,g+ta.V),size:ta.V,duration:1152,Ab:0,flags:{Fb:0,rb:0,qb:0,jb:0,kb:2,Gb:0}}),g+=
|
|
1124
|
+
ta.V):g++}}if(!U)throw new N(2,3,3018);var Ca=U.sampleRate,ua=Math.floor(k*Ca/1E3);a={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,$a:[],ma:new Uint8Array([]),Ea:new Uint8Array([]),data:{Lb:this.g,baseMediaDecodeTime:ua,Za:l},stream:b}}a&&c.push(a)}}catch(Ea){return Promise.reject(Ea)}if(!c.length)return Promise.reject(new N(2,3,3018));c=new kt(c);this.h.has(b.id)?d=this.h.get(b.id):(d=c.initSegment(),this.h.set(b.id,d));b=Ft(c);this.g++;b=eg(d,
|
|
1125
|
+
b);return Promise.resolve(b)};
|
|
1126
|
+
function qz(a,b,c,d){for(var e=[],f=null,g=[],h=b.Yd().filter(function(p){return null!=p.pts&&null!=p.dts}),k=0;k<h.length;k++){var l=h[k],m=void 0;k+1<h.length&&(m=h[k+1]);m=b.qf(l,m);g=g.concat(m);if(m=Zy(m)){null==f&&null!=l.dts&&(f=l.dts);var n=void 0;n=k+1<h.length?(h[k+1].dts||0)-(l.dts||0):(l.dts||0)-(h[k-1].dts||0);e.push({data:m.data,size:m.data.byteLength,duration:n,Ab:Math.round((l.pts||0)-(l.dts||0)),flags:{Fb:0,rb:0,qb:0,jb:0,kb:m.wg?2:1,Gb:m.wg?0:1}})}}b=Xy(g);if(!b||null==f)throw new N(2,
|
|
1127
|
+
3,3018);c.height=b.height;c.width=b.width;return{id:c.id,type:"video",codecs:"avc1",encrypted:c.encrypted&&0<c.drmInfos.length,timescale:9E4,duration:d,$a:[],ma:new Uint8Array([]),Ea:b.Ea,data:{Lb:a.g,baseMediaDecodeTime:f,Za:e},stream:c}}K("shaka.transmuxer.TsTransmuxer",nz);nz.prototype.transmux=nz.prototype.transmux;nz.prototype.getOrginalMimeType=nz.prototype.getOrginalMimeType;nz.prototype.convertCodecs=nz.prototype.convertCodecs;nz.prototype.isSupported=nz.prototype.isSupported;
|
|
1128
|
+
nz.prototype.destroy=nz.prototype.destroy;var oz=["aac","ac-3","ec-3","mp3"],pz=["avc"];Vc("video/mp2t",function(){return new nz("video/mp2t")},Zc);/*
|
|
1127
1129
|
@license
|
|
1128
1130
|
EME Encryption Scheme Polyfill
|
|
1129
1131
|
Copyright 2019 Google LLC
|
|
1130
1132
|
SPDX-License-Identifier: Apache-2.0
|
|
1131
1133
|
*/
|
|
1132
1134
|
function rz(){}var sz;function tz(){sz?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(sz=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=uz):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
1133
|
-
function uz(a,b){var c=this,d;return
|
|
1135
|
+
function uz(a,b){var c=this,d;return H(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,sz.call(c,a,b),2);d=e.h;if(vz(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=sz,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=wz;return e.return(wz.call(c,
|
|
1134
1136
|
a,b))})}
|
|
1135
|
-
function wz(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return
|
|
1137
|
+
function wz(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return H(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=xz(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=yz(h.videoCapabilities,d),l=yz(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 n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
1136
1138
|
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(t,sz.call(c,a,e),2)}p=t.h;return t.return(new zz(p,d))})}function yz(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}K("EmeEncryptionSchemePolyfill",rz);rz.install=tz;function Az(){}var Bz;
|
|
1137
1139
|
function Cz(){Bz?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Bz=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Dz):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1138
|
-
function Dz(a){var b=this,c,d,e;return
|
|
1140
|
+
function Dz(a){var b=this,c,d,e;return H(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,Bz.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&vz(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Bz,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1139
1141
|
navigator.mediaCapabilities.decodingInfo=Ez;if(d){f.F(3);break}e=c;return C(f,Fz(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(Ez.call(b,a))}})}
|
|
1140
|
-
function Ez(a){var b=this,c,d,e,f,g,h,k,l;return
|
|
1142
|
+
function Ez(a){var b=this,c,d,e,f,g,h,k,l;return H(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=xz(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,Bz.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1141
1143
|
new zz(k.keySystemAccess,c);m.F(3);break}if(!a.keySystemConfiguration){m.F(3);break}l=k;return C(m,Fz(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
1142
|
-
function Fz(a){var b,c;return
|
|
1144
|
+
function Fz(a){var b,c;return H(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 C(d,
|
|
1143
1145
|
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}K("McEncryptionSchemePolyfill",Az);Az.install=Cz;function zz(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
1144
1146
|
zz.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};zz.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
1145
1147
|
function xz(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 vz(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}
|
|
@@ -1190,56 +1192,56 @@ A:"Thai"},"th-TH":{u:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u
|
|
|
1190
1192
|
A:"Ukrainian"},ur:{u:"\u0627\u0631\u062f\u0648",A:"Urdu"},"ur-PK":{u:"\u0627\u0631\u062f\u0648",A:"Urdu"},uz:{u:"O'zbek",A:"Uzbek"},"uz-UZ":{u:"O'zbek",A:"Uzbek"},vi:{u:"Ti\u1ebfng Vi\u1ec7t",A:"Vietnamese"},"vi-VN":{u:"Ti\u1ebfng Vi\u1ec7t",A:"Vietnamese"},"xh-ZA":{u:"isiXhosa",A:"Xhosa"},yi:{u:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",A:"Yiddish"},"yi-DE":{u:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",A:"Yiddish (German)"},zh:{u:"\u4e2d\u6587",A:"Chinese"},"zh-HANS":{u:"\u4e2d\u6587\u7b80\u4f53",
|
|
1191
1193
|
A:"Chinese Simplified"},"zh-HANT":{u:"\u4e2d\u6587\u7e41\u9ad4",A:"Chinese Traditional"},"zh-CN":{u:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",A:"Chinese Simplified (China)"},"zh-HK":{u:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",A:"Chinese Traditional (Hong Kong)"},"zh-SG":{u:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",A:"Chinese Simplified (Singapore)"},"zh-TW":{u:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",A:"Chinese Traditional (Taiwan)"},"zu-ZA":{u:"isiZulu",A:"Zulu"}},Iz=r(Object.keys(Hz)),Jz=Iz.next();!Jz.done;Jz=
|
|
1192
1194
|
Iz.next()){var Kz=Jz.value;Hz[Kz.toLowerCase()]=Hz[Kz]};function Lz(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new wf;this.localization=this.controls.za;this.player=this.controls.zc();this.video=this.controls.Ub();this.adManager=this.player.Rd();this.ad=b.getAd();this.eventManager.s(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.s(this.adManager,"ad-stopped",function(){c.ad=null})}
|
|
1193
|
-
Lz.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};K("shaka.ui.Element",Lz);Lz.prototype.release=Lz.prototype.release;function Mz(a){return Nz(a,"shaka-back-to-overflow-button")}function Nz(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function Oz(a){a&&(a=Nz(a,"shaka-chosen-item"))&&a.parentElement.focus()}function Pz(){var a=
|
|
1194
|
-
function Rz(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function Sz(a,b){Lz.call(this,a,b);var c=this;this.i=
|
|
1195
|
-
""))});this.eventManager.s(this.localization,"locale-updated",function(){});this.eventManager.s(this.localization,"locale-changed",function(){});this.eventManager.s(this.adManager,"ad-started",function(){c.g.Da();c.g.ka(.5)});this.eventManager.s(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Da(),this.g.ka(.5))}qa(Sz,Lz);Sz.prototype.release=function(){this.g.stop();this.g=null;Lz.prototype.release.call(this)};K("shaka.ui.AdCounter",Sz);function Tz(a,b){Lz.call(this,a,b);var c=this;this.g=
|
|
1195
|
+
Lz.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};K("shaka.ui.Element",Lz);Lz.prototype.release=Lz.prototype.release;function Mz(a){return Nz(a,"shaka-back-to-overflow-button")}function Nz(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function Oz(a){a&&(a=Nz(a,"shaka-chosen-item"))&&a.parentElement.focus()}function Pz(){var a=R("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function Qz(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
1196
|
+
function Rz(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function Sz(a,b){Lz.call(this,a,b);var c=this;this.i=R("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=R("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new O(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=Rz(e-d,!1)+" / "+Rz(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
|
|
1197
|
+
""))});this.eventManager.s(this.localization,"locale-updated",function(){});this.eventManager.s(this.localization,"locale-changed",function(){});this.eventManager.s(this.adManager,"ad-started",function(){c.g.Da();c.g.ka(.5)});this.eventManager.s(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Da(),this.g.ka(.5))}qa(Sz,Lz);Sz.prototype.release=function(){this.g.stop();this.g=null;Lz.prototype.release.call(this)};K("shaka.ui.AdCounter",Sz);function Tz(a,b){Lz.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");Qz(this.g,!1);this.parent.appendChild(this.g);this.h=R("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.s(this.localization,"locale-updated",function(){c.ad&&Uz(c)});this.eventManager.s(this.localization,"locale-changed",function(){c.ad&&Uz(c)});this.eventManager.s(this.adManager,"ad-started",function(){Uz(c)});this.eventManager.s(this.adManager,
|
|
1196
1198
|
"ad-stopped",function(){c.h.textContent="";Qz(c.g,!1)});this.ad&&Uz(this)}qa(Tz,Lz);function Uz(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));Qz(a.g,!0)}}K("shaka.ui.AdPosition",Tz);function Vz(a,b){Lz.call(this,a,b);var c=this;this.button=Kk();this.parent.appendChild(this.button);this.eventManager.s(this.localization,"locale-updated",function(){c.g()});this.eventManager.s(this.localization,"locale-changed",function(){c.g()});this.eventManager.s(this.video,"play",function(){c.g();c.h()});this.eventManager.s(this.video,"pause",function(){c.g();c.h()});this.eventManager.s(this.video,"seeking",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-paused",function(){c.g();
|
|
1197
1199
|
c.h()});this.eventManager.s(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.s(this.button,"click",function(){c.ad&&c.ad.isLinear()?Wz(c.controls):Xz(c.controls)});this.ad&&(this.g(),this.h())}qa(Vz,Lz);Vz.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.o.paused&&!a.W;return a};Vz.prototype.g=function(){};Vz.prototype.h=function(){};
|
|
1198
|
-
K("shaka.ui.PlayButton",Vz);function Yz(a,b){Vz.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}qa(Yz,Vz);Yz.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};Yz.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};K("shaka.ui.BigPlayButton",Yz);function Zz(a,b){Lz.call(this,a,b);var c=this;this.j=this.controls.h;this.h=this.controls.g;this.i=[];this.g=
|
|
1200
|
+
K("shaka.ui.PlayButton",Vz);function Yz(a,b){Vz.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}qa(Yz,Vz);Yz.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};Yz.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};K("shaka.ui.BigPlayButton",Yz);function Zz(a,b){Lz.call(this,a,b);var c=this;this.j=this.controls.h;this.h=this.controls.g;this.i=[];this.g=R("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.s(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";Qz(c.g,!0)}else Qz(c.g,
|
|
1199
1201
|
!1)});this.eventManager.s(window,"click",function(){Qz(c.g,!1)});$z(this)}qa(Zz,Lz);Zz.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];Lz.prototype.release.call(this)};function aA(a,b){bA.set(a,b)}function $z(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=bA.get(c);d?a.i.push(d.create(a.g,a.controls)):Xa("Unrecognized context menu element:",c)}}K("shaka.ui.ContextMenu",Zz);
|
|
1200
|
-
Zz.registerElement=aA;var bA=new Map;function cA(a,b,c,d){Lz.call(this,a,b);var e=this;this.container=
|
|
1201
|
-
this.parent.appendChild(this.container);this.eventManager.s(this.bar,"mousedown",function(){e.controls.
|
|
1202
|
+
Zz.registerElement=aA;var bA=new Map;function cA(a,b,c,d){Lz.call(this,a,b);var e=this;this.container=R("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,u(c));this.h=!1;this.bar=document.createElement("input");this.C=new O(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,u(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
|
|
1203
|
+
this.parent.appendChild(this.container);this.eventManager.s(this.bar,"mousedown",function(){e.controls.ic()&&(e.h=!0,e.onChangeStart())});this.eventManager.s(this.bar,"touchstart",function(f){e.controls.ic()&&(e.h=!0,dA(e,f),e.onChangeStart())});this.eventManager.s(this.bar,"input",function(){e.onChange()});this.eventManager.s(this.bar,"touchmove",function(f){e.h&&(dA(e,f),e.onChange())});this.eventManager.s(this.bar,"touchend",function(f){e.h&&(e.h=!1,dA(e,f),e.onChangeEnd())});this.eventManager.s(this.bar,
|
|
1202
1204
|
"touchcancel",function(f){e.h&&(e.h=!1,dA(e,f),e.onChangeEnd())});this.eventManager.s(this.bar,"mouseup",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.s(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.s(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}qa(cA,Lz);q=cA.prototype;q.release=function(){this.C&&(this.C.stop(),this.C=null);Lz.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};
|
|
1203
1205
|
q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.h||(this.h=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.C.R(.5)};q.getValue=function(){return parseFloat(this.bar.value)};q.setValue=function(a){this.h||(this.bar.value=a)};
|
|
1204
1206
|
function dA(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}K("shaka.ui.RangeElement",cA);cA.prototype.setValue=cA.prototype.setValue;cA.prototype.getValue=cA.prototype.getValue;cA.prototype.changeTo=cA.prototype.changeTo;cA.prototype.onChangeEnd=cA.prototype.onChangeEnd;cA.prototype.onChange=cA.prototype.onChange;cA.prototype.onChangeStart=cA.prototype.onChangeStart;
|
|
1205
|
-
cA.prototype.setRange=cA.prototype.setRange;function eA(a,b){cA.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.B=
|
|
1206
|
-
this.g=
|
|
1207
|
+
cA.prototype.setRange=cA.prototype.setRange;function eA(a,b){cA.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.B=R("div");this.B.classList.add("shaka-ad-markers");this.container.insertBefore(this.B,this.container.childNodes[0]);this.D=this.controls.h;this.l=new O(function(){var d=c.getValue();c.player.S()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.G=new O(function(){fA(c)});this.I=!1;this.i=R("div");this.i.id="shaka-player-ui-thumbnail-container";
|
|
1208
|
+
this.g=R("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.m=R("div");this.m.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.m);this.container.appendChild(this.i);this.H=!1;this.j=new O(function(){gA(c)});this.o=[];this.eventManager.s(this.localization,"locale-updated",function(){return hA(c)});this.eventManager.s(this.localization,"locale-changed",function(){return hA(c)});this.eventManager.s(this.adManager,"ad-started",function(){iA(c)||
|
|
1207
1209
|
Qz(c.container,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){iA(c)&&Qz(c.container,!0)});this.eventManager.s(this.adManager,"ad-cue-points-changed",function(d){c.o=d.cuepoints;jA(c)});this.eventManager.s(this.player,"unloading",function(){c.o=[];jA(c)});this.eventManager.s(this.bar,"mousemove",function(d){if(c.player.Ud().length){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;kA(c,d,Math.round(f+(parseFloat(c.bar.max)-f)/e.width*d))}else gA(c)});
|
|
1208
|
-
this.eventManager.s(this.container,"mouseleave",function(){c.j.stop();c.j.R(.25)});this.setValue(this.video.currentTime);this.update();hA(this);this.ad&&Qz(this.container,!1)}qa(eA,cA);q=eA.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null,this.G.stop(),this.G=null);cA.prototype.release.call(this)};q.onChangeStart=function(){this.I=!this.video.paused;this.controls.
|
|
1209
|
-
q.onChange=function(){if(this.video.duration)if(this.update(),this.l.R(.125),this.player.Ud().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());kA(this,(d-a)/((b-a)/c.width),d)}else gA(this)};q.onChangeEnd=function(){this.l.Da();this.controls.
|
|
1210
|
+
this.eventManager.s(this.container,"mouseleave",function(){c.j.stop();c.j.R(.25)});this.setValue(this.video.currentTime);this.update();hA(this);this.ad&&Qz(this.container,!1)}qa(eA,cA);q=eA.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null,this.G.stop(),this.G=null);cA.prototype.release.call(this)};q.onChangeStart=function(){this.I=!this.video.paused;this.controls.Ef(!0);this.video.pause();this.j.stop();this.H=!0};
|
|
1211
|
+
q.onChange=function(){if(this.video.duration)if(this.update(),this.l.R(.125),this.player.Ud().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());kA(this,(d-a)/((b-a)/c.width),d)}else gA(this)};q.onChangeEnd=function(){this.l.Da();this.controls.Ef(!1);this.I&&this.video.play();this.H&&(this.H=!1,this.j.stop(),this.j.R(.25))};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
1210
1212
|
q.update=function(){var a=this.D.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ba(),g=f.end-f.start;this.setRange(f.start,f.end);iA(this)?(Qz(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.D.showUnbufferedStart?
|
|
1211
1213
|
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):Qz(this.container,!1)};
|
|
1212
1214
|
function fA(a){if(a.o.length){for(var b=a.player.Ba(),c=b.end-b.start,d=["to right"],e=[],f=a.D.seekBarColors.adBreaks,g=!1,h=r(a.o),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|
|
1213
1215
|
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.B.style.background="linear-gradient("+d.join(",")+")"}else a.B.style.background="transparent"}function jA(a){fA(a);var b=a.player.Ba();b=b.end-b.start;a.player.S()&&5<b&&a.G.ka(1)}function iA(a){var b=a.player.Ba();b=b.end-b.start;return a.player.S()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function hA(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
1214
|
-
function kA(a,b,c){var d,e,f,g,h,k,l,m,n,p;
|
|
1215
|
-
k,Math.max(0,b-k/2));a.i.style.left=m+"px";a.i.style.visibility="visible";n=g.uris[0].split("#xywh=")[0];if(n!==a.g.src){try{a.i.removeChild(a.g)}catch(v){}a.g=
|
|
1216
|
+
function kA(a,b,c){var d,e,f,g,h,k,l,m,n,p;H(function(t){if(1==t.g){d=lA(a);if(!d)return gA(a),t.return();0>c&&(c=0);e=a.player.Ba();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return C(t,a.player.pg(d.id,f),2)}g=t.h;if(!g||!g.uris.length)return gA(a),t.return();a.player.S()?(h=e.end-c,a.m.textContent=1>h?a.localization.resolve("LIVE"):"-"+mA(h)):a.m.textContent=mA(c);k=a.i.clientWidth;l=Math.floor(9*k/16);a.i.style.height=l+"px";a.i.style.top=-(l- -10)+"px";m=Math.min(a.bar.offsetWidth-
|
|
1217
|
+
k,Math.max(0,b-k/2));a.i.style.left=m+"px";a.i.style.visibility="visible";n=g.uris[0].split("#xywh=")[0];if(n!==a.g.src){try{a.i.removeChild(a.g)}catch(v){}a.g=R("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=n;a.i.insertBefore(a.g,a.i.firstChild)}p=k/g.width;g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain");g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain");a.g.style.left=
|
|
1216
1218
|
"-"+p*g.positionX+"px";a.g.style.top="-"+p*g.positionY+"px";a.g.style.transform="scale("+p+")";a.g.style.transformOrigin="left top";l=Math.floor(k*g.height/g.width);a.i.style.height=l+"px";a.i.style.top=-(l- -10)+"px";D(t)})}
|
|
1217
|
-
function lA(a){var b=a.player.Ud();if(!b.length)return null;for(var c={},d=r(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={
|
|
1218
|
-
function gA(a){a.i.style.visibility="hidden";a.m.textContent=""}function mA(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}K("shaka.ui.SeekBar",eA);function nA(){}nA.prototype.create=function(a,b){return new eA(a,b)};eA.Factory=nA;function Z(a,b,c,d){
|
|
1219
|
-
!1)});this.Fa=new O(function(){e.
|
|
1220
|
-
q.destroy=function(){var a=this;return
|
|
1221
|
-
null;case 6:a.D=null,a.B=null,a.o=null,a.za=null,a.ba.clear(),
|
|
1222
|
-
q.configure=function(a){this.h=a;this.C.
|
|
1219
|
+
function lA(a){var b=a.player.Ud();if(!b.length)return null;for(var c={},d=r(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={Fe:c.Fe,De:c.De},e=d.next())if(c.Fe=e.value,c.De=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Fe&&g.bandwidth<.01*f.De}}(c)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&e.length)return e[0];return b[0]}
|
|
1220
|
+
function gA(a){a.i.style.visibility="hidden";a.m.textContent=""}function mA(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}K("shaka.ui.SeekBar",eA);function nA(){}nA.prototype.create=function(a,b){return new eA(a,b)};eA.Factory=nA;function Z(a,b,c,d){gb.call(this);var e=this;this.P=!0;this.h=d;this.C=new Yn(c,a,this.h.castReceiverAppId,this.h.castAndroidReceiverCompatible);this.gb=!0;this.o=this.C.Ub();this.B=c;this.D=this.C.zc();this.ya=a;this.j=b;this.eb=this.D.Rd();this.l=this.m=null;this.W=!1;this.G=[];this.Qb=[];this.yb=!1;this.X=new O(function(){e.j.style.cursor="none";e.yb=!1;oA(e)});this.aa=new O(function(){e.g.removeAttribute("shown");e.I.R(2)});this.I=new O(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())Qz(g.value,
|
|
1221
|
+
!1)});this.Fa=new O(function(){e.ic()&&pA(e)});this.J=null;this.H=[];this.za=qA();this.i=new wf;this.configure(this.h);rA(this);this.ba=new Set;sA(this);this.Fa.ka(.125);this.i.s(this.za,"locale-changed",function(f){e.eb.setLocale(f.locales[0])})}qa(Z,gb);q=Z.prototype;
|
|
1222
|
+
q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.F(2);break}return C(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.X&&(a.X.stop(),a.X=null);a.aa&&(a.aa.stop(),a.aa=null);a.I&&(a.I.stop(),a.I=null);a.Fa&&(a.Fa.stop(),a.Fa=null);tA(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.F(4);break}return C(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.ya){b.F(6);break}return C(b,a.ya.destroy(),7);case 7:a.ya=
|
|
1223
|
+
null;case 6:a.D=null,a.B=null,a.o=null,a.za=null,a.ba.clear(),gb.prototype.release.call(a),D(b)}})};function tA(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function uA(a,b){vA.set(a,b)}q.Zg=function(a){this.gb=a;sA(this)};q.Yh=function(){oA(this)};
|
|
1224
|
+
q.configure=function(a){this.h=a;this.C.dg(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.wb&&(this.wb=null);this.fb&&(this.fb=null);this.g?(Lk(this.g),tA(this)):(wA(this),xA(this));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");yA(this);this.h.addBigPlayButton&&zA(this);this.h.customContextMenu&&(this.fb=new Zz(this.U,this),this.H.push(this.fb));this.Z||AA(this);this.hb=R("div");this.hb.classList.add("shaka-server-side-ad-container");
|
|
1223
1225
|
this.g.appendChild(this.hb);BA(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,u(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));CA(this);this.Qb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));oA(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.s(b,"click",c);this.i.s(b,"dblclick",
|
|
1224
|
-
c)}};q.
|
|
1225
|
-
q.rh=function(){return this.g};q.Ih=function(){return this.hb};q.oh=function(){return this.N};q.ph=function(){return this.h};q.Xh=function(){return this.W};q.
|
|
1226
|
-
q
|
|
1227
|
-
function DA(a){var b,c,d;return
|
|
1228
|
-
4,2);break;case 9:
|
|
1229
|
-
q.Ng=function(){Qz(this.K,!0);Qz(this.N,!0);this.g.setAttribute("ad-active","true")};q.rg=function(){Qz(this.K,!1);Qz(this.N,!1);this.g.removeAttribute("ad-active")};function Xz(a){a.P&&a.o.duration&&(a.D.
|
|
1230
|
-
function wA(a){a.g=
|
|
1231
|
-
function zA(a){var b=
|
|
1232
|
-
function AA(a){a.Z=
|
|
1226
|
+
c)}};q.Af=function(a){(this.P=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");oA(this)};q.Ig=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.Af(!1)};q.getAd=function(){return this.m};q.mh=function(){return this.C};q.yh=function(){return this.za};q.Ph=function(){return this.j};q.Ub=function(){return this.o};q.xh=function(){return this.B};q.zc=function(){return this.D};q.wh=function(){return this.ya};
|
|
1227
|
+
q.rh=function(){return this.g};q.Ih=function(){return this.hb};q.oh=function(){return this.N};q.ph=function(){return this.h};q.Xh=function(){return this.W};q.Ef=function(a){this.W=a};q.Th=function(){return this.gb};q.ng=function(){return this.l?this.l.getValue():this.o.currentTime};q.Jg=function(a){this.J=a};q.Md=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.Bc=function(){this.I.Da()};
|
|
1228
|
+
q.$d=function(){return document.fullscreenEnabled||this.B.webkitSupportsFullscreen?!0:!1};q.Dc=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.B;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
1229
|
+
function DA(a){var b,c,d;return H(function(e){switch(e.g){case 1:wa(e,2);if(!document.fullscreenEnabled){b=a.B;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.F(4);break}if(!document.pictureInPictureElement){e.F(5);break}return C(e,document.exitPictureInPicture(),5);case 5:return c=a.h.fullScreenElement,C(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.h.forceLandscapeOnFullscreen||!screen.orientation){e.F(4);break}wa(e,9);return C(e,screen.orientation.lock("landscape"),11);case 11:ya(e,
|
|
1230
|
+
4,2);break;case 9:za(e,2);case 4:ya(e,0);break;case 2:d=za(e),a.dispatchEvent(new M("error",(new Map).set("detail",d))),D(e)}})}function EA(a){var b;return H(function(c){if(!document.fullscreenEnabled)return b=a.B,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.F(0);screen.orientation&&screen.orientation.unlock();return C(c,document.exitFullscreen(),0)})}q.Jf=function(){var a=this;return H(function(b){return a.Dc()?C(b,EA(a),0):C(b,DA(a),0)})};
|
|
1231
|
+
q.Ng=function(){Qz(this.K,!0);Qz(this.N,!0);this.g.setAttribute("ad-active","true")};q.rg=function(){Qz(this.K,!1);Qz(this.N,!1);this.g.removeAttribute("ad-active")};function Xz(a){a.P&&a.o.duration&&(a.D.Pe(),a.o.paused&&!a.W?a.o.play():a.o.pause())}function Wz(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
|
|
1232
|
+
function wA(a){a.g=R("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.i.s(a.g,"touchstart",function(b){a.o.duration&&(a.ic()?a.J=Date.now():(FA(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.s(a.g,"click",function(){GA(a)});a.i.s(a.g,"dblclick",function(){a.h.doubleClickForFullscreen&&a.$d()&&a.Jf()})}
|
|
1233
|
+
function zA(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.wb=new Yz(b,a);a.H.push(a.wb)}function yA(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function HA(a){a.K=R("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();Qz(a.K,b);a.L.appendChild(a.K);b=new Tz(a.K,a);a.H.push(b);b=new Sz(a.K,a);a.H.push(b)}
|
|
1234
|
+
function AA(a){a.Z=R("div");a.Z.classList.add("shaka-spinner-container");a.j.appendChild(a.Z);var b=R("div");b.classList.add("shaka-spinner");a.Z.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");b.setAttribute("fill",
|
|
1233
1235
|
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
|
|
1234
|
-
function BA(a){a.L=
|
|
1235
|
-
(c=vA.get(c).create(a.U,a),a.H.push(c)):Xa("Unrecognized control panel element requested:",c)}function CA(a){if(a.h.addSeekBar)a.l=IA.create(a.L,a),a.H.push(a.l);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function xA(a){a.N=
|
|
1236
|
+
function BA(a){a.L=R("div");a.L.classList.add("shaka-bottom-controls");a.L.classList.add("shaka-no-propagation");a.g.appendChild(a.L);a.i.s(a.L,"click",function(d){d.target.closest(".shaka-overflow-button")||a.Bc()});HA(a);a.U=R("div");a.U.classList.add("shaka-controls-button-panel");a.U.classList.add("shaka-show-controls-on-mouse-over");a.h.enableTooltips&&a.U.classList.add("shaka-tooltips-on");a.L.appendChild(a.U);for(var b=r(a.h.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,vA.get(c)?
|
|
1237
|
+
(c=vA.get(c).create(a.U,a),a.H.push(c)):Xa("Unrecognized control panel element requested:",c)}function CA(a){if(a.h.addSeekBar)a.l=IA.create(a.L,a),a.H.push(a.l);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function xA(a){a.N=R("div");a.N.classList.add("shaka-client-side-ad-container");Qz(a.N,!1);a.i.s(a.N,"click",function(){GA(a)});a.j.appendChild(a.N)}
|
|
1236
1238
|
function rA(a){a.i.s(a.D,"buffering",function(){a.P&&Qz(a.Z,a.D.qd())});a.P&&Qz(a.Z,a.D.qd());a.i.s(window,"keydown",function(b){JA(a,b)});a.i.s(window,"click",function(){return a.Bc()});a.i.s(a,"submenuopen",function(){a.Bc()});a.i.s(a.o,"play",function(){oA(a)});a.i.s(a.o,"pause",function(){oA(a)});a.i.s(a.j,"mousemove",function(b){FA(a,b)});a.i.s(a.j,"touchmove",function(b){FA(a,b)},{passive:!0});a.i.s(a.j,"touchend",function(b){FA(a,b)},{passive:!0});a.i.s(a.j,"mouseleave",function(){a.J||a.X.Da()});
|
|
1237
1239
|
a.i.s(a.C,"caststatuschanged",function(){sA(a)});a.i.s(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&FA(a,b);if(a.h.enableKeyboardPlaybackControls){c=a.h.keyboardSeekDistance;var f=a.h.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),KA(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),
|
|
1238
1240
|
KA(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),KA(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),KA(a,a.l.getValue()+f));break;case "Home":a.l&&KA(a,a.D.Ba().start);break;case "End":a.l&&KA(a,a.D.Ba().end);break;case " ":e&&LA(a)}}});a.i.s(a.j,"keyup",function(b){a.ba.delete(b.key)});a.i.s(a.eb,"ad-started",function(b){a.m=b.ad;a.Ng()});a.i.s(a.eb,"ad-stopped",function(){a.m=null;a.rg()});screen.orientation&&a.i.s(screen.orientation,"change",
|
|
1239
|
-
function(){return
|
|
1240
|
-
function FA(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),oA(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.yb=!0,a.I.stop(),a.
|
|
1241
|
+
function(){return H(function(b){return C(b,MA(a),0)})})}function MA(a){return H(function(b){return a.o&&0!=a.o.readyState&&!a.C.ua()&&a.h.enableFullscreenOnRotation&&a.$d()?screen.orientation.type.includes("landscape")&&!a.Dc()?C(b,DA(a),0):screen.orientation.type.includes("portrait")&&a.Dc()?C(b,EA(a),0):b.F(0):b.return()})}
|
|
1242
|
+
function FA(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),oA(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.yb=!0,a.I.stop(),a.ic()||(pA(a),oA(a)),a.X.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.X.R(3))}function NA(a){return window.matchMedia("hover: hover").matches?a.Qb.some(function(b){return b.matches(":hover")}):!1}
|
|
1241
1243
|
function oA(a){var b=a.m?a.m.isPaused():!1,c=a.o.paused&&!a.W,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.yb||d||NA(a)?(pA(a),a.g.setAttribute("shown","true"),a.aa.stop()):a.aa.R(a.h.fadeDelay)}function GA(a){a.P&&(a.Md()?a.I.Da():a.h.singleClickForPlayAndPause&&LA(a))}function LA(a){a.m&&a.m.isLinear()?Wz(a):Xz(a)}
|
|
1242
|
-
function sA(a){var b=a.C.ua();a.dispatchEvent(new M("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.
|
|
1244
|
+
function sA(a){var b=a.C.ua();a.dispatchEvent(new M("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.ic=function(){return this.P?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function KA(a,b){a.l.changeTo(b);a.ic()&&pA(a)}
|
|
1243
1245
|
function pA(a){if(a.l)if(a.l.setValue(a.o.currentTime),a.l.update(),a.l.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new M("timeandseekrangeupdated"))}
|
|
1244
1246
|
function JA(a,b){a.ba.add(b.key);var c=a.Md();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),oA(a),a.i.s(window,"mousedown",function(){a.i.Lc(window,"mousedown")}));"Escape"==b.key&&a.I.Da();c&&a.ba.has("Tab")&&OA(a,b)}
|
|
1245
1247
|
function OA(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ba.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
@@ -1301,81 +1303,81 @@ a.na("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1301
1303
|
["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.na("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
|
|
1302
1304
|
["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
|
|
1303
1305
|
["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],
|
|
1304
|
-
["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.
|
|
1305
|
-
Z.prototype.toggleFullScreen=Z.prototype.
|
|
1306
|
+
["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.cg(navigator.languages||[]);return a}K("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.ic;Z.prototype.hideAdUI=Z.prototype.rg;Z.prototype.showAdUI=Z.prototype.Ng;
|
|
1307
|
+
Z.prototype.toggleFullScreen=Z.prototype.Jf;Z.prototype.isFullScreenEnabled=Z.prototype.Dc;Z.prototype.isFullScreenSupported=Z.prototype.$d;Z.prototype.hideSettingsMenus=Z.prototype.Bc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Md;Z.prototype.setLastTouchEventTime=Z.prototype.Jg;Z.prototype.getDisplayTime=Z.prototype.ng;Z.prototype.isCastAllowed=Z.prototype.Th;Z.prototype.setSeeking=Z.prototype.Ef;Z.prototype.isSeeking=Z.prototype.Xh;Z.prototype.getConfig=Z.prototype.ph;
|
|
1306
1308
|
Z.prototype.getClientSideAdContainer=Z.prototype.oh;Z.prototype.getServerSideAdContainer=Z.prototype.Ih;Z.prototype.getControlsContainer=Z.prototype.rh;Z.prototype.getLocalPlayer=Z.prototype.wh;Z.prototype.getPlayer=Z.prototype.zc;Z.prototype.getLocalVideo=Z.prototype.xh;Z.prototype.getVideo=Z.prototype.Ub;Z.prototype.getVideoContainer=Z.prototype.Ph;Z.prototype.getLocalization=Z.prototype.yh;Z.prototype.getCastProxy=Z.prototype.mh;Z.prototype.getAd=Z.prototype.getAd;
|
|
1307
|
-
Z.prototype.setEnabledNativeControls=Z.prototype.Ig;Z.prototype.setEnabledShakaControls=Z.prototype.
|
|
1309
|
+
Z.prototype.setEnabledNativeControls=Z.prototype.Ig;Z.prototype.setEnabledShakaControls=Z.prototype.Af;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Yh;Z.prototype.allowCast=Z.prototype.Zg;Z.registerSeekBar=function(a){IA=a};Z.registerElement=uA;Z.prototype.destroy=Z.prototype.destroy;var vA=new Map,IA=new nA;function PA(a,b){Lz.call(this,a,b);var c=this;this.l=this.controls.h;this.j=this.controls.g;this.i=[];this.g=Kk();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=R("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
|
|
1308
1310
|
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);QA(this);this.eventManager.s(this.localization,"locale-updated",function(){RA(c)});this.eventManager.s(this.localization,"locale-changed",function(){RA(c)});this.eventManager.s(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&Qz(c.g,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){Qz(c.g,!0)});this.eventManager.s(this.controls,"submenuopen",function(){Qz(c.h,!1)});this.eventManager.s(this.h,"touchstart",function(d){c.controls.Jg(Date.now());
|
|
1309
1311
|
d.stopPropagation()});this.eventManager.s(this.g,"click",function(){SA(c)});RA(this);this.ad&&this.ad.isLinear()&&Qz(this.g,!1)}qa(PA,Lz);PA.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];Lz.prototype.release.call(this)};function TA(a,b){UA.set(a,b)}
|
|
1310
|
-
function QA(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,UA.get(c)?(c=UA.get(c),a.i.push(c.create(a.h,a.controls))):Xa("Unrecognized overflow menu element requested:",c)}function SA(a){if(a.controls.Md())a.controls.Bc();else{Qz(a.h,!0);oA(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};
|
|
1311
|
-
K("shaka.ui.OverflowMenu",PA);PA.registerElement=TA;function VA(){}VA.prototype.create=function(a,b){return new PA(a,b)};uA("overflow_menu",new VA);var UA=new Map;function WA(a,b){Lz.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=
|
|
1312
|
-
this.i=
|
|
1313
|
-
c.player.
|
|
1314
|
-
uA("airplay",new ZA);function $A(a,b,c){this.i=a;this.j=b;this.h=aB(this);b.dataset.shakaPlayerContainer="";b.ui=this;this
|
|
1315
|
-
q
|
|
1316
|
-
q.Di=function(a){this.g.
|
|
1312
|
+
function QA(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,UA.get(c)?(c=UA.get(c),a.i.push(c.create(a.h,a.controls))):Xa("Unrecognized overflow menu element requested:",c)}function SA(a){if(a.controls.Md())a.controls.Bc();else{Qz(a.h,!0);oA(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};jb(a.h.childNodes,b)&&kb(a.h.childNodes,b)[0].focus()}}function RA(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1313
|
+
K("shaka.ui.OverflowMenu",PA);PA.registerElement=TA;function VA(){}VA.prototype.create=function(a,b){return new PA(a,b)};uA("overflow_menu",new VA);var UA=new Map;function WA(a,b){Lz.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=R("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");a.appendChild(this.j);
|
|
1314
|
+
this.i=R("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);XA(this);YA(this);this.eventManager.s(this.localization,"locale-updated",function(){XA(c)});this.eventManager.s(this.localization,"locale-changed",function(){XA(c)});this.eventManager.s(this.g,"click",function(){c.controls.Ub().webkitShowPlaybackTargetPicker()});a=this.controls.Ub();this.eventManager.s(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1315
|
+
c.player.Ve()==Km;Qz(c.g,"available"==d.availability&&e)});this.eventManager.s(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){YA(c)})}qa(WA,Lz);function YA(a){var b=a.controls.Ub();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function XA(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}K("shaka.ui.AirPlayButton",WA);function ZA(){}ZA.prototype.create=function(a,b){return new WA(a,b)};TA("airplay",new ZA);
|
|
1316
|
+
uA("airplay",new ZA);function $A(a,b,c){this.i=a;this.j=b;this.h=aB(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.$e()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.Gf(b);b.ui=this;c.ui=this}q=$A.prototype;q.destroy=function(){var a=this;return H(function(b){if(1==b.g)return a.g?C(b,a.g.destroy(),2):b.F(2);if(4!=b.g)return a.g=null,a.i?C(b,a.i.destroy(),4):b.F(4);a.i=null;D(b)})};
|
|
1317
|
+
q.$e=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Ad()&&1<navigator.maxTouchPoints};q.getConfiguration=function(){var a=aB(this);ml(a,this.h,aB(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=nl(a,b));ml(this.h,a,aB(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new M("uiupdated"))};q.qh=function(){return this.g};
|
|
1318
|
+
q.Di=function(a){this.g.Af(a)};
|
|
1317
1319
|
function aB(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
|
|
1318
1320
|
"picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},
|
|
1319
|
-
trackLabelFormat:bB,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a
|
|
1320
|
-
function cB(){var a,b,c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B;return
|
|
1321
|
+
trackLabelFormat:bB,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.$e()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
|
|
1322
|
+
function cB(){var a,b,c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,A,z,B;return H(function(E){switch(E.g){case 1:Uv();if(!am())return dB("shaka-ui-load-failed",eB),E.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){E.F(2);break}if(b.length&&!a.length){d=r(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
|
|
1321
1323
|
h.replaceChild(g,f);g.appendChild(f);k=null;l=r(c);for(m=l.next();!m.done;m=l.next())if(n=m.value,n.parentElement==g){k=n;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));fB(g,f,k)}E.F(2);break}p=r(a);t=p.next();case 4:if(t.done){E.F(2);break}v=t.value;if(v.ui){E.F(5);break}w=null;y=r(b);for(e=y.next();!e.done;e=y.next())if(x=e.value,x.parentElement==v){w=x;break}w||(w=document.createElement("video"),w.setAttribute("playsinline",""),v.appendChild(w));
|
|
1322
|
-
A=null;z=r(c);for(m=z.next();!m.done;m=z.next())if(B=m.value,B.parentElement==v){A=B;break}A||(A=document.createElement("canvas"),A.classList.add("shaka-canvas-container"),v.appendChild(A));wa(E,7);return C(E,fB(v,w,A),9);case 9:
|
|
1323
|
-
function fB(a,b,c){var d,e,f,g,h,k,l,m,n;return
|
|
1324
|
-
b.controls&&e.g.Ig(!0);if(h=b.getAttribute("src"))k=document.createElement("source"),k.setAttribute("src",h),b.appendChild(k),b.removeAttribute("src");l=r(b.querySelectorAll("source"));m=l.next();case 2:if(m.done){p.F(0);break}n=m.value;wa(p,5);return C(p,e.g.zc().load(n.getAttribute("src")),7);case 7:p.F(0);break;case 5:
|
|
1325
|
-
$A.prototype.getConfiguration=$A.prototype.getConfiguration;$A.prototype.isMobile=$A.prototype
|
|
1326
|
-
n.bb.forced,v=f.resolve(ac.Tg),w=k(n.bb),y=h(p,w);if(!m.has(y)){m.add(y);var x=Kk();x.addEventListener("click",function(z){return function(){c(z.bb)}}(n));var A=
|
|
1324
|
+
A=null;z=r(c);for(m=z.next();!m.done;m=z.next())if(B=m.value,B.parentElement==v){A=B;break}A||(A=document.createElement("canvas"),A.classList.add("shaka-canvas-container"),v.appendChild(A));wa(E,7);return C(E,fB(v,w,A),9);case 9:ya(E,5);break;case 7:return za(E),dB("shaka-ui-load-failed",gB),E.return();case 5:t=p.next();E.F(4);break;case 2:dB("shaka-ui-loaded"),D(E)}})}function dB(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
1325
|
+
function fB(a,b,c){var d,e,f,g,h,k,l,m,n;return H(function(p){switch(p.g){case 1:d=new S(b);e=new $A(d,a,b);d.Yf(c);f="";g=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(f=a.dataset.shakaPlayerCastReceiverId,g="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(f=b.dataset.shakaPlayerCastReceiverId,g="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);f.length&&e.configure({castReceiverAppId:f,castAndroidReceiverCompatible:g});
|
|
1326
|
+
b.controls&&e.g.Ig(!0);if(h=b.getAttribute("src"))k=document.createElement("source"),k.setAttribute("src",h),b.appendChild(k),b.removeAttribute("src");l=r(b.querySelectorAll("source"));m=l.next();case 2:if(m.done){p.F(0);break}n=m.value;wa(p,5);return C(p,e.g.zc().load(n.getAttribute("src")),7);case 7:p.F(0);break;case 5:za(p);case 3:m=l.next(),p.F(2)}})}K("shaka.ui.Overlay",$A);$A.prototype.setEnabled=$A.prototype.Di;$A.prototype.getControls=$A.prototype.qh;$A.prototype.configure=$A.prototype.configure;
|
|
1327
|
+
$A.prototype.getConfiguration=$A.prototype.getConfiguration;$A.prototype.isMobile=$A.prototype.$e;$A.prototype.destroy=$A.prototype.destroy;var bB=0;$A.TrackLabelFormat={LANGUAGE:bB,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var eB=0,gB=1;$A.FailReasonCode={NO_BROWSER_SUPPORT:eB,PLAYER_FAILED_TO_LOAD:gB};"complete"==document.readyState?H(function(a){if(1==a.g)return C(a,Promise.resolve(),2);cB();D(a)}):window.addEventListener("load",cB);function hB(a,b,c,d,e,f,g){function h(z,B){return z+": "+B}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=Mz(b);Lk(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={bb:n.bb},p=a.next()){n.bb=p.value;p=n.bb.language;var t=
|
|
1328
|
+
n.bb.forced,v=f.resolve(ac.Tg),w=k(n.bb),y=h(p,w);if(!m.has(y)){m.add(y);var x=Kk();x.addEventListener("click",function(z){return function(){c(z.bb)}}(n));var A=R("span");x.appendChild(A);A.textContent=iB(p,f);switch(g){case bB:t&&(A.textContent+=" ("+v+")");break;case 1:w?A.textContent=w:(Xa("Track #"+n.bb.id+" does not have a role, but the UI is configured to only show role."),A.textContent="?");t&&(A.textContent+=" ("+v+")");break;case 2:w&&(A.textContent+=": "+w);t&&(A.textContent+=" ("+v+")");
|
|
1327
1329
|
break;case 3:n.bb.label?A.textContent=n.bb.label:(Xa("Track #"+n.bb.id+" does not have a label, but the UI is configured to only show labels."),A.textContent="?")}d&&y==l&&(x.appendChild(Pz()),A.classList.add("shaka-chosen-item"),x.ariaSelected="true",e.textContent=A.textContent);b.appendChild(x)}}}
|
|
1328
1330
|
function iB(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Tb(a);if(window.Intl&&"DisplayNames"in Intl)try{if(Intl.DisplayNames.supportedLocalesOf([a]).length){var d=(new Intl.DisplayNames([a],{type:"language"})).of(a);return d.charAt(0).toUpperCase()+d.slice(1)}}catch(e){}return a in Hz?Hz[a].u:c in Hz?Hz[c].u+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+
|
|
1329
1331
|
" ("+a+")"};function jB(a,b,c){Lz.call(this,a,b);var d=this;kB(this,c);lB(this);mB(this);this.eventManager.s(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new M("submenuopen")),Qz(d.menu,!0),Oz(d.menu)):Qz(d.menu,!1)})}qa(jB,Lz);
|
|
1330
|
-
function kB(a,b){a.button=Kk();a.button.classList.add("shaka-overflow-button");a.icon=
|
|
1331
|
-
function lB(a){a.menu=
|
|
1332
|
-
|
|
1333
|
-
function(){pB(c)});oB(this);pB(this)}qa(nB,jB);function pB(a){var b=a.player.pb();hB(b,a.menu,function(c){a.player.
|
|
1334
|
-
function oB(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}K("shaka.ui.AudioLanguageSelection",nB);function qB(){}qB.prototype.create=function(a,b){return new nB(a,b)};TA("language",new qB);uA("language",new qB);function rB(a,b){Lz.call(this,a,b);var c=this;this.h=this.controls.C;this.g=Kk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=
|
|
1332
|
+
function kB(a,b){a.button=Kk();a.button.classList.add("shaka-overflow-button");a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=R("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=R("span");b.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
|
|
1333
|
+
function lB(a){a.menu=R("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Kk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.s(a.backButton,"click",function(){a.controls.Bc()});var b=R("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1334
|
+
R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function mB(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.s(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}Qz(a.parent,!0);jb(a.parent.childNodes,b)&&kb(a.parent.childNodes,b)[0].focus();oA(a.controls)}))}K("shaka.ui.SettingsMenu",jB);function nB(a,b){jB.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.s(this.localization,"locale-updated",function(){oB(c)});this.eventManager.s(this.localization,"locale-changed",function(){oB(c)});this.eventManager.s(this.player,"trackschanged",function(){var d=0<c.player.pb().length;Qz(c.button,d);pB(c)});this.eventManager.s(this.player,"variantchanged",
|
|
1335
|
+
function(){pB(c)});oB(this);pB(this)}qa(nB,jB);function pB(a){var b=a.player.pb();hB(b,a.menu,function(c){a.player.we(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.h.trackLabelFormat);Oz(a.menu);a.controls.dispatchEvent(new M("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
|
|
1336
|
+
function oB(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}K("shaka.ui.AudioLanguageSelection",nB);function qB(){}qB.prototype.create=function(a,b){return new nB(a,b)};TA("language",new qB);uA("language",new qB);function rB(a,b){Lz.call(this,a,b);var c=this;this.h=this.controls.C;this.g=Kk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=R("span");a.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");
|
|
1335
1337
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);sB(this);tB(this);this.eventManager.s(this.localization,"locale-updated",function(){sB(c)});this.eventManager.s(this.localization,"locale-changed",function(){sB(c)});this.eventManager.s(this.g,"click",function(){uB(c)});this.eventManager.s(this.controls,"caststatuschanged",function(){tB(c)})}qa(rB,Lz);
|
|
1336
|
-
function uB(a){var b;
|
|
1337
|
-
function vB(a){a.j.textContent=a.h.ua()?a.h.
|
|
1338
|
-
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Sb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.
|
|
1339
|
-
c.controls.
|
|
1340
|
-
K("shaka.ui.FullscreenButton",AB);function DB(){}DB.prototype.create=function(a,b){return new AB(a,b)};uA("fullscreen",new DB);function EB(a,b){Lz.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=
|
|
1338
|
+
function uB(a){var b;H(function(c){if(1==c.g){if(a.h.ua())return a.h.Og(),c.F(0);wa(c,3);a.g.disabled=!0;return C(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,ya(c,0);b=za(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new M("error",(new Map).set("detail",b)));D(c)})}function tB(a){var b=a.h.$f()&&a.controls.gb,c=a.h.ua();Qz(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");vB(a)}
|
|
1339
|
+
function vB(a){a.j.textContent=a.h.ua()?a.h.se():a.localization.resolve("OFF")}function sB(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");vB(a)}K("shaka.ui.CastButton",rB);function wB(){}wB.prototype.create=function(a,b){return new rB(a,b)};TA("cast",new wB);uA("cast",new wB);function xB(a,b){Lz.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);yB(this);this.h=this.controls.h.fastForwardRates;this.eventManager.s(this.localization,"locale-updated",function(){yB(c)});this.eventManager.s(this.localization,"locale-changed",function(){yB(c)});
|
|
1340
|
+
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Sb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.ze(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(xB,Lz);function yB(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}K("shaka.ui.FastForwardButton",xB);function zB(){}zB.prototype.create=function(a,b){return new xB(a,b)};uA("fast_forward",new zB);function AB(a,b){Lz.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Kk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");BB(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);CB(this);this.eventManager.s(this.localization,"locale-updated",function(){CB(c)});this.eventManager.s(this.localization,"locale-changed",function(){CB(c)});this.eventManager.s(this.g,"click",function(){return H(function(d){return C(d,
|
|
1341
|
+
c.controls.Jf(),0)})});this.eventManager.s(document,"fullscreenchange",function(){c.g.textContent=c.controls.Dc()?"fullscreen_exit":"fullscreen";CB(c)});this.eventManager.s(this.h,"loadedmetadata",function(){BB(c)});this.eventManager.s(this.h,"loadeddata",function(){BB(c)})}qa(AB,Lz);function BB(a){a.controls.$d()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function CB(a){a.g.ariaLabel=a.localization.resolve(a.controls.Dc()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1342
|
+
K("shaka.ui.FullscreenButton",AB);function DB(){}DB.prototype.create=function(a,b){return new AB(a,b)};uA("fullscreen",new DB);function EB(a,b){Lz.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=R("span");this.l.classList.add("shaka-current-selection-span");
|
|
1341
1343
|
a.appendChild(this.l);this.g.appendChild(a);FB(this);this.parent.appendChild(this.g);this.eventManager.s(this.localization,"locale-updated",function(){FB(c)});this.eventManager.s(this.localization,"locale-changed",function(){FB(c)});this.eventManager.s(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Da();c.h.ka(1)});this.m=this.video.loop;this.h=new O(function(){c.m!=c.video.loop&&(FB(c),c.m=c.video.loop)});this.h.ka(1)}qa(EB,Lz);
|
|
1342
1344
|
EB.prototype.release=function(){this.h.stop();this.h=null;Lz.prototype.release.call(this)};function FB(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}K("shaka.ui.LoopButton",EB);function GB(){}GB.prototype.create=function(a,b){return new EB(a,b)};TA("loop",new GB);uA("loop",new GB);aA("loop",new GB);function HB(a,b){Lz.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);IB(this);JB(this);this.eventManager.s(this.localization,"locale-updated",function(){IB(c)});this.eventManager.s(this.localization,"locale-changed",function(){IB(c)});this.eventManager.s(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
|
|
1343
1345
|
this.eventManager.s(this.video,"volumechange",function(){IB(c);JB(c)});this.eventManager.s(this.adManager,"ad-volume-changed",function(){IB(c);JB(c)});this.eventManager.s(this.adManager,"ad-muted",function(){IB(c);JB(c)});this.eventManager.s(this.adManager,"ad-stopped",function(){c.ad=null;IB(c);JB(c)})}qa(HB,Lz);function IB(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
1344
|
-
function JB(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}K("shaka.ui.MuteButton",HB);function KB(){}KB.prototype.create=function(a,b){return new HB(a,b)};uA("mute",new KB);function LB(a,b){Lz.call(this,a,b);var c=this;this.l=this.controls.B;this.m=this.controls.j;this.g=Kk();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=
|
|
1345
|
-
a.appendChild(this.j);this.h=
|
|
1346
|
+
function JB(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}K("shaka.ui.MuteButton",HB);function KB(){}KB.prototype.create=function(a,b){return new HB(a,b)};uA("mute",new KB);function LB(a,b){Lz.call(this,a,b);var c=this;this.l=this.controls.B;this.m=this.controls.j;this.g=Kk();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");
|
|
1347
|
+
a.appendChild(this.j);this.h=R("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);MB(this);this.parent.appendChild(this.g);NB(this)||Qz(this.g,!1);this.eventManager.s(this.localization,"locale-updated",function(){MB(c)});this.eventManager.s(this.localization,"locale-changed",function(){MB(c)});this.eventManager.s(this.g,"click",function(){OB(c)});this.eventManager.s(this.l,"enterpictureinpicture",function(){PB(c)});this.eventManager.s(this.l,"leavepictureinpicture",
|
|
1346
1348
|
function(){QB(c)});this.eventManager.s(this.controls,"caststatuschanged",function(d){d.newStatus?NB(c)&&Qz(c.g,!1):NB(c)&&Qz(c.g,!0)});this.eventManager.s(this.player,"trackschanged",function(){RB(c)})}qa(LB,Lz);function NB(a){return"documentPictureInPicture"in window||document.pictureInPictureEnabled&&!a.video.disablePictureInPicture}
|
|
1347
|
-
function OB(a){var b;
|
|
1348
|
-
function SB(a){var b,c,d,e,f,g;return
|
|
1349
|
+
function OB(a){var b;H(function(c){switch(c.g){case 1:wa(c,2);if(!("documentPictureInPicture"in window)){c.F(4);break}return C(c,SB(a),5);case 5:return c.return();case 4:return document.pictureInPictureElement?C(c,document.exitPictureInPicture(),7):(document.fullscreenElement&&document.exitFullscreen(),C(c,a.video.requestPictureInPicture(),7));case 7:ya(c,0);break;case 2:b=za(c),a.controls.dispatchEvent(new M("error",(new Map).set("detail",b))),D(c)}})}
|
|
1350
|
+
function SB(a){var b,c,d,e,f,g;return H(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),QB(a),h.return();b=a.m;c=b.getBoundingClientRect();return C(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;TB(d);e=b.parentNode||document.body;f=a.m.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n width: 100% !important; max-height: 100%}");
|
|
1349
1351
|
d.document.head.append(g);d.document.body.append(b);PB(a);a.eventManager.xa(d,"pagehide",function(){f.replaceWith(b)});D(h)})}
|
|
1350
1352
|
function TB(a){var b=[].concat(u(document.styleSheets)).map(function(d){try{return[].concat(u(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}
|
|
1351
1353
|
function PB(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function QB(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
|
|
1352
1354
|
function MB(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
|
|
1353
|
-
function RB(a){
|
|
1355
|
+
function RB(a){H(function(b){if(!NB(a))return Qz(a.g,!1),b.F(0);if(!a.player||!a.player.Cc())return Qz(a.g,!0),b.F(0);Qz(a.g,!1);return document.pictureInPictureElement?C(b,document.exitPictureInPicture(),0):b.F(0)})}K("shaka.ui.PipButton",LB);function UB(){}UB.prototype.create=function(a,b){return new LB(a,b)};TA("picture_in_picture",new UB);uA("picture_in_picture",new UB);aA("picture_in_picture",new UB);function VB(a,b){jB.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.s(this.localization,"locale-updated",function(){WB(c)});this.eventManager.s(this.localization,"locale-changed",function(){WB(c)});this.eventManager.s(this.player,"ratechange",function(){XB(c,c.player.Sb())});this.g=new Map(this.controls.h.playbackRates.map(function(d){return[d+
|
|
1354
1356
|
"x",d]}));WB(this);YB(this);XB(this,this.player.Sb())}qa(VB,jB);function WB(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
|
|
1355
1357
|
function XB(a,b){var c=Nz(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(Pz()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
1356
|
-
"x")}function YB(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={Tc:b.Tc},d=c.next()){b.Tc=d.value;d=Kk();var e=
|
|
1358
|
+
"x")}function YB(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={Tc:b.Tc},d=c.next()){b.Tc=d.value;d=Kk();var e=R("span");e.textContent=b.Tc;d.appendChild(e);a.eventManager.s(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.Tc);a.video.defaultPlaybackRate=a.g.get(f.Tc)}}(b));a.menu.appendChild(d)}Oz(a.menu)}K("shaka.ui.PlaybackRateSelection",VB);function ZB(){}ZB.prototype.create=function(a,b){return new VB(a,b)};TA("playback_rate",new ZB);uA("playback_rate",new ZB);function $B(a,b){Lz.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("shaka-current-time");aC(this,"0:00");this.parent.appendChild(this.g);this.eventManager.s(this.g,"click",function(){c.player.S()&&(c.video.currentTime=c.player.Ba().end)});this.eventManager.s(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.W,e=c.controls.ng(),f=c.video.duration,g=c.player.Ba(),h=g.end-g.start;c.player.S()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(aC(c,"- "+Rz(e,f)),c.g.disabled=
|
|
1357
1359
|
!1):(aC(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=Rz(e,d),f&&(e+=" / "+Rz(f,d)),aC(c,e),c.g.disabled=!0)});this.eventManager.s(this.player,"trackschanged",function(){c.player.S()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}qa($B,Lz);function aC(a,b){b!=a.g.textContent&&(a.g.textContent=b)}K("shaka.ui.PresentationTimeTracker",$B);function bC(){}bC.prototype.create=function(a,b){return new $B(a,b)};uA("time_and_duration",new bC);function cC(a,b){jB.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.s(this.localization,"locale-updated",function(){dC(c)});this.eventManager.s(this.localization,"locale-changed",function(){dC(c)});this.eventManager.s(this.player,"variantchanged",function(){eC(c)});this.eventManager.s(this.player,"trackschanged",function(){eC(c)});this.eventManager.s(this.player,
|
|
1358
1360
|
"abrstatuschanged",function(){eC(c)});eC(this)}qa(cC,jB);
|
|
1359
|
-
function eC(a){var b=[];a.player.
|
|
1360
|
-
a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e={xb:e.xb},g=f.next()){e.xb=g.value;g=Kk();g.classList.add("explicit-resolution");a.eventManager.s(g,"click",function(k){return function(){var l=k.xb;a.player.configure({abr:{enabled:!1}});a.player.
|
|
1361
|
-
"p";g.appendChild(h);d||e.xb!=c||(g.ariaSelected="true",g.appendChild(Pz()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Kk();e.classList.add("shaka-enable-abr-button");a.eventManager.s(e,"click",function(){a.player.configure({abr:{enabled:!0}});eC(a)});a.g=
|
|
1361
|
+
function eC(a){var b=[];a.player.Ve()!=Km&&(b=a.player.pb());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return(a.player.Cc()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.Cc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=Mz(a.menu);Lk(a.menu);
|
|
1362
|
+
a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e={xb:e.xb},g=f.next()){e.xb=g.value;g=Kk();g.classList.add("explicit-resolution");a.eventManager.s(g,"click",function(k){return function(){var l=k.xb;a.player.configure({abr:{enabled:!1}});a.player.yf(l,a.controls.h.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=a.player.Cc()?Math.round(e.xb.bandwidth/1E3)+" kbits/s":"PQ"==e.xb.hdr||"HLG"==e.xb.hdr?e.xb.height+"p (HDR)":e.xb.height+
|
|
1363
|
+
"p";g.appendChild(h);d||e.xb!=c||(g.ariaSelected="true",g.appendChild(Pz()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Kk();e.classList.add("shaka-enable-abr-button");a.eventManager.s(e,"click",function(){a.player.configure({abr:{enabled:!0}});eC(a)});a.g=R("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(Pz()),a.g.classList.add("shaka-chosen-item"),
|
|
1362
1364
|
a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);Oz(a.menu);a.controls.dispatchEvent(new M("resolutionselectionupdated"));dC(a)}
|
|
1363
1365
|
function dC(a){var b=a.player.Cc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}K("shaka.ui.ResolutionSelection",cC);function fC(){}
|
|
1364
1366
|
fC.prototype.create=function(a,b){return new cC(a,b)};TA("quality",new fC);uA("quality",new fC);function gC(a,b){Lz.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);hC(this);this.h=this.controls.h.rewindRates;this.eventManager.s(this.localization,"locale-updated",function(){hC(c)});this.eventManager.s(this.localization,"locale-changed",function(){hC(c)});
|
|
1365
|
-
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Sb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.
|
|
1367
|
+
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Sb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.ze(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(gC,Lz);function hC(a){a.g.ariaLabel=a.localization.resolve("REWIND")}K("shaka.ui.RewindButton",gC);function iC(){}iC.prototype.create=function(a,b){return new gC(a,b)};uA("rewind",new iC);function jC(a,b){Lz.call(this,a,b);var c=this;this.j=R("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=R("div");this.h.classList.add("shaka-skip-ad-counter");Qz(this.h,!1);this.j.appendChild(this.h);this.g=Kk();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;Qz(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);kC(this);this.i=new O(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1366
1368
|
d:(c.i.stop(),Qz(c.h,!1))});this.eventManager.s(this.localization,"locale-updated",function(){kC(c)});this.eventManager.s(this.localization,"locale-changed",function(){kC(c)});this.eventManager.s(this.adManager,"ad-started",function(){lC(c)});this.eventManager.s(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),Qz(c.h,!1))});this.eventManager.s(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;Qz(c.g,!1);Qz(c.h,!1)});this.eventManager.s(this.g,
|
|
1367
1369
|
"click",function(){c.ad.skip()});this.ad&&lC(this)}qa(jC,Lz);jC.prototype.release=function(){this.i.stop();this.i=null;Lz.prototype.release.call(this)};function kC(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function lC(a){a.ad.isSkippable()&&(Qz(a.g,!0),Qz(a.h,!0),a.h.textContent="",a.i.Da(),a.i.ka(.5))}K("shaka.ui.SkipAdButton",jC);function mC(a,b){Vz.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}qa(mC,Vz);mC.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};mC.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
|
|
1368
|
-
K("shaka.ui.SmallPlayButton",mC);function nC(){}nC.prototype.create=function(a,b){return new mC(a,b)};uA("play_pause",new nC);function oC(a,b){Lz.call(this,a,b);a=
|
|
1369
|
-
this.o=
|
|
1370
|
+
K("shaka.ui.SmallPlayButton",mC);function nC(){}nC.prototype.create=function(a,b){return new mC(a,b)};uA("play_pause",new nC);function oC(a,b){Lz.call(this,a,b);a=R("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}qa(oC,Lz);K("shaka.ui.Spacer",oC);function pC(){}pC.prototype.create=function(a,b){return new oC(a,b)};uA("spacer",new pC);function qC(a,b){function c(k){return Rz(h.h[k],!1)+" (m)"}function d(k){return Math.round(h.h[k]/1E3)+" (kbits/s)"}function e(k){return h.h[k].toFixed(2)+" (s)"}function f(k){return h.h[k]+" (frames)"}function g(k){return h.h[k]+" (px)"}Lz.call(this,a,b);var h=this;this.i=Kk();this.i.classList.add("shaka-statistics-button");this.j=R("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=R("label");a.classList.add("shaka-overflow-button-label");
|
|
1371
|
+
this.o=R("span");a.appendChild(this.o);this.m=R("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.g=R("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-statistics-container");this.g.classList.add("shaka-hidden");this.controls.g.appendChild(this.g);this.D=[];this.G=["stateHistory","switchHistory"];this.h=this.player.getStats();
|
|
1370
1372
|
this.B={};this.C={width:g,height:g,completionPercent:function(k){return h.h[k]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f,stallsDetected:function(k){return h.h[k]+" (stalls)"},gapsJumped:function(k){return h.h[k]+" (gaps)"}};this.l=new O(function(){h.h=h.player.getStats();for(var k=r(h.D),l=k.next();!l.done;l=
|
|
1371
1373
|
k.next())l=l.value,h.B[l].textContent=h.C[l](l)});rC(this);sC(this);this.eventManager.s(this.localization,"locale-updated",function(){rC(h)});this.eventManager.s(this.localization,"locale-changed",function(){rC(h)});this.eventManager.s(this.i,"click",function(){Qz(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ka(.1),Qz(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),Qz(h.g,!1));rC(h)})}qa(qC,Lz);
|
|
1372
1374
|
function rC(a){a.o.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
|
|
1373
|
-
function sC(a){for(var b=r(a.controls.h.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=
|
|
1374
|
-
tC.prototype.create=function(a,b){return new qC(a,b)};TA("statistics",new tC);aA("statistics",new tC);function uC(a,b){jB.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.
|
|
1375
|
-
"texttrackvisibility",function(){yC(c);xC(c)});this.eventManager.s(this.player,"textchanged",function(){xC(c)});this.eventManager.s(this.player,"trackschanged",function(){zC(c)});yC(this);wC(this);xC(this);zC(this)}qa(uC,jB);function vC(a){var b=Kk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(Pz());a.g=
|
|
1376
|
-
function yC(a){a.player.
|
|
1377
|
-
function xC(a){var b=a.player.Tb();hB(b,a.menu,function(c){return AC(a,c)},a.player.
|
|
1378
|
-
a.currentSelection.textContent);Oz(a.menu);a.controls.dispatchEvent(new M("captionselectionupdated"))}function AC(a,b){return
|
|
1375
|
+
function sC(a){for(var b=r(a.controls.h.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=R("div"),h=R("label");h.textContent=c+":";g.appendChild(h);h=R("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.D.push(c)}else Xa("Unrecognized statistic element:",c)}qC.prototype.release=function(){this.l.stop();this.l=null;Lz.prototype.release.call(this)};K("shaka.ui.StatisticsButton",qC);function tC(){}
|
|
1376
|
+
tC.prototype.create=function(a,b){return new qC(a,b)};TA("statistics",new tC);aA("statistics",new tC);function uC(a,b){jB.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.jc()?this.button.ariaPressed="true":this.button.ariaPressed="false";vC(this);this.eventManager.s(this.localization,"locale-updated",function(){wC(c);xC(c)});this.eventManager.s(this.localization,"locale-changed",function(){wC(c);xC(c)});this.eventManager.s(this.player,
|
|
1377
|
+
"texttrackvisibility",function(){yC(c);xC(c)});this.eventManager.s(this.player,"textchanged",function(){xC(c)});this.eventManager.s(this.player,"trackschanged",function(){zC(c)});yC(this);wC(this);xC(this);zC(this)}qa(uC,jB);function vC(a){var b=Kk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(Pz());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1378
|
+
function yC(a){a.player.jc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new M("captionselectionupdated"))}
|
|
1379
|
+
function xC(a){var b=a.player.Tb();hB(b,a.menu,function(c){return AC(a,c)},a.player.jc(),a.currentSelection,a.localization,a.controls.h.trackLabelFormat);b=Kk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.s(b,"click",function(){a.player.Ff(!1);xC(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.jc()||(b.ariaSelected="true",b.appendChild(Pz()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
|
|
1380
|
+
a.currentSelection.textContent);Oz(a.menu);a.controls.dispatchEvent(new M("captionselectionupdated"))}function AC(a,b){return H(function(c){a.player.xf(b);return C(c,a.player.Ff(!0),0)})}function wC(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
|
|
1379
1381
|
function zC(a){var b=0<a.player.Tb().length;Qz(a.button,b);xC(a)}K("shaka.ui.TextSelection",uC);function BC(){}BC.prototype.create=function(a,b){return new uC(a,b)};TA("captions",new BC);uA("captions",new BC);function CC(a,b){cA.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.h;this.eventManager.s(this.video,"volumechange",function(){return DC(c)});this.eventManager.s(this.adManager,"ad-volume-changed",function(){return EC(c)});this.eventManager.s(this.adManager,"ad-muted",function(){return EC(c)});this.eventManager.s(this.adManager,"ad-stopped",function(){return DC(c)});this.eventManager.s(this.localization,"locale-updated",function(){return FC(c)});
|
|
1380
1382
|
this.eventManager.s(this.localization,"locale-changed",function(){return FC(c)});DC(this);FC(this);if(this.ad)this.onChange()}qa(CC,cA);CC.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function DC(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);GC(a)}function EC(a){var b=a.ad.getVolume();a.setValue(b);GC(a)}
|
|
1381
1383
|
function GC(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function FC(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}K("shaka.ui.VolumeBar",CC);function HC(){}HC.prototype.create=function(a,b){return new CC(a,b)};uA("volume",new HC);}).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})();
|