shaka-player 4.1.6 → 4.1.7
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/AUTHORS +1 -0
- package/CHANGELOG.md +15 -0
- package/CONTRIBUTORS +1 -0
- package/dist/deps.js +2 -2
- package/dist/locales.js +29 -29
- package/dist/shaka-player.compiled.d.ts +5 -1
- package/dist/shaka-player.compiled.debug.d.ts +5 -1
- package/dist/shaka-player.compiled.debug.externs.js +2 -1
- package/dist/shaka-player.compiled.debug.js +82 -81
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +2 -1
- package/dist/shaka-player.compiled.js +516 -513
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +5 -1
- package/dist/shaka-player.ui.debug.d.ts +5 -1
- package/dist/shaka-player.ui.debug.externs.js +2 -1
- package/dist/shaka-player.ui.debug.js +98 -97
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +2 -1
- package/dist/shaka-player.ui.js +656 -653
- package/dist/shaka-player.ui.map +3 -3
- package/externs/mux.js +3 -0
- package/lib/cast/cast_proxy.js +2 -1
- package/lib/cast/cast_receiver.js +19 -5
- package/lib/cast/cast_sender.js +2 -1
- package/lib/cast/cast_utils.js +16 -6
- package/lib/hls/hls_parser.js +9 -2
- package/lib/media/media_source_engine.js +6 -0
- package/lib/media/playhead.js +23 -1
- package/lib/media/streaming_engine.js +3 -12
- package/lib/media/transmuxer.js +6 -0
- package/lib/player.js +24 -11
- package/lib/util/manifest_parser_utils.js +4 -0
- package/package.json +1 -1
- package/roadmap.md +24 -6
- package/test/cast/cast_receiver_integration.js +97 -16
- package/test/cast/cast_receiver_unit.js +17 -12
- package/test/cast/cast_utils_unit.js +1 -0
- package/test/media/media_source_engine_integration.js +31 -0
- package/test/media/playhead_unit.js +41 -0
- package/test/media/streaming_engine_integration.js +13 -0
- package/test/media/streaming_engine_unit.js +36 -23
- package/test/player_unit.js +87 -0
- package/test/test/util/simple_fakes.js +3 -0
- package/ui/controls.js +4 -1
- package/ui/settings_menu.js +11 -2
package/dist/shaka-player.ui.js
CHANGED
|
@@ -15,11 +15,11 @@ ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
|
|
|
15
15
|
ea("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=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
16
|
function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
|
|
17
17
|
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;
|
|
18
|
-
function qa(a,b){a.prototype=ka(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.
|
|
19
|
-
function ta(a,b){a.i={
|
|
20
|
-
function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.
|
|
18
|
+
function qa(a,b){a.prototype=ka(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.ej=b.prototype}function ra(){this.A=!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.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
|
|
19
|
+
function ta(a,b){a.i={rf:b,Cf:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function A(a){a.g=0}function B(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b,c){a.g=b;a.m=c||0}function F(a,b){a.m=b||0;var c=a.i.rf;a.i=null;return c}function xa(a){a.C=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Cf?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new ra;this.h=a}function Aa(a,b){sa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ca(a)}
|
|
21
21
|
function Ba(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.A=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}
|
|
22
|
-
function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.
|
|
22
|
+
function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Cf)throw b.rf;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
|
|
23
23
|
function Da(a){this.next=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.B):(a.g.B(b),b=Ca(a));return b};this["throw"]=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.B):(ta(a.g,b),b=Ca(a));return b};this["return"]=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}
|
|
24
24
|
function Ea(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())})}function I(a){return Ea(new Da(new za(a)))}function Fa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
25
25
|
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.A=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
@@ -32,15 +32,15 @@ while(!k.done)})};return b});function Ha(a,b){return Object.prototype.hasOwnProp
|
|
|
32
32
|
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ha(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
33
33
|
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(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
|
|
34
34
|
Ha(k,g)&&Ha(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ha(k,g)&&Ha(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
35
|
-
ea("Map",function(a){function b(){var h={};return h.
|
|
35
|
+
ea("Map",function(a){function b(){var h={};return h.ob=h.next=h.head=h}function c(h,k){var l=h.g;return fa(function(){if(l){for(;l.head!=h.g;)l=l.ob;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&&Ha(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,va:p}}return{id:l,
|
|
36
36
|
list:m,index:-1,va: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||
|
|
37
|
-
"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.va?l.va.value=k:(l.va={next:this.g,
|
|
38
|
-
h.va.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.
|
|
37
|
+
"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.va?l.va.value=k:(l.va={next:this.g,ob:this.g.ob,head:this.g,key:h,value:k},l.list.push(l.va),this.g.ob.next=l.va,this.g.ob=l.va,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.va&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.va.ob.next=h.va.next,h.va.next.ob=h.va.ob,
|
|
38
|
+
h.va.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.ob=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).va};e.prototype.get=function(h){return(h=d(this,h).va)&&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=function(h,k){for(var l=this.entries(),
|
|
39
39
|
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});function Ja(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ea("Array.prototype.keys",function(a){return a?a:function(){return Ja(this,function(b){return b})}});
|
|
40
40
|
ea("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
41
41
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
|
|
42
42
|
b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
|
|
43
|
-
function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{
|
|
43
|
+
function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{Af:e,v:f}}return{Af:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).Af}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
|
|
44
44
|
ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});function La(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
|
|
45
45
|
ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=La(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});
|
|
46
46
|
var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ha(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Na});ea("Array.prototype.values",function(a){return a?a:function(){return Ja(this,function(b,c){return c})}});
|
|
@@ -55,8 +55,8 @@ function K(a,b){var c=a.split("."),d=Oa;c[0]in d||"undefined"==typeof d.execScri
|
|
|
55
55
|
*/
|
|
56
56
|
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}
|
|
57
57
|
function Pa(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);
|
|
58
|
-
var Qa={
|
|
59
|
-
|
|
58
|
+
var Qa={Hh:"abrstatuschanged",Ih:"adaptation",Jh:"buffering",Nh:"downloadfailed",Oh:"downloadheadersreceived",Ph:"drmsessionupdate",Wh:"emsg",Error:"error",Xh:"expirationupdated",$h:"gapjumped",di:"loaded",ei:"loading",li:"manifestparsed",mi:"mediaqualitychanged",Metadata:"metadata",si:"onstatechange",ti:"onstateidle",Fi:"ratechange",Li:"sessiondata",Mi:"stalldetected",Ni:"streaming",Oi:"textchanged",Pi:"texttrackvisibility",Qi:"timelineregionadded",Ri:"timelineregionenter",Si:"timelineregionexit",
|
|
59
|
+
Ti:"trackschanged",Yi:"unloading",$i:"variantchanged"};function Ra(){}function Ta(){}function Ua(){}function Va(a){var b=Fa.apply(1,arguments);Wa.has(a)||(Wa.add(a),Ua.apply(Ra,ia(b)))}function Xa(){}function Ya(){}function Za(){}function $a(){}var Wa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Ua=cb[2];Ta=cb[1]};function db(){this.g={}}q=db.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function eb(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function fb(){this.ua=new db;this.ud=this}fb.prototype.addEventListener=function(a,b){this.ua&&this.ua.push(a,b)};fb.prototype.removeEventListener=function(a,b){this.ua&&this.ua.remove(a,b)};fb.prototype.dispatchEvent=function(a){if(!this.ua)return!0;var b=this.ua.get(a.type)||[],c=this.ua.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.ud;a.currentTarget=this.ud;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
60
60
|
fb.prototype.release=function(){this.ua=null};function gb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function hb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function ib(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function jb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c};/*
|
|
61
61
|
@license
|
|
62
62
|
Copyright 2008 The Closure Library Authors
|
|
@@ -67,10 +67,10 @@ var kb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
67
67
|
Copyright 2006 The Closure Library Authors
|
|
68
68
|
SPDX-License-Identifier: Apache-2.0
|
|
69
69
|
*/
|
|
70
|
-
function lb(a){var b;a instanceof lb?(mb(this,a.
|
|
71
|
-
q.toString=function(){var a=[],b=this.
|
|
72
|
-
q.resolve=function(a){var b=this.clone();"data"===b.
|
|
73
|
-
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?ob(b,a.g.clone()):c=!!a.Ib;c&&(b.Ib=a.Ib);return b};q.clone=function(){return new lb(this)};function mb(a,b,c){a.
|
|
70
|
+
function lb(a){var b;a instanceof lb?(mb(this,a.Wa),this.Sb=a.Sb,this.Za=a.Za,nb(this,a.kc),this.La=a.La,ob(this,a.g.clone()),this.Ib=a.Ib):a&&(b=String(a).match(kb))?(mb(this,b[1]||"",!0),this.Sb=pb(b[2]||""),this.Za=pb(b[3]||"",!0),nb(this,b[4]),this.La=pb(b[5]||"",!0),ob(this,b[6]||"",!0),this.Ib=pb(b[7]||"")):this.g=new qb(null)}q=lb.prototype;q.Wa="";q.Sb="";q.Za="";q.kc=null;q.La="";q.Ib="";
|
|
71
|
+
q.toString=function(){var a=[],b=this.Wa;b&&a.push(sb(b,tb,!0),":");if(b=this.Za){a.push("//");var c=this.Sb;c&&a.push(sb(c,tb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.kc;null!=b&&a.push(":",String(b))}if(b=this.La)this.Za&&"/"!=b.charAt(0)&&a.push("/"),a.push(sb(b,"/"==b.charAt(0)?ub:vb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ib)&&a.push("#",sb(b,wb));return a.join("")};
|
|
72
|
+
q.resolve=function(a){var b=this.clone();"data"===b.Wa&&(b=new lb);var c=!!a.Wa;c?mb(b,a.Wa):c=!!a.Sb;c?b.Sb=a.Sb:c=!!a.Za;c?b.Za=a.Za:c=null!=a.kc;var d=a.La;if(c)nb(b,a.kc);else if(c=!!a.La){if("/"!=d.charAt(0))if(this.Za&&!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(""):".."==
|
|
73
|
+
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?ob(b,a.g.clone()):c=!!a.Ib;c&&(b.Ib=a.Ib);return b};q.clone=function(){return new lb(this)};function mb(a,b,c){a.Wa=c?pb(b,!0):b;a.Wa&&(a.Wa=a.Wa.replace(/:$/,""))}function nb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.kc=b}else a.kc=null}function ob(a,b,c){b instanceof qb?a.g=b:(c||(b=sb(b,xb)),a.g=new qb(b))}
|
|
74
74
|
function pb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function sb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,yb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function yb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var tb=/[#\/\?@]/g,vb=/[#\?:]/g,ub=/[#\?]/g,xb=/[#\?@]/g,wb=/#/g;function qb(a){this.g=a||null}
|
|
75
75
|
function zb(a){if(!a.Ea&&(a.Ea={},a.jd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=qb.prototype;q.Ea=null;q.jd=null;q.add=function(a,b){zb(this);this.g=null;var c=this.Ea.hasOwnProperty(a)&&this.Ea[a];c||(this.Ea[a]=c=[]);c.push(b);this.jd++;return this};
|
|
76
76
|
q.set=function(a,b){zb(this);this.g=null;this.Ea.hasOwnProperty(a)?this.Ea[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Ea)return"";var a=[],b;for(b in this.Ea)for(var c=encodeURIComponent(b),d=this.Ea[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new qb;a.g=this.g;if(this.Ea){var b={},c;for(c in this.Ea)b[c]=this.Ea[c].concat();a.Ea=b;a.jd=this.jd}return a};function O(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}O.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};K("shaka.util.Error",O);O.Severity={RECOVERABLE:1,CRITICAL:2};O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
@@ -82,7 +82,8 @@ HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIA
|
|
|
82
82
|
LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,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,
|
|
83
83
|
CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,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,
|
|
84
84
|
CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function Ab(a,b){return a.concat(b)}function Bb(){}function Cb(a){return null!=a};function Db(a,b){if(0==b.length)return a;var c=b.map(function(d){return new lb(d)});return a.map(function(d){return new lb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ab,[]).map(function(d){return d.toString()})}function Eb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
85
|
-
function Fb(a,b){if(1==b.length)return b[0];var c=Gb(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function Gb(a,b){for(var c=r(Hb[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==Ib?"":null}
|
|
85
|
+
function Fb(a,b){if(1==b.length)return b[0];var c=Gb(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function Gb(a,b){for(var c=r(Hb[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==Ib?"":null}
|
|
86
|
+
var Ib="text",Jb={Ja:"video",Gb:"audio",ha:Ib,xc:"image",Eh:"application"},Hb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Kb(){}function Lb(a,b){a=Mb(a);b=Mb(b);return a.split("-")[0]==b.split("-")[0]}function Nb(a,b){a=Mb(a);b=Mb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Ob(a,b){a=Mb(a);b=Mb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Mb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Pb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Qb(a,b){var c=Rb(a),d=Rb(b);return a!=c&&b!=d&&c==d}
|
|
86
87
|
function Sb(a,b){a=Mb(a);b=Mb(b);return b==a?4:Nb(b,a)?3:Ob(b,a)?2:Nb(a,b)?1:0}function Rb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Pb.get(a)||a}function Tb(a){return a.language?Mb(a.language):a.audio&&a.audio.language?Mb(a.audio.language):a.video&&a.video.language?Mb(a.video.language):"und"}
|
|
87
88
|
function Ub(a,b){for(var c=Mb(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Mb(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Nb(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Ob(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Nb(c,f))return f;return null}K("shaka.util.LanguageUtils",Kb);Kb.findClosestLocale=Ub;Kb.getLocaleForVariant=Tb;
|
|
88
89
|
Kb.getLocaleForText=function(a){return Mb(a.language||"und")};Kb.getBase=Rb;Kb.relatedness=Sb;Kb.areSiblings=Qb;Kb.normalize=Mb;Kb.isSiblingOf=Ob;Kb.isParentOf=Nb;Kb.areLanguageCompatible=Lb;Kb.areLocaleCompatible=function(a,b){a=Mb(a);b=Mb(b);return a==b};
|
|
@@ -92,12 +93,12 @@ var Pb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
92
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",
|
|
93
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",
|
|
94
95
|
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Vb(a){fb.call(this);this.j=Mb(a);this.i=new Map;this.g=new Set;this.h=new Map}qa(Vb,fb);q=Vb.prototype;q.release=function(){fb.prototype.release.call(this)};
|
|
95
|
-
q.
|
|
96
|
-
q.ia=function(a,b,c){a=Mb(a);void 0===c&&(c=Xb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Xb||d.set(f,e)});this.h.set(a,d);Wb(this);this.dispatchEvent(new M("locale-updated"));return this};q.
|
|
96
|
+
q.jf=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Mb(c.value));Wb(this);a=jb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new M("unknown-locales",(new Map).set("locales",a)));a=jb(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
|
+
q.ia=function(a,b,c){a=Mb(a);void 0===c&&(c=Xb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Xb||d.set(f,e)});this.h.set(a,d);Wb(this);this.dispatchEvent(new M("locale-updated"));return this};q.lh=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""};
|
|
97
98
|
function Wb(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={Wb:f.Wb},h=g.next()){f.Wb=h.value;e.add(f.Wb);e.add(Rb(f.Wb));h=jb(b.keys(),function(l){return function(m){return Qb(m,l.Wb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=jb(b.keys(),function(l){return function(m){return Rb(m)==l.Wb}}(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);
|
|
98
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,Yb(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 Yb(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",Vb);Vb.prototype.resolve=Vb.prototype.resolve;
|
|
99
|
-
Vb.prototype.resolveDictionary=Vb.prototype.
|
|
100
|
-
|
|
100
|
+
Vb.prototype.resolveDictionary=Vb.prototype.lh;Vb.prototype.insert=Vb.prototype.ia;Vb.prototype.changeLocale=Vb.prototype.jf;Vb.prototype.release=Vb.prototype.release;var Xb=1;Vb.ConflictResolution={USE_OLD:0,USE_NEW:Xb};Vb.UNKNOWN_LOCALES="unknown-locales";Vb.UNKNOWN_LOCALIZATION="unknown-localization";Vb.MISSING_LOCALIZATIONS="missing-localizations";Vb.LOCALE_CHANGED="locale-changed";Vb.LOCALE_UPDATED="locale-updated";var Zb={Qh:"ENTER_LOOP_MODE",bi:"LANGUAGE",$e:"LIVE",ni:"NOT_APPLICABLE",AD_PROGRESS:"AD_PROGRESS",Wi:"UNMUTE",Lh:"CAST",Ai:"PLAYBACK_RATE",Xi:"UNRECOGNIZED_LANGUAGE",Wf:"SUBTITLE_FORCED",oi:"OFF",Uh:"EXIT_LOOP_MODE",Kh:"CAPTIONS",Ii:"SKIP_TO_LIVE",Zh:"FULL_SCREEN",Bi:"QUALITY",Dh:"AIRPLAY",BACK:"BACK",ji:"MULTIPLE_LANGUAGES",xi:"PICTURE_IN_PICTURE",ci:"LOOP",pi:"ON",Hi:"SKIP_AD",ki:"MUTE",zi:"PLAY",Bh:"AD_DURATION",wi:"PAUSE",Fh:"AUTO_QUALITY",Vi:"UNDETERMINED_LANGUAGE",Ki:"STATISTICS",Yh:"FAST_FORWARD",
|
|
101
|
+
Vh:"EXIT_PICTURE_IN_PICTURE",Ci:"REPLAY",Zi:"VOLUME",ii:"MORE_SETTINGS",Gi:"SEEK",Ch:"AD_TIME",Di:"RESOLUTION",Th:"EXIT_FULL_SCREEN",Rh:"ENTER_PICTURE_IN_PICTURE",Ei:"REWIND"};function $b(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}$b.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function ac(a){return a.h/(1-Math.pow(a.g,a.i))};function bc(){this.h=new $b(2);this.j=new $b(5);this.g=0;this.i=128E3;this.l=16E3}bc.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)};bc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};bc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(ac(this.h),ac(this.j))};function cc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function dc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function ec(a,b,c){c||(c=cc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Pd:d.Pd},e=a.next()){d.Pd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Pd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
101
102
|
function fc(a,b,c){c||(c=cc);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 gc(a,b,c){this.startTime=a;this.direction=hc;this.endTime=b;this.payload=c;this.region=new ic;this.position=null;this.positionAlign=jc;this.size=0;this.textAlign=kc;this.writingMode=lc;this.lineInterpretation=mc;this.line=null;this.lineHeight="";this.lineAlign=nc;this.displayAlign=oc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=pc;this.fontStyle=qc;this.linePadding=this.letterSpacing=
|
|
102
103
|
this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}gc.prototype.clone=function(){var a=new gc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
103
104
|
function rc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!fc(a.nestedCues,b.nestedCues,rc))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(!fc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}K("shaka.text.Cue",gc);var jc="auto";
|
|
@@ -105,7 +106,7 @@ gc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:jc};v
|
|
|
105
106
|
gc.lineInterpretation={LINE_NUMBER:mc,PERCENTAGE:1};var nc="start",xc={CENTER:"center",START:nc,END:"end"};gc.lineAlign=xc;var yc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};gc.defaultTextColor=yc;var zc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};gc.defaultTextBackgroundColor=zc;var pc=400;gc.fontWeight={NORMAL:pc,BOLD:700};
|
|
106
107
|
var qc="normal",Ac={NORMAL:qc,ITALIC:"italic",OBLIQUE:"oblique"};gc.fontStyle=Ac;gc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function ic(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Bc;this.scroll=Cc}K("shaka.text.CueRegion",ic);var Bc=1;ic.units={PX:0,PERCENTAGE:Bc,LINES:2};var Cc="";ic.scrollMode={NONE:Cc,UP:"up"};function Dc(){}function Ec(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Fc(a)==Fc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Gc(a),d=Gc(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Fc(a){return a instanceof ArrayBuffer?a:a.buffer}function Hc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
107
108
|
function Gc(a,b,c){c=void 0===c?Infinity:c;return Ic(a,void 0===b?0:b,c,Uint8Array)}function Jc(a,b,c){c=void 0===c?Infinity:c;return Ic(a,void 0===b?0:b,c,DataView)}function Ic(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(Fc(a),b,Math.min(b+Math.max(c,0),e)-b)}K("shaka.util.BufferUtils",Dc);Dc.toDataView=Jc;Dc.toUint8=Gc;Dc.toArrayBuffer=Hc;Dc.equal=Ec;function Kc(){}K("shaka.dependencies",Kc);Kc.has=function(a){return Lc.has(a)};Kc.add=function(a,b){if(!Mc[a])throw Error(a+" is not supported");Lc.set(a,function(){return b})};var Mc={muxjs:"muxjs"};Kc.Allowed=Mc;var Lc=new Map([["muxjs",function(){return window.muxjs}]]);function Nc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Nc.prototype.resolve=function(){};Nc.prototype.reject=function(){};function Oc(a){this.h=a;this.g=void 0}Oc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Pc(a){this.h=a;this.g=null}Pc.prototype.T=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};Pc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.xa=function(){this.stop();this.h();return this};P.prototype.T=function(a){var b=this;this.stop();this.g=(new Pc(function(){b.h()})).T(a);return this};P.prototype.ka=function(a){var b=this;this.stop();this.g=(new Pc(function(){b.g.T(a);b.h()})).T(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};K("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.ka;P.prototype.tickAfter=P.prototype.T;
|
|
108
|
-
P.prototype.tickNow=P.prototype.xa;function Qc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function
|
|
109
|
+
P.prototype.tickNow=P.prototype.xa;function Qc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Sc(a){return""!=Tc().canPlayType(a)}function Uc(){return Vc("Xbox One")}function Wc(){return Vc("Tizen")}function Xc(){return Vc("Web0S")&&Vc("Chrome/38.0.2125.122 Safari/537.36")}function Yc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Wc()&&!Vc("PC=EOS")&&!Zc()}function Zc(){return Vc("PlayStation 4")}
|
|
109
110
|
function $c(){if(!Yc())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 Vc(a){return(navigator.userAgent||"").includes(a)}function Tc(){if(ad)return ad;bd||(bd=new P(function(){ad=null}));(ad=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ad=document.createElement("video"));bd.T(1);return ad}var bd=null,ad=null;function cd(){}
|
|
110
111
|
function dd(a){if(!a)return"";a=Gc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Zc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ta('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
111
112
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
@@ -118,14 +119,14 @@ function rd(a,b){if(!Lc.get("muxjs")()||!sd(a))return!1;if(b)return MediaSource.
|
|
|
118
119
|
function td(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function ud(a,b){a.l=!0;a.h=new Nc;a.m=[];a.j=[];a.i=[];var c=Gc(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new O(2,3,3018));return a.h};function vd(){}function wd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function xd(a,b,c){a=wd(a,b);if(sd(a)){if(Lc.get("muxjs")())return td(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
|
|
119
120
|
function yd(a){var b=zd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
|
|
120
121
|
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 Ad(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function zd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}K("shaka.util.MimeUtils",vd);vd.getFullType=wd;
|
|
121
|
-
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Bd(a){this.j=null;this.i=a;this.C=!1;this.l=this.B=0;this.m=Infinity;this.h=this.g=null;this.F="";this.A=new Map}function Cd(a){return
|
|
122
|
+
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Bd(a){this.j=null;this.i=a;this.C=!1;this.l=this.B=0;this.m=Infinity;this.h=this.g=null;this.F="";this.A=new Map}function Cd(a){return Dd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Bd.prototype.destroy=function(){this.i=this.j=null;this.A.clear();return Promise.resolve()};
|
|
122
123
|
function Hd(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.j||!a.i)return k["return"]();if(null==c||null==d)return a.j.parseInit(Gc(b)),k["return"]();e=a.C?c:a.B;f={periodStart:a.B,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(Gc(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.i.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);A(k)})}
|
|
123
124
|
Bd.prototype.remove=function(a,b){var c=this;return I(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));A(d)})};function Id(a,b,c){a.l=b;a.m=c}function Jd(a,b,c){a.F=b;if(b=a.A.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.i.append(e)}
|
|
124
125
|
function Kd(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new gc(c.startTime,c.endTime,c.text)});return b}function Ld(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ld(a,d.value,c)}
|
|
125
126
|
function Md(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,[]);Ld(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.F&&a.i.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.A.has(f)||a.A.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.A.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
126
|
-
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",Bd);Bd.prototype.destroy=Bd.prototype.destroy;Bd.findParser=function(a){return
|
|
127
|
+
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",Bd);Bd.prototype.destroy=Bd.prototype.destroy;Bd.findParser=function(a){return Dd[a]};Bd.unregisterParser=function(a){delete Dd[a]};Bd.registerParser=function(a,b){Dd[a]=b};var Dd={};function Nd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Od(f,b,c);f=Pd(f,d);b=Qd(f);b=Rd(b);var g=Sd(b,e);a.variants=a.variants.filter(function(h){return Td(h)==g?!0:!1})}function Qd(a){var b=new db;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Td(c);b.push(d,c)}return b}
|
|
127
128
|
function Rd(a){var b=0,c=new Map,d=a.size();eb(a,function(e,f){for(var g=r(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new db);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
|
|
128
|
-
function Od(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={
|
|
129
|
+
function Od(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={$d:d.$d},e=b.next())if(d.$d=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.$d)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={Md:d.Md},b=c.next())if(d.Md=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Md)}}(d)),b.length){a=b;break}return a}
|
|
129
130
|
function Sd(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Ud||d==Vd){if(a=Wd(a,d),1==a.size())return a.keys()[0]}else if(d==Xd)break;return Yd(a)}function Wd(a,b){var c=0,d=new db;eb(a,function(e,f){for(var g=0,h=0,k=r(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
|
|
130
131
|
function Yd(a){var b="",c=Infinity;eb(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Td(a){var b="";a.video&&(b=yd(a.video.codecs));var c="";a.audio&&(c=yd(a.audio.codecs));return b+"-"+c}function Zd(a,b,c){a.variants=a.variants.filter(function(d){return $d(d,b,c)})}
|
|
131
132
|
function $d(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;if(0!=a.disabledUntilTime){if(a.disabledUntilTime>Date.now()/1E3)return!1;a.disabledUntilTime=0}return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
|
|
@@ -159,34 +160,34 @@ var te=0,Ud="smooth",Vd="powerEfficient",Xd="bandwidth",me=(new Map).set("image/
|
|
|
159
160
|
q.chooseVariant=function(){var a=De(this.g.restrictions,this.j),b=this.h.getBandwidthEstimate(Ee(this));this.j.length&&!a.length&&(a=De(null,this.j),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.A)?1:Math.abs(this.A),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
|
|
160
161
|
q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.i)a:{if(!this.B){var c=this.h;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(Ee(this));c&&this.l(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(Ee(this))};q.setVariants=function(a){this.j=a};q.playbackRateChanged=function(a){this.A=a};
|
|
161
162
|
q.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function Ee(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function De(a,b){a&&(b=b.filter(function(c){return $d(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}K("shaka.abr.SimpleAbrManager",Ce);Ce.prototype.configure=Ce.prototype.configure;
|
|
162
|
-
Ce.prototype.playbackRateChanged=Ce.prototype.playbackRateChanged;Ce.prototype.setVariants=Ce.prototype.setVariants;Ce.prototype.getBandwidthEstimate=Ce.prototype.getBandwidthEstimate;Ce.prototype.segmentDownloaded=Ce.prototype.segmentDownloaded;Ce.prototype.disable=Ce.prototype.disable;Ce.prototype.enable=Ce.prototype.enable;Ce.prototype.chooseVariant=Ce.prototype.chooseVariant;Ce.prototype.init=Ce.prototype.init;Ce.prototype.stop=Ce.prototype.stop;function
|
|
163
|
-
function He(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&Ie(c,d)&&Je(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Ie(c,d)&&Je(c.roles,d.roles)));return c?!1:!0}
|
|
164
|
-
function Ie(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return zd(f)[0]}),d=b.codecs.split(",").map(function(f){return zd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Je(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.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
|
|
165
|
-
Le.prototype.create=function(a){var b=[];b=Me(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ne(b,this.j);a.length&&(b=a);this.g&&(a=Pd(b,this.g),a.length&&(b=a));this.h&&(a=Oe(b,this.h),a.length&&(b=a));a=new
|
|
163
|
+
Ce.prototype.playbackRateChanged=Ce.prototype.playbackRateChanged;Ce.prototype.setVariants=Ce.prototype.setVariants;Ce.prototype.getBandwidthEstimate=Ce.prototype.getBandwidthEstimate;Ce.prototype.segmentDownloaded=Ce.prototype.segmentDownloaded;Ce.prototype.disable=Ce.prototype.disable;Ce.prototype.enable=Ce.prototype.enable;Ce.prototype.chooseVariant=Ce.prototype.chooseVariant;Ce.prototype.init=Ce.prototype.init;Ce.prototype.stop=Ce.prototype.stop;function Fe(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}Fe.prototype.add=function(a){return He(this.h,a)?(this.g.add(a),!0):!1};
|
|
164
|
+
function He(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&Ie(c,d)&&Je(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Ie(c,d)&&Je(c.roles,d.roles)));return c?!1:!0}Fe.prototype.values=function(){return this.g.values()};
|
|
165
|
+
function Ie(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return zd(f)[0]}),d=b.codecs.split(",").map(function(f){return zd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Je(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.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 Fe(c[0],c):this.h.create(a)};function Le(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
|
|
166
|
+
Le.prototype.create=function(a){var b=[];b=Me(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ne(b,this.j);a.length&&(b=a);this.g&&(a=Pd(b,this.g),a.length&&(b=a));this.h&&(a=Oe(b,this.h),a.length&&(b=a));a=new Fe(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){var c=Mb(b),d=Ub(c,a.map(function(e){return Tb(e)}));return d?a.filter(function(e){return d==Tb(e)}):[]}
|
|
166
167
|
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 Oe(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Pe(){this.g=Qe;this.h=(new Map).set(Qe,2).set(Re,1)}function Se(a,b,c){a.h.set(Qe,c).set(Re,b)}var Re=0,Qe=1;function Te(a,b){var c=Ue();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=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
168
|
function Ve(a){var b,c;return I(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new O(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return u(d,new Promise(function(e){(new P(e)).T(c/1E3)}),2)}a.h*=a.m;A(d)})}function Ue(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function We(a,b){this.promise=a;this.i=b;this.g=!1}function Xe(a){return new We(Promise.reject(a),function(){return Promise.resolve()})}function Ye(){var a=Promise.reject(new O(2,7,7001));a["catch"](function(){});return new We(a,function(){return Promise.resolve()})}function Ze(a){return new We(Promise.resolve(a),function(){return Promise.resolve()})}function $e(a){return new We(a,function(){return a["catch"](function(){})})}We.prototype.abort=function(){this.g=!0;return this.i()};
|
|
168
169
|
function af(a){return new We(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}We.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
169
170
|
We.prototype.na=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=bf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Nc,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new We(f,function(){return d()})};
|
|
170
|
-
function bf(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",We);We.prototype.chain=We.prototype.na;We.prototype["finally"]=We.prototype["finally"];We.all=af;We.prototype.abort=We.prototype.abort;We.notAbortable=$e;We.completed=Ze;We.aborted=Ye;We.failed=Xe;function cf(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 df(a){var b={},c;for(c in a)b[c]=a[c];return b};function ef(){this.g=[]}function ff(a,b){a.g.push(b["finally"](function(){dc(a.g,b)}))}ef.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 gf(a,b,c){fb.call(this);this.i=!1;this.m=new ef;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}qa(gf,fb);q=gf.prototype;q.
|
|
171
|
+
function bf(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",We);We.prototype.chain=We.prototype.na;We.prototype["finally"]=We.prototype["finally"];We.all=af;We.prototype.abort=We.prototype.abort;We.notAbortable=$e;We.completed=Ze;We.aborted=Ye;We.failed=Xe;function cf(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 df(a){var b={},c;for(c in a)b[c]=a[c];return b};function ef(){this.g=[]}function ff(a,b){a.g.push(b["finally"](function(){dc(a.g,b)}))}ef.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 gf(a,b,c){fb.call(this);this.i=!1;this.m=new ef;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}qa(gf,fb);q=gf.prototype;q.Ge=function(a){this.A=a};function hf(a,b,c,d){c=c||jf;var e=kf[a];if(!e||c>=e.priority)kf[a]={priority:c,bh:b,dh:void 0===d?!1:d}}q.eh=function(a){this.g.add(a)};q.vh=function(a){this.g["delete"](a)};q.eg=function(){this.g.clear()};q.fh=function(a){this.h.add(a)};q.wh=function(a){this.h["delete"](a)};q.fg=function(){this.h.clear()};
|
|
171
172
|
function lf(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();fb.prototype.release.call(this);return this.m.destroy()};
|
|
172
173
|
q.request=function(a,b){var c=this,d=new mf;if(this.i){var e=Promise.reject(new O(2,7,7001));e["catch"](function(){});return new nf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?cf(b.retryParameters):Ue();b.uris=cf(b.uris);e=of(this,a,b);var f=e.na(function(){return pf(c,a,b,new Te(b.retryParameters,!1),0,null,d)}),g=f.na(function(n){return qf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
173
|
-
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.na(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.
|
|
174
|
-
function of(a,b,c){var d=Ze(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={
|
|
175
|
-
function pf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new lb(c.uris[e]),k=h.
|
|
176
|
-
if(!n)return v;var D=c.retryParameters.connectionTimeout;D&&(p=new P(function(){w=!0;v.abort()}),p.T(D/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new P(function(){w=!0;v.abort()}));return v}).na(function(v){p&&p.stop();t&&t.stop();void 0==v.timeMs&&(v.timeMs=Date.now()-x);var D={response:v,
|
|
174
|
+
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.na(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.Pg||!c.l||t.fromCache||a!=rf||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new nf(m.promise,function(){return m.abort()},d);ff(this.m,e);return e};
|
|
175
|
+
function of(a,b,c){var d=Ze(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Vd:e.Vd},f=a.next())e.Vd=f.value,d=d.na(function(g){return function(){c.body&&(c.body=Hc(c.body));return g.Vd(b,c)}}(e));return d.na(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
|
|
176
|
+
function pf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new lb(c.uris[e]),k=h.Wa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),mb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=kf[k])?k.bh:null;if(!m)return Xe(new O(2,1,1E3,h));var n=k.dh,p=null,t=null,w=!1,y=!1,x;return $e(Ve(d)).na(function(){if(a.i)return Ye();x=Date.now();var v=m(c.uris[e],c,b,function(C,G,E){p&&p.stop();t&&t.T(z/1E3);a.l&&b==rf&&(a.l(C,G),l=!0,g.g=E)},function(C){a.j&&a.j(C,c,b);y=!0});
|
|
177
|
+
if(!n)return v;var D=c.retryParameters.connectionTimeout;D&&(p=new P(function(){w=!0;v.abort()}),p.T(D/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new P(function(){w=!0;v.abort()}));return v}).na(function(v){p&&p.stop();t&&t.stop();void 0==v.timeMs&&(v.timeMs=Date.now()-x);var D={response:v,Pg:l};!y&&a.j&&a.j(v.headers,c,b);return D},function(v){p&&p.stop();t&&t.stop();if(a.B){var D=null,z=0;v instanceof O&&(D=v,1001==v.code&&(z=v.data[1]));a.B(c,D,z,w)}if(a.i)return Ye();w&&(v=new O(1,1,1003,
|
|
177
178
|
c.uris[e],b));if(v instanceof O){if(7001==v.code)throw v;if(1010==v.code)throw f;if(1==v.severity)return D=(new Map).set("error",v),D=new M("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,pf(a,b,c,d,e,v,g)}throw v;})}
|
|
178
|
-
function qf(a,b,c){var d=Ze(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={
|
|
179
|
-
gf.defaultRetryParameters=function(){return Ue()};gf.prototype.clearAllResponseFilters=gf.prototype.
|
|
179
|
+
function qf(a,b,c){var d=Ze(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Wd:e.Wd},f=a.next())e.Wd=f.value,d=d.na(function(g){return function(){var h=c.response;h.data&&(h.data=Hc(h.data));return g.Wd(b,h)}}(e));return d.na(function(){return c},function(g){var h=2;if(g instanceof O){if(7001==g.code)throw g;h=g.severity}throw new O(h,1,1007,g);})}K("shaka.net.NetworkingEngine",gf);gf.prototype.request=gf.prototype.request;gf.prototype.destroy=gf.prototype.destroy;gf.makeRequest=lf;
|
|
180
|
+
gf.defaultRetryParameters=function(){return Ue()};gf.prototype.clearAllResponseFilters=gf.prototype.fg;gf.prototype.unregisterResponseFilter=gf.prototype.wh;gf.prototype.registerResponseFilter=gf.prototype.fh;gf.prototype.clearAllRequestFilters=gf.prototype.eg;gf.prototype.unregisterRequestFilter=gf.prototype.vh;gf.prototype.registerRequestFilter=gf.prototype.eh;gf.unregisterScheme=function(a){delete kf[a]};gf.registerScheme=hf;gf.prototype.setForceHTTPS=gf.prototype.Ge;function mf(){this.g=0}
|
|
180
181
|
gf.NumBytesRemainingClass=mf;function nf(a,b,c){We.call(this,a,b);this.h=c}qa(nf,We);gf.PendingRequest=nf;var rf=1;gf.RequestType={MANIFEST:0,SEGMENT:rf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var jf=3;gf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:jf};var kf={};function sf(a){this.g=!1;this.h=new Nc;this.i=a}sf.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 tf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function uf(){this.g=new db}q=uf.prototype;q.release=function(){this.Sc();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new vf(a,b,c,d),this.g.push(b,a))};q.Fa=function(a,b,c,d){function e(g){f.nc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.nc=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.nc(),this.g.remove(b,e))}};
|
|
181
182
|
q.Sc=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.nc();this.g.g={}}};K("shaka.util.EventManager",uf);uf.prototype.removeAll=uf.prototype.Sc;uf.prototype.unlisten=uf.prototype.nc;uf.prototype.listenOnce=uf.prototype.Fa;uf.prototype.listen=uf.prototype.o;uf.prototype.release=uf.prototype.release;function vf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=wf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
182
183
|
vf.prototype.nc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function wf(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 xf(a)?b:b.capture||!1}
|
|
183
|
-
function xf(a){var b=yf;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}yf=b}return b||!1}var yf=void 0;function zf(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 Af(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Bf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function Cf(a,b){this.W=Jc(a);this.h=b==Df;this.g=0}q=Cf.prototype;q.Da=function(){return this.g<this.W.byteLength};q.oa=function(){return this.g};q.
|
|
184
|
-
q.
|
|
185
|
-
q.skip=function(a){if(this.g+a>this.W.byteLength)throw Ef();this.g+=a};q.
|
|
186
|
-
Cf.prototype.skip=Cf.prototype.skip;Cf.prototype.readBytes=Cf.prototype.Cb;Cf.prototype.readUint64=Cf.prototype.lc;Cf.prototype.readInt32=Cf.prototype.
|
|
187
|
-
q.
|
|
188
|
-
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.oa(),b.W.byteLength-b.oa()))}};function Jf(a){for(var b=Kf(a);a.reader.Da()&&!a.parser.g;)a.parser.
|
|
189
|
-
function Gf(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Nf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Kf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}K("shaka.util.Mp4Parser",Ff);Ff.headerSize=Kf;Ff.typeToString=Nf;Ff.allData=Mf;Ff.sampleDescription=Lf;Ff.children=Jf;Ff.prototype.parseNext=Ff.prototype.
|
|
184
|
+
function xf(a){var b=yf;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}yf=b}return b||!1}var yf=void 0;function zf(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 Af(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Bf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function Cf(a,b){this.W=Jc(a);this.h=b==Df;this.g=0}q=Cf.prototype;q.Da=function(){return this.g<this.W.byteLength};q.oa=function(){return this.g};q.wg=function(){return this.W.byteLength};q.pb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw Ef();}};q.ve=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Ef();}};q.R=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Ef();}};
|
|
185
|
+
q.Hf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Ef();}};q.lc=function(){try{if(this.h){var a=this.W.getUint32(this.g,!0);var b=this.W.getUint32(this.g+4,!0)}else b=this.W.getUint32(this.g,!1),a=this.W.getUint32(this.g+4,!1)}catch(c){throw Ef();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.W.byteLength)throw Ef();var b=Gc(this.W,this.g,a);this.g+=a;return b};
|
|
186
|
+
q.skip=function(a){if(this.g+a>this.W.byteLength)throw Ef();this.g+=a};q.mh=function(a){if(this.g<a)throw Ef();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw Ef();this.g=a};q.Qc=function(){for(var a=this.g;this.Da()&&0!=this.W.getUint8(this.g);)this.g+=1;a=Gc(this.W,a,this.g-a);this.g+=1;return dd(a)};function Ef(){return new O(2,3,3E3)}K("shaka.util.DataViewReader",Cf);Cf.prototype.readTerminatedString=Cf.prototype.Qc;Cf.prototype.seek=Cf.prototype.seek;Cf.prototype.rewind=Cf.prototype.mh;
|
|
187
|
+
Cf.prototype.skip=Cf.prototype.skip;Cf.prototype.readBytes=Cf.prototype.Cb;Cf.prototype.readUint64=Cf.prototype.lc;Cf.prototype.readInt32=Cf.prototype.Hf;Cf.prototype.readUint32=Cf.prototype.R;Cf.prototype.readUint16=Cf.prototype.ve;Cf.prototype.readUint8=Cf.prototype.pb;Cf.prototype.getLength=Cf.prototype.wg;Cf.prototype.getPosition=Cf.prototype.oa;Cf.prototype.hasMoreData=Cf.prototype.Da;var Df=1;Cf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Df};function Ff(){this.i=[];this.h=[];this.g=!1}q=Ff.prototype;q.box=function(a,b){var c=Gf(a);this.i[c]=Hf;this.h[c]=b;return this};q.Y=function(a,b){var c=Gf(a);this.i[c]=If;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Cf(a,0);for(this.g=!1;a.Da()&&!this.g;)this.Cd(0,a,b,c)};
|
|
188
|
+
q.Cd=function(a,b,c,d){var e=b.oa();if(d&&e+8>b.W.byteLength)this.g=!0;else{var f=b.R(),g=b.R(),h=!1;switch(f){case 0:f=b.W.byteLength-e;break;case 1:if(d&&b.oa()+8>b.W.byteLength){this.g=!0;return}f=b.lc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==If){if(d&&b.oa()+4>b.W.byteLength){this.g=!0;return}m=b.R();l=m>>>24;m&=16777215}g=e+f;c&&g>b.W.byteLength&&(g=b.W.byteLength);d&&g>b.W.byteLength?this.g=!0:(d=g-b.oa(),b=0<d?b.Cb(d):new Uint8Array(0),b=new Cf(b,0),k({parser:this,partialOkay:c||
|
|
189
|
+
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.oa(),b.W.byteLength-b.oa()))}};function Jf(a){for(var b=Kf(a);a.reader.Da()&&!a.parser.g;)a.parser.Cd(a.start+b,a.reader,a.partialOkay)}function Lf(a){for(var b=Kf(a),c=a.reader.R(),d=0;d<c&&(a.parser.Cd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Mf(a){return function(b){a(b.reader.Cb(b.reader.W.byteLength-b.reader.oa()))}}
|
|
190
|
+
function Gf(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Nf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Kf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}K("shaka.util.Mp4Parser",Ff);Ff.headerSize=Kf;Ff.typeToString=Nf;Ff.allData=Mf;Ff.sampleDescription=Lf;Ff.children=Jf;Ff.prototype.parseNext=Ff.prototype.Cd;Ff.prototype.parse=Ff.prototype.parse;Ff.prototype.stop=Ff.prototype.stop;
|
|
190
191
|
Ff.prototype.fullBox=Ff.prototype.Y;Ff.prototype.box=Ff.prototype.box;var Hf=0,If=1;function Of(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ff).box("moov",Jf).box("moof",Jf).Y("pssh",function(c){if(!(1<c.version)){var d=Gc(c.reader.W,-12,c.size);b.data.push(d);b.g.push(od(c.reader.Cb(16)));if(0<c.version){d=c.reader.R();for(var e=0;e<d;e++){var f=od(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
|
|
191
192
|
function Pf(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Jc(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=r(c),c=b.next();!c.done;c=b.next())c=nd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Qf(a,b){var c=Rf(a,b);return 1!=c.length?null:c[0]}function Sf(a,b,c){a=Tf(a,b,c);return 1!=a.length?null:a[0]}function Rf(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function Uf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
192
193
|
function Tf(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Vf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Wf(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Xf(a){return Array.from(a.childNodes).every(Yf)?a.textContent.trim():null}
|
|
@@ -194,7 +195,7 @@ function Yf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
|
|
|
194
195
|
function ag(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
195
196
|
function bg(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 cg(a){a=Number(a);return 0===a%1?a:null}function dg(a){a=Number(a);return 0===a%1&&0<a?a:null}function eg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function fg(a){a=Number(a);return isNaN(a)?null:a}function gg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
196
197
|
function hg(a,b){var c=new DOMParser,d=ig.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function jg(a,b){try{var c=dd(a);return hg(c,b)}catch(d){return null}}
|
|
197
|
-
var ig=new Oc(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 kg(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.ba=this.$=!1;this.J=0;this.g=null;this.B=new uf;this.i=new Map;this.F=[];this.A=new Nc;this.h=null;this.m=function(d){c.A.reject(d);a.onError(d)};this.ea=new Map;this.ua=new Map;this.S=new P(function(){return
|
|
198
|
+
var ig=new Oc(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 kg(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.ba=this.$=!1;this.J=0;this.g=null;this.B=new uf;this.i=new Map;this.F=[];this.A=new Nc;this.h=null;this.m=function(d){c.A.reject(d);a.onError(d)};this.ea=new Map;this.ua=new Map;this.S=new P(function(){return lg(c)});this.N=!1;this.K=[];this.P=!1;this.aa=(new P(function(){og(c)})).ka(b);this.A["catch"](function(){});this.j=new sf(function(){return pg(c)});this.X=!1;this.H=null}q=kg.prototype;q.destroy=function(){return this.j.destroy()};
|
|
198
199
|
function pg(a){return I(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.A.reject(),a.aa.stop(),a.aa=null,a.S.stop(),a.S=null,u(b,qg(a),2);case 2:if(!a.l){b.D(3);break}B(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.C=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.X=!1,a.H=null,A(b)}})}q.configure=function(a){this.h=a};function rg(a,b,c){a.ba=!0;a.F=[];a.N=c;return sg(a,b)}
|
|
199
200
|
function tg(a,b,c){a.F=c;a.N=0<c.length;return sg(a,b)}function ug(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 vg(a,g,[])}
|
|
200
201
|
function sg(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,w,y;return I(function(x){if(1==x.g){if(c=wg(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(v){return v.video&&v.video.drmInfos.length||v.audio&&v.audio.drmInfos.length?!0:!1});g||(h=zf(a.h.servers),xg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=yg(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,zg(t,zf(a.h.servers),zf(a.h.advanced||{}),a.h.keySystemsMapping);
|
|
@@ -210,29 +211,29 @@ function vg(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,w,y;return I(function(x){switch(x.g
|
|
|
210
211
|
f.keySystem;var D=d.get(f.keySystem);var z=[],C=[],G=[],E=[],H=new Set;Og(D,z,G,C,E,H);var J=a.N?"persistent-license":"temporary";v={keySystem:v,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:C[0],initData:E,keyIds:H};D=r(D);for(z=D.next();!z.done;z=
|
|
211
212
|
D.next())z=z.value,z.distinctiveIdentifierRequired&&(v.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(v.persistentStateRequired=z.persistentStateRequired);D=v}else D=f.keySystem,v=b.get(f.keySystem),z=[],C=[],G=[],E=[],H=new Set,Og(v.drmInfos,z,G,C,E,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==v.distinctiveIdentifier,persistentStateRequired:"required"==v.persistentState,sessionType:v.sessionTypes[0]||"temporary",audioRobustness:(v.audioCapabilities?
|
|
212
213
|
v.audioCapabilities[0].robustness:"")||"",videoRobustness:(v.videoCapabilities?v.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:C[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new O(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return w=x.h,tf(a.j),a.C=w,a.$=!0,u(x,Fg(a),7);case 7:tf(a.j);va(x,0);break;case 4:y=F(x);tf(a.j,y);a.g=null;a.I.clear();if(y instanceof O)throw y;throw new O(2,6,6002,y.message);}})}
|
|
213
|
-
function Mg(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(yg(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 O(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={
|
|
214
|
-
l.
|
|
214
|
+
function Mg(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(yg(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 O(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Td:d.Td},e=a.next())for(d.Td=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==
|
|
215
|
+
l.Td}}(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}
|
|
215
216
|
function Ng(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,w,y,x;return I(function(v){switch(v.g){case 1:if(1==b.size&&b.has(""))throw new O(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){v.D(4);break}k=h.value;if(!b.has(k)){v.D(3);break}l=b.get(k);B(v,6);return u(v,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
216
217
|
v.h,v["return"](c);case 6:F(v);case 7:tf(a.j);case 3:h=g.next();v.D(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){v.D(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();v.D(9);break}w=h.value;y=b.get(w);x=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=p){v.D(13);break}B(v,15);return u(v,navigator.requestMediaKeySystemAccess(w,[y]),17);case 17:return c=v.h,v["return"](c);case 15:F(v);case 16:tf(a.j);case 13:h=t.next();v.D(12);break;case 11:return v["return"](c)}})}
|
|
217
218
|
function wg(a){a=zf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=nd(f),h=nd(e);g={kty:"oct",kid:ld(g,!1),k:ld(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Gc(hd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
218
219
|
serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
219
|
-
function Hg(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:try{c=a.C.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.B.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(k):Dg(a,k)});a.B.o(c,"keystatuseschange",function(k){return Pg(a,k)});e={initData:null,initDataType:null,loaded:!1,
|
|
220
|
+
function Hg(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:try{c=a.C.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.B.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(k):Dg(a,k)});a.B.o(c,"keystatuseschange",function(k){return Pg(a,k)});e={initData:null,initDataType:null,loaded:!1,re:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);B(h,2);return u(h,c.load(b),4);
|
|
220
221
|
case 4:f=h.h;tf(a.j);if(!f)return a.i["delete"](c),a.m(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Ig(a)&&a.A.resolve();return h["return"](c);case 2:g=F(h),tf(a.j,g),a.i["delete"](c),a.m(new O(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
|
|
221
|
-
function Jg(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.m(new O(2,6,6005,f.message));return}a.B.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(f):Dg(a,f)});a.B.o(e,"keystatuseschange",function(f){return Pg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,
|
|
222
|
+
function Jg(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.m(new O(2,6,6005,f.message));return}a.B.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(f):Dg(a,f)});a.B.o(e,"keystatuseschange",function(f){return Pg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,re:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&ld(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
|
|
222
223
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new O(2,6,6006,f.message,f,h))}})}
|
|
223
224
|
function Dg(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,w,y;I(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&ld(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=lf([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),
|
|
224
225
|
Kg(a.g.keySystem)&&Qg(g),h=Date.now(),B(x,2),l=a.G.Pb.request(2,g),u(x,l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=F(x),n=new O(2,6,6007,m),a.m(n),d&&d.cb&&d.cb.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ld(k.data);B(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return p=F(x),t=new O(2,6,6008,p.message),a.m(t),d&&d.cb&&d.cb.reject(t),x["return"]();case 6:if(a.j.g)return x["return"]();w=new M("drmsessionupdate");
|
|
225
226
|
a.G.onEvent(w);d&&(d.cb&&d.cb.resolve(),y=new P(function(){d.loaded=!0;Ig(a)&&a.A.resolve()}),y.T(Rg));A(x)}})}
|
|
226
227
|
function Qg(a){var b=ed(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=hg(b,"PlayReadyKeyMessage");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=md(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
227
228
|
function Pg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Kg(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||Zc())){k=Jc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=od(h).slice(0,32);a.ea.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.cb&&(a.i["delete"](c),
|
|
228
|
-
c.close()["catch"](function(){}));Ig(a)&&(a.A.resolve(),a.S.T(Sg))}function
|
|
229
|
+
c.close()["catch"](function(){}));Ig(a)&&(a.A.resolve(),a.S.T(Sg))}function lg(a){var b=a.ea,c=a.ua;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new O(2,6,6014));a.G.zd(Af(c))}
|
|
229
230
|
function Tg(){var a,b,c,d,e,f,g,h;return I(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 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,
|
|
230
231
|
c],f=new Map,g=function(l){var m,n,p;return I(function(t){switch(t.g){case 1:B(t,2);if("org.w3.clearkey"===l&&$c())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Vc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:F(t),f.set(l,null),A(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](Af(f))})}
|
|
231
232
|
function Ug(a){var b;return I(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).T(Vg)}),B(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);A(c)})}
|
|
232
233
|
function qg(a){var b;return I(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return I(function(g){if(1==g.g)return B(g,2),a.ba||a.F.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Ug(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);A(g)})})),0)})}
|
|
233
|
-
function Wg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={
|
|
234
|
+
function Wg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Ua:f.Ua},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ua=[];f.Ua=f.Ua.concat(e.initData||[]);f.Ua=f.Ua.concat(h.initData||[]);f.Ua=f.Ua.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ua.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
|
|
234
235
|
e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
|
|
235
|
-
initData:f.
|
|
236
|
+
initData:f.Ua,keyIds:g});break}}return c}function yg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function og(a){a.i.forEach(function(b,c){var d=b.re,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.re=e)})}function Ig(a){a=a.i.values();return hb(a,function(b){return b.loaded})}
|
|
236
237
|
function xg(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
|
|
237
238
|
function Og(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ha:g.Ha},h=a.next()){g.Ha=h.value;b.includes(g.Ha.licenseServerUri)||b.push(g.Ha.licenseServerUri);d.includes(g.Ha.serverCertificateUri)||d.push(g.Ha.serverCertificateUri);g.Ha.serverCertificate&&(c.some(function(m){return function(n){return Ec(n,m.Ha.serverCertificate)}}(g))||c.push(g.Ha.serverCertificate));if(g.Ha.initData){h={};for(var k=r(g.Ha.initData),l=k.next();!l.done;h={Zc:h.Zc},l=k.next())h.Zc=l.value,e.some(function(m){return function(n){var p=
|
|
238
239
|
m.Zc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Ec(n.initData,p.initData)}}(h))||e.push(h.Zc)}if(g.Ha.keyIds)for(h=r(g.Ha.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
@@ -257,96 +258,96 @@ b.skip(1),d=Vh(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&
|
|
|
257
258
|
function Zh(a,b,c){var d=null;b=r(Yh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Ph(f,c,a.i));a.h[e]=null}return d}function $h(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ai(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return bi[a<<2|b<<1|c]}
|
|
258
259
|
var ci=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),bi="black blue green cyan red magenta yellow white".split(" ");function di(){this.h=[];this.g=[];this.i=new Sh;this.l=0;this.B=new Map([["CC1",new zh(0,0)],["CC2",new zh(0,1)],["CC3",new zh(1,0)],["CC4",new zh(1,1)]]);this.A=this.m=0;this.j=new Map;ei(this)}function ei(a){a.m=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,mh(b.i),mh(b.l),mh(b.A)}
|
|
259
260
|
function fi(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=gi(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())Th(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=hi(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
|
|
260
|
-
function gi(a,b){var c=b.type;if(16===(b.Oa&112)){var d=b.Oa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Oa&&255===b.
|
|
261
|
+
function gi(a,b){var c=b.type;if(16===(b.Oa&112)){var d=b.Oa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Oa&&255===b.ib||!b.Oa&&!b.ib||!ii(b.Oa)||!ii(b.ib))return 45<=++a.l&&ei(a),null;a.l=0;b.Oa&=127;b.ib&=127;if(!b.Oa&&!b.ib)return null;d=null;if(16===(b.Oa&112))a:{var e=b.Oa;d=b.ib;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Ih[f]:7===f&&(h=!0);
|
|
261
262
|
d=1===(d&1);if(c.h!==Dh){f=c.g;if(c.h===Ch&&e!==f.g){var k=1+e-f.h;yh(f,k,1+f.g-f.h,f.h);oh(f,0,k-1);oh(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ph(c.g,qh,32),g=!1,e=Ih[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Hh[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))ph(c.g,sh,d);else if(18===
|
|
262
|
-
(e&246)&&32===(d&224))ph(c.g,e&1?wh:uh,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.
|
|
263
|
-
0,h-1),oh(e,e.g,15-e.g),c.j=d,e=g);break;case 46:oh(c.l,0,15);break;case 47:e=null,c.h!==Dh&&(e=nh(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Eh(c),c.j=d}d=e;break a}d=null}else e=b.
|
|
263
|
+
(e&246)&&32===(d&224))ph(c.g,e&1?wh:uh,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.ib){case 32:Eh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Bh(c,2,d);break;case 38:e=Bh(c,3,d);break;case 39:e=Bh(c,4,d);break;case 40:ph(c.g,qh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:mh(c.A);Gh(c);break;case 43:Gh(c);break;case 44:e=c.i;g=null;c.h!==Dh&&(g=nh(e,c.j,d));oh(e,0,15);e=g;break;case 45:e=c.g;c.h!==Ch?e=null:(g=nh(e,c.j,d),h=e.g-e.h+1,yh(e,h-1,h,e.h),oh(e,
|
|
264
|
+
0,h-1),oh(e,e.g,15-e.g),c.j=d,e=g);break;case 46:oh(c.l,0,15);break;case 47:e=null,c.h!==Dh&&(e=nh(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Eh(c),c.j=d}d=e;break a}d=null}else e=b.ib,ph(c.g,qh,b.Oa),ph(c.g,qh,e);return d}
|
|
264
265
|
function hi(a,b){var c=[];try{for(;b.Da();){var d=Vh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Vh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Wh(e));for(var g=a.j.get(e),h=b.oa();b.oa()-h<f;){e=b;var k=Vh(e),l=k.value,m=k.pts;if(16===l){var n=Vh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Oh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Ph(t,p,g.i));if(t.h+1>=t.H){p=t;for(var w=0,y=1;15>y;y++,
|
|
265
266
|
w++)p.i[w]=p.i[y];for(y=0;1>y;y++,w++)p.i[w]=Mh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Ph(t,p,g.i));t.i[t.h]=Mh();t.g=0;break;case 12:t.isVisible()&&(e=Ph(t,p,g.i)),Lh(t),p=t,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Xh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Nh(g.g,"\u266a"):Nh(g.g,
|
|
266
|
-
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Nh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(ci.has(e)){var v=ci.get(e);Nh(g.g,v)}else Nh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Nh(g.g,"_"):Nh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof O&&3E3===D.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function ii(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ji(a,b){var c=null,d=null,e=a.R();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:e,
|
|
267
|
-
function mi(a,b,c){var d=a.R(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={
|
|
267
|
+
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Nh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(ci.has(e)){var v=ci.get(e);Nh(g.g,v)}else Nh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Nh(g.g,"_"):Nh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof O&&3E3===D.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function ii(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ji(a,b){var c=null,d=null,e=a.R();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:e,pf:c,hg:d}}function ki(a,b){return{cf:1==b?a.lc():a.R()}}function li(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.R()}}
|
|
268
|
+
function mi(a,b,c){var d=a.R(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={ze:null,sampleSize:null,Gd:null};c&256&&(g.ze=a.R());c&512&&(g.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(g.Gd=0==b?a.R():a.Hf());e.push(g)}return{dj:d,Jf:e}};function ni(){this.i=new Map;this.h=this.g=0}
|
|
268
269
|
ni.prototype.init=function(a){var b=this,c=[],d=[];(new Ff).box("moov",Jf).box("mvex",Jf).Y("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.R();f=f.R();b.g=e;b.h=f}).box("trak",Jf).Y("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.R();c.push(e)}).box("mdia",Jf).Y("mdhd",function(e){e=li(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new O(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
269
|
-
ni.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Ff).box("moof",Jf).box("traf",Jf).Y("trun",function(k){f=mi(k.reader,k.version,k.flags).
|
|
270
|
-
(k.
|
|
270
|
+
ni.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Ff).box("moof",Jf).box("traf",Jf).Y("trun",function(k){f=mi(k.reader,k.version,k.flags).Jf}).Y("tfhd",function(k){k=ji(k.reader,k.flags);d=k.pf||b.g;e=k.hg||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).Y("tfdt",function(k){g=ki(k.reader,k.version).cf}).box("mdat",function(k){if(null===g)throw new O(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,w=0,y=p;for(t.length&&(y=t[0].sampleSize||p);k.Da();){var x=k.R();if(6==
|
|
271
|
+
(k.pb()&31)){var v=0;t.length>w&&(v=t[w].Gd||0);v=(l+v)/m;for(var D=[],z,C=k.Cb(x-1),G=z=0;G<C.length;)2==z&&3==C[G]?(z=0,C=[].concat(ia(C)),C.splice(G,1),C=new Uint8Array(C)):0==C[G]?z++:z=0,G++;z=C;for(G=0;G<z.length;){for(C=0;255==z[G];)C+=255,G++;C+=z[G++];for(var E=0;255==z[G];)E+=255,G++;E+=z[G++];4==C&&D.push(z.subarray(G,G+E));G+=E}D=r(D);for(z=D.next();!z.done;z=D.next())c.push({ah:z.value,pts:v})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=t.length>w?l+(t[w].ze||n):l+n,w++,y=t.length>
|
|
271
272
|
w?t[w].sampleSize||p:p)}}).parse(a,!1);return c};function oi(){this.h=new ni;this.g=new di}oi.prototype.init=function(a){this.h.init(a)};
|
|
272
|
-
function pi(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Gc(e
|
|
273
|
-
;function qi(a,b,c,d){this.Pa=a;this.
|
|
274
|
-
function si(a,b,c,d,e,f,g,h,k,l,m,n,p,t){l=void 0===l?[]:l;t=void 0===t?ti:t;this.startTime=a;this.j=this.endTime=b;this.m=c;this.
|
|
275
|
-
q.Cc=function(){return this.Ca};q.
|
|
276
|
-
si.prototype.getStartTime=si.prototype.getStartTime;si.prototype.getUris=si.prototype.Pa;var ti=0,ui=1;si.Status={
|
|
277
|
-
function yi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(zi(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}function Ai(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=zi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function zi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Bi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.N={};this.K={};this.g=null;this.H=!1;this.S=d||function(){};this.i={};this.
|
|
278
|
-
function Di(a){var b,c,d,e,f,g,h,k;return I(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Bb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.
|
|
273
|
+
function pi(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Gc(e.ah);if(0<f.length&&(d=a.g,e=e.pts,f=new Cf(f,0),181===f.pb()&&49===f.ve()&&1195456820===f.R()&&3===f.pb())){var g=f.pb();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.pb(),l=(k&4)>>2,m=f.pb(),n=f.pb();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Oa:m,ib:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return fi(a.g)}
|
|
274
|
+
;function qi(a,b,c,d){this.Pa=a;this.Ta=b;this.Ca=c;this.me=void 0===d?null:d}qi.prototype.Gc=function(){return this.Ta};qi.prototype.Cc=function(){return this.Ca};function ri(a,b){return a&&b?a.Gc()==b.Gc()&&a.Cc()==b.Cc()&&fc(a.Pa(),b.Pa()):a==b}K("shaka.media.InitSegmentReference",qi);qi.prototype.getEndByte=qi.prototype.Cc;qi.prototype.getStartByte=qi.prototype.Gc;
|
|
275
|
+
function si(a,b,c,d,e,f,g,h,k,l,m,n,p,t){l=void 0===l?[]:l;t=void 0===t?ti:t;this.startTime=a;this.j=this.endTime=b;this.m=c;this.Ta=d;this.Ca=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.l=void 0===n?null:n;this.g=void 0===p?null:p;this.status=t}q=si.prototype;q.Pa=function(){return this.m()};q.getStartTime=function(){return this.startTime};q.ug=function(){return this.endTime};q.Gc=function(){return this.Ta};
|
|
276
|
+
q.Cc=function(){return this.Ca};q.Mg=function(){return this.tilesLayout};q.Lg=function(){return this.l};q.pd=function(){return this.status};q.Vg=function(){this.status=ui};K("shaka.media.SegmentReference",si);si.prototype.markAsUnavailable=si.prototype.Vg;si.prototype.getStatus=si.prototype.pd;si.prototype.getTileDuration=si.prototype.Lg;si.prototype.getTilesLayout=si.prototype.Mg;si.prototype.getEndByte=si.prototype.Cc;si.prototype.getStartByte=si.prototype.Gc;si.prototype.getEndTime=si.prototype.ug;
|
|
277
|
+
si.prototype.getStartTime=si.prototype.getStartTime;si.prototype.getUris=si.prototype.Pa;var ti=0,ui=1;si.Status={Gh:ti,Ui:ui,gi:2};function vi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function wi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function xi(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)}
|
|
278
|
+
function yi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(zi(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}function Ai(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=zi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function zi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Bi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.N={};this.K={};this.g=null;this.H=!1;this.S=d||function(){};this.i={};this.B=new uf;this.A={};this.F=b;this.I=new Nc;this.l=Ci(this,this.I);this.G=new sf(function(){return Di(e)});this.J="";this.C=!1;this.P=new Nc}function Ci(a,b){var c=new MediaSource;a.B.Fa(c,"sourceopen",function(){URL.revokeObjectURL(a.J);b.resolve()});a.J=Ei(c);a.j.src=a.J;return c}q=Bi.prototype;q.destroy=function(){return this.G.destroy()};
|
|
279
|
+
function Di(a){var b,c,d,e,f,g,h,k;return I(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Bb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.A)b.push(a.A[k].destroy());return u(l,Promise.all(b),2)}a.B&&(a.B.release(),a.B=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.A={};a.F=null;a.i=
|
|
279
280
|
{};A(l)})}
|
|
280
|
-
q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return I(function(n){if(1==n.g)return e=Jb,u(n,d.I,2);d.
|
|
281
|
-
function(p){return function(){return Gi(d,p.Ga)}}(f)),d.h[f.Ga]=m,d.N[f.Ga]=l,d.i[f.Ga]=[],d.K[f.Ga]=!!k.drmInfos.length);A(n)})};function Fi(a,b,c){a.g||(a.g=new Bd(a.m));var d=a.g;a=a.H;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,
|
|
282
|
-
function Ki(a,b){return b==Ib?a.g.h:wi(Ji(a,b))}function Li(a,b,c){if(b==Ib)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Ji(a,b);return yi(a,c)}q.
|
|
283
|
-
function Mi(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,n,p,t,w,y,x,v,D,z,C,G,E;return I(function(H){switch(H.g){case 1:h=Jb;if(b!=h.ha){H.D(2);break}if(!a.
|
|
284
|
-
ud(a.
|
|
285
|
-
y.timestampOffset=0;return u(H,Pi(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return u(H,Pi(a,b,function(){return Qi(a,b)}),11);case 11:return y.timestampOffset=z,y.appendWindowStart=D[0],y.appendWindowEnd=D[1],C=vi(Ji(a,b)),G=(d.startTime||0)-(C||0),a.P.resolve(G),u(H,Pi(a,b,function(){return Ri(a,b,0,a.l.duration)}),12);case 12:if(b!=h.Ja){H.D(9);break}return u(H,Pi(a,b,function(){a.j.currentTime-=.001;Gi(a,b)}),9);case 9:y.mode=x;case 8:return d&&a.
|
|
286
|
-
b,function(){return Qi(a,b)}),Pi(a,b,function(){var J=E;0>J&&(J+=.001);a.h[b].timestampOffset=J;Gi(a,b)})),u(H,Pi(a,b,function(){a.h[b].appendBuffer(c)}),15);case 15:A(H)}})}function Si(a,b){var c=Ki(a,"video")||0;Jd(a.g,b,c)}function Ti(a){a.g&&Jd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return I(function(f){e=Jb;return a==e.ha?u(f,d.g.remove(b,c),0):u(f,Pi(d,a,function(){return Ri(d,a,b,c)}),0)})};
|
|
281
|
+
q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return I(function(n){if(1==n.g)return e=Jb,u(n,d.I,2);d.C=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ga:f.Ga},h=g.next())f.Ga=h.value,k=a.get(f.Ga),l=wd(k.mimeType,k.codecs),f.Ga==e.ha?Fi(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!rd(l,f.Ga)||(d.A[f.Ga]=new qd,l=td(f.Ga,l)),m=d.l.addSourceBuffer(l),d.B.o(m,"error",function(p){return function(){d.i[p.Ga][0].p.reject(new O(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.B.o(m,"updateend",
|
|
282
|
+
function(p){return function(){return Gi(d,p.Ga)}}(f)),d.h[f.Ga]=m,d.N[f.Ga]=l,d.i[f.Ga]=[],d.K[f.Ga]=!!k.drmInfos.length);A(n)})};function Fi(a,b,c){a.g||(a.g=new Bd(a.m));var d=a.g;a=a.H;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,Dd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Ua('Text parsers should have a "setSequenceMode" method!'),d.C=a)}function Hi(a){return a.l?"ended"==a.l.readyState:!0}function Ii(a,b){return b==Ib?a.g.g:vi(Ji(a,b))}
|
|
283
|
+
function Ki(a,b){return b==Ib?a.g.h:wi(Ji(a,b))}function Li(a,b,c){if(b==Ib)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Ji(a,b);return yi(a,c)}q.jb=function(){var a={total:zi(this.j.buffered),audio:zi(Ji(this,"audio")),video:zi(Ji(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 Ji(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
284
|
+
function Mi(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,n,p,t,w,y,x,v,D,z,C,G,E;return I(function(H){switch(H.g){case 1:h=Jb;if(b!=h.ha){H.D(2);break}if(!a.C){H.D(3);break}return u(H,a.P,4);case 4:k=H.h,a.g.B=k;case 3:return u(H,Hd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return H["return"]();case 2:if(!a.A[b]){e&&(a.g||Fi(a,"text/vtt",a.C),d?(l=pi(a.F,c),l.length&&(m=a.h[h.Ja].timestampOffset,Md(a.g,l,d.startTime,d.endTime,m))):a.F.init(c));H.D(6);break}f&&a.A[b].g.resetCaptions();
|
|
285
|
+
return u(H,ud(a.A[b],c),7);case 7:n=H.h,a.g||Fi(a,"text/vtt",a.C),n.metadata&&(p=a.h[b].timestampOffset,a.S(n.metadata,p,d?d.endTime:null)),n.captions&&n.captions.length&&(t=a.h[h.Ja].timestampOffset,w=Kd(n.captions),Md(a.g,w,d?d.startTime:null,d?d.endTime:null,t)),c=n.data;case 6:c=Ni(a,c,d?d.startTime:null,b);y=a.h[b];x=Oi;if(!a.C||y.mode==x||!d){H.D(8);break}v=b==h.Ja||!(h.Ja in a.h);if(!v){H.D(9);break}D=[y.appendWindowStart,y.appendWindowEnd];y.appendWindowStart=0;y.appendWindowEnd=Infinity;
|
|
286
|
+
z=y.timestampOffset;y.timestampOffset=0;return u(H,Pi(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return u(H,Pi(a,b,function(){return Qi(a,b)}),11);case 11:return y.timestampOffset=z,y.appendWindowStart=D[0],y.appendWindowEnd=D[1],C=vi(Ji(a,b)),G=(d.startTime||0)-(C||0),a.P.resolve(G),u(H,Pi(a,b,function(){return Ri(a,b,0,a.l.duration)}),12);case 12:if(b!=h.Ja){H.D(9);break}return u(H,Pi(a,b,function(){a.j.currentTime-=.001;Gi(a,b)}),9);case 9:y.mode=x;case 8:return d&&a.C&&b!=h.ha&&(f||g)&&
|
|
287
|
+
(E=d.startTime,Pi(a,b,function(){return Qi(a,b)}),Pi(a,b,function(){var J=E;0>J&&(J+=.001);a.h[b].timestampOffset=J;Gi(a,b)})),u(H,Pi(a,b,function(){a.h[b].appendBuffer(c)}),15);case 15:A(H)}})}function Si(a,b){var c=Ki(a,"video")||0;Jd(a.g,b,c)}function Ti(a){a.g&&Jd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return I(function(f){e=Jb;return a==e.ha?u(f,d.g.remove(b,c),0):u(f,Pi(d,a,function(){return Ri(d,a,b,c)}),0)})};
|
|
287
288
|
function Ui(a,b){var c;return I(function(d){c=Jb;return b==c.ha?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,Pi(a,b,function(){return Ri(a,b,0,a.l.duration)}),0)})}q.flush=function(a){var b=this,c;return I(function(d){c=Jb;return a==c.ha?d["return"]():u(d,Pi(b,a,function(){b.j.currentTime-=.001;Gi(b,a)}),0)})};
|
|
288
289
|
function Vi(a,b,c,d,e,f){var g;return I(function(h){g=Jb;return b==g.ha?(f||(a.g.B=c),Id(a.g,d,e),h["return"]()):u(h,Promise.all([Pi(a,b,function(){return Qi(a,b)}),f?Promise.resolve():Pi(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;Gi(a,b)}),Pi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Gi(a,b)})]),0)})}
|
|
289
290
|
q.endOfStream=function(a){var b=this;return I(function(c){return u(c,Wi(b,function(){Hi(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.bb=function(a){var b=this;return I(function(c){return u(c,Wi(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Nc};b.i[d].unshift(e)}b.l.duration=a}),0)})};q.getDuration=function(){return this.l.duration};function Ri(a,b,c,d){d<=c?Gi(a,b):a.h[b].remove(c,d)}
|
|
290
291
|
function Qi(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;Gi(a,b)}function Gi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Xi(a,b))}function Pi(a,b,c){tf(a.G);c={start:c,p:new Nc};a.i[b].push(c);1==a.i[b].length&&Yi(a,b);return c.p}
|
|
291
292
|
function Wi(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:tf(a.G);c=[];d={};for(e in a.h)d.vc=new Nc,f={start:function(l){return function(){return l.vc.resolve()}}(d),p:d.vc},a.i[e].push(f),c.push(d.vc),1==a.i[e].length&&f.start(),d={vc:d.vc};B(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.h)Xi(a,h)}A(k)}})}function Xi(a,b){a.i[b].shift();Yi(a,b)}
|
|
292
|
-
function Yi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d)),Xi(a,b)}}function Ni(a,b,c,d){var e=a.K[d];null==c&&e&&(Wc()||Uc())&&"mp4"==a.N[d].split(";")[0].split("/")[1]&&(b=dh(b));return b}var Ei=window.URL.createObjectURL,Oi="sequence",Zi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Q(a,b,c){this.l=a;this.
|
|
293
|
-
q.ic=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.
|
|
294
|
-
q.U=function(){return Infinity==this.i&&!this.B};q.Mb=function(){return Infinity!=this.i&&!this.B};q.
|
|
295
|
-
q.
|
|
296
|
-
Q.prototype.setUserSeekStart=Q.prototype.
|
|
297
|
-
Q.prototype.setSegmentAvailabilityDuration=Q.prototype.
|
|
293
|
+
function Yi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d)),Xi(a,b)}}function Ni(a,b,c,d){var e=a.K[d];null==c&&e&&(Wc()||Uc())&&"mp4"==a.N[d].split(";")[0].split("/")[1]&&(b=dh(b));return b}var Ei=window.URL.createObjectURL,Oi="sequence",Zi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Q(a,b,c){this.l=a;this.Dd=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0;this.H=!1}q=Q.prototype;q.getDuration=function(){return this.i};q.Cg=function(){return this.g};q.bb=function(a){this.i=a};q.Gg=function(){return this.l};q.Lf=function(a){this.A=a};q.Wc=function(a){this.B=a};q.Ke=function(a){this.m=a};q.sh=function(a){this.Dd=a};q.sg=function(){return this.Dd};
|
|
294
|
+
q.ic=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.qe(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&!this.H&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.le=function(){this.H=!0};q.qe=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.pe=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
|
|
295
|
+
q.U=function(){return Infinity==this.i&&!this.B};q.Mb=function(){return Infinity!=this.i&&!this.B};q.mb=function(){return Math.max(this.C,this.Jb()-this.m)};q.Of=function(a){this.C=a};q.Jb=function(){return this.U()||this.Mb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Fc=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Jb()-this.m+a,this.kb()))};q.cc=function(){return this.Fc(0)};
|
|
296
|
+
q.kb=function(){return Math.max(0,this.Jb()-(this.U()||this.Mb()?this.Dd:0))};q.Sf=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.Kf=function(a){this.G=a};K("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.Kf;Q.prototype.usingPresentationStartTime=Q.prototype.Sf;Q.prototype.getSeekRangeEnd=Q.prototype.kb;Q.prototype.getSeekRangeStart=Q.prototype.cc;Q.prototype.getSafeSeekRangeStart=Q.prototype.Fc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Jb;
|
|
297
|
+
Q.prototype.setUserSeekStart=Q.prototype.Of;Q.prototype.getSegmentAvailabilityStart=Q.prototype.mb;Q.prototype.isInProgress=Q.prototype.Mb;Q.prototype.isLive=Q.prototype.U;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.pe;Q.prototype.notifyMinSegmentStartTime=Q.prototype.qe;Q.prototype.lockStartTime=Q.prototype.le;Q.prototype.notifySegments=Q.prototype.ic;Q.prototype.getDelay=Q.prototype.sg;Q.prototype.setDelay=Q.prototype.sh;
|
|
298
|
+
Q.prototype.setSegmentAvailabilityDuration=Q.prototype.Ke;Q.prototype.setStatic=Q.prototype.Wc;Q.prototype.setClockOffset=Q.prototype.Lf;Q.prototype.getPresentationStartTime=Q.prototype.Gg;Q.prototype.setDuration=Q.prototype.bb;Q.prototype.getMaxSegmentDuration=Q.prototype.Cg;Q.prototype.getDuration=Q.prototype.getDuration;function $i(a,b,c){this.l=c;this.j=a;this.B=aj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.A=0;this.C=b;this.i=function(){}}$i.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function bj(a,b){a.i=b}function cj(a){this.g=a}function aj(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(zi(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 dj(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.G=c;this.i=new uf;this.m=!1;this.F=a.readyState;this.C=0;this.h=d;this.l=!1;this.i.o(a,"waiting",function(){return ej(f)});this.j=(new P(function(){ej(f)})).ka(.25)}dj.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};dj.prototype.se=function(){this.l=!0;ej(this)};
|
|
298
299
|
function ej(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=aj(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.A++,b.l(new M("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Ai(c,b,a.G.gapDetectionThreshold),null==
|
|
299
|
-
d||0==d&&!a.l||(e=c.start(d),e>=a.B.
|
|
300
|
+
d||0==d&&!a.l||(e=c.start(d),e>=a.B.kb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.C++,a.A(new M("gapjumped")))))}}};function fj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=gj.value().get(b),c.Fa(a,b,d))}var gj=new Oc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function hj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new uf;this.i=new ij(a);fj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){jj(d,d.j)})}hj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function kj(a){return a.m?a.g.currentTime:a.j}function lj(a,b){0<a.g.readyState?mj(a.i,b):fj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){jj(a,a.j)})}
|
|
300
301
|
function jj(a,b){.001>Math.abs(a.g.currentTime-b)?nj(a):(a.h.Fa(a.g,"seeking",function(){nj(a)}),mj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function nj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function ij(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}ij.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
301
|
-
function mj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function oj(a){function
|
|
302
|
-
q.
|
|
303
|
-
function pj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.B=null;this.
|
|
304
|
-
l-k&&(k=l-3);h<k&&(h=rj(g,h),g.i.currentTime=h)}})).ka(.25)}
|
|
305
|
-
function sj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.cc():a.g.
|
|
306
|
-
function tj(a,b){var c=a.g.cc();if(b<c)return c;c=a.g.
|
|
302
|
+
function mj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function oj(a){this.g=a;this.j=!1;this.h=null;this.i=new uf}q=oj.prototype;q.ae=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.Fa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;fj(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.be=function(a){this.h=this.j?this.h:a};q.dd=function(){return(this.j?this.g.currentTime:this.h)||0};q.Ze=function(){return 0};
|
|
303
|
+
q.Ye=function(){return 0};q.Ff=function(){};
|
|
304
|
+
function pj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.B=null;this.A=qj(a,c,f);this.j=new dj(a,b.presentationTimeline,c,this.A,f);this.h=new hj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=kj(g.h);h=rj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;lj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},sj(this,d));this.m=new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=kj(g.h),k=g.g.cc(),l=g.g.kb();3>
|
|
305
|
+
l-k&&(k=l-3);h<k&&(h=rj(g,h),g.i.currentTime=h)}})}q=pj.prototype;q.ae=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.be=function(a){lj(this.h,a)};q.dd=function(){var a=kj(this.h);return 0<this.i.readyState&&!this.i.paused?tj(this,a):a};q.Ze=function(){return this.A?this.A.A:0};q.Ye=function(){return this.j.C};
|
|
306
|
+
function sj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.cc():a.g.kb():0>b&&(b=a.g.kb()+b);return uj(a,tj(a,b))}q.Ff=function(){this.j.se()};function uj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function rj(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.cc(),f=a.g.kb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Fc(c),k=a.g.Fc(d);c=a.g.Fc(c+d);return b>=g?uj(a,b):b>f?f:b<e?xi(a.i.buffered,k)?k:c:b>=h||xi(a.i.buffered,b)?b:c}
|
|
307
|
+
function tj(a,b){var c=a.g.cc();if(b<c)return c;c=a.g.kb();return b>c?c:b}function qj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new $i(new cj(a),b.stallThreshold,c);bj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function vj(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=vj.prototype;q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.Wg=function(){this.i=!0};q.find=function(a){for(var b=this.M.length-1,c=b;0<=c;--c){var d=this.M[c],e=c<b?this.M[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.M.length&&a<this.M[0].startTime?this.h:null};q.get=function(a){if(0==this.M.length)return null;a-=this.h;return 0>a||a>=this.M.length?null:this.M[a]};
|
|
307
308
|
q.offset=function(a){if(!this.i)for(var b=r(this.M),c=b.next();!c.done;c=b.next()){c=c.value;c.startTime+=a;c.endTime+=a;c.j+=a;c=r(c.h);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};q.Nc=function(a){!this.i&&a.length&&(this.M=this.M.filter(function(b){return b.startTime<a[0].startTime}),this.M.push.apply(this.M,ia(a)))};q.hc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.M.length||d.endTime>c.M[0].startTime)});this.Nc(a);this.Hb(b)};
|
|
308
309
|
q.Hb=function(a){if(!this.i){var b=this.M.length;this.M=this.M.filter(function(c){return c.endTime>a});this.h+=b-this.M.length}};
|
|
309
|
-
q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.M.length;)if(this.M[this.M.length-1].startTime>=b)this.M.pop();else break;for(;this.M.length;)if(this.M[0].endTime<=a)this.M.shift(),c||this.h++;else break;0!=this.M.length&&(a=this.M[this.M.length-1],this.M[this.M.length-1]=new si(a.startTime,b,a.m,a.
|
|
310
|
-
q.
|
|
311
|
-
function xj(a,b,c){return new vj([new si(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",vj);vj.forSingleSegment=xj;vj.prototype.getIteratorForTime=vj.prototype.ac;vj.prototype.updateEvery=vj.prototype.
|
|
310
|
+
q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.M.length;)if(this.M[this.M.length-1].startTime>=b)this.M.pop();else break;for(;this.M.length;)if(this.M[0].endTime<=a)this.M.shift(),c||this.h++;else break;0!=this.M.length&&(a=this.M[this.M.length-1],this.M[this.M.length-1]=new si(a.startTime,b,a.m,a.Ta,a.Ca,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.l,a.g))}};
|
|
311
|
+
q.Id=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.M.push.apply(c.M,ia(d)):(c.g.stop(),c.g=null)}),this.g.ka(a))};vj.prototype[Symbol.iterator]=function(){return this.ac(0)};vj.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.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new wj(this,b,d)};
|
|
312
|
+
function xj(a,b,c){return new vj([new si(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",vj);vj.forSingleSegment=xj;vj.prototype.getIteratorForTime=vj.prototype.ac;vj.prototype.updateEvery=vj.prototype.Id;vj.prototype.fit=vj.prototype.yb;vj.prototype.evict=vj.prototype.Hb;vj.prototype.mergeAndEvict=vj.prototype.hc;vj.prototype.offset=vj.prototype.offset;vj.prototype.get=vj.prototype.get;vj.prototype.find=vj.prototype.find;vj.prototype.markImmutable=vj.prototype.Wg;
|
|
312
313
|
vj.prototype.release=vj.prototype.release;function wj(a,b,c){this.i=a;this.h=b;this.g=c}wj.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.Pa().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};wj.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.Pa().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};
|
|
313
314
|
K("shaka.media.SegmentIterator",wj);wj.prototype.next=wj.prototype.next;wj.prototype.current=wj.prototype.current;function yj(){vj.call(this,[]);this.j=[]}qa(yj,vj);q=yj.prototype;q.clone=function(){var a=new yj;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.M.length}return null};
|
|
314
|
-
q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.M.length}return null};q.offset=function(){};q.Nc=function(){};q.Hb=function(){};q.hc=function(){};q.yb=function(){};q.
|
|
315
|
-
yj.prototype.offset=yj.prototype.offset;yj.prototype.get=yj.prototype.get;yj.prototype.find=yj.prototype.find;yj.prototype.release=yj.prototype.release;function zj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.od();this.h=new P(function(){b.g.
|
|
316
|
-
Dj.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.Pc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.
|
|
317
|
-
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.
|
|
315
|
+
q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.M.length}return null};q.offset=function(){};q.Nc=function(){};q.Hb=function(){};q.hc=function(){};q.yb=function(){};q.Id=function(){};K("shaka.media.MetaSegmentIndex",yj);yj.prototype.updateEvery=yj.prototype.Id;yj.prototype.fit=yj.prototype.yb;yj.prototype.mergeAndEvict=yj.prototype.hc;yj.prototype.evict=yj.prototype.Hb;yj.prototype.merge=yj.prototype.Nc;
|
|
316
|
+
yj.prototype.offset=yj.prototype.offset;yj.prototype.get=yj.prototype.get;yj.prototype.find=yj.prototype.find;yj.prototype.release=yj.prototype.release;function zj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.od();this.h=new P(function(){b.g.Ef(.25*b.i)})}zj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};zj.prototype.set=function(a){this.i=a;Aj(this)};zj.prototype.ld=function(){return this.g.ld()};function Aj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.od()!=b&&a.g.Ie(b);return}catch(c){}a.h.ka(.25);0!=a.g.od()&&a.g.Ie(0)};function Bj(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){Cj(b,!1)})).ka(.25)}Bj.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 Cj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Dj(a){fb.call(this);this.g=new Map;this.h=a}qa(Dj,fb);Dj.prototype.release=function(){this.g.clear();fb.prototype.release.call(this)};function Ej(a,b){var c=a.g.get(b);c||(c={Pc:[],mf:null,contentType:b},a.g.set(b,c));return c}function Fj(a,b,c){var d=Ej(a,b.contentType);Gj(a,d);a={me:b,position:c};d=d.Pc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
317
|
+
Dj.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.Pc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.me;break a}}d=null}if(e=d)e=c.mf,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);
|
|
318
|
+
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.mf=d,JSON.stringify(d),c=new M("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Gj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Pc;b.Pc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Pc=[]};function Hj(a){fb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new P(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(Hj,fb);Hj.prototype.release=function(){this.g.clear();this.h.stop();fb.prototype.release.call(this)};function Ij(a){fb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Ub:null,Tb:Jj,Lb:function(c,d){return Kj(b,"enter",c,d)}},{Ub:Lj,Tb:Jj,Lb:function(c,d){return Kj(b,"enter",c,d)}},{Ub:Mj,Tb:Jj,Lb:function(c,d){return Kj(b,"enter",c,d)}},{Ub:Jj,Tb:Lj,Lb:function(c,d){return Kj(b,"exit",c,d)}},{Ub:Jj,Tb:Mj,Lb:function(c,d){return Kj(b,"exit",c,d)}},{Ub:Lj,Tb:Mj,Lb:function(c,d){return Kj(b,"skip",c,d)}},{Ub:Mj,Tb:Lj,Lb:function(c,d){return Kj(b,"skip",c,d)}}];this.h=new uf;this.h.o(this.i,"regionremove",
|
|
318
319
|
function(c){b.g["delete"](c.region)})}qa(Ij,fb);Ij.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;fb.prototype.release.call(this)};Ij.prototype.j=function(a,b){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?Lj:a>d.endTime?Mj:Jj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Ub==e&&h.Tb==f&&h.Lb(d,b)}};
|
|
319
320
|
function Kj(a,b,c,d){b=new M(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Lj=1,Jj=2,Mj=3;function Nj(a,b,c,d,e){a=lf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Oj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.C=1;this.A=this.l=null;this.i=new Map;this.F=!1;this.G=null;this.B=!1;this.h=new sf(function(){return Pj(c)})}q=Oj.prototype;q.destroy=function(){return this.h.destroy()};function Pj(a){var b,c,d,e;return I(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Qj(e),b.push(Rj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;A(f)})}
|
|
320
321
|
q.configure=function(a){this.j=a;this.G=new Te({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};q.start=function(){var a=this;return I(function(b){if(1==b.g)return u(b,Sj(a),2);tf(a.h);a.F=!0;A(b)})};
|
|
321
322
|
function Tj(a,b){var c,d,e,f,g,h;I(function(k){switch(k.g){case 1:return c=Jb,B(k,2),u(k,Ui(a.g.V,c.ha),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=wd(b.mimeType,b.codecs);Fi(a.g.V,e,a.m.sequenceMode);f=a.g.V.m;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=Uj(b),a.i.set(c.ha,h),Vj(a,h,0);A(k)}})}function Wj(a){var b=a.i.get(Ib);b&&(Qj(b),Rj(b)["catch"](function(){}),a.i["delete"](Ib));a.A=null}
|
|
322
323
|
function Xj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Rb&&(Yj(a,e,!1,0,!1),c.Rb=d)}else if(d=c.Rb)c.Rb=null,Yj(a,d,!0,0,!1)}}function Zj(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.F&&(b.video&&Yj(a,b.video,c,d,e,f),b.audio&&Yj(a,b.audio,c,d,e,f))}function ak(a,b){a.A=b;a.F&&Yj(a,b,!0,0,!1)}
|
|
323
|
-
function Yj(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ib?g&&(g.Rb&&(b.trickModeVideo?(g.Rb=b,b=b.trickModeVideo):g.Rb=null),g.stream!=b||e)&&(b.type==Ib&&Fi(a.g.V,wd(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.sa=null,g
|
|
324
|
-
function ck(a,b){var c,d;return I(function(e){if(1==e.g){if(!b.Ka)return e["return"]();c=b.stream;d=b.Ka;return c.segmentIndex?e.D(2):u(e,c.createSegmentIndex(),2)}if(b.Ka!=d||b.stream!=c)return e["return"]();var f=a.g.nd();var g=Ki(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ca?k.Ca-k.
|
|
324
|
+
function Yj(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ib?g&&(g.Rb&&(b.trickModeVideo?(g.Rb=b,b=b.trickModeVideo):g.Rb=null),g.stream!=b||e)&&(b.type==Ib&&Fi(a.g.V,wd(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.sa=null,g.bf=!!f,c&&(g.zc?g.Ld=!0:g.ab?(g.Eb=!0,g.hd=d,g.Ld=!0):(Qj(g),bk(a,g,!0,d)["catch"](function(h){if(a.g)a.g.onError(h)}))),ck(a,g)["catch"](function(h){if(a.g)a.g.onError(h)})):Tj(a,b)}
|
|
325
|
+
function ck(a,b){var c,d;return I(function(e){if(1==e.g){if(!b.Ka)return e["return"]();c=b.stream;d=b.Ka;return c.segmentIndex?e.D(2):u(e,c.createSegmentIndex(),2)}if(b.Ka!=d||b.stream!=c)return e["return"]();var f=a.g.nd();var g=Ki(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ca?k.Ca-k.Ta:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.Ca?k.Ca-k.Ta:null)||0),k=a.g.getBandwidthEstimate(),
|
|
325
326
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.Ka.h.g>h?!0:!1):f=!1;f&&b.Ka.abort();A(e)})}
|
|
326
|
-
q.Tc=function(){for(var a=this.g.nd(),b=r(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);c.sa=null;var e=this.g.V;d==Ib?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Ji(e,d),e=xi(e,a));if(!e){(null!=Ki(this.g.V,d)||c.
|
|
327
|
-
function dk(a,b){b.zc||b.Eb||(b.
|
|
327
|
+
q.Tc=function(){for(var a=this.g.nd(),b=r(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);c.sa=null;var e=this.g.V;d==Ib?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Ji(e,d),e=xi(e,a));if(!e){(null!=Ki(this.g.V,d)||c.ab)&&dk(this,c);c.Ka&&(c.Ka.abort(),c.Ka=null);if(d===Ib)for(d=this.g.V.F.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,ei(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())$h(e.value);c.Tc=!0}}};
|
|
328
|
+
function dk(a,b){b.zc||b.Eb||(b.ab?(b.Eb=!0,b.hd=0):null==Ii(a.g.V,b.type)?null==b.rb&&Vj(a,b,0):(Qj(b),bk(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
|
|
328
329
|
function Sj(a){var b,c,d,e,f,g,h,k,l,m;return I(function(n){if(1==n.g){b=Jb;if(!a.l)throw new O(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Gb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ja,a.l.video),d.add(a.l.video));a.A&&(c.set(b.ha,a.A),d.add(a.A));e=a.g.V;f=a.j.forceTransmuxTS;return u(n,e.init(c,f,a.m.sequenceMode),2)}tf(a.h);a.updateDuration();g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||(m=Uj(l),a.i.set(k,m),Vj(a,m,0));A(n)})}
|
|
329
|
-
function Uj(a){return{stream:a,type:a.type,sa:null,Ra:null,
|
|
330
|
-
function ek(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:tf(a.h);if(b.
|
|
330
|
+
function Uj(a){return{stream:a,type:a.type,sa:null,Ra:null,td:null,ke:null,je:null,ie:null,Rb:null,endOfStream:!1,ab:!1,rb:null,Eb:!1,hd:0,Ld:!1,zc:!1,Tc:!0,we:!1,Ic:!1,Ka:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.V.bb(a):this.g.V.bb(Math.pow(2,32))};
|
|
331
|
+
function ek(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:tf(a.h);if(b.ab||null==b.rb||b.zc)return h["return"]();b.rb=null;if(!b.Eb){h.D(2);break}return u(h,bk(a,b,b.Ld,b.hd),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.rb&&Vj(a,b,0),h["return"]();case 4:B(h,6);d=fk(a,b);null!=d&&(Vj(a,b,d),b.Ic=!1);va(h,7);break;case 6:return e=
|
|
331
332
|
F(h),u(h,gk(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return u(h,a.g.V.endOfStream(),10);case 10:tf(a.h),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),A(h)}})}
|
|
332
333
|
function fk(a,b){if(hk(b))return Si(a.g.V,b.stream.originalId||""),null;b.type==Ib&&Ti(a.g.V);var c=a.g.nd(),d=b.Ra?b.Ra.endTime:c,e=Li(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=Ki(a.g.V,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(Ib))&&hk(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=ik(a,b,c,h);if(!e)return a.j.updateIntervalSeconds;
|
|
333
334
|
f=Infinity;g=Array.from(a.i.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,hk(h)||h.sa&&!h.sa.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;jk(a,b,c,e)["catch"](function(){});return null}
|
|
334
335
|
function ik(a,b,c,d){if(b.sa)return b.sa.current();if(b.Ra||d)return b.sa=b.stream.segmentIndex.ac(b.Ra?b.Ra.endTime:d),b.sa&&b.sa.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.sa=b.stream.segmentIndex.ac(d),e=b.sa&&b.sa.next().value);e||(b.sa=b.stream.segmentIndex.ac(c),e=b.sa&&b.sa.next().value);return e}
|
|
335
|
-
function jk(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,w,y,x,v,D;return I(function(z){switch(z.g){case 1:e=Jb;f=b.stream;g=b.sa;b.
|
|
336
|
-
0;(new Ff).box("mdat",function(L){E=L.size+L.start;G=!0}).parse(n,!1,!0);if(!G)return J.D(0);H=n.subarray(0,E);n=n.subarray(E);return u(J,mk(a,b,c,f,d,H),0)})},u(z,nk(a,b,d,w),9);l=nk(a,b,d);return u(z,l,7);case 7:return m=z.h,tf(a.h),a.B?z["return"]():b.Eb?(b.
|
|
337
|
-
b.
|
|
338
|
-
function
|
|
339
|
-
function kk(a,b,c){var d,e,f,g,h,k,l;return I(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.
|
|
340
|
-
2),u(w,k,4);case 4:return n=w.h,tf(a.h),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(w,a.g.
|
|
336
|
+
function jk(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,w,y,x,v,D;return I(function(z){switch(z.g){case 1:e=Jb;f=b.stream;g=b.sa;b.ab=!0;B(z,2);if(2==d.pd())throw new O(1,1,1011);return u(z,kk(a,b,d),4);case 4:tf(a.h);if(a.B)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h)return n=new Uint8Array(0),t=p=!1,w=function(C){var G,E,H;return I(function(J){if(p)return J["return"]();t=!0;tf(a.h);if(a.B)return J["return"]();n=lk(n,C);G=!1;E=
|
|
337
|
+
0;(new Ff).box("mdat",function(L){E=L.size+L.start;G=!0}).parse(n,!1,!0);if(!G)return J.D(0);H=n.subarray(0,E);n=n.subarray(E);return u(J,mk(a,b,c,f,d,H),0)})},u(z,nk(a,b,d,w),9);l=nk(a,b,d);return u(z,l,7);case 7:return m=z.h,tf(a.h),a.B?z["return"]():b.Eb?(b.ab=!1,Vj(a,b,0),z["return"]()):u(z,mk(a,b,c,f,d,m),6);case 9:y=z.h;if(t){z.D(6);break}p=!0;tf(a.h);return a.B?z["return"]():b.Eb?(b.ab=!1,Vj(a,b,0),z["return"]()):u(z,mk(a,b,c,f,d,y),6);case 6:tf(a.h);if(a.B)return z["return"]();b.Ra=d;g.next();
|
|
338
|
+
b.ab=!1;b.we=!1;x=a.g.V.jb();v=x[b.type];Za(JSON.stringify(v));b.Eb||a.g.se();Vj(a,b,0);va(z,0);break;case 2:D=F(z);tf(a.h,D);if(a.B)return z["return"]();b.ab=!1;if(7001==D.code)b.ab=!1,b.rb=null,Vj(a,b,0),z.D(0);else if(b.type==e.ha&&a.j.ignoreTextStreamFailures)a.i["delete"](e.ha),z.D(0);else if(3017==D.code)ok(a,b,D),z.D(0);else return b.Ic=!0,D.severity=2,u(z,gk(a,D),0)}})}function lk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
339
|
+
function ok(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.we})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Ic=!0;a.B=!0;a.g.onError(c);return}b.we=!0}Vj(a,b,4)}
|
|
340
|
+
function kk(a,b,c){var d,e,f,g,h,k,l;return I(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.ke||e!=b.je||f!=b.ie)h=function(){var n;return I(function(p){if(1==p.g)return B(p,2),b.je=e,b.ie=f,b.ke=g,u(p,Vi(a.g.V,b.type,g,e,f,a.m.sequenceMode),4);if(2!=p.g)return va(p,0);n=F(p);b.je=null;b.ie=null;b.ke=null;throw n;})},d.push(h());!ri(c.i,b.td)&&(b.td=c.i)&&(k=nk(a,b,c.i),l=function(){var n,p,t;return I(function(w){switch(w.g){case 1:return B(w,
|
|
341
|
+
2),u(w,k,4);case 4:return n=w.h,tf(a.h),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(w,a.g.df(b.type,n),5);case 5:return u(w,Mi(a.g.V,b.type,n,null,p),6);case 6:va(w,0);break;case 2:throw t=F(w),b.td=null,t;}})},a.g.Zg(c.startTime,c.i),d.push(l()));return u(m,Promise.all(d),0)})}
|
|
341
342
|
function mk(a,b,c,d,e,f){var g,h,k;return I(function(l){switch(l.g){case 1:return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.j.dispatchAllEmsgBoxes)&&(new Ff).Y("emsg",function(m){var n=d.emsgSchemeIdUris;if(0===m.version){var p=m.reader.Qc();var t=m.reader.Qc();var w=m.reader.R();var y=m.reader.R();var x=m.reader.R();var v=m.reader.R();var D=e.startTime+y/w}else w=m.reader.R(),D=m.reader.lc()/w+e.timestampOffset,y=D-e.startTime,x=m.reader.R(),
|
|
342
|
-
v=m.reader.R(),p=m.reader.Qc(),t=m.reader.Qc();m=m.reader.Cb(m.reader.W.byteLength-m.reader.oa());if(n&&n.includes(p)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==p?a.g
|
|
343
|
+
v=m.reader.R(),p=m.reader.Qc(),t=m.reader.Qc();m=m.reader.Cb(m.reader.W.byteLength-m.reader.oa());if(n&&n.includes(p)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==p?a.g.$g():(n=(new Map).set("detail",{startTime:D,endTime:D+x/w,schemeIdUri:p,value:t,timescale:w,presentationTimeDelta:y,eventDuration:x,id:v,messageData:m}),n=new M("emsg",n),a.g.onEvent(n))}).parse(f),u(l,pk(a,b,c),2);case 2:return tf(a.h),h=b.Tc,b.Tc=!1,k=b.bf,b.bf=!1,u(l,a.g.df(b.type,f),3);case 3:return u(l,Mi(a.g.V,b.type,
|
|
343
344
|
f,e,g,h,k),4);case 4:tf(a.h),A(l)}})}function pk(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=Ii(a.g.V,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.V.remove(b.type,e,e+g),2)}tf(a.h);A(h)})}function hk(a){return a&&a.type==Ib&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
344
|
-
function nk(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=rf,f=Nj(c.Pa(),c.
|
|
345
|
-
function bk(a,b,c,d){var e,f;return I(function(g){if(1==g.g)return b.Eb=!1,b.
|
|
346
|
-
function Vj(a,b,c){var d=b.type;if(d!=Ib||a.i.has(d))b.
|
|
347
|
-
function vk(a,b){var c={jc:function(){},
|
|
348
|
-
function sk(a){return I(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Kb)var c=!1;else{a.g&&(a.g.
|
|
349
|
-
function wk(a){var b,c;return I(function(d){switch(d.g){case 1:return a.i=a.j.
|
|
345
|
+
function nk(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=rf,f=Nj(c.Pa(),c.Ta,c.Ca,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof qi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Pb.request(e,f),b.Ka=h,u(l,h.promise,2);k=l.h;b.Ka=null;return l["return"](k.data)})}
|
|
346
|
+
function bk(a,b,c,d){var e,f;return I(function(g){if(1==g.g)return b.Eb=!1,b.Ld=!1,b.hd=0,b.zc=!0,b.Ra=null,b.td=null,b.sa=null,d?(e=a.g.nd(),f=a.g.V.getDuration(),u(g,a.g.V.remove(b.type,e+d,f),3)):u(g,Ui(a.g.V,b.type),4);if(3!=g.g)return tf(a.h),c?u(g,a.g.V.flush(b.type),3):g.D(3);tf(a.h);b.zc=!1;b.endOfStream=!1;Vj(a,b,0);A(g)})}
|
|
347
|
+
function Vj(a,b,c){var d=b.type;if(d!=Ib||a.i.has(d))b.rb=(new Pc(function(){var e;return I(function(f){if(1==f.g)return B(f,2),u(f,ek(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);A(f)})})).T(c)}function Qj(a){null!=a.rb&&(a.rb.stop(),a.rb=null)}function Rj(a){return I(function(b){return a.Ka?u(b,a.Ka.abort(),0):b.D(0)})}function gk(a,b){return I(function(c){if(1==c.g)return u(c,Ve(a.G),2);tf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);A(c)})};function qk(a,b){var c=rk(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return sk(d)});this.B=new sf(function(){return tk(d)})}qk.prototype.destroy=function(){return this.B.destroy()};function tk(a){var b,c,d;return I(function(e){if(1==e.g)return a.h&&a.h.abort(),uk(a),u(e,a.C,2);a.g&&a.g.$a.Qb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Qb();a.g=null;a.m=[];a.j=null;A(e)})}
|
|
348
|
+
function vk(a,b){var c={jc:function(){},yd:function(){},Qb:function(){},onError:function(){},Bd:function(){},cj:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();uk(a);return c}
|
|
349
|
+
function sk(a){return I(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Kb)var c=!1;else{a.g&&(a.g.$a.Qb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.jc(),a.g={node:d.node,payload:d.payload,Kb:d.Kb,$a:c.$a}):c.$a.Bd();c=!0}c?c=Promise.resolve():a.g?c=wk(a):(a.j.Yg(a.i),a.A=new Nc,c=a.A);b=u(b,c,1)}return b})}
|
|
350
|
+
function wk(a){var b,c;return I(function(d){switch(d.g){case 1:return a.i=a.j.Eg(a.i,a.l,a.g.node,a.g.payload),B(d,2),a.h=a.j.ig(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.$a.yd(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.$a.Qb();else a.g.$a.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function uk(a){a.A&&(a.A.resolve(),a.A=null)};function xk(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=xk.prototype;q.remove=function(a,b){if(!this.g)return!1;yk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
350
351
|
q.append=function(a){function b(h,k){for(var l=r(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},"");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(c).join(""):
|
|
351
352
|
l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=r(d);for(var g=d.next();!g.done;f={Vb:f.Vb},g=d.next())f.Vb=g.value,a.some(function(h){return function(k){return k.startTime==h.Vb.startTime&&k.endTime==h.Vb.endTime&&k.text==h.Vb.payload?!0:!1}}(f))||(g=zk(f.Vb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-
|
|
352
353
|
e.indexOf(k)});a=r(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};q.destroy=function(){this.g&&(yk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
@@ -354,10 +355,10 @@ function zk(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTim
|
|
|
354
355
|
function yk(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",xk);xk.prototype.setTextVisibility=xk.prototype.setTextVisibility;xk.prototype.isTextVisible=xk.prototype.isTextVisible;xk.prototype.destroy=xk.prototype.destroy;xk.prototype.append=xk.prototype.append;xk.prototype.remove=xk.prototype.remove;function Ak(){}function R(a){return document.createElement(a)}function Bk(){return document.createElement("button")}function Ck(a){for(;a.firstChild;)a.removeChild(a.firstChild)}K("shaka.util.Dom",Ak);Ak.removeAllChildren=Ck;function Dk(a,b){var c=this;this.j=!1;this.i=[];this.F=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 P(function(){Ek(c)})).ka(.25);this.h=new Map;this.B=new uf;this.B.o(document,"fullscreenchange",function(){Ek(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){Ek(c,
|
|
355
356
|
!0)}),this.l.observe(this.g));this.A=new Map}q=Dk.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Yc:c.Yc},d=a.next())c.Yc=d.value,b.some(function(e){return function(f){return rc(f,e.Yc)}}(c))||this.i.push(c.Yc);Ek(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)};
|
|
356
357
|
q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Ek(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
|
|
357
|
-
function Fk(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.
|
|
358
|
-
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.Rc?(c.appendChild(d.Rc),d.Rc.appendChild(d.
|
|
358
|
+
function Fk(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.Tf:null;l&&(g.push(l.ce),l.Rc&&g.push(l.Rc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Gk(a,k,e),l=a.h.get(k),n=l.Tf,f=!0));0<k.nestedCues.length&&n&&Fk(a,k.nestedCues,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?
|
|
359
|
+
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.Rc?(c.appendChild(d.Rc),d.Rc.appendChild(d.ce)):c.appendChild(d.ce)}}function Ek(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=r(a.A.values()),e=d.next();!e.done;e=d.next())Ck(e.value);Ck(a.g);a.h.clear();a.A.clear()}if(a.j){d=new Map;e=r(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Fk(a,a.i,a.g,c,[])}}}
|
|
359
360
|
function Gk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&Hk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.A.has(c.id))c=a.A.get(c.id);else{e=R("span");var g=c.heightUnits==Bc?"%":"px",h=c.widthUnits==Bc?"%":"px",k=c.viewportAnchorUnits==Bc?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+g;e.style.width=c.width+h;e.style.position="absolute";e.style.top=c.viewportAnchorY+
|
|
360
|
-
k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(c.id,e);c=e}e=f;d&&(e=R("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{
|
|
361
|
+
k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(c.id,e);c=e}e=f;d&&(e=R("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{ce:f,Tf:e,Rc:c})}
|
|
361
362
|
function Hk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Ik(c.linePadding,c,a.m);f.paddingRight=Ik(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
|
|
362
363
|
"no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Jk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?
|
|
363
364
|
"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Ik(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==lc?(f.width="100%",c.lineAlign==nc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==nc?f.left=c.line+"%":"end"==
|
|
@@ -368,11 +369,11 @@ K("shaka.text.UITextDisplayer",Dk);Dk.prototype.setTextVisibility=Dk.prototype.s
|
|
|
368
369
|
break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}K("shaka.text.WebVttGenerator",function(){});function Lk(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function Mk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?Nk:Ok};d.ot=Pk(c);var e=d.ot===Qk||d.ot===Rk||d.ot===Sk||d.ot===Tk;e&&(d.bl=Uk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==Tk&&(d.tb=Vk(a,d.ot)/1E3);Wk(a,b,d)}}catch(f){Va("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
|
|
369
370
|
function Xk(a,b,c){try{if(!a.g.enabled)return b;var d=Yk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Sk;break a;case "application/x-mpegurl":e=Zk;break a}e=void 0}d.ot=e;d.su=!0;var f=$k(d);return al(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Yk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
370
371
|
function Wk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Yk(a));c.pr=a.h.zb();var e=c.ot===Qk||c.ot===Sk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=bl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=$k(c);f&&(b.uris=b.uris.map(function(g){return al(g,f)}))}}}
|
|
371
|
-
function Pk(a){var b=a.type;if(a.init)return cl;if("video"==b)return a.codecs.includes(",")?Sk:Qk;if("audio"==b)return Rk;if("text"==b)return"application/mp4"===a.mimeType?Tk:dl}function Uk(a,b){var c=a.h.
|
|
372
|
+
function Pk(a){var b=a.type;if(a.init)return cl;if("video"==b)return a.codecs.includes(",")?Sk:Qk;if("audio"==b)return Rk;if("text"==b)return"application/mp4"===a.mimeType?Tk:dl}function Uk(a,b){var c=a.h.jb()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
|
|
372
373
|
function Vk(a,b){var c=a.h.Qa();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case Qk:return d.videoBandwidth||NaN;case Rk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
|
|
373
374
|
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"===
|
|
374
375
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function bl(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}
|
|
375
|
-
function al(a,b){if(!b||a.includes("offline:"))return a;var c=new lb(a);c.g.set("CMCD",b);return c.toString()}var Zk="m",Rk="a",Qk="v",Sk="av",cl="i",dl="c",Tk="tt",Ok="v",Nk="l";K("shaka.util.CmcdManager.StreamingFormat",{
|
|
376
|
+
function al(a,b){if(!b||a.includes("offline:"))return a;var c=new lb(a);c.g.set("CMCD",b);return c.toString()}var Zk="m",Rk="a",Qk="v",Sk="av",cl="i",dl="c",Tk="tt",Ok="v",Nk="l";K("shaka.util.CmcdManager.StreamingFormat",{Mh:"d",ai:"h",Ji:"s",ri:"o"});function el(){}
|
|
376
377
|
function fl(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]=cf(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=cf(l)),k=fl(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?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
|
|
377
378
|
k),g=!1)}return g}function gl(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 hl(a,b){return a&&b}K("shaka.util.ConfigUtils",el);el.convertToConfigObject=gl;el.mergeConfigObjects=fl;function il(){}
|
|
378
379
|
function jl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ue(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){return hl([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Uc()},c={retryParameters:Ue(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,
|
|
@@ -385,88 +386,88 @@ preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,prefer
|
|
|
385
386
|
function(g){return I(function(h){return h["return"](kl(g,f.preferredAudioLanguage))})};return f}function ll(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 fl(a,b,c||jl(),d,"")}
|
|
386
387
|
function kl(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Ub(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Mb(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
|
|
387
388
|
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Ib&&"image"!=g.type||c.push(g);return c}K("shaka.util.PlayerConfiguration",il);il.mergeConfigObjects=ll;il.createDefault=jl;function ml(){this.g=null;this.h=[]}function nl(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 ol(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
|
|
388
|
-
function pl(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 ql(){this.i=this.h=null;this.g=[]}function rl(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 sl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.P=this.S=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new ml;this.h=new ql};function S(a,b){fb.call(this);var c=this;this.l=tl;this.qd=this.g=null;this.ba=!1;this.
|
|
389
|
-
this.
|
|
390
|
-
f){return $e(xl(c,e,f))});d.set(this.P,function(e){e.O&&(c.
|
|
391
|
-
function(e,f){return Fl(c,e,f)});this.ma=new qk(this.P,{
|
|
392
|
-
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return I(function(f){return 1==f.g?u(f,yl(c,e),2):f["return"](e.O?c.X:c.P)})},
|
|
393
|
-
q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.l==Jl)return c["return"]();a.l=Jl;b=vk(a.ma,function(){return{node:a.P,payload:rk(),Kb:!1}});return u(c,new Promise(function(d){b.jc=function(){};b.
|
|
389
|
+
function pl(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 ql(){this.i=this.h=null;this.g=[]}function rl(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 sl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.P=this.S=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new ml;this.h=new ql};function S(a,b){fb.call(this);var c=this;this.l=tl;this.qd=this.g=null;this.ba=!1;this.vd=new uf;this.gb=new uf;this.B=new uf;this.ue=this.C=this.fb=this.i=this.xd=this.J=this.j=this.ea=this.S=this.Ed=this.N=this.sd=this.I=this.Xa=this.F=this.K=this.m=this.H=null;this.Vf=1E9;this.h=ul(this);this.Bc={width:Infinity,height:Infinity};this.A=null;this.ya=new Le(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.za=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
|
|
390
|
+
this.hb=this.h.preferForcedSubs;this.eb=[];this.Hc=null;b&&b(this);this.H=vl(this);this.H.Ge(this.h.streaming.forceHTTPS);this.G=null;wl&&(this.G=wl());this.vd.o(window,"online",function(){c.xe()});this.P={name:"detach"};this.X={name:"attach"};this.aa={name:"unload"};this.We={name:"manifest-parser"};this.Ve={name:"manifest"};this.Ma={name:"media-source"};this.ye={name:"drm-engine"};this.$={name:"load"};this.Xe={name:"src-equals-drm-engine"};this.Ya={name:"src-equals"};var d=new Map;d.set(this.X,function(e,
|
|
391
|
+
f){return $e(xl(c,e,f))});d.set(this.P,function(e){e.O&&(c.gb.Sc(),e.O=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return $e(e)});d.set(this.aa,function(e){return $e(yl(c,e))});d.set(this.Ma,function(e){e=zl(c,e);return $e(e)});d.set(this.We,function(e,f){var g=Al(c,e,f);return $e(g)});d.set(this.Ve,function(e){return Bl(c,e)});d.set(this.ye,function(e){e=Cl(c,e);return $e(e)});d.set(this.$,function(e,f){return $e(Dl(c,e,f))});d.set(this.Xe,function(e,f){var g=El(c,e,f);return $e(g)});d.set(this.Ya,
|
|
392
|
+
function(e,f){return Fl(c,e,f)});this.ma=new qk(this.P,{Eg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.O!=h.O?c.P:g==c.X?c.X:g==c.Ma||g==c.$?c.Ma:g==c.Ya?c.Xe:null);e==c.Ma&&(k=g==c.$&&f.O==h.O?c.We:c.aa);e==c.We&&(k=Gl(c.$,c.Ve,c.aa,g,f,h));e==c.Ve&&(k=Gl(c.$,c.ye,c.aa,g,f,h));e==c.ye&&(k=Gl(c.$,c.$,c.aa,g,f,h));e==c.Xe&&(k=g==c.Ya&&f.O==h.O?c.Ya:c.aa);if(e==c.$||e==c.Ya)k=c.aa;e==c.aa&&(k=h.O&&f.O==h.O?c.X:c.P);return k},ig:function(e,f,g){c.dispatchEvent(Hl("onstatechange",
|
|
393
|
+
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return I(function(f){return 1==f.g?u(f,yl(c,e),2):f["return"](e.O?c.X:c.P)})},Yg:function(e){c.dispatchEvent(Hl("onstateidle",(new Map).set("state",e.name)))}});this.Uf=new P(function(){ae(c.i.variants,c.h.restrictions,c.Bc)&&Il(c)});a&&this.yc(a,!0)}qa(S,fb);function Hl(a,b){return new M(a,b)}q=S.prototype;
|
|
394
|
+
q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.l==Jl)return c["return"]();a.l=Jl;b=vk(a.ma,function(){return{node:a.P,payload:rk(),Kb:!1}});return u(c,new Promise(function(d){b.jc=function(){};b.yd=function(){d()};b.Qb=function(){d()};b.onError=function(){d()};b.Bd=function(){d()}}),2);case 2:return u(c,a.ma.destroy(),3);case 3:a.vd&&(a.vd.release(),a.vd=null);a.gb&&(a.gb.release(),a.gb=null);a.B&&(a.B.release(),a.B=null);a.ue=null;a.C=null;a.h=null;a.A=null;a.qd=null;
|
|
394
395
|
a.S=null;if(!a.H){c.D(4);break}return u(c,a.H.destroy(),5);case 5:a.H=null;case 4:fb.prototype.release.call(a),A(c)}})};
|
|
395
|
-
function Kl(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Vc("Trident/"))return!1;var a=$c();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Qc()?!0:
|
|
396
|
+
function Kl(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Vc("Trident/"))return!1;var a=$c();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Qc()?!0:Sc("application/x-mpegurl")}
|
|
396
397
|
q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==Jl)return Promise.reject(Ll());var c=rk();c.O=a;Qc()||(b=!1);var d=b?this.Ma:this.X,e=vk(this.ma,function(){return{node:d,payload:c,Kb:!1}});e.jc=function(){};return Ml(e)};q.detach=function(){var a=this;if(this.l==Jl)return Promise.reject(Ll());var b=vk(this.ma,function(){return{node:a.P,payload:rk(),Kb:!1}});b.jc=function(){};return Ml(b)};
|
|
397
|
-
q.
|
|
398
|
-
q.load=function(a,b,c){var d=this;this.Hc=null;if(this.l==Jl)return Promise.reject(Ll());this.dispatchEvent(Hl("loading"));var e=rk();e.uri=a;e.
|
|
399
|
-
g.Qb=function(){return k(Ll())};g.onError=function(l){return k(l)}})};function Nl(a,b){if(!Qc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ah(d),c=Pl[c]);if(c){if(""==(b.O||Tc()).canPlayType(c))return!1;if(!Qc()||!(c in $g||ah(d)in bh)||a.h.streaming.preferNativeHls)return!0;if(Yc())return a.h.streaming.useNativeHlsOnSafari}return!1}function xl(a,b,c){null==b.O&&(b.O=c.O,a.
|
|
400
|
-
function yl(a,b){var c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return a.l!=Jl&&(a.l=tl),c=a.
|
|
401
|
-
a.j.destroy(),8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.F&&(a.F.release(),a.F=null);if(!a.K){n.D(9);break}return u(n,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.O||!b.O.src){n.D(11);break}return u(n,new Promise(function(p){return(new P(p)).T(.1)}),12);case 12:for(b.O.removeAttribute("src"),b.O.load();b.O.lastChild;)b.O.removeChild(b.O.firstChild);case 11:if(!a.m){n.D(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.
|
|
402
|
-
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.A=new sl;a.
|
|
403
|
-
function zl(a,b){var c,d,e,f,g,h;return I(function(k){if(1==k.g)return c=new oi,d=a.h.textDisplayFactory,e=d(),a.
|
|
404
|
-
function Al(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.
|
|
405
|
-
function Bl(a,b){var c=b.uri,d=a.H;a.
|
|
398
|
+
q.Te=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Jl)return Promise.reject(Ll());Qc()||(a=!1);var c=rk(),d=vk(this.ma,function(e){var f=e.O&&a?b.Ma:e.O?b.X:b.P;c.O=e.O;return{node:f,payload:c,Kb:!1}});d.jc=function(){};return Ml(d)};q.Ah=function(a){this.Hc=a};
|
|
399
|
+
q.load=function(a,b,c){var d=this;this.Hc=null;if(this.l==Jl)return Promise.reject(Ll());this.dispatchEvent(Hl("loading"));var e=rk();e.uri=a;e.Ne=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Nl(this,e)?this.Ya:this.$,g=vk(this.ma,function(h){if(null==h.O)return null;e.O=h.O;return{node:f,payload:e,Kb:!0}});this.A=new sl;this.S=Ol(this);g.jc=function(){};return new Promise(function(h,k){g.Bd=function(){return k(new O(2,7,7002))};g.yd=function(){h();d.dispatchEvent(Hl("loaded"))};
|
|
400
|
+
g.Qb=function(){return k(Ll())};g.onError=function(l){return k(l)}})};function Nl(a,b){if(!Qc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ah(d),c=Pl[c]);if(c){if(""==(b.O||Tc()).canPlayType(c))return!1;if(!Qc()||!(c in $g||ah(d)in bh)||a.h.streaming.preferNativeHls)return!0;if(Yc())return a.h.streaming.useNativeHlsOnSafari}return!1}function xl(a,b,c){null==b.O&&(b.O=c.O,a.gb.o(b.O,"error",function(){var d=Ql(a);d&&Rl(a,d)}));a.g=b.O;return Promise.resolve()}
|
|
401
|
+
function yl(a,b){var c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return a.l!=Jl&&(a.l=tl),c=a.eb.map(function(p){return p()}),a.eb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Hl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.O&&a.B.Sc();a.Uf.stop();a.Xa&&(a.Xa.release(),a.Xa=null);a.sd&&(a.sd.stop(),a.sd=null);if(!a.J){n.D(3);break}return u(n,a.J.stop(),4);case 4:a.J=null,a.xd=null;case 3:if(!a.C){n.D(5);break}return u(n,a.C.stop(),5);case 5:if(!a.j){n.D(7);break}return u(n,
|
|
402
|
+
a.j.destroy(),8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.F&&(a.F.release(),a.F=null);if(!a.K){n.D(9);break}return u(n,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.O||!b.O.src){n.D(11);break}return u(n,new Promise(function(p){return(new P(p)).T(.1)}),12);case 12:for(b.O.removeAttribute("src"),b.O.load();b.O.lastChild;)b.O.removeChild(b.O.firstChild);case 11:if(!a.m){n.D(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.fb=null;a.N=null;if(a.i){d=
|
|
403
|
+
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.A=new sl;a.Se=null;Sl(a);A(n)}})}
|
|
404
|
+
function zl(a,b){var c,d,e,f,g,h;return I(function(k){if(1==k.g)return c=new oi,d=a.h.textDisplayFactory,e=d(),a.Se=d,f=Tl(b.O,c,e,function(l,m,n){l=r(l);for(var p=l.next();!p.done;p=l.next())if(p=p.value,p.data&&p.cueTime&&p.frames){for(var t=p.cueTime+m,w=n,y=r(p.frames),x=y.next();!x.done;x=y.next())Ul(a,t,w,"ID3",x.value);if(a.G)a.G.onHlsTimedMetadata(p,t)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.H=h,u(k,f.I,2);a.K=f;A(k)})}
|
|
405
|
+
function Al(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.fb=d,f=a,u(h,Zg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.xd=h.h;a.J=a.xd();g=cf(a.h.manifest);c.O&&"AUDIO"===c.O.nodeName&&(g.disableVideo=!0);a.J.configure(g);A(h)})}
|
|
406
|
+
function Bl(a,b){var c=b.uri,d=a.H;a.Ed=new Hj(function(){return a.Ia()});a.Ed.addEventListener("regionadd",function(g){g=g.region;Vl(a,"timelineregionadded",g);if(a.G)a.G.onDashTimedMetadata(g)});a.ea=null;a.h.streaming.observeQualityChanges&&(a.ea=new Dj(function(){return a.jb()}),a.ea.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,
|
|
406
407
|
height:h.height,mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Hl("mediaqualitychanged",h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.S;try{k.g.enabled&&(k.A=h.format,Wk(k,g,{ot:Zk,su:!k.i}))}catch(l){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Mk(a.S,g,h)},filter:function(g){return Wl(a,g)},makeTextStreamsForClosedCaptions:function(g){return Xl(a,
|
|
407
|
-
g)},onTimelineRegionAdded:function(g){var h=a.
|
|
408
|
+
g)},onTimelineRegionAdded:function(g){var h=a.Ed;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new M("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Rl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
|
|
408
409
|
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()}},f=Date.now()/1E3;return new We(function(){var g,h,k,l;return I(function(m){if(1==m.g)return g=a,u(m,a.J.start(c,e),2);g.i=m.h;h=Hl("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036);Yl(a.i);k=Date.now()/1E3;l=k-f;a.A.H=l;A(m)})}(),function(){return a.J.stop()})}
|
|
409
|
-
function Cl(a,b){var c,d;return I(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Zl(a,{Pb:a.H,onError:function(f){Rl(a,f)},
|
|
410
|
-
function Dl(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,w;return I(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Hc&&(b.startTime=a.Hc,a.Hc=null);d=b.O;e=b.uri;a.
|
|
411
|
-
(a.
|
|
412
|
-
a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=im(a);a.j.configure(a.h.streaming);a.l=jm;d.textTracks&&a.B.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":km(a,x)}});a.dispatchEvent(Hl("streaming"));l=null;if(m=a.Qa().find(function(x){return x.active})){y.D(2);break}l=Il(a);em(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n=a.F.dd();return u(y,lm(l,n),4);case 4:p=y.h,a.F
|
|
413
|
-
null,pe(l));case 2:return t=a.Ab().find(function(x){return x.active}),t||((w=ze(a.i.textStreams,a.za,a.wb,a.
|
|
414
|
-
c.
|
|
415
|
-
function El(a,b,c){var d,e,f,g,h,k,l;return I(function(m){return 1==m.g?(d=Jb,e=Date.now()/1E3,f=!0,a.m=Zl(a,{Pb:a.H,onError:function(n){Rl(a,n)},
|
|
410
|
+
function Cl(a,b){var c,d;return I(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Zl(a,{Pb:a.H,onError:function(f){Rl(a,f)},zd:function(f){$l(a,f)},onExpirationUpdated:function(f,g){am(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.A.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,tg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.yc(b.O),3):u(e,Wl(a,a.i),0)})}
|
|
411
|
+
function Dl(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,w;return I(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Hc&&(b.startTime=a.Hc,a.Hc=null);d=b.O;e=b.uri;a.fb=e;a.I=new zj({od:function(){return d.playbackRate},ld:function(){return d.defaultPlaybackRate},Ie:function(x){d.playbackRate=x},Ef:function(x){d.currentTime+=x}});f=function(){return bm(a)};g=function(){return cm(a)};a.B.o(d,"playing",f);a.B.o(d,"pause",f);a.B.o(d,"ended",f);a.B.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.ue==h||
|
|
412
|
+
(a.ue=h,a.C=h(),a.C.configure(a.h.abr));a.ya=new Le(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.za=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.hb=a.h.preferForcedSubs;dm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(x,v,D){a.j&&x!=a.j.l&&em(a,x,!0,void 0===v?!1:v,void 0===D?0:D)});a.F=fm(a,b.startTime);a.Xa=gm(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);hm(a,k);Nd(a.i,a.h.preferredVideoCodecs,
|
|
413
|
+
a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=im(a);a.j.configure(a.h.streaming);a.l=jm;d.textTracks&&a.B.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":km(a,x)}});a.dispatchEvent(Hl("streaming"));l=null;if(m=a.Qa().find(function(x){return x.active})){y.D(2);break}l=Il(a);em(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n=a.F.dd();return u(y,lm(l,n),4);case 4:p=y.h,a.F.be(p);case 3:mm(a,
|
|
414
|
+
null,pe(l));case 2:return a.F.ae(),t=a.Ab().find(function(x){return x.active}),t||((w=ze(a.i.textStreams,a.za,a.wb,a.hb)[0]||null)&&rl(a.A.h,w,!0),l&&(w?(l.audio&&nm(a,l.audio,w)&&(a.ba=!0),a.ba&&a.K.m.setTextVisibility(!0),om(a)):a.ba=!1),w&&(a.h.streaming.alwaysStreamText||a.Ob())&&ak(a.j,w)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.C.enable(),pm(a)),de(a.j?a.j.l:null,a.i),qm(a.i),rm(a),sm(a),a.i.variants.some(function(x){return x.primary}),a.B.Fa(d,"loadedmetadata",function(){a.A.m=Date.now()/
|
|
415
|
+
1E3-c.Ne}),A(y)}})}
|
|
416
|
+
function El(a,b,c){var d,e,f,g,h,k,l;return I(function(m){return 1==m.g?(d=Jb,e=Date.now()/1E3,f=!0,a.m=Zl(a,{Pb:a.H,onError:function(n){Rl(a,n)},zd:function(n){$l(a,n)},onExpirationUpdated:function(n,p){am(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.A.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=ah(g),k=Pl[h],"application/x-mpegurl"==k&&Yc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,primary:!1,
|
|
416
417
|
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?Ad(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ja,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
417
418
|
a.m.X=!0,u(m,tg(a.m,[l],[]),2)):u(m,a.m.yc(b.O),0)})}
|
|
418
|
-
function Fl(a,b,c){function d(){return bm(a)}b.uri=c.uri;b.startTime=c.startTime;a.
|
|
419
|
-
e.preload&&a.B.Fa(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.
|
|
420
|
-
"change",function(){return rm(a)}));var g=ah(b.uri);e.src=Xk(a.S,b.uri,Pl[g]);(Wc()||Vc("Web0S"))&&e.load();a.l=um;a.dispatchEvent(Hl("streaming"));var h=new Nc;fj(e,HTMLMediaElement.HAVE_METADATA,a.B,function(){h.resolve()});fj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.B,function(){var k;return I(function(l){if(1==l.g)return vm(a),k=wm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):u(l,new Promise(function(m){a.B.Fa(e.textTracks,"change",m);(new P(m)).T(1)}),2);if(f)return l["return"]();
|
|
421
|
-
A(l)})});e.error?h.reject(Ql(a)):"none"==e.preload&&(Ua('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.B.Fa(e,"error",function(){h.reject(Ql(a))});return new We(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})}
|
|
422
|
-
function vm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.
|
|
423
|
-
function tm(a,b){if("metadata"==b.kind){b.mode="hidden";a.B.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ul(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new P(function(){var d=ym(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).xa().T(.5);a.
|
|
424
|
-
function Ul(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Hl("metadata",b))}function km(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).xa().T(.5);a.
|
|
419
|
+
function Fl(a,b,c){function d(){return bm(a)}b.uri=c.uri;b.startTime=c.startTime;a.fb=b.uri;var e=b.O;a.F=new oj(e);var f=!1;a.eb.push(function(){f=!0});null!=b.startTime&&a.F.be(b.startTime);a.I=new zj({od:function(){return e.playbackRate},ld:function(){return e.defaultPlaybackRate},Ie:function(k){e.playbackRate=k},Ef:function(k){e.currentTime+=k}});hm(a,a.h.streaming.rebufferingGoal);a.B.o(e,"playing",d);a.B.o(e,"pause",d);a.B.o(e,"ended",d);a.B.o(e,"ratechange",function(){return cm(a)});"none"!=
|
|
420
|
+
e.preload&&a.B.Fa(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.Ne});e.audioTracks&&(a.B.o(e.audioTracks,"addtrack",function(){return rm(a)}),a.B.o(e.audioTracks,"removetrack",function(){return rm(a)}),a.B.o(e.audioTracks,"change",function(){return rm(a)}));e.textTracks&&(a.B.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":tm(a,k);break;case "chapters":km(a,k);break;default:rm(a)}}),a.B.o(e.textTracks,"removetrack",function(){return rm(a)}),a.B.o(e.textTracks,
|
|
421
|
+
"change",function(){return rm(a)}));var g=ah(b.uri);e.src=Xk(a.S,b.uri,Pl[g]);(Wc()||Vc("Web0S"))&&e.load();a.l=um;a.dispatchEvent(Hl("streaming"));var h=new Nc;fj(e,HTMLMediaElement.HAVE_METADATA,a.B,function(){a.F.ae();h.resolve()});fj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.B,function(){var k;return I(function(l){if(1==l.g)return vm(a),k=wm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):u(l,new Promise(function(m){a.B.Fa(e.textTracks,"change",m);(new P(m)).T(1)}),2);if(f)return l["return"]();
|
|
422
|
+
xm(a);A(l)})});e.error?h.reject(Ql(a)):"none"==e.preload&&(Ua('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.B.Fa(e,"error",function(){h.reject(Ql(a))});return new We(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})}
|
|
423
|
+
function vm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Hd(b);var c=a.h.preferredVariantRole;""!=c&&a.Hd(b,c)}}function xm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Be(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Be(b,d,c)}}
|
|
424
|
+
function tm(a,b){if("metadata"==b.kind){b.mode="hidden";a.B.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ul(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new P(function(){var d=ym(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).xa().T(.5);a.eb.push(function(){c.stop()})}}
|
|
425
|
+
function Ul(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Hl("metadata",b))}function km(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).xa().T(.5);a.eb.push(function(){c.stop()})}}function Yl(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 Zl(a,b){return new kg(b,a.h.drm.updateExpirationTime)}
|
|
425
426
|
function vl(a){return new gf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Hl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Hl("downloadfailed",b))})}
|
|
426
|
-
function fm(a,b){return new pj(a.g,a.i,a.h.streaming,b,function(){a.
|
|
427
|
-
function gm(a){var b=new Ij(a.
|
|
427
|
+
function fm(a,b){return new pj(a.g,a.i,a.h.streaming,b,function(){a.Xa&&Cj(a.Xa,!0);a.j&&a.j.Tc();a.N&&zm(a)},function(c){return a.dispatchEvent(c)})}
|
|
428
|
+
function gm(a){var b=new Ij(a.Ed);b.addEventListener("enter",function(d){Vl(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Vl(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Vl(a,"timelineregionenter",e),Vl(a,"timelineregionexit",e))});var c=new Bj(a.g);c.g.add(b);a.ea&&c.g.add(a.ea);return c}function hm(a,b){a.N=new Pe;a.N.g=Re;Se(a.N,b,Math.min(.5,b/2));Sl(a);a.sd=(new P(function(){zm(a)})).ka(.25)}
|
|
428
429
|
function zm(a){switch(a.l){case um:if(a.g.ended)var b=!0;else{var c=wi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case jm:a:if(a.g.ended||Hi(a.K))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Jb();var d=wi(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=yi(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Qe:Re;c.g=d;b!=d&&Sl(a)}function Tl(a,b,c,d){return new Bi(a,b,c,d)}
|
|
429
|
-
function Ol(a){return new Lk({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},
|
|
430
|
-
function im(a){return new Oj(a.i,{nd:function(){return a.F.dd()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Mk(a.S,b,c)},V:a.K,Pb:a.H,onError:function(b){return Rl(a,b)},onEvent:function(b){return a.dispatchEvent(b)}
|
|
430
|
+
function Ol(a){return new Lk({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},jb:function(){return a.jb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Qa:function(){return a.Qa()},zb:function(){return a.zb()},U:function(){return a.U()}},a.h.cmcd)}
|
|
431
|
+
function im(a){return new Oj(a.i,{nd:function(){return a.F.dd()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Mk(a.S,b,c)},V:a.K,Pb:a.H,onError:function(b){return Rl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},$g:function(){a.J&&a.J.update&&a.J.update()},se:function(){a.F&&a.F.Ff();zm(a)},Zg:function(b,c){var d=c.me;d&&a.ea&&Fj(a.ea,d,b)},df:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){for(var e=
|
|
431
432
|
new Of(Gc(c)),f=0,g=r(e.data),h=g.next();!h.done;h=g.next())f+=h.value.length;if(0==f)d=Promise.resolve();else{f=new Uint8Array(f);g=0;e=r(e.data);for(h=e.next();!h.done;h=e.next())h=h.value,f.set(h,g),g+=h.length;Cg(d,"cenc",f);d=d.A}}else d=Promise.resolve();return d}})}
|
|
432
433
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=gl(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=ll(this.h,a,ul(this));Am(this);return c};
|
|
433
|
-
function Am(a){if(a.J){var b=cf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Bm(a,a.i)}catch(f){Rl(a,f)}a.C&&sm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Cm(a)}a.H&&a.H.
|
|
434
|
-
c);a.
|
|
435
|
-
q.
|
|
434
|
+
function Am(a){if(a.J){var b=cf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Bm(a,a.i)}catch(f){Rl(a,f)}a.C&&sm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Cm(a)}a.H&&a.H.Ge(a.h.streaming.forceHTTPS);if(a.K&&(a.K.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Se!=b)){var c=b(),d=a.K,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
|
|
435
|
+
c);a.Se=b;a.j&&(b=a.j,(c=b.i.get(Ib))&&Yj(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),pm(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Se(a.N,b,Math.min(.5,b/2)));a.i&&dm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=ul(this);ll(a,this.h,ul(this));return a};
|
|
436
|
+
q.lg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ia().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.kh=function(){for(var a in this.h)delete this.h[a];ll(this.h,ul(this),ul(this));Am(this)};q.wf=function(){return this.l};q.Dg=function(){return this.g};q.Ec=function(){return this.H};q.ee=function(){return this.fb};
|
|
436
437
|
q.kd=function(){return this.G?this.G:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Mb=function(){return this.i?this.i.presentationTimeline.Mb():!1};q.ec=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
437
|
-
q.Ia=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.cc(),end:a.
|
|
438
|
-
q.Kc=function(){return this.N?this.N.g==Re:!1};q.zb=function(){return this.g?this.I?this.I.i:1:0};q.
|
|
438
|
+
q.Ia=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.cc(),end:a.kb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Og=function(){this.U()&&(this.g.currentTime=this.Ia().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Dc=function(){return this.m?this.m.Dc():Infinity};q.md=function(){return this.m?this.m.md():{}};
|
|
439
|
+
q.Kc=function(){return this.N?this.N.g==Re:!1};q.zb=function(){return this.g?this.I?this.I.i:1:0};q.Re=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==jm&&(this.C.playbackRateChanged(a),Xj(this.j,1<Math.abs(a))))};q.gf=function(){var a=this.I.ld();this.l==um&&this.I.set(a);this.l==jm&&(this.I.set(a),this.C.playbackRateChanged(a),Xj(this.j,!1))};
|
|
439
440
|
q.Qa=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,xe(e)){var f=pe(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return we(g)}):[]};
|
|
440
|
-
q.Ab=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=qe(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?wm(this).map(function(f){return ue(f)}):[]};q.
|
|
441
|
-
q.
|
|
441
|
+
q.Ab=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=qe(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?wm(this).map(function(f){return ue(f)}):[]};q.vg=function(){return this.i?this.i.imageStreams.map(function(a){return re(a)}):[]};
|
|
442
|
+
q.Kg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,w,y,x,v,D,z,C;return I(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.D(3):u(G,d.createSegmentIndex(),3):G["return"](null):G.D(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;
|
|
442
443
|
w=m*n;y=f.j-f.startTime;x=f.l||y/w;v=f.startTime;z=D=0;1<w&&(C=Math.floor((b-f.startTime)/x),v=f.startTime+C*x,D=C%m*p,z=Math.floor(C/m)*t);return G["return"]({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:z,startTime:v,duration:x,uris:f.Pa(),width:p})}return G["return"](null)})};
|
|
443
|
-
q.
|
|
444
|
-
q.
|
|
445
|
-
se(c)==a.id){Em(this,c);break}};q.
|
|
446
|
-
q.
|
|
444
|
+
q.Ce=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(rl(this.A.h,b,!1),ak(this.j,b),Dm(this),this.za=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=wm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,se(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";Dm(this)}};
|
|
445
|
+
q.De=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("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&&xe(d)&&(em(this,d,!1,b,c),this.ya=new Ke(d),sm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
446
|
+
se(c)==a.id){Em(this,c);break}};q.kg=function(){return Fm(this.Qa())};q.Jg=function(){return Fm(this.Ab())};q.jg=function(){return Array.from(Gm(this.Qa()))};q.Ig=function(){return Array.from(Gm(this.Ab()))};
|
|
447
|
+
q.Hd=function(a,b){if(this.i&&this.F){this.ya=new Le(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.ya.create(this.i.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=pe(f),this.De(c,!0)):Cm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Mb(a);f=d=null;e=
|
|
447
448
|
r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=we(g);Mb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Em(this,f):d&&Em(this,d)}};
|
|
448
|
-
q.
|
|
449
|
-
q.
|
|
450
|
-
q.
|
|
449
|
+
q.Be=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.za=a,this.wb=b||"",this.hb=c,(a=ze(this.i.textStreams,this.za,this.wb,this.hb)[0]||null)&&a!=this.j.A&&(rl(this.A.h,a,!1),this.h.streaming.alwaysStreamText||this.Ob()))ak(this.j,a),Dm(this)}else{var d=Mb(a);(a=this.Ab().find(function(e){return Mb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Ce(a)}};
|
|
450
|
+
q.nh=function(a){if(this.i&&this.F){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ya=new Le(b.language,"",0,a),Cm(this))}};q.Ob=function(){var a=this.ba;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?wm(this).some(function(b){return"showing"==b.mode}):a};q.uf=function(){return this.g&&this.g.src&&this.g.textTracks?Hm(this).map(function(a){return ue(a)}):[]};
|
|
451
|
+
q.ng=function(a){var b=Mb(a),c=Hm(this).filter(function(g){return Mb(g.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.id;f&&""!=f||(f=e.startTime+"-"+e.endTime+"-"+e.text);a.push({id:f,title:e.text,startTime:e.startTime,endTime:e.endTime})}}return a};
|
|
451
452
|
function wm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function ym(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Hm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
452
|
-
q.
|
|
453
|
-
q.
|
|
454
|
-
q.
|
|
453
|
+
q.Le=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==jm)this.K.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ze(this.i.textStreams,this.za,this.wb,this.hb),0<a.length&&(ak(this.j,a[0]),Dm(this))):Wj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=wm(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")}om(this)}};
|
|
454
|
+
q.Fg=function(){if(!this.U())return null;var a=this.ma.l,b=0;if(this.F)b=this.F.dd();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
455
|
+
q.xf=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.jb=function(){if(this.l==jm)return this.K.jb();var a={total:[],audio:[],video:[],text:[]};this.l==um&&(a.total=zi(this.g.buffered));return a};
|
|
455
456
|
q.getStats=function(){if(this.l!=jm&&this.l!=um)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:[]};bm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.A;b=
|
|
456
|
-
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.A.P=this.F.
|
|
457
|
+
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.A.P=this.F.Ye(),this.A.S=this.F.Ze());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.A;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.K=d;this.A.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.A.B=c;if(this.l==jm){if(c=this.j.l)this.A.F=(this.I?this.I.i:1)*c.bandwidth;c&&c.video&&(b=this.A,d=c.video.height||NaN,b.A=c.video.width||NaN,b.l=d);this.U()&&(c=this.xf().valueOf()+
|
|
457
458
|
1E3*this.Ia().end,this.A.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.A.I=this.i.presentationTimeline.g);c=this.C.getBandwidthEstimate();this.A.C=c}this.l==um&&(c=this.A,b=a.videoHeight||NaN,c.A=a.videoWidth||NaN,c.l=b);var e=this.A;a=e.A;c=e.l;b=e.F;d=e.K;var f=e.N,g=e.J,h=e.S,k=e.P,l=e.C,m=e.i,n=e.m,p=e.H,t=e.j,w=ol(e.g,"playing"),y=ol(e.g,"paused"),x=ol(e.g,"buffering"),v=e.B,D=e.G,z=e.I,C=pl(e.g),G=[];e=r(e.h.g);for(var E=e.next();!E.done;E=e.next())E=E.value,G.push({timestamp:E.timestamp,
|
|
458
459
|
id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:t,playTime:w,pauseTime:y,bufferingTime:x,licenseTime:v,liveLatency:D,maxSegmentDuration:z,stateHistory:C,switchHistory:G}};
|
|
459
|
-
q
|
|
460
|
-
Jb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new O(1,4,4033);if(!k.length){z.D(6);break}return u(z,Km(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,w=Lm(h,t,d,k),y=new Blob([w],{type:"text/vtt"}),a=Ei(y),d="text/vtt";case 6:x={id:h.
|
|
460
|
+
q.$f=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,w,y,x,v,D;return I(function(z){switch(z.g){case 1:if(h.l!=jm&&h.l!=um)throw new O(1,7,7004);if(d){z.D(2);break}return u(z,Im(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(C){}if(h.l!=um){z.D(4);break}g&&(c="forced");return u(z,Jm(h,a,b,c,d,f||"",k),5);case 5:l=h.Ab();if(m=l.find(function(C){return C.language==b&&C.label==(f||"")&&C.kind==c}))return rm(h),z["return"](m);throw new O(1,2,2012);case 4:n=
|
|
461
|
+
Jb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new O(1,4,4033);if(!k.length){z.D(6);break}return u(z,Km(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,w=Lm(h,t,d,k),y=new Blob([w],{type:"text/vtt"}),a=Ei(y),d="text/vtt";case 6:x={id:h.Vf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:xj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ha,primary:!1,trickModeVideo:null,
|
|
461
462
|
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};v=wd(x.mimeType,x.codecs);D=Cd(v);if(!D)throw new O(2,2,2014,d);h.i.textStreams.push(x);rm(h);return z["return"](qe(x))}})};
|
|
462
|
-
q.
|
|
463
|
+
q.Zf=function(a,b,c){var d=this,e,f,g,h;return I(function(k){switch(k.g){case 1:if(d.l!=jm&&d.l!=um)throw new O(1,7,7004);if(c){k.D(2);break}return u(k,Im(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return u(k,Jm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.uf();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return u(k,new Promise(function(l,m){d.B.Fa(f,"load",l);d.B.Fa(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return k["return"](h);
|
|
463
464
|
case 5:throw new O(1,2,2012);}})};function Im(a,b){var c,d;return I(function(e){switch(e.g){case 1:c=ah(b);if(d=Mm[c])return e["return"](d);B(e,2);return u(e,ch(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new O(1,2,2011,c);}})}
|
|
464
465
|
function Jm(a,b,c,d,e,f,g){var h,k,l,m;return I(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Km(a,b,a.H,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=Lm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ei(l),e="text/vtt");m=document.createElement("track");var p=a.S,t=b;try{if(p.g.enabled){var w=Yk(p);w.ot=dl;w.su=!0;var y=$k(w);var x=al(t,y)}else x=t}catch(v){Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",v),x=t}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
465
466
|
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}function Km(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){e=rf;f=lf([b],d);f.method="GET";var k=a.S;try{k.g.enabled&&Wk(k,f,{ot:dl,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}
|
|
466
|
-
function Lm(a,b,c,d){var e=
|
|
467
|
-
q.
|
|
468
|
-
function ul(a){var b=jl();b.streaming.failureCallback=function(c){var d=
|
|
469
|
-
function Xl(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 yj;h={id:a.
|
|
467
|
+
function Lm(a,b,c,d){var e=Dd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Gc(b),b=c.parseMedia(b,a),Kk(b,d);throw new O(2,2,2014,c);}q.He=function(a,b){this.Bc.width=a;this.Bc.height=b};q.xe=function(a){if(this.l==jm){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Ic&&(d.Ic=!1,Vj(b,d,a));b=!0}}else b=!1;return b};
|
|
468
|
+
q.Ag=function(){Ua("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.Bg=function(){return this.xd};
|
|
469
|
+
function ul(a){var b=jl();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.xe(d))}};b.textDisplayFactory=function(){return a.qd?new Dk(a.g,a.qd):new xk(a.g)};return b}q.Me=function(a){this.qd=a};
|
|
470
|
+
function Xl(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 yj;h={id:a.Vf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
470
471
|
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function Wl(a,b){return I(function(c){if(1==c.g)return u(c,Nm(a,b),2);Bm(a,b);A(c)})}
|
|
471
472
|
function Nm(a,b){var c;return I(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,be(c,b),2);qm(b);A(d)})}
|
|
472
473
|
function Bm(a,b){if(a.l!=Jl){ae(b.variants,a.h.restrictions,a.Bc)&&a.j&&rm(a);var c=a.m?a.m.g:null;if(c&&a.m.C)for(var d=r(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=r(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,Cg(a.m,g.initDataType,g.initData)}}Om(a,b)}}
|
|
@@ -476,30 +477,30 @@ function sm(a){try{Om(a,a.i)}catch(c){return Rl(a,c),!1}var b=a.i.variants.filte
|
|
|
476
477
|
function em(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Zj(a.j,b,d,e,!0);else{var g=a.A.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Zj(a.j,b,d,e,void 0,c);d=null;f&&(d=pe(f));b=pe(b);c?mm(a,d,b):Pm(a,d,b)}}function Em(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=we(c);var d=we(b);Pm(a,c,d)}
|
|
477
478
|
function nm(a,b,c){a=Mb(a.h.preferredTextLanguage);b=Mb(b.language);c=Mb(c.language);return Lb(c,a)&&!Lb(b,c)}function mm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Hl("adaptation",b);Qm(a,b)}function rm(a){var b=Hl("trackschanged");Qm(a,b)}function Pm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Hl("variantchanged",b);Qm(a,b)}function Dm(a){var b=Hl("textchanged");Qm(a,b)}function om(a){var b=Hl("texttrackvisibility");Qm(a,b)}
|
|
478
479
|
function pm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Qm(a,Hl("abrstatuschanged",b))}
|
|
479
|
-
function Rm(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;for(var d=a.Qa().find(function(h){return h.active}),e=a.i,f=r(e.variants),g=f.next();!g.done;g=f.next())g=g.value,g.id===d.id&&(g.disabledUntilTime=Date.now()/1E3+c);ae(e.variants,a.h.restrictions,a.Bc);d=Il(a);if(!d)return!1;e=a.
|
|
480
|
+
function Rm(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;for(var d=a.Qa().find(function(h){return h.active}),e=a.i,f=r(e.variants),g=f.next();!g.done;g=f.next())g=g.value,g.id===d.id&&(g.disabledUntilTime=Date.now()/1E3+c);ae(e.variants,a.h.restrictions,a.Bc);d=Il(a);if(!d)return!1;e=a.jb().video.reduce(function(h,k){return h+k.end-k.start},0);em(a,d,!1,!0,e);a.Uf.T(c);return!0}
|
|
480
481
|
function Rl(a,b){if(a.l!=Jl)if(Rm(a,b))b.handled=!0;else{var c=Hl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Vl(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(Hl(b,c))}
|
|
481
482
|
function Ql(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new O(2,3,3016,b,c,a.g.error.message)}
|
|
482
483
|
function $l(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&&!Sm.includes(l)}h!=f.allowedByKeySystem&&
|
|
483
|
-
(e=!0)}}}if(!e||sm(a))(d=a.j.l)&&!d.allowedByKeySystem&&Cm(a),e&&rm(a)}}function am(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=Hl("expirationupdated");a.dispatchEvent(b)}function dm(a,b,c){0<b&&(a.U()||a.
|
|
484
|
+
(e=!0)}}}if(!e||sm(a))(d=a.j.l)&&!d.allowedByKeySystem&&Cm(a),e&&rm(a)}}function am(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=Hl("expirationupdated");a.dispatchEvent(b)}function dm(a,b,c){0<b&&(a.U()||a.Of(b));b=a.getDuration();c<b&&(a.U()||a.bb(c))}
|
|
484
485
|
function Om(a,b){var c=a.m?a.m.md():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?Sm.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
|
|
485
486
|
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function qm(a){if(!a.variants.some(xe))throw new O(2,4,4032);}function Qm(a,b){I(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Jl&&a.dispatchEvent(b);A(c)})}function Gm(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(Mb(c.language)):b.add("und");return b}
|
|
486
487
|
function Fm(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=Mb(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){for(var m=r(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
|
|
487
|
-
h.push({language:l,role:n,label:p})}});return h}function Ll(){return new O(2,7,7E3)}function Gl(a,b,c,d,e,f){return d==a&&e.O==f.O&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function rk(){return{O:null,mimeType:null,startTime:null,
|
|
488
|
-
S.prototype.getManifestParserFactory=S.prototype.
|
|
489
|
-
S.prototype.setTextTrackVisibility=S.prototype.
|
|
490
|
-
S.prototype.getAudioLanguagesAndRoles=S.prototype.
|
|
491
|
-
S.prototype.getExpiration=S.prototype.Dc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.
|
|
492
|
-
S.prototype.getLoadMode=S.prototype.
|
|
493
|
-
S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return I(function(h){if(1==h.g)return b={},a?u(h,Tg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Qc()){for(var l in $g)k[l]=!0;for(var m in bh)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]=Qc()?!!$g[n]:
|
|
494
|
-
Qc()?!!bh[p]:
|
|
495
|
-
k={};p=r(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Qc()?Cd(l)?!0:MediaSource.isTypeSupported(l)||rd(l):
|
|
488
|
+
h.push({language:l,role:n,label:p})}});return h}function Ll(){return new O(2,7,7E3)}function Gl(a,b,c,d,e,f){return d==a&&e.O==f.O&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function rk(){return{O:null,mimeType:null,startTime:null,Ne:NaN,uri:null}}function Ml(a){return new Promise(function(b,c){a.Qb=function(){return c(Ll())};a.yd=function(){return b()};a.onError=function(d){return c(d)};a.Bd=function(){return c(Ll())}})}K("shaka.Player",S);S.prototype.setVideoContainer=S.prototype.Me;
|
|
489
|
+
S.prototype.getManifestParserFactory=S.prototype.Bg;S.prototype.getManifest=S.prototype.Ag;S.prototype.retryStreaming=S.prototype.xe;S.prototype.setMaxHardwareResolution=S.prototype.He;S.prototype.addChaptersTrack=S.prototype.Zf;S.prototype.addTextTrackAsync=S.prototype.$f;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.jb;S.prototype.getPresentationStartTimeAsDate=S.prototype.xf;S.prototype.getPlayheadTimeAsDate=S.prototype.Fg;
|
|
490
|
+
S.prototype.setTextTrackVisibility=S.prototype.Le;S.prototype.getChapters=S.prototype.ng;S.prototype.getChaptersTracks=S.prototype.uf;S.prototype.isTextTrackVisible=S.prototype.Ob;S.prototype.selectVariantsByLabel=S.prototype.nh;S.prototype.selectTextLanguage=S.prototype.Be;S.prototype.selectAudioLanguage=S.prototype.Hd;S.prototype.getTextLanguages=S.prototype.Ig;S.prototype.getAudioLanguages=S.prototype.jg;S.prototype.getTextLanguagesAndRoles=S.prototype.Jg;
|
|
491
|
+
S.prototype.getAudioLanguagesAndRoles=S.prototype.kg;S.prototype.selectVariantTrack=S.prototype.De;S.prototype.selectTextTrack=S.prototype.Ce;S.prototype.getThumbnails=S.prototype.Kg;S.prototype.getImageTracks=S.prototype.vg;S.prototype.getTextTracks=S.prototype.Ab;S.prototype.getVariantTracks=S.prototype.Qa;S.prototype.cancelTrickPlay=S.prototype.gf;S.prototype.trickPlay=S.prototype.Re;S.prototype.getPlaybackRate=S.prototype.zb;S.prototype.isBuffering=S.prototype.Kc;S.prototype.getKeyStatuses=S.prototype.md;
|
|
492
|
+
S.prototype.getExpiration=S.prototype.Dc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.Og;S.prototype.seekRange=S.prototype.Ia;S.prototype.isAudioOnly=S.prototype.ec;S.prototype.isInProgress=S.prototype.Mb;S.prototype.isLive=S.prototype.U;S.prototype.getAdManager=S.prototype.kd;S.prototype.getAssetUri=S.prototype.ee;S.prototype.getNetworkingEngine=S.prototype.Ec;S.prototype.getMediaElement=S.prototype.Dg;
|
|
493
|
+
S.prototype.getLoadMode=S.prototype.wf;S.prototype.resetConfiguration=S.prototype.kh;S.prototype.getBufferFullness=S.prototype.lg;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.updateStartTime=S.prototype.Ah;S.prototype.unload=S.prototype.Te;S.prototype.detach=S.prototype.detach;S.prototype.attach=S.prototype.yc;
|
|
494
|
+
S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return I(function(h){if(1==h.g)return b={},a?u(h,Tg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Qc()){for(var l in $g)k[l]=!0;for(var m in bh)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]=Qc()?!!$g[n]:Sc(n);for(var p in l)k[p]=
|
|
495
|
+
Qc()?!!bh[p]:Sc(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",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ia(Zi));
|
|
496
|
+
k={};p=r(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Qc()?Cd(l)?!0:MediaSource.isTypeSupported(l)||rd(l):Sc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Tm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=Kl;S.setAdManagerFactory=function(a){wl=a};S.registerSupportPlugin=function(a,b){Tm[a]=b};S.prototype.destroy=S.prototype.destroy;var Jl=0,tl=1,jm=2,um=3;S.LoadMode={DESTROYED:Jl,NOT_LOADED:tl,MEDIA_SOURCE:jm,SRC_EQUALS:um};S.version="v4.1.7";
|
|
496
497
|
var Sm=["output-restricted","internal-error"],Tm={},wl=null,Pl={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"},Mm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
497
498
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function Um(){this.h=[];this.j=this.i=this.g=0};function Vm(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new uf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Vm.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
498
499
|
q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
|
|
499
500
|
q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
500
501
|
q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};K("shaka.ads.ClientSideAd",Vm);Vm.prototype.release=Vm.prototype.release;Vm.prototype.getPositionInSequence=Vm.prototype.getPositionInSequence;Vm.prototype.getSequenceLength=Vm.prototype.getSequenceLength;Vm.prototype.setMuted=Vm.prototype.setMuted;Vm.prototype.resize=Vm.prototype.resize;Vm.prototype.isLinear=Vm.prototype.isLinear;Vm.prototype.isMuted=Vm.prototype.isMuted;
|
|
501
502
|
Vm.prototype.setVolume=Vm.prototype.setVolume;Vm.prototype.getVolume=Vm.prototype.getVolume;Vm.prototype.play=Vm.prototype.play;Vm.prototype.pause=Vm.prototype.pause;Vm.prototype.skip=Vm.prototype.skip;Vm.prototype.canSkipNow=Vm.prototype.canSkipNow;Vm.prototype.getTimeUntilSkippable=Vm.prototype.getTimeUntilSkippable;Vm.prototype.isSkippable=Vm.prototype.isSkippable;Vm.prototype.isPaused=Vm.prototype.isPaused;Vm.prototype.getRemainingTime=Vm.prototype.getRemainingTime;
|
|
502
|
-
Vm.prototype.getMinSuggestedDuration=Vm.prototype.getMinSuggestedDuration;Vm.prototype.getDuration=Vm.prototype.getDuration;function Wm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new uf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.1.
|
|
503
|
+
Vm.prototype.getMinSuggestedDuration=Vm.prototype.getMinSuggestedDuration;Vm.prototype.getDuration=Vm.prototype.getDuration;function Wm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new uf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.1.7");this.g=null;this.h.Fa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Xm(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
503
504
|
function(f){Ym(e,f)});this.i.onended=function(){e.m.contentComplete()}}Wm.prototype.stop=function(){this.g&&this.g.stop();this.A&&Ck(this.A)};Wm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Ym(a,b){b.getError();Zm(a,null);a.l(new M("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
504
505
|
function Xm(a,b){a.l(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new M("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new M("ad-cue-points-changed",(new Map).set("cuepoints",d)))}$m(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,an(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
|
|
505
506
|
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,an(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,an(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,an(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
|
|
@@ -521,8 +522,8 @@ f;e.i(new M("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}dn.prototyp
|
|
|
521
522
|
function en(a,b){a.i(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function T(){fb.call(this);this.g=this.i=null;this.h=new Um;this.j=navigator.language}qa(T,fb);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.i&&this.i.release();this.i=new Wm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
522
523
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);fb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new M("ad-stopped"));this.h=new Um};q.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
|
|
523
524
|
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new dn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
524
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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.1.
|
|
525
|
-
(c.H=!0),c.j=new Nc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ua('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.1.
|
|
525
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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.1.7";c=this.g;var d=b;c.j?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
526
|
+
(c.H=!0),c.j=new Nc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ua('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.1.7";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.G};
|
|
526
527
|
q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};K("shaka.ads.AdManager",T);
|
|
527
528
|
T.prototype.onCueMetadataChange=T.prototype.onCueMetadataChange;T.prototype.onHlsTimedMetadata=T.prototype.onHlsTimedMetadata;T.prototype.onDashTimedMetadata=T.prototype.onDashTimedMetadata;T.prototype.getStats=T.prototype.getStats;T.prototype.getServerSideCuePoints=T.prototype.getServerSideCuePoints;T.prototype.replaceServerSideAdTagParameters=T.prototype.replaceServerSideAdTagParameters;T.prototype.requestServerSideStream=T.prototype.requestServerSideStream;T.prototype.initServerSide=T.prototype.initServerSide;
|
|
528
529
|
T.prototype.requestClientSideAds=T.prototype.requestClientSideAds;T.prototype.onAssetUnload=T.prototype.onAssetUnload;T.prototype.release=T.prototype.release;T.prototype.initClientSide=T.prototype.initClientSide;T.prototype.setLocale=T.prototype.setLocale;T.ADS_LOADED="ads-loaded";T.AD_STARTED="ad-started";T.AD_FIRST_QUARTILE="ad-first-quartile";T.AD_MIDPOINT="ad-midpoint";T.AD_THIRD_QUARTILE="ad-third-quartile";T.AD_COMPLETE="ad-complete";T.AD_STOPPED="ad-stopped";T.AD_SKIPPED="ad-skipped";
|
|
@@ -531,384 +532,386 @@ T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHAN
|
|
|
531
532
|
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(zi(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
|
|
532
533
|
function gn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=hn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
|
|
533
534
|
function hn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
534
|
-
var jn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),kn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ln=["loop","playbackRate"],mn=["pause","play"],nn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
m.code);for(n in m)p[n]=m[n];t.reject(p)}else t.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;
|
|
538
|
-
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.xa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.P,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(
|
|
539
|
-
|
|
540
|
-
function
|
|
541
|
-
q.get=function(a,b){var c=this;if("video"==a){if(mn.includes(b))return function(){return c.
|
|
542
|
-
q.set=function(a,b,c){this.g[a][b]=c;
|
|
543
|
-
q.
|
|
544
|
-
function
|
|
545
|
-
function
|
|
546
|
-
q.destroy=function(a){a&&this.g.Zb();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;fb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.bc=function(){return this.B};q.
|
|
547
|
-
q.cast=function(){var a=this,b;return I(function(c){return 1==c.g?(b=
|
|
548
|
-
q.
|
|
549
|
-
function
|
|
550
|
-
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
551
|
-
function
|
|
552
|
-
function
|
|
553
|
-
function
|
|
554
|
-
function
|
|
535
|
+
var jn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),kn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ln=["loop","playbackRate"],mn=["pause","play"],nn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
536
|
+
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},on={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},pn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},qn=[["getConfiguration","configure"]],rn=[["isTextTrackVisible","setTextTrackVisibility"]],sn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
537
|
+
tn=["attach","detach","load","unload"];function un(a,b,c,d,e,f,g){var h=this;this.I=a;this.P=g;this.j=new P(b);this.S=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return vn(h)};this.G=function(k,l){var m=gn(l);switch(m.type){case "event":var n=m.targetName;m=Pa(m.event);h.B(n,m);break;case "update":n=m.update;for(var p in n){m=h.g[p]||{};for(var t in n[p])m[t]=n[p][t]}h.C&&(h.S(),h.C=!1);break;case "asyncComplete":if(p=m.id,m=m.error,t=h.i[p],delete h.i[p],t)if(m){p=new O(m.severity,m.category,
|
|
538
|
+
m.code);for(n in m)p[n]=m[n];t.reject(p)}else t.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;wn.add(this)}q=un.prototype;q.destroy=function(){wn["delete"](this);xn(this);yn&&zn(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.qa=function(){return this.h};q.Fd=function(){return this.N};
|
|
539
|
+
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.xa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.P,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(wn),d=c.next();!d.done;d=c.next())An(d.value,b)},function(b){for(var c=r(wn),d=c.next();!d.done;d=c.next())d=d.value,Bn="available"==b,d.j.xa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Bn&&this.j.T(Cn);(a=yn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
540
|
+
An(this,a):yn=null}else window.__onGCastApiAvailable!==Dn&&(En=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Dn)};q.Ee=function(a){this.A=a;this.h&&Fn(this,{type:"appData",appData:this.A})};q.cast=function(a){var b=this;return I(function(c){if(!b.m)throw new O(1,8,8E3);if(!Bn)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Nc;chrome.cast.requestSession(function(d){return Gn(b,a,d)},function(d){return Hn(b,d)});return u(c,b.l,0)})};
|
|
541
|
+
function In(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Gn(a,b,c)},function(c){return Hn(a,c)})}}q.Zb=function(){if(this.h){xn(this);if(yn){zn(this);try{yn.stop(function(){},function(){})}catch(a){}yn=null}vn(this)}};
|
|
542
|
+
q.get=function(a,b){var c=this;if("video"==a){if(mn.includes(b))return function(){return c.If.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))}}else if("player"==a){if(pn[b]&&!this.get("player","isLive")())return function(){};if(sn.includes(b))return function(){return c.If.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(tn.includes(b))return function(){return c.hh.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(nn[b]||on[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
543
|
+
q.set=function(a,b,c){this.g[a][b]=c;Fn(this,{type:"set",targetName:a,property:b,value:c})};function Gn(a,b,c){yn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);vn(a);Fn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function Hn(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 O(2,8,c,b))}
|
|
544
|
+
q.If=function(a,b){Fn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.hh=function(a,b){var c=Fa.apply(2,arguments),d=new Nc,e=this.J.toString();this.J++;this.i[e]=d;try{Fn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function An(a,b){var c=a.K();a.l=new Nc;a.C=!0;Gn(a,c,b)}function zn(a){var b=yn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
545
|
+
function vn(a){var b=yn?"connected"==yn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};xn(a)}a.h=b;a.N=b?yn.receiver.friendlyName:"";a.j.xa()}function xn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function Fn(a,b){var c=fn(b),d=yn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Xa)}catch(e){throw c=new O(2,8,8005,e),d=new M("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var Cn=.02,Bn=!1,yn=null,En=null,wn=new Set;
|
|
546
|
+
function Dn(a){En?window.__onGCastApiAvailable=En:delete window.__onGCastApiAvailable;En=null;if(a)for(var b=r(wn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Jn(a,b,c,d){d=void 0===d?!1:d;fb.call(this);var e=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.G=c;this.F=d;this.C=new Map;this.g=new un(c,function(){return Kn(e)},function(){return Ln(e)},function(f,g){return Mn(e,f,g)},function(){return Nn(e)},function(){return On(e)},d);Pn(this)}qa(Jn,fb);q=Jn.prototype;
|
|
547
|
+
q.destroy=function(a){a&&this.g.Zb();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;fb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.bc=function(){return this.B};q.ef=function(){return this.g.m&&Bn};q.qa=function(){return this.g.qa()};q.Fd=function(){return this.g.Fd()};
|
|
548
|
+
q.cast=function(){var a=this,b;return I(function(c){return 1==c.g?(b=On(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Te(),0):c["return"]()})};q.Ee=function(a){this.g.Ee(a)};q.Qf=function(){In(this.g)};q.Zb=function(){this.g.Zb()};
|
|
549
|
+
q.kf=function(a,b){b=void 0===b?!1:b;var c=this;return I(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d["return"]();c.G=a;c.F=b;c.g.Zb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new un(a,function(){return Kn(c)},function(){return Ln(c)},function(e,f){return Mn(c,e,f)},function(){return Nn(c)},function(){return On(c)},b);c.g.init();A(d)})};
|
|
550
|
+
function Pn(a){a.g.init();a.m=new uf;for(var b=r(jn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.qa()||(f=Pa(f),a.j.dispatchEvent(f))});for(var d in Qa)a.m.o(a.h,Qa[d],function(f){a.g.qa()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.sc=e,Object.defineProperty(a.l,b.sc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Qn(a,f.sc)}}(b),set:function(f){return function(g){var h=f.sc;a.g.qa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={sc:b.sc};a.B={};Rn(a,
|
|
551
|
+
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Sn(a,f)}})});Tn(a);a.j=new fb;a.j.ud=a.l;a.A=new fb;a.A.ud=a.B}function Tn(a){var b=new Map;Rn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
|
|
552
|
+
function Rn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
|
|
553
|
+
function On(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.ee(),startTime:null};a.i.pause();for(var c=r(ln),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(qn);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(rn);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 Kn(a){var b=new M("caststatuschanged");a.dispatchEvent(b)}
|
|
554
|
+
function Ln(a){var b=new M(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
555
|
+
function Nn(a){for(var b=r(qn),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(ln);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(ln),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(rn);for(k=
|
|
555
556
|
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)})}
|
|
556
|
-
function
|
|
557
|
-
function
|
|
558
|
-
if("setVideoContainer"==b)return function(c){return a.h.
|
|
559
|
-
K("shaka.cast.CastProxy",
|
|
560
|
-
|
|
557
|
+
function Qn(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.qa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.qa()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
|
|
558
|
+
function Sn(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.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.Ec()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.kd()};
|
|
559
|
+
if("setVideoContainer"==b)return function(c){return a.h.Me(c)};if(a.g.qa()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.qa()&&0==Object.keys(a.g.g.video).length&&(nn[b]||on[b])||!a.g.qa()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
560
|
+
function Mn(a,b,c){a.g.qa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}K("shaka.cast.CastProxy",Jn);Jn.prototype.changeReceiverId=Jn.prototype.kf;Jn.prototype.forceDisconnect=Jn.prototype.Zb;Jn.prototype.suggestDisconnect=Jn.prototype.Qf;Jn.prototype.setAppData=Jn.prototype.Ee;Jn.prototype.cast=Jn.prototype.cast;Jn.prototype.receiverName=Jn.prototype.Fd;Jn.prototype.isCasting=Jn.prototype.qa;Jn.prototype.canCast=Jn.prototype.ef;Jn.prototype.getPlayer=Jn.prototype.bc;
|
|
561
|
+
Jn.prototype.getVideo=Jn.prototype.Bb;Jn.prototype.destroy=Jn.prototype.destroy;function Un(a,b,c,d){fb.call(this);var e=this;this.g=a;this.h=b;this.j=new uf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new P(function(){Vn(e)});Wn(this)}qa(Un,fb);q=Un.prototype;q.isConnected=function(){return this.H};q.Rg=function(){return this.A};q.qh=function(a){this.i=a};q.gg=function(){this.i=null};
|
|
562
|
+
q.rh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.ph=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.oh=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
561
563
|
q.destroy=function(){var a=this,b,c;return I(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.A=!0,a.l=null,a.B=null,fb.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();A(d)})};
|
|
562
|
-
function
|
|
563
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
564
|
-
!1;
|
|
565
|
-
function
|
|
566
|
-
function
|
|
567
|
-
a.h[n](p);a.g.autoplay=f;b.manifest&&(a.g.play(),
|
|
568
|
-
function
|
|
569
|
-
function
|
|
570
|
-
function
|
|
571
|
-
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return
|
|
572
|
-
function
|
|
573
|
-
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||
|
|
574
|
-
function
|
|
575
|
-
K("shaka.cast.CastReceiver",
|
|
576
|
-
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{
|
|
577
|
-
function
|
|
578
|
-
function
|
|
579
|
-
function
|
|
580
|
-
226,251,75]),m=new Uint8Array([]);k=[{initData:Pf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Eb(g,f.init||a||h||k);if(g=
|
|
581
|
-
function
|
|
582
|
-
var
|
|
564
|
+
function Wn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Xn(a)};b.onSenderDisconnected=function(){return Xn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Yn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Yn(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 Zn(a,
|
|
565
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return $n(a,e)};b.start();b=r(jn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return ao(a,"video",e)});for(var d in Qa)a.j.o(a.h,Qa[d],function(e){return ao(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.He(3840,2160):a.h.He(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
|
|
566
|
+
!1;bo(a)});a.j.o(a.g,"playing",function(){a.A=!1;bo(a)});a.j.o(a.g,"pause",function(){bo(a)});a.j.o(a.h,"unloading",function(){a.A=!0;bo(a)});a.j.o(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.A=!0,bo(a))})).T(co)})}function Xn(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;bo(a)}
|
|
567
|
+
function bo(a){var b;I(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new M("caststatuschanged");a.dispatchEvent(b);eo(a)||fo(a);A(c)})}
|
|
568
|
+
function go(a,b,c){var d,e,f,g,h,k,l,m,n,p;I(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,B(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=F(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],
|
|
569
|
+
a.h[n](p);a.g.autoplay=f;b.manifest&&(a.g.play(),fo(a));A(t)}})}function ao(a,b,c){a.h&&(Vn(a),Yn(a,{type:"event",targetName:b,event:c},a.l))}
|
|
570
|
+
function Vn(a){a.I.T(ho);for(var b={video:{},player:{}},c=r(kn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in pn)0==a.m%pn[e]&&(b.player[e]=a.h[e]());for(var f in nn)0==a.m%nn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Yn(a,{type:"update",update:b},a.l);for(var g in on)0==a.m%on[g]&&(b={player:{}},b.player[g]=a.h[g](),Yn(a,{type:"update",update:b},a.l));a.F&&(a.m+=
|
|
571
|
+
1);eo(a)}function eo(a){return a.C&&(a.g.duration||a.h.U())?(io(a),a.C=!1,!0):!1}function io(a,b){var c={contentId:a.h.ee(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);fo(a,void 0===b?0:b,c)}
|
|
572
|
+
function $n(a,b){var c=gn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;go(a,c.initState,c.appData);Vn(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.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=
|
|
573
|
+
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return jo(a,h,g,null)},function(k){return jo(a,h,g,k)})}}
|
|
574
|
+
function Zn(a,b){var c=gn(b.data);switch(c.type){case "PLAY":a.g.play();fo(a);break;case "PAUSE":a.g.pause();fo(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),fo(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),fo(a));break;case "STOP":a.h.Te().then(function(){a.h&&fo(a)});break;case "GET_STATUS":io(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
|
|
575
|
+
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||fo(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.G(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&io(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Yn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:Yn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
|
|
576
|
+
function jo(a,b,c,d){a.h&&Yn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Yn(a,b,c,d){a.H&&(a=fn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function fo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?ko:a.h.Kc()?lo:a.g.paused?mo:no,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Yn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
|
|
577
|
+
K("shaka.cast.CastReceiver",Un);Un.prototype.destroy=Un.prototype.destroy;Un.prototype.setContentArtist=Un.prototype.oh;Un.prototype.setContentImage=Un.prototype.ph;Un.prototype.setContentTitle=Un.prototype.rh;Un.prototype.clearContentMetadata=Un.prototype.gg;Un.prototype.setContentMetadata=Un.prototype.qh;Un.prototype.isIdle=Un.prototype.Rg;Un.prototype.isConnected=Un.prototype.isConnected;var ho=.5,co=5,ko="IDLE",no="PLAYING",lo="BUFFERING",mo="PAUSED";function oo(a,b,c){var d=po(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 O(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Ae?(e=h.init||e,!1):!0}),f.length&&(a=qo(e,f,c,g),0==a.length&&(a=[Eb("",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(Eb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
|
|
578
|
+
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{nf:g,aj:e,drmInfos:a,tf:!0}}function ro(a,b,c,d){var e=oo(a,c,d);if(b.tf){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.tf=!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 O(2,4,4008);return e.nf||b.nf}
|
|
579
|
+
function so(a){var b=0,c=Jc(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=Gc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
580
|
+
function to(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function uo(a){a=Sf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=md(a.textContent);a=so(a).filter(function(b){return b.type===vo})[0];if(!a)return"";a=ed(a.value,!0);return(a=hg(a,"WRMHEADER"))?to(a):""}
|
|
581
|
+
function qo(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.Ae];if(g){var h;if(h=Sf(f.node,"urn:microsoft:playready","pro")){h=md(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Pf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Ae)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,
|
|
582
|
+
226,251,75]),m=new Uint8Array([]);k=[{initData:Pf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Eb(g,f.init||a||h||k);if(g=wo.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function po(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=xo(c.value))&&b.push(c);return b}
|
|
583
|
+
function xo(a){var b=a.getAttribute("schemeIdUri"),c=Vf(a,"urn:mpeg:cenc:2013","default_KID"),d=Tf(a,"urn:mpeg:cenc:2013","pssh").map(Xf);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:md(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,Ae:b,keyId:c,init:0<e.length?e:null}}
|
|
584
|
+
var vo=1,wo=(new Map).set("com.widevine.alpha",function(a){return(a=Sf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",uo).set("com.microsoft.playready.recommendation",uo).set("com.microsoft.playready.software",uo).set("com.microsoft.playready.hardware",uo).set("org.w3.clearkey",function(a){return(a=Sf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function yo(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=
|
|
583
585
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
584
|
-
function
|
|
585
|
-
p||0;if(0>p)if(t){t=Zf(t,"t",eg);if(null==t)break;else if(w>=t)break;p=Math.ceil((t-w)/y)-1}else{if(Infinity==k)break;else if(w/f>=k)break;p=Math.ceil((k*f-w)/y)-1}0<l.length&&w!=m&&(l[l.length-1].end=w/f);for(t=0;t<=p;++t)m=w+y,l.push({start:w/f,end:m/f,
|
|
586
|
-
function
|
|
587
|
-
function
|
|
588
|
-
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
|
|
589
|
-
function
|
|
590
|
-
function
|
|
591
|
-
function
|
|
592
|
-
d)}function
|
|
593
|
-
function
|
|
594
|
-
function
|
|
595
|
-
function
|
|
596
|
-
function
|
|
597
|
-
J=new
|
|
598
|
-
function
|
|
599
|
-
function
|
|
600
|
-
Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.M.length||e.Nc(g);return Promise.resolve(e)}}}function
|
|
601
|
-
function
|
|
602
|
-
function
|
|
603
|
-
n;l?(p&&(new vj(m)).yb(c,n,!0),l.hc(m,a.presentationTimeline.
|
|
604
|
-
function
|
|
605
|
-
function
|
|
606
|
-
y=b.
|
|
607
|
-
function
|
|
608
|
-
function
|
|
609
|
-
function
|
|
610
|
-
p=r(m);for(t=p.next();!t.done;t=p.next())w=t.value,w.push(
|
|
586
|
+
function zo(a,b){var c=Ao(a,b,"timescale"),d=1;c&&(d=dg(c)||1);var e=Ao(a,b,"duration");c=dg(e||"");"image"==a.L.contentType&&(c=fg(e||""));c&&(c/=d);var f=Ao(a,b,"startNumber");e=Number(Ao(a,b,"presentationTimeOffset"))||0;var g=eg(f||"");if(null==f||null==g)g=1;var h=Bo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Z.duration||Infinity;h=Rf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],t=h[n+1],w=Zf(p,"t",eg),y=Zf(p,"d",eg);p=Zf(p,"r",cg);null!=w&&(w-=e);if(!y)break;w=null!=w?w:m;p=
|
|
587
|
+
p||0;if(0>p)if(t){t=Zf(t,"t",eg);if(null==t)break;else if(w>=t)break;p=Math.ceil((t-w)/y)-1}else{if(Infinity==k)break;else if(w/f>=k)break;p=Math.ceil((k*f-w)/y)-1}0<l.length&&w!=m&&(l[l.length-1].end=w/f);for(t=0;t<=p;++t)m=w+y,l.push({start:w/f,end:m/f,xh:w}),w=m}f=l}return{timescale:d,wa:c,mc:g,qb:e/d||0,Ue:e,timeline:f}}function Ao(a,b,c){return[b(a.L),b(a.Aa),b(a.ra)].filter(Cb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
588
|
+
function Bo(a,b,c){return[b(a.L),b(a.Aa),b(a.ra)].filter(Cb).map(function(d){return Qf(d,c)}).reduce(function(d,e){return d||e})}
|
|
589
|
+
function Co(a,b,c,d,e,f){for(var g=Vf(a,"http://www.w3.org/1999/xlink","href"),h=Vf(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 Xe(new O(2,4,4028));if("onLoad"!=h)return Xe(new O(2,4,4027));var m=Db([d],[g]);return e.request(0,lf(m,b)).na(function(n){n=jg(n.data,a.tagName);if(!n)return Xe(new O(2,4,4001,g));
|
|
590
|
+
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 Do(a,b,c,m[0],e,f+1)})}
|
|
591
|
+
function Do(a,b,c,d,e,f){f=void 0===f?0:f;if(Vf(a,"http://www.w3.org/1999/xlink","href")){var g=Co(a,b,c,d,e,f);c&&(g=g.na(void 0,function(){return Do(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Vf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Do(k,b,c,d,e,f)));return af(g).na(function(){return a})};function Eo(a,b,c,d,e,f,g){var h,k=(new Ff).Y("sidx",function(l){h=Fo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
|
|
592
|
+
function Fo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.ve();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.R(),t=(p&2147483648)>>>31;p&=2147483647;var w=g.reader.R();g.reader.skip(4);if(1==t)throw new O(2,3,3006);h.push(new si(l/k+c,(l+w)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=w;a+=p}g.parser.stop();return h};function Go(a){this.h=Jc(a);this.g=new Cf(this.h,0)}Go.prototype.Da=function(){return this.g.Da()};
|
|
593
|
+
function Ho(a){var b=Io(a);if(7<b.length)throw new O(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Io(a);a:{d=r(Jo);for(var e=d.next();!e.done;e=d.next())if(Ec(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.oa();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.oa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.oa();d=Jc(a.h,a.g.oa(),b);a.g.skip(b);return new Ko(c,
|
|
594
|
+
d)}function Io(a){var b=a.g.oa(),c=a.g.pb();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Gc(a.h,b,c)}var Jo=[[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 Ko(a,b){this.id=a;this.g=b}
|
|
595
|
+
function Lo(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(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 Mo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Go(a.g);for(var n=null,p=null;a.Da();){var t=Ho(a);if(187==t.id){var w=No(t);w&&(t=c*w.yh,w=b+w.gh,null!=n&&m.push(new si(n+g,t+g,l,p,w-1,f,g,h,k)),n=t,p=w)}}null!=n&&m.push(new si(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
596
|
+
function No(a){var b=new Go(a.g);a=Ho(b);if(179!=a.id)throw new O(2,3,3013);a=Lo(a);b=Ho(b);if(183!=b.id)throw new O(2,3,3012);b=new Go(b.g);for(var c=0;b.Da();){var d=Ho(b);if(241==d.id){c=Lo(d);break}}return{yh:a,gh:c}};function Oo(a,b){var c=Bo(a,b,"Initialization");if(!c)return null;var d=a.L.Na,e=c.getAttribute("sourceURL");e&&(d=Db(a.L.Na,[e]));e=0;var f=null;if(c=Zf(c,"range",bg))e=c.start,f=c.end;return new qi(function(){return d},e,f,Po(a))}
|
|
597
|
+
function Qo(a,b){var c=Number(Ao(a,Ro,"presentationTimeOffset"))||0,d=Ao(a,Ro,"timescale"),e=1;d&&(e=dg(d)||1);var f=c/e||0,g=Oo(a,Ro);So(a,g);var h=df(a);return{$b:function(){var k=Bo(h,Ro,"RepresentationIndex"),l=h.L.Na;k&&(k=k.getAttribute("sourceURL"))&&(l=Db(h.L.Na,[k]));k=Uo(h);return Vo(h,b,g,l,k.start,k.end,f)}}}
|
|
598
|
+
function Vo(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,w,y,x,v,D,z,C,G;return I(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.xb||!a.Z.Df,l=a.Z.start,m=a.Z.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,w=[p(d,e,f),"webm"==n?p(c.Pa(),c.Ta,c.Ca):null],p=null,u(E,Promise.all(w),2);y=E.h;x=y[0];v=y[1]||null;D=null;z=l-g;C=l;G=m?l+m:Infinity;if("mp4"==n)var H=Eo(x,e,d,c,z,C,G);else{H=new Go(v);if(440786851!=Ho(H).id)throw new O(2,3,3008);var J=Ho(H);if(408125543!=J.id)throw new O(2,3,3009);H=J.g.byteOffset;
|
|
599
|
+
J=new Go(J.g);for(var L=null;J.Da();){var N=Ho(J);if(357149030==N.id){L=N;break}}if(!L)throw new O(2,3,3010);L=new Go(L.g);N=1E6;for(J=null;L.Da();){var V=Ho(L);if(2807729==V.id)N=Lo(V);else if(17545==V.id)if(4==V.g.byteLength)J=V.g.getFloat32(0);else if(8==V.g.byteLength)J=V.g.getFloat64(0);else throw new O(2,3,3003);}if(null==J)throw new O(2,3,3011);L=N/1E9;J*=L;N=Ho(new Go(x));if(475249515!=N.id)throw new O(2,3,3007);H=Mo(N,H,L,J,d,c,z,C,G)}D=H;h.ic(D);t=new vj(D);k&&t.yb(C,G,!0);return E["return"](t)})}
|
|
600
|
+
function Ro(a){return a.Uc}function Uo(a){var b=Bo(a,Ro,"RepresentationIndex");a=Ao(a,Ro,"indexRange");a=bg(a||"");b&&(a=Zf(b,"range",bg,a));return a}function So(a,b){Wo(a,b);if(!Uo(a))throw new O(2,4,4002);}function Wo(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Ib&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
|
|
601
|
+
function Po(a){var b=a.L;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.wd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Xo(a,b){var c=Oo(a,Yo),d=Zo(a);if(!d.wa&&!d.timeline&&1<d.fc.length)throw new O(2,4,4002);if(!d.wa&&!a.Z.duration&&!d.timeline&&1==d.fc.length)throw new O(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new O(2,4,4002);var e=null,f=null;a.ra.id&&a.L.id&&(f=b[a.ra.id+","+a.L.id])&&(e=f.segmentIndex);var g=$o(a.Z.start,a.Z.duration,a.L.Na,d,c);c=!e;e?e.hc(g,a.presentationTimeline.mb()):e=new vj(g);a.presentationTimeline.ic(g);a.xb&&a.Z.Df||e.yb(a.Z.start,a.Z.duration?a.Z.start+a.Z.duration:
|
|
602
|
+
Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.M.length||e.Nc(g);return Promise.resolve(e)}}}function Yo(a){return a.Db}function Zo(a){var b=ap(a);a=zo(a,Yo);var c=a.mc;0==c&&(c=1);var d=0;a.wa?d=a.wa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{wa:a.wa,startTime:d,mc:c,qb:a.qb,timeline:a.timeline,fc:b}}
|
|
603
|
+
function $o(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.qb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Rd:m.Rd},n++){var p=d.fc[n];m.Rd=Db(c,[p.Xg]);var t=void 0;t=null!=d.wa?l+d.wa:d.timeline?d.timeline[n].end:l+b;k.push(new si(a+l,a+t,function(w){return function(){return w.Rd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
|
|
604
|
+
function ap(a){return[a.L.Db,a.Aa.Db,a.ra.Db].filter(Cb).map(function(b){return Rf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Bf&&(a.Bf=!0);var c=b.getAttribute("media");b=Zf(b,"mediaRange",bg,{start:0,end:null});return{Xg:c,start:b.start,end:b.end}})};function bp(a,b,c,d,e,f){var g=cp(a),h=dp(a);ep(h);var k=df(a);if(h.Jc)return Wo(a,g),{$b:function(){var t=yo(h.Jc,k.L.id,null,k.bandwidth||null,null);t=Db(k.L.Na,[t]);return Vo(k,b,g,t,0,null,h.qb)}};if(h.wa)return d||(a.presentationTimeline.pe(h.wa),a.presentationTimeline.qe(a.Z.start)),{$b:function(){return fp(k,h,e,g,f)}};var l=null;d=d=null;a.ra.id&&a.L.id&&(d=a.ra.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=gp(k,h,g);c=a.Z.start;var n=a.Z.duration?a.Z.start+a.Z.duration:Infinity,p=Infinity!=
|
|
605
|
+
n;l?(p&&(new vj(m)).yb(c,n,!0),l.hc(m,a.presentationTimeline.mb())):l=new vj(m);a.presentationTimeline.ic(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{$b:function(){l&&0!=l.M.length||l.Nc(m);return Promise.resolve(l)}}}function hp(a){return a.Vc}function dp(a){var b=zo(a,hp),c=Ao(a,hp,"media");a=Ao(a,hp,"index");return{wa:b.wa,timescale:b.timescale,mc:b.mc,qb:b.qb,Ue:b.Ue,timeline:b.timeline,oe:c,Jc:a}}
|
|
606
|
+
function ep(a){var b=a.Jc?1:0;b+=a.timeline?1:0;b+=a.wa?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Jc&&(a.timeline=null),a.wa=null);if(!a.Jc&&!a.oe)throw new O(2,4,4002);}
|
|
607
|
+
function fp(a,b,c,d,e){function f(L){var N=(L-t)*p,V=N+b.qb,Z=N+l;N=Z+p;var ha=Math.min(N,h());Z=new si(Z,ha,function(){var ja=yo(y,v,L,x,V*w);return Db(D,[ja])},0,null,d,z,l,h());Z.j=N;return Z}function g(){var L=[Math.max(k.mb(),l),Math.min(k.Jb(),h())].map(function(N){return N-l});return[Math.ceil(L[0]/p),Math.ceil(L[1]/p)-1].map(function(N){return N+t})}function h(){var L=null!=m&&e[m]||n;return L?l+L:Infinity}var k=a.presentationTimeline,l=a.Z.start,m=a.ra.id,n=a.Z.duration,p=b.wa,t=b.mc,w=b.timescale,
|
|
608
|
+
y=b.oe,x=a.bandwidth||null,v=a.L.id,D=a.L.Na,z=l-b.qb,C=g();a=a.xb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var G=a;G<=C;++G){var E=f(G);c.push(E)}var H=new vj(c);c=k.Jb()<h();G=k.U();if(c||G){var J=Math.max(a,C+1);H.Id(p,function(){var L=k.mb();H.Hb(L);var N=r(g());N.next();N=N.next().value;for(var V=[];J<=N;){var Z=f(J);V.push(Z);J++}return L>h()&&!V.length?null:V})}return Promise.resolve(H)}
|
|
609
|
+
function gp(a,b,c){var d=a.Z.start,e=a.Z.duration,f=d-b.qb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Qd:h.Qd,Ud:h.Ud,Xd:h.Xd,Nd:h.Nd,Zd:h.Zd,Od:h.Od},k++){var l=b.timeline[k],m=l.start,n=l.xh;l=l.end;h.Xd=k+b.mc;h.Zd=n+b.Ue;h.Ud=a.L.id;h.Nd=a.bandwidth||null;h.Qd=b.oe;h.Od=a.L.Na;g.push(new si(d+m,d+l,function(p){return function(){var t=yo(p.Qd,p.Ud,p.Xd,p.Nd||null,p.Zd);return Db(p.Od,[t]).map(function(w){return w.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
610
|
+
function cp(a){var b=Ao(a,hp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Na;return new qi(function(){var f=yo(b,c,null,d,null);return Db(e,[f])},0,null,Po(a))};function ip(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}ip.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
|
|
611
|
+
function jp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,w,y,x,v,D,z,C,G,E,H,J,L,N,V,Z,ha,ja,wa,Ma;return I(function(Ga){switch(Ga.g){case 1:d=Jb;kp(b);lp(b);mp(b);np(b);if(!c&&1==b.length){e=b[0];a.g=e.fd;a.h=e.Kd;a.j=e.textStreams;a.i=e.imageStreams;Ga.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ga["return"]();k=b.map(function(Sa){return Sa.fd});l=b.map(function(Sa){return Sa.Kd});m=b.map(function(Sa){return Sa.textStreams});n=b.map(function(Sa){return Sa.imageStreams});
|
|
612
|
+
p=r(m);for(t=p.next();!t.done;t=p.next())w=t.value,w.push(op(d.ha));y=r(n);for(x=y.next();!x.done;x=y.next())v=x.value,v.push(op(d.xc));return u(Ga,pp(a.g,k,f,qp,rp),3);case 3:return u(Ga,pp(a.h,l,f,qp,rp),4);case 4:return u(Ga,pp(a.j,m,f,qp,rp),5);case 5:return u(Ga,pp(a.i,n,f,qp,rp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(L=r(a.g),N=L.next();!N.done;N=L.next())for(V=N.value,Z=r(a.h),ha=Z.next();!ha.done;ha=Z.next())ja=ha.value,wa=Wg(V.drmInfos,ja.drmInfos),V.drmInfos.length&&ja.drmInfos.length&&
|
|
611
613
|
!wa.length||(Ma=D++,z.push({id:Ma,language:V.language,primary:V.primary,audio:V,video:ja,bandwidth:(V.bandwidth||0)+(ja.bandwidth||0),drmInfos:wa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(C=a.h.concat(a.g),G=r(C),E=G.next();!E.done;E=G.next())H=E.value,J=D++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.Ja?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
612
|
-
a.l=z;A(Ga)}})}function
|
|
613
|
-
function
|
|
614
|
-
function
|
|
615
|
-
function
|
|
616
|
-
function
|
|
617
|
-
h.value,k.push(
|
|
614
|
+
a.l=z;A(Ga)}})}function kp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.fd),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&&ec(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.fd=c}}
|
|
615
|
+
function mp(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&&ec(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
616
|
+
function lp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Kd),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&&ec(e.roles,h.roles)&&Bf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Kd=c}}
|
|
617
|
+
function np(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.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}}
|
|
618
|
+
function sp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,w,y,x,v,D,z,C,G,E,H,J,L,N,V;return I(function(Z){switch(Z.g){case 1:b=Jb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.Gb})});d=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.Ja})});e=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.ha})});f=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.xc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
|
|
619
|
+
h.value,k.push(tp(b.ha));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(tp(b.xc));return u(Z,pp([],c,0,up,vp),2);case 2:return p=Z.h,u(Z,pp([],d,0,up,vp),3);case 3:return t=Z.h,u(Z,pp([],e,0,up,vp),4);case 4:return w=Z.h,u(Z,pp([],f,0,up,vp),5);case 5:y=Z.h;x=0;if(t.length&&p.length)for(G=r(p),E=G.next();!E.done;E=G.next())for(H=E.value,J=r(t),L=J.next();!L.done;L=J.next())N=L.value,V=x++,N.variantIds.push(V),H.variantIds.push(V);else for(v=t.concat(p),D=r(v),z=D.next();!z.done;z=D.next())C=
|
|
618
620
|
z.value,C.variantIds=[x++];return Z["return"](t.concat(p).concat(w).concat(y))}})}
|
|
619
|
-
function
|
|
621
|
+
function pp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,w,y,x,v,D,z,C,G,E,H,J,L;return I(function(N){switch(N.g){case 1:f=Jb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){N.D(4);break}m=l.value;return u(N,wp(m,b,c,e,g),5);case 5:n=N.h;if(!n)throw new O(2,4,4037);l=k.next();N.D(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(w=t.value,y=r(w),x=y.next();!x.done;x=y.next())v=x.value,(D=xp(v,b,d,e,g))&&a.push(D);z=r(g);for(t=z.next();!t.done;t=
|
|
620
622
|
z.next())for(C=t.value,G={},E=r(C),x=E.next();!x.done;G={vb:G.vb},x=E.next())if(G.vb=x.value,H=G.vb.type==f.ha&&!G.vb.language,J=G.vb.type==f.xc&&!G.vb.tilesLayout,!H&&!J&&(L=a.some(function(V){return function(Z){return Z.mimeType==V.vb.mimeType&&yd(Z.codecs)==yd(V.vb.codecs)}}(G))))throw new O(2,4,4037);return N["return"](a)}})}
|
|
621
|
-
function
|
|
622
|
-
function
|
|
623
|
-
function
|
|
624
|
-
function
|
|
625
|
-
function
|
|
626
|
-
function
|
|
627
|
-
(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=
|
|
628
|
-
function
|
|
629
|
-
function
|
|
630
|
-
function
|
|
631
|
-
function
|
|
632
|
-
d=
|
|
633
|
-
function
|
|
634
|
-
function
|
|
635
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
636
|
-
function
|
|
637
|
-
function
|
|
638
|
-
q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return I(function(c){if(1==c.g)return B(c,2),u(c,
|
|
639
|
-
function
|
|
640
|
-
function
|
|
641
|
-
function
|
|
642
|
-
"timeShiftBufferDepth",ag);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Zf(b,"suggestedPresentationDelay",ag));v=a.g.dash.ignoreMaxSegmentDuration;D=null;v||(D=Zf(b,"maxSegmentDuration",ag));z=b.getAttribute("type")||"static";if(a.i)for(C=a.i.presentationTimeline,G=r(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.Hb(C.
|
|
643
|
-
!isNaN(a.g.availabilityWindowOverride)&&(w=a.g.availabilityWindowOverride);null==w&&(w=Infinity);C.
|
|
644
|
-
C.
|
|
645
|
-
function
|
|
646
|
-
null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,
|
|
647
|
-
function
|
|
648
|
-
}d=c.filter(function(m){return!m.
|
|
649
|
-
[]:
|
|
650
|
-
function
|
|
651
|
-
function
|
|
623
|
+
function wp(a,b,c,d,e){return I(function(f){if(1==f.g)return yp(b,a),a.matchedStreams?a.segmentIndex?u(f,zp(a,c),2):f.D(2):f["return"](!1);Ap(a,c,d,e);return f["return"](!0)})}
|
|
624
|
+
function zp(a,b){var c,d,e,f,g,h,k;return I(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof yj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);A(l)})}
|
|
625
|
+
function xp(a,b,c,d,e){var f=c(a);yp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return I(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new yj;return u(g,zp(f,0),0)})});if(!f.matchedStreams)return null;Ap(f,0,d,e);return f}function Ap(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==Sb(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
|
|
626
|
+
function qp(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}
|
|
627
|
+
function up(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
628
|
+
function rp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Wg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new O(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
|
|
629
|
+
(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=qp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),rp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&rp(a.trickModeVideo,b)}
|
|
630
|
+
function vp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
|
|
631
|
+
function yp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Bp,video:Bp,text:Cp,image:Dp}[f.type],h={audio:Ep,video:Fp,text:Gp,image:Hp}[f.type],k=null;e=r(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return;c.push(f)}b.matchedStreams=c}function Bp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||yd(b.codecs)!=yd(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<Wg(c,d).length:1)}return c?!1:!0}
|
|
632
|
+
function Cp(a,b){return a.language?b.language?0==Sb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Dp(a){return a.tilesLayout?!0:!1}
|
|
633
|
+
function Ep(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
|
|
634
|
+
d=Ip(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Jp)return!0;if(d==Kp)return!1;d=Ip(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Jp?!0:d==Kp?!1:a.bandwidth&&Lp(a.bandwidth,b.bandwidth,c.bandwidth)==Jp?!0:!1}
|
|
635
|
+
function Fp(a,b,c){if(a.id==c.id)return!0;var d=Ip(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Jp)return!0;if(d==Kp)return!1;if(a.frameRate){d=Ip(a.frameRate,b.frameRate,c.frameRate);if(d==Jp)return!0;if(d==Kp)return!1}return a.bandwidth&&Lp(a.bandwidth,b.bandwidth,c.bandwidth)==Jp?!0:!1}
|
|
636
|
+
function Gp(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(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!=
|
|
637
|
+
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Hp(a,b,c){return a.id==c.id?!0:Ip(a.width*a.height,b.width*b.height,c.width*c.height)==Jp?!0:!1}function tp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
638
|
+
function op(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new vj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
639
|
+
function Ip(a,b,c){if(b==a&&a!=c)return Kp;if(c==a&&a!=b)return Jp;if(b>a){if(c<=a||c-a<b-a)return Jp;if(c-a>b-a)return Kp}else{if(c>a)return Kp;if(a-c<a-b)return Jp;if(a-c>a-b)return Kp}return Mp}function Lp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Jp:b<a?Kp:Mp}var Jp=1,Mp=0,Kp=-1;function Np(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new ip;this.H=0;this.J=new $b(5);this.G=new P(function(){Op(a)});this.A=new ef;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=Np.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return I(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Pp(c),2);d=e.h;c.h&&Qp(c,d);if(!c.h)throw new O(2,7,7001);return e["return"](c.i)})};
|
|
640
|
+
q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return I(function(c){if(1==c.g)return B(c,2),u(c,Pp(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);A(c)})};q.onExpirationUpdated=function(){};
|
|
641
|
+
function Pp(a){var b,c,d,e,f,g,h;return I(function(k){if(1==k.g)return b=lf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),ff(a.A,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Rp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
|
|
642
|
+
function Rp(a,b,c){var d,e,f,g,h;return I(function(k){if(1==k.g){d=jg(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Sp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Do(d,a.g.retryParameters,f,c,a.h.networkingEngine);ff(a.A,g);return u(k,g.promise,2)}h=k.h;return k["return"](Sp(a,h,c))})}
|
|
643
|
+
function Sp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,w,y,x,v,D,z,C,G,E,H,J,L,N,V,Z,ha,ja,wa,Ma,Ga,Sa;return I(function(Ia){switch(Ia.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Rf(b,"Location").map(Xf).filter(Cb);0<f.length&&(g=Db(e,f),e=a.m=g);h=Rf(b,"BaseURL");k=h.map(Xf);l=Db(e,k);m=0;h&&h.length&&(m=Zf(h[0],"availabilityTimeOffset",fg)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Zf(b,"minBufferTime",ag)||0);a.H=Zf(b,"minimumUpdatePeriod",ag,-1);t=Zf(b,"availabilityStartTime",$f);w=Zf(b,
|
|
644
|
+
"timeShiftBufferDepth",ag);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Zf(b,"suggestedPresentationDelay",ag));v=a.g.dash.ignoreMaxSegmentDuration;D=null;v||(D=Zf(b,"maxSegmentDuration",ag));z=b.getAttribute("type")||"static";if(a.i)for(C=a.i.presentationTimeline,G=r(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.Hb(C.mb());else J=a.g.defaultPresentationDelay||1.5*p,L=null!=x?x:J,C=new Q(t,L,a.g.dash.autoCorrectDrift);C.Wc("static"==z);(N=C.U())&&
|
|
645
|
+
!isNaN(a.g.availabilityWindowOverride)&&(w=a.g.availabilityWindowOverride);null==w&&(w=Infinity);C.Ke(w);V=b.getAttribute("profiles")||"";Z={xb:"static"!=z,presentationTimeline:C,ra:null,Z:null,Aa:null,L:null,bandwidth:0,Bf:!1,Yb:m,profiles:V.split(",")};ha=Tp(a,Z,l,b);ja=ha.duration;wa=ha.periods;"static"!=z&&ha.qf||C.bb(ja||Infinity);a.C&&!a.F&&(Ma=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?C.Kf(a.C):a.C&&Ua("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.");
|
|
646
|
+
C.pe(D||1);return u(Ia,jp(a.j,wa,Z.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ia.D(3);break}a.i={presentationTimeline:C,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0,sequenceMode:!1};if(!C.Sf()){Ia.D(4);break}Ga=Rf(b,"UTCTiming");return u(Ia,Up(a,l,Ga),5);case 5:Sa=Ia.h;if(!a.h)return Ia["return"]();C.Lf(Sa);case 4:C.le();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ia)}})}
|
|
647
|
+
function Tp(a,b,c,d){var e=Zf(d,"mediaPresentationDuration",ag),f=[],g=0;d=Rf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Zf(k,"start",ag,g),n=k.id,p=Zf(k,"duration",ag),t=null;if(l){var w=Zf(l,"start",ag);null!=w&&(t=w-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=Vp(a,b,c,{start:m,duration:t,node:k,Df:null==t||!l});f.push(g);b.ra.id&&t&&(a.N[b.ra.id]=t);if(null==t){g=
|
|
648
|
+
null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,qf:!1}:{periods:f,duration:g,qf:!0}}
|
|
649
|
+
function Vp(a,b,c,d){b.ra=Wp(d.node,null,c);b.Z=d;b.ra.Yb=b.Yb;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=Rf(d.node,"EventStream");c=b.presentationTimeline.mb();e=r(e);for(var f=e.next();!f.done;f=e.next())Xp(a,d.start,d.duration,f.value,c);c=Rf(d.node,"AdaptationSet").map(function(m){return Yp(a,b,m)}).filter(Cb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.jh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018);
|
|
650
|
+
}d=c.filter(function(m){return!m.Qe});c=c.filter(function(m){return m.Qe});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Qe.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={cd:h.cd},l=k.next())h.cd=l.value,h.cd.trickModeVideo=e.streams.find(function(m){return function(n){return yd(m.cd.codecs)==yd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Zp(d,"audio");g=a.g.disableVideo?[]:Zp(d,"video");f=a.g.disableText?
|
|
651
|
+
[]:Zp(d,Ib);c=a.g.disableThumbnails?[]:Zp(d,"image");if(!g.length&&!e.length)throw new O(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ra.id,fd:d,Kd:e,textStreams:g,imageStreams:f}}
|
|
652
|
+
function Zp(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
653
|
+
function Yp(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Aa=Wp(c,b.ra,null);var e=!1,f=Rf(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(Cb),h=void 0,k=b.Aa.contentType==Ib;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=
|
|
652
654
|
l}}var n;m=Rf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Rf(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
|
|
653
655
|
10)));m=Rf(c,"Accessibility");var w=new Map;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 v=x.value,D=x=void 0;v.includes("=")?(v=v.split("="),x=v[0].startsWith("CC")?v[0]:"CC"+v[0],D=v[1]||"und"):(x="CC"+p,2==t.length?p+=2:p++,D=v);w.set(x,Mb(D))}}else w.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
|
|
654
|
-
1,null!=t)for(t=r(t.split(";")),x=t.next();!x.done;x=t.next())x=x.value,v=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],v=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,v=x),w.set(y,Mb(v));else w.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Rf(c,"ContentProtection");var z=
|
|
655
|
-
(l=l[0],l.textContent&&(G=l.textContent));l=Rf(c,"Representation");c=l.map(function(E){if(E
|
|
656
|
-
m.value,p=r(z.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(Cb);return{id:b.Aa.id||"__fake__"+a.I++,contentType:b.Aa.contentType,language:C,
|
|
657
|
-
function
|
|
658
|
-
throw H;}t=Rf(l,"ContentProtection");t=
|
|
656
|
+
1,null!=t)for(t=r(t.split(";")),x=t.next();!x.done;x=t.next())x=x.value,v=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],v=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,v=x),w.set(y,Mb(v));else w.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Rf(c,"ContentProtection");var z=oo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),C=Mb(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Rf(c,"Label"))&&l.length&&
|
|
657
|
+
(l=l[0],l.textContent&&(G=l.textContent));l=Rf(c,"Representation");c=l.map(function(E){if(E=$p(a,b,z,h,C,G,e,g,w,E))E.hdr=E.hdr||n;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.Aa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.Aa.contentType||"application"==b.Aa.contentType)for(b.Aa.contentType=aq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Aa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
658
|
+
m.value,p=r(z.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(Cb);return{id:b.Aa.id||"__fake__"+a.I++,contentType:b.Aa.contentType,language:C,bj:e,streams:c,drmInfos:z.drmInfos,Qe:f,jh:k}}
|
|
659
|
+
function $p(a,b,c,d,e,f,g,h,k,l){b.L=Wp(l,b.Aa,null);a.C=Math.min(a.C,b.L.Yb);if(!bq(b.L))return null;var m=b.Z.start;b.bandwidth=Zf(l,"bandwidth",dg)||0;var n=b.L.contentType,p=n==Ib||"application"==n;n="image"==n;try{var t=function(H,J,L){return cq(a,H,J,L)};if(b.L.Uc)var w=Qo(b,t);else if(b.L.Db)w=Xo(b,a.l);else if(b.L.Vc)w=bp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Na,x=b.Z.duration||0;w={$b:function(){return Promise.resolve(xj(m,x,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
|
|
660
|
+
throw H;}t=Rf(l,"ContentProtection");t=ro(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var v=!1;Rf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(v=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Rf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
659
661
|
(z=l.getAttribute("value")),!z))return null;var C;l=b.L.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"))&&(C="PQ");var G=b.L.id?b.ra.id+","+b.L.id:"",E={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,J,L;return I(function(N){if(1==N.g){J=(H=G&&b.xb&&a.l[G])?a.l[G]:E;if(J.segmentIndex)return N.D(0);L=J;return u(N,w.$b(),3)}L.segmentIndex=N.h;A(N)})},closeSegmentIndex:function(){E.segmentIndex&&
|
|
660
|
-
(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Aa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.
|
|
661
|
-
hdr:C,tilesLayout:z,matchedStreams:[]};G&&b.xb&&!a.l[G]&&(a.l[G]=E);return E}function
|
|
662
|
-
function
|
|
663
|
-
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Rf(a,"AudioChannelConfiguration");m=
|
|
664
|
-
"height",eg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),
|
|
665
|
-
function
|
|
666
|
-
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
|
|
667
|
-
function
|
|
668
|
-
function
|
|
669
|
-
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":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}n.D(9);break;case 7:return u(n,
|
|
662
|
+
(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Aa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.wd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:v,closedCaptions:k,
|
|
663
|
+
hdr:C,tilesLayout:z,matchedStreams:[]};G&&b.xb&&!a.l[G]&&(a.l[G]=E);return E}function Op(a){var b,c;I(function(d){switch(d.g){case 1:return b=0,B(d,2),u(d,Pp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Qp(a,b);A(d)}})}function Qp(a,b){0>a.H||a.G.T(Math.max(3,a.H-b,ac(a.J)))}
|
|
664
|
+
function Wp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,wd:null,audioSamplingRate:null,Yb:0};c=c||b.Na;var d=Rf(a,"BaseURL"),e=d.map(Xf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Zf(a,"frameRate",gg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Rf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
|
|
665
|
+
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Rf(a,"AudioChannelConfiguration");m=dq(m)||b.wd;p=Zf(a,"audioSamplingRate",eg)||b.audioSamplingRate;f||(f=aq(g,h));var t=Qf(a,"SegmentBase"),w=Qf(a,"SegmentTemplate"),y=t?Zf(t,"availabilityTimeOffset",fg)||0:0,x=w?Zf(w,"availabilityTimeOffset",fg)||0:0;d=d&&d.length?Zf(d[0],"availabilityTimeOffset",fg)||0:0;d=b.Yb+d+y+x;return{Na:Db(c,e),Uc:t||b.Uc,Db:Qf(a,"SegmentList")||b.Db,Vc:w||b.Vc,width:Zf(a,"width",eg)||b.width,height:Zf(a,
|
|
666
|
+
"height",eg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),wd:m,audioSamplingRate:p,Yb:d}}
|
|
667
|
+
function dq(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=
|
|
668
|
+
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 bq(a){var b=a.Uc?1:0;b+=a.Db?1:0;b+=a.Vc?1:0;if(0==b)return a.contentType==Ib||"application"==a.contentType?!0:!1;1!=b&&(a.Uc&&(a.Db=null),a.Vc=null);return!0}
|
|
669
|
+
function eq(a,b,c,d){var e,f,g,h,k,l;return I(function(m){if(1==m.g)return e=Db(b,[c]),f=lf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),ff(a.A,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=dd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
|
|
670
|
+
function Up(a,b,c){var d,e,f,g,h,k,l,m;return I(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.D(4);break}h=g.value;B(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.D(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.D(8);
|
|
671
|
+
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":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}n.D(9);break;case 7:return u(n,eq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,eq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
|
|
670
672
|
case 9:va(n,3);break;case 5:F(n);case 3:g=f.next();n.D(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
|
|
671
|
-
function
|
|
672
|
-
function
|
|
673
|
-
|
|
674
|
-
function
|
|
675
|
-
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=
|
|
676
|
-
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new
|
|
677
|
-
var
|
|
678
|
-
K("shaka.net.DataUriPlugin",
|
|
679
|
-
q.start=function(a,b){var c=this,d,e;return I(function(f){if(1==f.g)return c.i=b,c.m=b.isLowLatencyMode(),u(f,
|
|
680
|
-
q.update=function(){var a=this,b,c,d,e,f,g;return I(function(h){if(1==h.g){if(a.l==
|
|
681
|
-
function
|
|
682
|
-
function
|
|
683
|
-
function
|
|
684
|
-
function
|
|
685
|
-
function
|
|
686
|
-
|
|
687
|
-
disabledUntilTime:0,primary:!0,audio:"audio"==H?N.stream:null,video:"video"==H?N.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,7,7001);a.
|
|
688
|
-
a.X?a.X:3*a.aa),a.j.Wc(!1)):(a.j=new Q(null,0),a.j.Wc(!0));if(a.l!=
|
|
689
|
-
|
|
690
|
-
function
|
|
691
|
-
function
|
|
673
|
+
function Xp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Zf(d,"timescale",eg)||1;d=r(Rf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Zf(k,"presentationTime",eg)||0,m=Zf(k,"duration",eg)||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))}}
|
|
674
|
+
function cq(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=rf,f=Nj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),ff(a.A,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function aq(a,b){return Cd(wd(a,b))?Ib:a.split("/")[0]}K("shaka.dash.DashParser",Np);bh.mpd=function(){return new Np};$g["application/dash+xml"]=function(){return new Np};$g["video/vnd.mpeg.dash.mpd"]=function(){return new Np};function fq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function gq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}gq.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};
|
|
675
|
+
gq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function U(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function hq(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function iq(a,b,c){c=void 0===c?[]:c;this.h=b;this.i=a;this.g=c}function jq(a,b){this.name=a;this.value=b};function kq(a,b){return a.filter(function(c){return c.name==b})}function lq(a,b){return a.filter(function(c){return hq(c,"TYPE")==b})}function mq(a,b){var c=kq(a,b);return c.length?c[0]:null}function nq(a){var b=0;b=void 0===b?0:b;return(a=mq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b};function oq(a){this.h=a;this.g=0}function pq(a){qq(a,/[ \t]+/gm)}function qq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function rq(a){return a.g==a.h.length?null:(a=qq(a,/[^ \t\n]*/gm))?a[0]:null};function sq(){this.g=0}
|
|
676
|
+
function tq(a,b,c){b=dd(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 O(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=uq(a,g),--a.g,vq.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=uq(a,h);if(wq.includes(h.name)){if(1!=b)throw new O(2,4,4017);
|
|
677
|
+
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=uq(a,m),vq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==U(m,"TYPE")?k.push(m):"MAP"==U(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Db([d],[m.trim()])[0],h&&g.push(h),e.push(new iq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new iq("",g,k)));return new fq(c,b,f,e)}f.push(h);
|
|
678
|
+
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new jq("URI",k)),e=!0)}}return new fq(c,b,f)}function uq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new O(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new oq(f);var h;(h=qq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=qq(f,k);)d.push(new jq(h[1],h[2]||h[3])),pq(f)}return new gq(c,e,d,g)}
|
|
679
|
+
var vq="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".split(" "),wq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function xq(){}function yq(a){try{var b=zq(a);return Ze({uri:a,Gf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Xe(c)}}function zq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(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=md(a):e=hd(a);return{data:e,contentType:c}}
|
|
680
|
+
K("shaka.net.DataUriPlugin",xq);xq.parse=yq;hf("data",yq);function Aq(){var a=this;this.g=this.i=null;this.ya=1;this.A=new Map;this.C=new Map;this.ma=new Set;this.h=new Map;this.j=null;this.N="";this.$=new sq;this.ea=0;this.S=!1;this.P=null;this.F=new P(function(){Bq(a)});this.l=Cq;this.J=null;this.aa=0;this.H=Infinity;this.X=this.ba=0;this.G=new ef;this.I=[];this.K=new Map;this.za=!1;this.B=new Map;this.ua=new Map;this.m=!1}q=Aq.prototype;q.configure=function(a){this.g=a};
|
|
681
|
+
q.start=function(a,b){var c=this,d,e;return I(function(f){if(1==f.g)return c.i=b,c.m=b.isLowLatencyMode(),u(f,Dq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,u(f,Eq(c,d.data,a),3);e=c.ea;0<e&&c.F.T(e);return f["return"](c.J)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.i=null;this.ma.clear();this.J=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
|
|
682
|
+
q.update=function(){var a=this,b,c,d,e,f,g;return I(function(h){if(1==h.g){if(a.l==Cq)return h["return"]();b=[];c=Array.from(a.h.values());return c.length?u(h,Fq(a,c[0]),2):h.D(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Fq(a,c[d]));return u(h,Promise.all(b),4)}Gq(a);e=c.some(function(k){return 0==k.yf});e||(f=Hq,Iq(a,f.Xf),g=c.map(function(k){return k.Lc}),a.j.bb(Math.min.apply(Math,ia(g))),a.i.updateDuration());A(h)})};
|
|
683
|
+
function Fq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return I(function(w){if(1==w.g)return c=b.Yf,d=new lb(c),a.m&&b.dg&&ob(d,new qb("_HLS_skip=YES")),u(w,Dq(a,d.toString()),2);e=w.h;f=tq(a.$,e.data,e.uri);if(1!=f.type)throw new O(2,4,4017);g=kq(f.g,"EXT-X-DEFINE");h=Jq(a,g);k=b.stream;l=Kq(a,f,k.type,b.Mc,h);a.I.push(l);k.segmentIndex.hc(l,a.j.mb());l.length&&(m=nq(f.g),n=b.Mc.get(m),k.segmentIndex.Hb(n));p=l[l.length-1];if(t=mq(f.g,"EXT-X-ENDLIST"))b.yf=!0,b.Lc=p.endTime;A(w)})}q.onExpirationUpdated=function(){};
|
|
684
|
+
function Lq(a){if(!a.S){for(var b=-1,c=new Map,d=r(a.h.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.M[0]||null))for(var g=r(e.Mc),h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.P=b;b=r(a.h.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)f=a.P-c.get(d),e.M.splice(0,f),(e=e.M[0]||null)&&Mq(d,-e.startTime);a.S=!0}}}
|
|
685
|
+
function Nq(a){if(!a.S){for(var b=Infinity,c=r(a.h.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.M[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){c=r(a.h.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;null!=e&&(e=e.M[0]||null,null==e.g?Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.Jd,"Expect AV sync issues!"):Mq(d,e.g-b-e.startTime))}a.S=!0}}}
|
|
686
|
+
function Mq(a,b){a.stream.segmentIndex.offset(b);a.Lc+=b;for(var c=r(a.Mc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.Mc.set(d,e+b)}}
|
|
687
|
+
function Eq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,w,y,x,v,D,z,C,G,E,H,J,L,N,V,Z,ha,ja,wa,Ma,Ga,Sa,Ia,sc,Rc,Ed,Fd,rb,Gd,tc,Ge;return I(function(ab){switch(ab.g){case 1:d=tq(a.$,b,a.N);e=kq(d.g,"EXT-X-DEFINE");Oq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],J=Ad(G),L=new Map,u(ab,Pq(a,d,c,c,J,H,"",!0,"Media Playlist",null,L,null,!1,!1,E),8);k=kq(d.g,"EXT-X-MEDIA");l=kq(d.g,"EXT-X-STREAM-INF");m=kq(d.g,"EXT-X-IMAGE-STREAM-INF");Qq(a,l);n=
|
|
688
|
+
kq(d.g,"EXT-X-SESSION-DATA");p=r(n);for(t=p.next();!t.done;t=p.next())if(w=t.value,y=U(w,"DATA-ID"),x=U(w,"URI"),v=U(w,"LANGUAGE"),D=U(w,"VALUE"),z=(new Map).set("id",y),x&&z.set("uri",Db([a.N],[x])[0]),v&&z.set("language",v),D&&z.set("value",D),C=new M("sessiondata",z),a.i)a.i.onEvent(C);return u(ab,Rq(a,k),4);case 4:return Sq(a,k),u(ab,Tq(a,l),5);case 5:return f=ab.h,u(ab,Uq(a,k),6);case 6:return g=ab.h,u(ab,Vq(a,m),7);case 7:h=ab.h;ab.D(3);break;case 8:N=ab.h,a.h.set(c,N),f.push({id:0,language:"und",
|
|
689
|
+
disabledUntilTime:0,primary:!0,audio:"audio"==H?N.stream:null,video:"video"==H?N.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?Lq(a):Nq(a);if(a.za&&0==f.length)throw new O(2,4,4034);V=Infinity;Z=r(a.h.values());for(ha=Z.next();!ha.done;ha=Z.next())ja=ha.value,"text"!=ja.stream.type&&(V=Math.min(V,ja.Lc));a.l!=Cq?(a.j=new Q(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:
|
|
690
|
+
a.X?a.X:3*a.aa),a.j.Wc(!1)):(a.j=new Q(null,0),a.j.Wc(!0));if(a.l!=Cq)a.ea=a.H,wa=Hq,a.l==wa.$e&&(Ma=a.j.Dd,isNaN(a.g.availabilityWindowOverride)||(Ma=a.g.availabilityWindowOverride),a.j.Ke(Ma));else for(a.j.bb(V),Ga=r(a.h.values()),ha=Ga.next();!ha.done;ha=Ga.next())Sa=ha.value,Sa.stream.segmentIndex.yb(0,V);a.I=[];Ia=[];sc=r(f);for(Rc=sc.next();!Rc.done;Rc=sc.next())for(Ed=Rc.value,Fd=r([Ed.video,Ed.audio]),rb=Fd.next();!rb.done;rb=Fd.next())(Gd=rb.value)&&Ia.push(Gd);return u(ab,Promise.all(Ia.map(function(mg){return I(function(ng){return u(ng,
|
|
691
|
+
mg.createSegmentIndex(),0)})})),9);case 9:tc=r(Ia);for(rb=tc.next();!rb.done;rb=tc.next())Ge=rb.value,a.I.push(Ge.segmentIndex.M);Gq(a);a.j.le();a.J={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.J);A(ab)}})}function Oq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=U(e,"NAME");e=U(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}
|
|
692
|
+
function Jq(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=U(f,"NAME");var g=U(f,"VALUE");f=U(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}
|
|
693
|
+
function Qq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=U(e,"AUDIO");d=U(e,"VIDEO");var g=U(e,"SUBTITLES");e=Wq(a,e);if(g){var h=Gb(Ib,e);a.B.set(g,h);dc(e,h)}f&&(g=Gb("audio",e),g||(g=a.g.hls.defaultAudioCodec),a.B.set(f,g));d&&(f=Gb("video",e),f||(f=a.g.hls.defaultVideoCodec),a.B.set(d,f))}}
|
|
694
|
+
function Uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return I(function(w){if(1==w.g)return c=lq(b,"SUBTITLES"),d=c.map(function(y){var x,v,D;return I(function(z){if(1==z.g){if(x=a.g.disableText)return z["return"](null);B(z,2);return u(z,Xq(a,y),4)}if(2!=z.g)return v=z.h,z["return"](v.stream);D=F(z);if(a.g.hls.ignoreTextStreamFailures)return z["return"](null);throw D;})}),u(w,Promise.all(d),2);e=w.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=hq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(n=
|
|
692
695
|
r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return w["return"](e.filter(function(y){return y}))})}
|
|
693
|
-
function
|
|
694
|
-
function
|
|
695
|
-
function
|
|
696
|
-
void 0,C.frameRate=Number(h)||void 0,C.hdr=t||void 0;z=a.
|
|
696
|
+
function Vq(a,b){var c,d;return I(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return I(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);B(l,2);return u(l,Yq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
|
|
697
|
+
function Rq(a,b){var c;return I(function(d){b=b.filter(function(e){var f=U(e,"URI")||"";return"SUBTITLES"!=U(e,"TYPE")&&""!=f});c=b.map(function(e){return Xq(a,e)});return u(d,Promise.all(c),0)})}
|
|
698
|
+
function Tq(a,b){var c,d,e;return I(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,w;return I(function(y){if(1==y.g)return h=U(g,"FRAME-RATE"),k=Number(U(g,"AVERAGE-BANDWIDTH"))||Number(hq(g,"BANDWIDTH")),l=U(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=U(g,"VIDEO-RANGE"),u(y,Zq(a,g),2);if(w=y.h){for(var x=y["return"],v=w.audio,D=w.video,z=r(D),C=z.next();!C.done;C=z.next())if(C=C.value.stream)C.width=Number(n)||void 0,C.height=Number(p)||
|
|
699
|
+
void 0,C.frameRate=Number(h)||void 0,C.hdr=t||void 0;z=a.g.disableAudio;if(!v.length||z)v=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];v=r(v);for(C=v.next();!C.done;C=v.next()){C=C.value;for(var G=r(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=C?C.stream:null;var J=H?H.stream:null,L=C?C.stream.drmInfos:null,N=H?H.stream.drmInfos:null;H=(H?H.Jd:"")+" - "+(C?C.Jd:"");E&&J&&L.length&&N.length&&!(0<Wg(L,N).length)||a.ma.has(H)||(E={id:a.ya++,language:E?E.language:"und",primary:!!E&&E.primary||
|
|
697
700
|
!!J&&J.primary,audio:E,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(E),a.ma.add(H))}}y=x.call(y,z)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Ab,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
|
|
698
|
-
function
|
|
699
|
-
|
|
700
|
-
function
|
|
701
|
-
function
|
|
702
|
-
w="YES"==t;return u(x,
|
|
703
|
-
function
|
|
704
|
-
Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=U(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.
|
|
705
|
-
function
|
|
706
|
-
function
|
|
707
|
-
function
|
|
708
|
-
"METHOD"),"NONE"!=Z){E=!0;if("AES-128"==Z)return a.za=!0,uc["return"](null);ha=
|
|
709
|
-
[];if(n)for(
|
|
710
|
-
forced:p,channelsCount:l,audioSamplingRate:null,spatialAudio:t,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return uc["return"]({stream:
|
|
711
|
-
function
|
|
712
|
-
function
|
|
713
|
-
function
|
|
714
|
-
if(!a.m)return null}var y=[];if(a.m)for(var x={},v=0;v<d.g.length;x={
|
|
715
|
-
z))}}m?f=e+Number(m.value.split(",")[0]):f=y[y.length-1].endTime;(a=
|
|
716
|
-
function
|
|
717
|
-
function
|
|
701
|
+
function Zq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,w,y;return I(function(x){if(1==x.g)return c=Jb,d=Wq(a,b),e=U(b,"AUDIO"),f=U(b,"VIDEO"),h=(g=e||f)&&a.C.has(g)?a.C.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=hq(b,"URI"),p=k.audio.find(function(v){return v&&v.Jd==n}),t=Gb(c.Ja,d),(w=Gb(c.Gb,d))&&!t?l=c.Gb:!h.length&&w&&t?(l=c.Ja,d=[[t,w].join()]):k.audio.length&&p?(l=c.Gb,m=!0):l=k.video.length?c.Gb:c.Ja,m?x.D(2):u(x,$q(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
|
|
702
|
+
ar(k);return x["return"](k)})}function Wq(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=U(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=zd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function br(a){a=U(a,"LANGUAGE")||"und";return Mb(a)}
|
|
703
|
+
function ar(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Sq(a,b){var c=lq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=br(e);var f=hq(e,"GROUP-ID");e=hq(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
|
|
704
|
+
function Xq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,w,y;return I(function(x){if(1==x.g){c=hq(b,"GROUP-ID");d="";var v=hq(b,"TYPE").toLowerCase();"subtitles"==v&&(v=Ib);e=v;e!=Ib&&c&&a.B.has(c)&&(d=a.B.get(c));f=cr(hq(b,"URI"),a.A);if(a.h.has(f))return x["return"](a.h.get(f));g=br(b);h=U(b,"NAME");k=U(b,"DEFAULT");l="YES"==k;"audio"==e?v=(v=U(b,"CHANNELS"))?parseInt(v.split("/")[0],10):null:v=null;m=v;"audio"==e?v=(v=U(b,"CHANNELS"))?v.includes("/JOC"):!1:v=!1;n=v;p=U(b,"CHARACTERISTICS");t=U(b,"FORCED");
|
|
705
|
+
w="YES"==t;return u(x,dr(a,f,d,e,g,l,h,m,null,p,w,n),2)}y=x.h;a.C.has(c)?a.C.get(c).push(y):a.C.set(c,[y]);if(null==y)return x["return"](null);if(a.h.has(f))return x["return"](a.h.get(f));a.h.set(f,y);return x["return"](y)})}
|
|
706
|
+
function Yq(a,b){var c,d,e,f,g,h,k,l,m,n;return I(function(p){if(1==p.g){c=cr(hq(b,"URI"),a.A);d=U(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=br(b);f=U(b,"NAME");g=U(b,"CHARACTERISTICS");return u(p,dr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=U(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
|
|
707
|
+
Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=U(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
|
|
708
|
+
function $q(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){e=cr(hq(b,"URI"),a.A);if(a.h.has(e))return k["return"](a.h.get(e));var l=U(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=Fb(d,c);return u(k,dr(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
|
|
709
|
+
function dr(a,b,c,d,e,f,g,h,k,l,m,n){var p,t,w;return I(function(y){if(1==y.g)return p=Db([a.N],[b])[0],u(y,Dq(a,p),2);t=y.h;p=t.uri;w=tq(a.$,t.data,p);return y["return"](Pq(a,w,b,p,c,d,e,f,g,h,k,l,m,n))})}
|
|
710
|
+
function Pq(a,b,c,d,e,f,g,h,k,l,m,n,p,t,w){var y,x,v,D,z,C,G,E,H,J,L,N,V,Z,ha,ja,wa,Ma,Ga,Sa,Ia,sc,Rc,Ed,Fd,rb,Gd,tc,Ge,ab,mg,ng;return I(function(uc){if(1==uc.g){if(1!=b.type)throw new O(2,4,4017);y=kq(b.g,"EXT-X-DEFINE");x=Jq(a,y);er(a,b);return w?uc.D(2):u(uc,fr(a,f,e,b,x),3)}2!=uc.g&&(w=uc.h);v=[];if(b.segments)for(D=r(b.segments),z=D.next();!z.done;z=D.next())C=z.value,G=kq(C.h,"EXT-X-KEY"),v.push.apply(v,ia(G));E=!1;H=[];J=new Set;L=r(v);for(N=L.next();!N.done;N=L.next())if(V=N.value,Z=hq(V,
|
|
711
|
+
"METHOD"),"NONE"!=Z){E=!0;if("AES-128"==Z)return a.za=!0,uc["return"](null);ha=hq(V,"KEYFORMAT");if(wa=(ja=gr[ha])?ja(V,w):null){if(wa.keyIds)for(Ma=r(wa.keyIds),Ga=Ma.next();!Ga.done;Ga=Ma.next())Sa=Ga.value,J.add(Sa);H.push(wa)}}if(E&&!H.length)throw new O(2,4,4026);Zi.includes(w)&&(e="");Ia=new Map;try{sc=Kq(a,b,f,Ia,x)}catch(To){if(4035==To.code)return Ua("Skipping unsupported HLS stream",w,c),uc["return"](null);throw To;}Rc=sc[sc.length-1].endTime;Ed=new vj(sc);Fd=f==Ib?"subtitle":void 0;rb=
|
|
712
|
+
[];if(n)for(Gd=r(n.split(",")),tc=Gd.next();!tc.done;tc=Gd.next())Ge=tc.value,rb.push(Ge);mg=(ab=mq(b.g,"EXT-X-SERVER-CONTROL"))?null!=ab.getAttribute("CAN-SKIP-UNTIL"):!1;ng={id:a.ya++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ed,mimeType:w,codecs:e,kind:Fd,encrypted:E,drmInfos:H,keyIds:J,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:rb,
|
|
713
|
+
forced:p,channelsCount:l,audioSamplingRate:null,spatialAudio:t,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return uc["return"]({stream:ng,Jd:c,Yf:d,Lc:Rc,Mc:Ia,dg:mg,yf:!1})})}
|
|
714
|
+
function er(a,b){var c=mq(b.g,"EXT-X-PLAYLIST-TYPE"),d=mq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Iq(a,Cq);else{c?Iq(a,hr):Iq(a,ir);d=mq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=mq(b.g,"EXT-X-PART-INF");a.m&&c?(a.ba=Number(hq(c,"PART-TARGET")),a.H=Math.min(a.ba,a.H),c=mq(b.g,"EXT-X-SERVER-CONTROL"),a.X=c?Number(hq(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.aa=Math.max(d,a.aa)}}
|
|
715
|
+
function jr(a,b,c,d){c=mq(c,"EXT-X-MAP");if(!c)return null;var e=hq(c,"URI");d=cr(Db([b],[e])[0],d);b=[d,U(c,"BYTERANGE","")].join("-");a.ua.has(b)||(c=kr(d,c),a.ua.set(b,c));return a.ua.get(b)}function kr(a,b){var c=0,d=null,e=U(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new qi(function(){return[a]},c,d)}
|
|
716
|
+
function lr(a,b,c,d,e,f,g,h){var k=d.h,l=cr(d.i,f),m=mq(k,"EXTINF"),n=f=0,p=null;d.g.length&&!a.m&&Ua("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 t=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=mq(k,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(t=$f(w.value))}w=ti;mq(k,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.g.length)throw new O(2,4,4024,"EXTINF");
|
|
717
|
+
if(!a.m)return null}var y=[];if(a.m)for(var x={},v=0;v<d.g.length;x={Sd:x.Sd},v++){var D=d.g[v],z=0==v?c:y[y.length-1],C=0==v?e:z.endTime,G=Number(U(D,"DURATION"))||a.ba;if(G){G=C+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(E=U(D,"BYTERANGE-START"))?Number(E):0:(E=U(D,"BYTERANGE"),H=r(mr(z,E)),E=H.next().value,H=H.next().value);if(z=U(D,"URI"))x.Sd=Db([g],[z])[0],z=ti,"YES"==U(D,"GAP")&&(z=2),y.push(new si(C,G,function(J){return function(){return[J.Sd]}}(x),E,H,b,0,0,Infinity,[],"",null,null,
|
|
718
|
+
z))}}m?f=e+Number(m.value.split(",")[0]):f=y[y.length-1].endTime;(a=mq(k,"EXT-X-BYTERANGE"))?(p=r(mr(c,a.value)),n=p.next().value,p=p.next().value):y.length&&(n=y[0].Ta,p=y[y.length-1].Ca);c="";a=null;"image"==h&&(c="1x1",h=mq(k,"EXT-X-TILES"))&&(c=hq(h,"LAYOUT"),(h=U(h,"DURATION"))&&(a=Number(h)));return new si(e,f,function(){return l.length?[l]:[]},n,p,b,0,0,Infinity,y,c,a,t,w)}function mr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.Ca+1,d=c+d-1);return[c,d]}
|
|
719
|
+
function Gq(a){if(a.j){for(var b=r(a.I),c=b.next();!c.done;c=b.next())a.j.ic(c.value);a.I=[]}}
|
|
720
|
+
function Kq(a,b,c,d,e){var f=b.segments,g=nq(b.g),h=mq(b.g,"EXT-X-SKIP");h=h?Number(U(h,"SKIPPED-SEGMENTS")):0;var k=g+h,l=0;a.l!=Cq&&d.has(k)&&(l=d.get(k));for(var m=[],n=null,p=0;p<f.length;p++){var t=f[p],w=0==p?l:n.endTime;k=g+h+p;d.set(k,w);var y=jr(a,b.h,t.h,e);!a.m&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.m=a.i.isLowLatencyMode());(n=y=lr(a,y,n,t,w,e,b.h,c))&&(a.g.hls.ignoreManifestProgramDateTime&&null!=a.P&&k<a.P||m.push(y))}if(a=m.some(function(x){return null!=x.g}))for(b=
|
|
718
721
|
{},c=0;c<m.length;b={rc:b.rc,qc:b.qc,Xc:b.Xc,sb:b.sb,pc:b.pc},c++)if(b.sb=m[c],null==b.sb.g)for(b.qc=0,b.rc=c,d=function(x){return function(){var v=m[x.rc];if(v){if(null!=v.g)return v.g+x.qc;x.qc-=v.endTime-v.startTime;x.rc+=1}return null}}(b),b.pc=0,b.Xc=c,e=function(x){return function(){var v=m[x.Xc];if(v){v!=x.sb&&(x.pc+=v.endTime-v.startTime);if(null!=v.g)return v.g+x.pc;--x.Xc}return null}}(b);null==b.sb.g;)b.sb.g=e(),null==b.sb.g&&(b.sb.g=d());if(a)for(a=r(m),b=a.next();!b.done;b=a.next())for(c=
|
|
719
|
-
b.value,b=c.g,c=r(c.h),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return m}function
|
|
720
|
-
function
|
|
721
|
-
if(!y){if(b==f.ha)return v["return"]("text/vtt");x=n.mp4;return v["return"](x)}return v["return"](y.split(";")[0])})}function
|
|
722
|
-
function
|
|
723
|
-
var
|
|
724
|
-
image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},
|
|
725
|
-
if(a=U(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
|
|
726
|
-
Vc("Tizen 3")||Vc("Tizen 2")||Xc()||(bh.m3u8=function(){return new
|
|
727
|
-
function
|
|
728
|
-
break}return u(L,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,n-p,x-n),p=n,t=J;H.done?G.close():(G.enqueue(H.value),E());A(L)}})}E()},new k({start:v}),u(C,l.arrayBuffer(),5);case 5:m=C.h;va(C,3);break;case 2:D=F(C);if(d.
|
|
729
|
-
function
|
|
730
|
-
function
|
|
722
|
+
b.value,b=c.g,c=r(c.h),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return m}function cr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new O(2,4,4039,f);}}return c}
|
|
723
|
+
function fr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,w,y,x;return I(function(v){if(1==v.g){f=Jb;g=rf;h=Math.trunc((d.segments.length-1)/2);k=cr(d.segments[h].i,e);l=new lb(k);m=l.La.split(".").pop();n=nr[b];if((p=n[m])||(p=or[m]))return v["return"](p);if(b==f.ha){if("vtt"==c||"wvtt"==c)return v["return"]("text/vtt");if(c&&""!==c)return v["return"]("application/mp4")}if(b==f.xc&&(!c||"jpeg"==c))return v["return"]("image/jpeg");t=lf([k],a.g.retryParameters);t.method="HEAD";return u(v,pr(a,t,g),2)}w=v.h;y=w.headers["content-type"];
|
|
724
|
+
if(!y){if(b==f.ha)return v["return"]("text/vtt");x=n.mp4;return v["return"](x)}return v["return"](y.split(";")[0])})}function Dq(a,b){var c=lf([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return pr(a,c,0)}function Bq(a){var b,c;I(function(d){if(1==d.g){if(!a.i)return d["return"]();B(d,2);return u(d,a.update(),4)}if(2!=d.g)return a.l!=Cq&&(b=a.ea,a.F.T(b)),va(d,0);c=F(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.F.T(.1);A(d)})}
|
|
725
|
+
function Iq(a,b){a.l=b;a.j&&a.j.Wc(a.l==Cq);a.l!=Cq||a.F.stop()}function pr(a,b,c){if(!a.G)throw new O(2,7,7001);b=a.i.networkingEngine.request(c,b);ff(a.G,b);return b.promise}K("shaka.hls.HlsParser",Aq);
|
|
726
|
+
var or={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},nr={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"},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"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"txt/vtt",
|
|
727
|
+
ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},gr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new O(2,4,4040);return Eb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=hq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=hq(a,"URI");b=zq(b);b=Gc(b.data);b=Eb("com.widevine.alpha",[{initDataType:"cenc",
|
|
728
|
+
initData:b}]);if(a=U(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=hq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=hq(a,"URI");a=zq(a);a=Gc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Pf(a,b,new Set,0);return Eb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Cq="VOD",ir="EVENT",hr="LIVE",Hq={Xf:Cq,Sh:ir,$e:hr};
|
|
729
|
+
Vc("Tizen 3")||Vc("Tizen 2")||Xc()||(bh.m3u8=function(){return new Aq},$g["application/x-mpegurl"]=function(){return new Aq},$g["application/vnd.apple.mpegurl"]=function(){return new Aq});function qr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Gf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=gd(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function rr(){}function sr(a,b,c,d,e){var f=new tr;zf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ur,h={hf:!1,Rf:!1};a=vr(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 We(a,function(){h.hf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new P(function(){h.Rf=!0;g.abort()});k.T(b/1E3);a["finally"](function(){k.stop()})}return a}
|
|
730
|
+
function vr(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,w,y,x,v,D,z;return I(function(C){switch(C.g){case 1:return h=wr,k=xr,p=n=0,t=Date.now(),B(C,2),u(C,h(a,c),4);case 4:return l=C.h,f(yr(l.headers)),w=l.clone().body.getReader(),x=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,v=function(G){function E(){var H,J;return I(function(L){switch(L.g){case 1:return B(L,2),u(L,w.read(),4);case 4:H=L.h;va(L,3);break;case 2:return F(L),L["return"]();case 3:if(H.done){L.D(5);break}n+=H.value.byteLength;if(!g){L.D(5);
|
|
731
|
+
break}return u(L,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,n-p,x-n),p=n,t=J;H.done?G.close():(G.enqueue(H.value),E());A(L)}})}E()},new k({start:v}),u(C,l.arrayBuffer(),5);case 5:m=C.h;va(C,3);break;case 2:D=F(C);if(d.hf)throw new O(1,1,7001,a,b);if(d.Rf)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,D,b);case 3:return z=yr(l.headers),C["return"](qr(z,m,l.status,a,l.url,b))}})}function yr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
732
|
+
function zr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}K("shaka.net.HttpFetchPlugin",rr);rr.isSupported=zr;rr.parse=sr;var wr=window.fetch,ur=window.AbortController,xr=window.ReadableStream,tr=window.Headers;zr()&&(hf("http",sr,2,!0),hf("https",sr,2,!0),hf("blob",sr,2,!0));function Ar(){}
|
|
733
|
+
function Br(a,b,c,d,e){var f=new Cr,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 O(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=Dr(f);e(t);n=!0}};f.onload=function(){var t=Dr(f),w=f.response;try{var y=qr(t,w,f.status,a,f.responseURL,c);l(y)}catch(x){m(x)}};f.onerror=function(t){m(new O(1,1,1002,a,t,
|
|
731
734
|
c))};f.ontimeout=function(){m(new O(1,1,1003,a,c))};f.onprogress=function(t){var w=Date.now();if(100<w-g||t.lengthComputable&&t.loaded==t.total)d(w-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=w};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new We(k,function(){f.abort();return Promise.resolve()})}
|
|
732
|
-
function
|
|
733
|
-
function
|
|
734
|
-
function
|
|
735
|
-
function
|
|
736
|
-
q.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
737
|
-
q.getManifests=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,
|
|
738
|
-
function
|
|
739
|
-
function
|
|
740
|
-
function
|
|
741
|
-
|
|
742
|
-
function
|
|
743
|
-
function
|
|
744
|
-
function
|
|
745
|
-
|
|
746
|
-
function
|
|
747
|
-
function
|
|
748
|
-
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}}
|
|
749
|
-
function
|
|
750
|
-
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
|
|
751
|
-
|
|
735
|
+
function Dr(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",Ar);Ar.parse=Br;var Cr=window.XMLHttpRequest;hf("http",Br,1,!0);hf("https",Br,1,!0);hf("blob",Br,1,!0);function Er(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Fr(a){return a.Pa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ta+":"+a.Ca}function Gr(a,b){return Nj(a.g.Pa(),a.g.Ta,a.g.Ca,b.streaming.retryParameters)};function Hr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Ir(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Hr.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 Jr(a){var b=this;this.A=a;this.j=new Map;this.i=new sf(function(){return Kr(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Hr}Jr.prototype.destroy=function(){return this.i.destroy()};function Lr(a,b,c){a.m=b;a.l=c}function Kr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
736
|
+
function Mr(a,b,c,d,e,f){tf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return I(function(w){if(1==w.g)return u(w,Nr(a,c),2);h=w.h;if(a.i.g)throw new O(2,9,7001);if(e)for(m in k=Gc(h),l=new Of(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 y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return w["return"](f(h))})});a.j.set(b,g)}function Or(a){return I(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
|
|
737
|
+
function Nr(a,b){var c,d,e,f;return I(function(g){if(1==g.g)return c=rf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;dc(a.h,e);return g["return"](f.data)})};function Pr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Nc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Pr.prototype.abort=function(){var a=this;return I(function(b){if(1==b.g){try{a.i.abort()}catch(c){}B(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);A(b)})};
|
|
738
|
+
function Qr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return I(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();A(g)})}})}Pr.prototype.store=function(){return this.h};Pr.prototype.promise=function(){return this.g};function Rr(a){this.h=a;this.g=[]}Rr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Sr(a,b){return Tr(a,b,"readwrite")}function Tr(a,b,c){c=a.h.transaction([b],c);var d=new Pr(c,b);a.g.push(d);d.promise().then(function(){dc(a.g,d)},function(){dc(a.g,d)});return d};function Ur(a,b,c){this.h=new Rr(a);this.i=b;this.g=c}q=Ur.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Vr(this.i)};q.removeSegments=function(a,b){return Wr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,Xr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.lf(e)}))})};q.addManifests=function(){return Vr(this.g)};
|
|
739
|
+
q.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function Yr(a,b,c){a=Sr(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=Sr(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 Wr(this,this.g,a,b)};
|
|
740
|
+
q.getManifests=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,Xr(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Ac(e)})))})};q.getAllManifests=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=Tr(a.h,a.g,"readonly"),c=new Map,u(d,Qr(b,function(e,f){var g;return I(function(h){if(1==h.g)return u(h,a.Ac(f),2);g=h.h;c.set(e,g);A(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.lf=function(a){return a};q.Ac=function(a){return Promise.resolve(a)};
|
|
741
|
+
function Vr(a){return Promise.reject(new O(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 I(function(m){if(1==m.g){d=Sr(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={bd:g.bd},k=h.next())l=k.value,g.bd=e.add(l),g.bd.onsuccess=function(n){return function(){f.push(n.bd.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
|
|
742
|
+
function Wr(a,b,c,d){a=Sr(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={$c:e.$c},f=c.next())e.$c=f.value,b["delete"](e.$c).onsuccess=function(g){return function(){return d(g.$c)}}(e);return a.promise()}
|
|
743
|
+
function Xr(a,b,c){var d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=Tr(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={wc:h.wc,tc:h.tc},l=k.next())h.tc=l.value,h.wc=e.get(h.tc),h.wc.onsuccess=function(n){return function(){void 0==n.wc.result&&g.push(n.tc);f[n.tc]=n.wc.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new O(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function Zr(a){this.g=new Rr(a)}Zr.prototype.destroy=function(){return this.g.destroy()};Zr.prototype.getAll=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=Tr(a.g,"session-ids","readonly"),c=[],u(d,Qr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Zr.prototype.add=function(a){var b=Sr(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()};
|
|
744
|
+
Zr.prototype.remove=function(a){var b=this,c;return I(function(d){return 1==d.g?(c=Sr(b.g,"session-ids"),u(d,Qr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function $r(){this.g=new Map}$r.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)};$r.prototype.init=function(){var a=this;as.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});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)};
|
|
745
|
+
function bs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Sa:d,Ba:f},Ba:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function cs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Sa:d,Ba:f},e)})})}
|
|
746
|
+
function ds(a,b,c){a=a.g.get(b);if(!a)throw new O(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new O(2,9,9013,"Could not find cell with name "+c);return b}function es(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function fs(a){var b=Array.from(a.g.keys());if(!b.length)throw new O(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
747
|
+
function gs(a){var b,c,d;return I(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=as,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function hs(a,b){as.set(a,b)}K("shaka.offline.StorageMuxer",$r);$r.unregister=function(a){as["delete"](a)};$r.register=hs;$r.prototype.destroy=$r.prototype.destroy;var as=new Map;function is(){Ur.apply(this,arguments)}qa(is,Ur);is.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return I(function(g){d=Sr(c.h,c.g);e=d.store();f=new Nc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
|
|
748
|
+
is.prototype.Ac=function(a){var b,c,d,e,f,g;return I(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=js(a.periods[c],e),b.push(f);return u(h,sp(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})})};
|
|
749
|
+
function js(a,b){ks(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return ls(e,a.startTime,b)})}
|
|
750
|
+
function ls(a,b,c){var d=a.initSegmentUri?ms(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=ms(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
751
|
+
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}}is.prototype.lf=function(a){return{data:a.data}};function ms(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 O(2,9,9004,"Could not parse uri "+a);}
|
|
752
|
+
function ks(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++,
|
|
753
|
+
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 ns(){Ur.apply(this,arguments)}qa(ns,Ur);
|
|
754
|
+
ns.prototype.Ac=function(a){var b,c,d,e,f,g;return I(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(os(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,sp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
|
|
752
755
|
a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
753
|
-
function
|
|
754
|
-
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function
|
|
755
|
-
q.init=function(){var a=this,b=new Nc,c=!1,d=new P(function(){c=!0;b.reject(new O(2,9,9017))});d.T(2);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
|
|
756
|
-
new
|
|
756
|
+
function os(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
|
|
757
|
+
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function ps(){Ur.apply(this,arguments)}qa(ps,Ur);q=ps.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 Yr(this,a,b)};q.Ac=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function qs(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=qs.prototype;
|
|
758
|
+
q.init=function(){var a=this,b=new Nc,c=!1,d=new P(function(){c=!0;b.reject(new O(2,9,9017))});d.T(2);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 is(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new ns(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
759
|
+
new ns(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new ps(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Zr(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 O(2,
|
|
757
760
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),A(b)}})};
|
|
758
761
|
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};
|
|
759
|
-
q.erase=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,
|
|
760
|
-
function
|
|
761
|
-
function
|
|
762
|
-
function
|
|
762
|
+
q.erase=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,rs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
|
|
763
|
+
function rs(){var a=new Nc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}hs("idb",function(){return Vc("CrKey")||Uc()||!window.indexedDB?null:new qs});function ss(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}ss.prototype.Sa=function(){return this.i};ss.prototype.Ba=function(){return this.h};ss.prototype.key=function(){return this.l};ss.prototype.toString=function(){return this.j};
|
|
764
|
+
function ts(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 ss(b,c,d,Number(a[4])):null};function us(a,b){this.h=a;this.g=b}
|
|
765
|
+
function vs(a,b){var c=new Q(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=ws(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ib}).map(function(l){return xs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return xs(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=
|
|
763
766
|
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}}
|
|
764
|
-
function
|
|
765
|
-
b.next())for(e=e.value,g=
|
|
766
|
-
function
|
|
767
|
-
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function
|
|
768
|
-
function
|
|
769
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:d=
|
|
770
|
-
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return d=c.g,e=new
|
|
771
|
-
$g["application/x-offline-manifest"]=function(){return new
|
|
772
|
-
function
|
|
773
|
-
function
|
|
767
|
+
function ws(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=
|
|
768
|
+
b.next())for(e=e.value,g=xs(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=xs(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}
|
|
769
|
+
function xs(a,b,c){var d=b.segments.map(function(e){return ys(a,e)});c.ic(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new vj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
|
|
770
|
+
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function ys(a,b){var c=new ss("segment",a.h,a.g,b.dataKey);return new si(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?zs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
771
|
+
function zs(a,b){var c=new ss("segment",a.h,a.g,b);return new qi(function(){return[c.toString()]},0,null)};function As(){this.g=null}q=As.prototype;q.configure=function(){};
|
|
772
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:d=ts(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new $r;ua(m);return u(m,e.init(),4);case 4:return u(m,ds(e,d.Sa(),d.Ba()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new us(d.Sa(),d.Ba()),l=vs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return xa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
773
|
+
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return d=c.g,e=new $r,B(m,2,3),u(m,e.init(),5);case 5:return u(m,ds(e,d.Sa(),d.Ba()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:F(m),m.D(3)}})};
|
|
774
|
+
$g["application/x-offline-manifest"]=function(){return new As};function Bs(){}function Cs(a){var b=ts(a);b&&"manifest"==b.g?(a={uri:a,Gf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ze(a)):a=b&&"segment"==b.g?Ds(b.key(),b):Xe(new O(2,1,9004,a));return a}
|
|
775
|
+
function Ds(a,b){var c=new $r;return Ze(void 0).na(function(){return c.init()}).na(function(){return ds(c,b.Sa(),b.Ba())}).na(function(d){return d.getSegments([b.key()])}).na(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}K("shaka.offline.OfflineScheme",Bs);Bs.plugin=Cs;hf("offline",Cs);function Es(a,b,c){var d,e,f,g,h,k;return I(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,w=r(m),y=w.next();!y.done;y=w.next())if(y=y.value,Fs(y.info,p)){y.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.D(4);break}g=f.value;h=Gs(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l["return"](d)}})}
|
|
776
|
+
function Gs(a,b,c){var d,e;return I(function(f){switch(f.g){case 1:return d=new kg({Pb:b,onError:function(){},zd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),B(f,2),d.configure(a),u(f,ug(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return B(f,6),u(f,Fg(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
|
|
774
777
|
9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return I(function(h){if(1==h.g)return B(h,2),u(h,Gg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);A(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
775
|
-
function
|
|
776
|
-
function
|
|
777
|
-
case 4:b.h=null,b.g=null,A(k)}})})}function
|
|
778
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
779
|
-
function
|
|
780
|
-
p,b,c,e,f),y=w.
|
|
781
|
-
function
|
|
782
|
-
return u(ha,
|
|
783
|
-
F(z),D=Object.values(l),u(z,g.removeSegments(D,function(){}),10);case 10:throw v;}})}function
|
|
784
|
-
function
|
|
785
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(v,a.updateManifest(b,c),4);case 4:g=!0;f();va(v,0);break;case 2:return y=F(v),u(v,
|
|
786
|
-
function
|
|
778
|
+
function Fs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ec(a.audioCapabilities,b.audioCapabilities,c)&&ec(a.videoCapabilities,b.videoCapabilities,c)};function Hs(a,b,c){var d=b.presentationTimeline.getDuration();b=Is(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Js(a,b){var c=vs(new us(a.Sa(),a.Ba()),b),d=b.appMetadata||{};c=Is(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}}
|
|
779
|
+
function Is(a){var b=[],c=ye(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(pe(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(qe(c.value));return b};function Ks(){this.g={}}function Ls(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 Ms(a,b){a.g[b.id]=b.bandwidth||2048}function Ns(a,b){var c=a.g[b];null==c&&(c=0);return c};function Os(a){var b=this;if(a&&a.constructor!=S)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ec()):(this.h=jl(),this.g=new gf);this.i=[];this.j=[];var c=!a;this.l=new sf(function(){var d,e,f,g,h;return I(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Kr(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return u(k,b.g.destroy(),4);
|
|
780
|
+
case 4:b.h=null,b.g=null,A(k)}})})}function Ps(){if(Qc())a:{var a=r(as.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=Os.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=gl(a,b));return ll(this.h,a)};q.getConfiguration=function(){var a=jl();ll(a,this.h,jl());return a};q.Ec=function(){return this.g};
|
|
781
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Jr(this.g);this.j.push(f);b=Qs(this,a,b||{},function(){var g;return I(function(h){if(1==h.g)return u(h,Zg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new We(b,function(){return Kr(f)});b["finally"](function(){dc(d.j,f)});return Rs(this,b)};
|
|
782
|
+
function Qs(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,w,y,x,v,D,z;return I(function(C){switch(C.g){case 1:return Ss(),h=g=null,k=new $r,n=m=l=null,B(C,2,3),u(C,d(),5);case 5:return g=C.h,u(C,Ts(a,b,g,e),6);case 6:p=C.h;Us(a);t=!p.presentationTimeline.U()&&!p.presentationTimeline.Mb();if(!t)throw new O(2,9,9005,b);return u(C,Vs(a,p,function(G){n=n||G},e),7);case 7:h=C.h;Us(a);if(n)throw n;return u(C,Ws(p,e),8);case 8:return u(C,k.init(),9);case 9:return Us(a),u(C,bs(k),10);case 10:return l=C.h,Us(a),w=Xs(h,
|
|
783
|
+
p,b,c,e,f),y=w.Ug,x=w.Oe,u(C,l.Ba.addManifests([y]),11);case 11:v=C.h;Us(a);m=v[0];Us(a);if(n)throw n;return u(C,Ys(a,x,m,y,f,e,l.Ba,p,h),12);case 12:return Us(a),D=new ss("manifest",l.path.Sa,l.path.Ba,m),C["return"](Js(D,y));case 3:return xa(C),u(C,k.destroy(),13);case 13:if(!g){C.D(14);break}return u(C,g.stop(),14);case 14:if(!h){C.D(16);break}return u(C,h.destroy(),16);case 16:ya(C,0);break;case 2:z=F(C);if(null==m){C.D(18);break}return u(C,Zs(m),18);case 18:throw n||z;}})}
|
|
784
|
+
function Ys(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,w,y,x,v,D;return I(function(z){switch(z.g){case 1:l={};m=0;n=function(C,G){var E,H,J,L,N,V,Z;return I(function(ha){if(1==ha.g){E={};H=r(C);for(J=H.next();!J.done;E={Fb:E.Fb},J=H.next())E.Fb=J.value,L=Gr(E.Fb,f),N=E.Fb.i,V=E.Fb.h,Z=function(ja){return function(wa){var Ma,Ga,Sa;return I(function(Ia){if(1==Ia.g)return u(Ia,g.addSegments([{data:wa}]),2);Ma=Ia.h;Us(a);Ga=ja.Fb.g;Sa=Fr(Ga);l[Sa]=Ma[0];m+=wa.byteLength;A(Ia)})}}(E),Mr(e,E.Fb.groupId,L,N,V,Z);
|
|
785
|
+
return u(ha,Or(e),2)}if(!G)return ha.D(0);Us(a);$s(h,d,k,f);return u(ha,g.updateManifest(c,d),0)})};p=!1;B(z,2);if(!at(h)||!p||bt(h)){z.D(4);break}return u(z,n(b.filter(function(C){return C.h}),!0),5);case 5:return Us(a),b=b.filter(function(C){return!C.h}),t=l,w=m,l={},m=0,u(z,ct(g,c,d,t,w,function(){return Us(a)}),6);case 6:Us(a);case 4:if(p){z.D(7);break}return u(z,n(b,!1),8);case 8:return Us(a),y=l,x=m,l={},m=0,u(z,ct(g,c,d,y,x,function(){return Us(a)}),9);case 9:Us(a);case 7:va(z,0);break;case 2:return v=
|
|
786
|
+
F(z),D=Object.values(l),u(z,g.removeSegments(D,function(){}),10);case 10:throw v;}})}function Zs(a){var b,c,d,e;return I(function(f){switch(f.g){case 1:return b=new $r,u(f,b.init(),2);case 2:return u(f,bs(b),3);case 3:return c=f.h,d=new ss("manifest",c.path.Sa,c.path.Ba,a),u(f,b.destroy(),4);case 4:return e=new Os,u(f,e.remove(d.toString()),0)}})}
|
|
787
|
+
function ct(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,w,y,x;return I(function(v){switch(v.g){case 1:g=!1;B(v,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,w=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=w&&(t.dataKey=w,t.pendingSegmentRefId=void 0),w=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=w&&(t.initSegmentKey=w,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
|
|
788
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(v,a.updateManifest(b,c),4);case 4:g=!0;f();va(v,0);break;case 2:return y=F(v),u(v,Zs(b),5);case 5:if(g){v.D(6);break}x=Object.values(d);return u(v,a.removeSegments(x,function(){}),6);case 6:throw y;}})}
|
|
789
|
+
function Ws(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,w,y,x,v,D,z,C,G,E,H,J,L,N,V,Z,ha,ja;return I(function(wa){switch(wa.g){case 1:return c={width:Infinity,height:Infinity},Zd(a,b.restrictions,c),u(wa,ce(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Nd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(pe(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=
|
|
787
790
|
p.value,d.push(qe(t));w=r(a.imageStreams);for(y=w.next();!y.done;y=w.next())x=y.value,d.push(re(x));return u(wa,b.offline.trackSelectionCallback(d),3);case 3:v=wa.h;D=a.presentationTimeline.getDuration();z=0;C=r(v);for(G=C.next();!G.done;G=C.next())E=G.value,H=E.bandwidth*D/8,z+=H;B(wa,4);return u(wa,b.offline.downloadSizeCallback(z),6);case 6:J=wa.h;if(!J)throw new O(2,9,9014);va(wa,5);break;case 4:L=F(wa);if(L instanceof O)throw L;throw new O(2,9,9015);case 5:N=new Set;V=new Set;Z=new Set;ha=r(v);
|
|
788
|
-
for(G=ha.next();!G.done;G=ha.next())ja=G.value,"variant"==ja.type&&N.add(ja.id),"text"==ja.type&&V.add(ja.id),"image"==ja.type&&Z.add(ja.id);a.variants=a.variants.filter(function(Ma){return N.has(Ma.id)});a.textStreams=a.textStreams.filter(function(Ma){return V.has(Ma.id)});a.imageStreams=a.imageStreams.filter(function(Ma){return Z.has(Ma.id)});
|
|
789
|
-
function
|
|
790
|
-
p&&n&&(p.initData=[]);return{
|
|
791
|
-
function
|
|
792
|
-
function
|
|
793
|
-
function
|
|
794
|
-
function
|
|
795
|
-
function
|
|
796
|
-
q.list=function(){return
|
|
797
|
-
function
|
|
798
|
-
|
|
799
|
-
function
|
|
800
|
-
function
|
|
801
|
-
function
|
|
802
|
-
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;
|
|
803
|
-
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function
|
|
804
|
-
function
|
|
805
|
-
function
|
|
806
|
-
function
|
|
807
|
-
function
|
|
808
|
-
|
|
809
|
-
var
|
|
810
|
-
Tm.offline=
|
|
811
|
-
function
|
|
812
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
813
|
-
function
|
|
814
|
-
function
|
|
815
|
-
l=
|
|
816
|
-
n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);B(v,3);return u(v,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=v.h;va(v,4);break;case 3:F(v);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return v["return"](b)}})}
|
|
817
|
-
function
|
|
818
|
-
function
|
|
819
|
-
function
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
function
|
|
824
|
-
function
|
|
825
|
-
function
|
|
826
|
-
function
|
|
791
|
+
for(G=ha.next();!G.done;G=ha.next())ja=G.value,"variant"==ja.type&&N.add(ja.id),"text"==ja.type&&V.add(ja.id),"image"==ja.type&&Z.add(ja.id);a.variants=a.variants.filter(function(Ma){return N.has(Ma.id)});a.textStreams=a.textStreams.filter(function(Ma){return V.has(Ma.id)});a.imageStreams=a.imageStreams.filter(function(Ma){return Z.has(Ma.id)});dt(a);A(wa)}})}
|
|
792
|
+
function Xs(a,b,c,d,e,f){var g=Hs(c,b,d),h=e.offline.progressCallback;Lr(f,function(t,w){g.size=w;h(g,t)},function(t,w){k&&e.offline.usePersistentLicense&&l==w&&Cg(a,"cenc",t)});var k=at(b)&&!bt(b),l=null;k&&(l=et.get(a.g.keySystem));for(var m=new Ks,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())Ms(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())Ls(m,n.value);m=ft(f,m,b,e);f=m.streams;m=m.Oe;p=a.g;n=e.offline.usePersistentLicense;
|
|
793
|
+
p&&n&&(p.initData=[]);return{Ug:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Dc(),streams:f,sessionIds:n?Lg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Oe:m}}function at(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
794
|
+
function bt(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 $s(a,b,c,d){b.expiration=c.Dc();c=Lg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(at(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}q.remove=function(a){return gt(this,ht(this,a))};
|
|
795
|
+
function ht(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:Ss();c=ts(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new $r;ua(k);return u(k,e.init(),4);case 4:return u(k,ds(e,d.Sa(),d.Ba()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([it(a,h,e),jt(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
796
|
+
function kt(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:wd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:wd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function it(a,b,c){return I(function(d){return u(d,lt(a.g,a.h.drm,c,b),0)})}
|
|
797
|
+
function jt(a,b,c){function d(){}var e=mt(c);Js(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.ih=function(){return gt(this,nt(this))};
|
|
798
|
+
function nt(a){var b,c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return Ss(),b=a.g,c=a.h.drm,d=new $r,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],es(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.D(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,Es(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.D(5);break;case 2:return xa(n),u(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
|
|
799
|
+
q.list=function(){return gt(this,ot())};function ot(){var a,b,c;return I(function(d){switch(d.g){case 1:return Ss(),a=[],b=new $r,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),cs(b,function(e,f){c=c.then(function(){var g;return I(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Js(new ss("manifest",e.Sa,e.Ba,l),k);a.push(m)});A(h)})})}),u(d,c,2);case 2:return xa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
|
|
800
|
+
function Ts(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){}},c.configure(d.manifest),
|
|
801
|
+
Us(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Us(a),k=pt(h),u(l,Promise.all(gb(k,function(m){return m.createSegmentIndex()})),3);Us(a);if(e)throw e;return l["return"](h)})}
|
|
802
|
+
function Vs(a,b,c,d){var e;return I(function(f){switch(f.g){case 1:return e=new kg({Pb:a.g,onError:c,zd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,rg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Fg(e),3);case 3:return u(f,Eg(e),4);case 4:return f["return"](e)}})}
|
|
803
|
+
function ft(a,b,c,d){var e=new Map,f=pt(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=qt(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()),Oe:Array.from(e.values())}}
|
|
804
|
+
function qt(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
|
|
805
|
+
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;rt(d,c.presentationTimeline.mb(),function(l){var m=Fr(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Ns(b,d.id)*p;p=Ir(a.g,p);f.set(m,new Er(l,p,k,!1))}l.i&&(n=Fr(l.i),f.has(n)||(p=.5*Ns(b,d.id),p=Ir(a.g,p),f.set(n,new Er(l.i,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
|
|
806
|
+
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function rt(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 Us(a){if(a.l.g)throw new O(2,9,7001);}function Ss(){if(!Ps())throw new O(2,9,9E3);}function gt(a,b){return I(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);xa(c);dc(a.i,b);return ya(c,0)})}
|
|
807
|
+
function Rs(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){dc(a.i,c)})}function mt(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)}
|
|
808
|
+
function lt(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=fs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:kt(d,!1),videoCapabilities:kt(d,!0)}});return u(h,Es(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
809
|
+
function pt(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}
|
|
810
|
+
function dt(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",Os);Os.deleteAll=function(){var a;return I(function(b){return 1==b.g?(a=new $r,ua(b),u(b,gs(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):ya(b,0)})};Os.prototype.list=Os.prototype.list;
|
|
811
|
+
Os.prototype.removeEmeSessions=Os.prototype.ih;Os.prototype.remove=Os.prototype.remove;Os.prototype.store=Os.prototype.store;Os.prototype.getNetworkingEngine=Os.prototype.Ec;Os.prototype.getConfiguration=Os.prototype.getConfiguration;Os.prototype.configure=Os.prototype.configure;Os.prototype.destroy=Os.prototype.destroy;Os.support=Ps;
|
|
812
|
+
var et=(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");
|
|
813
|
+
Tm.offline=Ps;function st(){}function tt(){for(var a=r(ut),b=a.next();!b.done;b=a.next()){b=b.value;try{b.cg()}catch(c){Ua("Error installing polyfill!",c)}}}function vt(a,b){for(var c={priority:b||0,cg:a},d=0;d<ut.length;d++)if(ut[d].priority<c.priority){ut.splice(d,0,c);return}ut.push(c)}K("shaka.polyfill",st);st.register=vt;st.installAll=tt;var ut=[];function wt(){}function xt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())yt(b.value)}function yt(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)}})}st.Aria=wt;wt.install=xt;vt(xt);function zt(){}function At(){Bt()}st.EncryptionScheme=zt;zt.install=At;vt(At,-2);function Ct(){}
|
|
814
|
+
function Dt(){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}}),
|
|
815
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Et);document.addEventListener("webkitfullscreenerror",Et);document.addEventListener("mozfullscreenchange",Et);document.addEventListener("mozfullscreenerror",Et);document.addEventListener("MSFullscreenChange",Et);document.addEventListener("MSFullscreenError",Et)}}
|
|
816
|
+
function Et(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)}st.Fullscreen=Ct;Ct.install=Dt;vt(Dt);function Ft(){}function Gt(){var a=!0;if(Yc()||Vc("PlayStation 5")||Zc()||Vc("Web0S")||Wc()||Vc("CrKey")||Vc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Ht=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=It)}
|
|
817
|
+
function It(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,w,y,x;return I(function(v){switch(v.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return v["return"](b);if("media-source"==a.type){if(!Qc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return v["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Sc(g),!h)||a.audio&&(k=a.audio.contentType,
|
|
818
|
+
l=Sc(k),!l))return v["return"](b)}else return v["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,v["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(t));m.video&&(w={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(w));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
|
|
819
|
+
n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);B(v,3);return u(v,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=v.h;va(v,4);break;case 3:F(v);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return v["return"](b)}})}st.MediaCapabilities=Ft;Ft.install=Gt;var Ht=null;Ft.originalMcap=Ht;vt(Gt,-1);function Jt(){}function Kt(){var a=$c();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Lt():a?12>=a?(Mt(),Nt()):Mt():(Vc("Tizen 2")||Vc("Tizen 3")||Vc("Tizen 4"))&&Ot());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Pt()}
|
|
820
|
+
function Mt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function Nt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Ot(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=zd(b)[0]&&a(b)}}
|
|
821
|
+
function Lt(){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)}}
|
|
822
|
+
function Pt(){var a=MediaSource.isTypeSupported;Vc("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)})}st.MediaSource=Jt;Jt.install=Kt;vt(Kt);function Qt(){}function Rt(){screen.orientation||void 0!=window.orientation&&St()}function St(){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 Tt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new M("change");b.dispatchEvent(c)})}st.Orientation=Qt;
|
|
823
|
+
Qt.install=Rt;function Tt(){fb.call(this);this.type="";this.angle=0}qa(Tt,fb);
|
|
824
|
+
Tt.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)};
|
|
825
|
+
Tt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};vt(Rt);function Ut(){}function Vt(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Wt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Xt,window.MediaKeys=Yt,window.MediaKeySystemAccess=Zt,window.shakaMediaKeysPolyfill=!0)}function Wt(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
826
|
+
function Xt(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}st.PatchedMediaKeysNop=Ut;Ut.install=Vt;function Yt(){throw new TypeError("Illegal constructor.");}Yt.prototype.createSession=function(){};Yt.prototype.setServerCertificate=function(){};function Zt(){this.keySystem="";throw new TypeError("Illegal constructor.");}Zt.prototype.getConfiguration=function(){};Zt.prototype.createMediaKeys=function(){};vt(Vt,-10);function $t(){}
|
|
827
|
+
function au(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)bu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=cu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=du;window.MediaKeys=eu;window.MediaKeySystemAccess=fu;window.shakaMediaKeysPolyfill=!0}}
|
|
828
|
+
function gu(a){var b=bu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function cu(a,b){try{var c=new fu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function du(a){var b=this.mediaKeys;b&&b!=a&&hu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&hu(a,this);return Promise.resolve()}st.PatchedMediaKeysWebkit=$t;$t.install=au;
|
|
829
|
+
function fu(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");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
|
|
827
830
|
m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=r(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
|
|
828
|
-
d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
829
|
-
function
|
|
830
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=
|
|
831
|
-
function
|
|
832
|
-
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?
|
|
833
|
-
function
|
|
834
|
-
function
|
|
835
|
-
function
|
|
836
|
-
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=
|
|
837
|
-
q.forEach=function(a){this.g&&a(this.g,Xg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Xg.value();return this.g&&Ec(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var
|
|
838
|
-
function
|
|
839
|
-
function
|
|
840
|
-
function
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Uf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=r(e),t=p.next();!t.done;t=p.next()){var w=t.value;t=new ic;var y=w.getAttribute("xml:id");if(y){t.id=y;var x=null;n&&(x=
|
|
844
|
-
null!=v&&(t.width=Number(v[1]),t.height=Number(v[2]),D||(null!=y&&(t.width=100*t.width/y),null!=x&&(t.height=100*t.height/x)),t.widthUnits=D||null!=y?Bc:0,t.heightUnits=D||null!=x?Bc:0);if(w=
|
|
845
|
-
2,2001,"<p> can only be inside <div> in TTML");n=r(Rf(c,"div"));for(p=n.next();!p.done;p=n.next())if(Rf(p.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(c=
|
|
846
|
-
function
|
|
847
|
-
a=[];if(!y)for(var x=r(p.childNodes),v=x.next();!v.done;v=x.next())(v=
|
|
848
|
-
c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new gc(x,v,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new gc(x,v,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=
|
|
849
|
-
(g=
|
|
850
|
-
function
|
|
851
|
-
f))a.backgroundColor=g;if(g=
|
|
852
|
-
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=
|
|
853
|
-
|
|
854
|
-
function
|
|
855
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&dc(a.textDecoration,"overline")}}function
|
|
856
|
-
function
|
|
857
|
-
function
|
|
858
|
-
function
|
|
859
|
-
function
|
|
860
|
-
function
|
|
861
|
-
function
|
|
862
|
-
var
|
|
863
|
-
end:"end"},
|
|
864
|
-
K("shaka.text.Mp4TtmlParser",
|
|
865
|
-
|
|
866
|
-
f/9E4-c}}f=[];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new
|
|
867
|
-
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");
|
|
831
|
+
d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}fu.prototype.createMediaKeys=function(){var a=new eu(this.g);return Promise.resolve(a)};fu.prototype.getConfiguration=function(){return this.h};function eu(a){this.l=a;this.h=null;this.g=new uf;this.i=[];this.j=new Map}
|
|
832
|
+
function hu(a,b){a.h=b;a.g.Sc();var c=bu;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Hc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=iu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.pd()?"licenserequest":"licenserenewal").set("message",d.message),d=new M("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=iu(a,d.sessionId))ju(d,"usable"),
|
|
833
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=iu(a,d.sessionId);e&&e.handleError(d)}))}eu.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 ku(b,this.l,a);this.i.push(a);return a};eu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
834
|
+
function iu(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 ku(a,b,c){fb.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 Nc;this.keyStatuses=new lu}qa(ku,fb);q=ku.prototype;
|
|
835
|
+
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?ju(this,"output-restricted"):1==b?ju(this,"expired"):ju(this,"internal-error"))};
|
|
836
|
+
function mu(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=Gc(hd("LOAD_SESSION|"+c));else{var e=hd("PERSISTENT|");d=pd(e,b)}else d=Gc(b)}catch(g){return Promise.reject(g)}a.h=new Nc;var f=gu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new P(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).T(.01)}return a.h}
|
|
837
|
+
function nu(a,b,c){if(a.g)a.g.then(function(){return nu(a,b,c)})["catch"](function(){return nu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=dd(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=md(e.keys[0].k);e=md(e.keys[0].kid)}else d=Gc(c),e=null;var f=gu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
838
|
+
function ju(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new M("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return mu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?mu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Nc;nu(this,b,a);return b};
|
|
839
|
+
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=gu("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 lu(){this.size=0;this.g=void 0}q=lu.prototype;q.pd=function(){return this.g};
|
|
840
|
+
q.forEach=function(a){this.g&&a(this.g,Xg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Xg.value();return this.g&&Ec(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var bu="";vt(au);function ou(){}function pu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=qu,Object.defineProperty(a,"disablePictureInPicture",{get:ru,set:su,enumerable:!0,configurable:!0}),document.exitPictureInPicture=tu,document.addEventListener("webkitpresentationmodechanged",uu,!0))}}
|
|
841
|
+
function uu(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)}
|
|
842
|
+
function qu(){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 tu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
843
|
+
function ru(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function su(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}st.PiPWebkit=ou;ou.install=pu;vt(pu);function vu(){}function wu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=xu))}function xu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}st.RandomUUID=vu;vu.install=wu;vt(wu);function yu(){}function zu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Au)}function Au(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}st.StorageEstimate=yu;yu.install=zu;vt(zu);function Bu(){}function Cu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Du})}function Du(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}st.Symbol=Bu;Bu.install=Cu;vt(Cu);function Eu(){}function Fu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}st.VideoPlayPromise=Eu;Eu.install=Fu;vt(Fu);function Gu(){}function Hu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Xc())&&(a.getVideoPlaybackQuality=Iu)}}function Iu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}st.VideoPlaybackQuality=Gu;Gu.install=Hu;vt(Hu);function Ju(){}function Ku(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Lu;else if(6==b)a=Mu;else{try{var c=!!Lu(1,2,"")}catch(d){c=!1}c&&(a=Lu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Lu(a,b,c){return new window.TextTrackCue(a,b,c)}function Mu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}st.VTTCue=Ju;Ju.install=Ku;vt(Ku);function Nu(){}Nu.prototype.parseInit=function(){};Nu.prototype.setSequenceMode=function(){};Nu.prototype.parseMedia=function(a,b){var c=null,d=[],e=dd(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Ou.exec(f))){var g=Pu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new gc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};K("shaka.text.LrcTextParser",Nu);Nu.prototype.parseMedia=Nu.prototype.parseMedia;
|
|
844
|
+
Nu.prototype.setSequenceMode=Nu.prototype.setSequenceMode;Nu.prototype.parseInit=Nu.prototype.parseInit;var Ou=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Pu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Dd["application/x-subtitle-lrc"]=function(){return new Nu};function Qu(){}Qu.prototype.parseInit=function(){};Qu.prototype.setSequenceMode=function(){};
|
|
845
|
+
Qu.prototype.parseMedia=function(a,b){var c=dd(a),d=[];if(""==c)return d;var e=hg(c,"tt");if(!e)throw new O(2,2,2005,"Failed to parse TTML.");c=e.getElementsByTagName("body")[0];if(!c)return[];var f=Wf(e,Ru,"frameRate"),g=Wf(e,Ru,"subFrameRate"),h=Wf(e,Ru,"frameRateMultiplier"),k=Wf(e,Ru,"tickRate"),l=Wf(e,Ru,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Wf(e,Su,"extent");if("default"!=m&&"preserve"!=m)throw new O(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Tu(f,g,
|
|
846
|
+
h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Uf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=r(e),t=p.next();!t.done;t=p.next()){var w=t.value;t=new ic;var y=w.getAttribute("xml:id");if(y){t.id=y;var x=null;n&&(x=Uu.exec(n)||Vu.exec(n));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var v,D;if(v=Wu(w,h,"extent"))v=(D=Uu.exec(v))||Vu.exec(v),
|
|
847
|
+
null!=v&&(t.width=Number(v[1]),t.height=Number(v[2]),D||(null!=y&&(t.width=100*t.width/y),null!=x&&(t.height=100*t.height/x)),t.widthUnits=D||null!=y?Bc:0,t.heightUnits=D||null!=x?Bc:0);if(w=Wu(w,h,"origin"))v=(D=Uu.exec(w))||Vu.exec(w),null!=v&&(t.viewportAnchorX=Number(v[1]),t.viewportAnchorY=Number(v[2]),D||(null!=x&&(t.viewportAnchorY=100*t.viewportAnchorY/x),null!=y&&(t.viewportAnchorX=100*t.viewportAnchorX/y)),t.viewportAnchorUnits=D||null!=y?Bc:0)}else t=null;t&&k.push(t)}if(Rf(c,"p").length)throw new O(2,
|
|
848
|
+
2,2001,"<p> can only be inside <div> in TTML");n=r(Rf(c,"div"));for(p=n.next();!p.done;p=n.next())if(Rf(p.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(c=Xu(c,b.periodStart,f,g,h,e,k,m,l,null,!1))c.backgroundColor||(c.backgroundColor="transparent"),d.push(c);return d};
|
|
849
|
+
function Xu(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var t=null,w=r(Yu),y=w.next();!y.done&&!(t=Zu(p,"backgroundImage",d,"#",y.value)[0]);y=w.next());w=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(C){return C.nodeType==Node.TEXT_NODE});
|
|
850
|
+
a=[];if(!y)for(var x=r(p.childNodes),v=x.next();!v.done;v=x.next())(v=Xu(v.value,b,c,d,e,f,g,h,k,p,m))&&a.push(v);d=null!=l;x=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||x||"br"==p.tagName||0!=a.length||d&&!h))return null;v=$u(p,c);x=v.start;for(v=v.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)v=av(n,c,x,v),x=v.start,v=v.end,n=n.parentNode;null==x&&(x=0);x+=b;v=null==v?Infinity:v+b;if(!D&&0<a.length)for(x=Infinity,v=0,b=r(a),
|
|
851
|
+
c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new gc(x,v,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new gc(x,v,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Zu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(C){return C.id==z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
|
|
852
|
+
(g=Zu(l,"region",f,"")[0]);bv(b,p,g,t,e,w,0==a.length);return b}
|
|
853
|
+
function bv(a,b,c,d,e,f,g){f=f||g;"rtl"==cv(b,c,e,"direction",f)&&(a.direction="rtl");g=cv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=hc);(g=cv(b,c,e,"textAlign",!0))?(a.positionAlign=dv[g],a.lineAlign=ev[g],a.textAlign=vc[g.toUpperCase()]):a.textAlign=kc;if(g=cv(b,c,e,"displayAlign",!0))a.displayAlign=wc[g.toUpperCase()];if(g=cv(b,c,e,"color",f))a.color=g;if(g=cv(b,c,e,"backgroundColor",
|
|
854
|
+
f))a.backgroundColor=g;if(g=cv(b,c,e,"border",f))a.border=g;if(g=cv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=cv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=cv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=cv(b,c,e,"lineHeight",f))&&g.match(fv)&&(a.lineHeight=g);(g=cv(b,c,e,"fontSize",f))&&(g.match(fv)||g.match(gv))&&(a.fontSize=g);if(g=cv(b,c,e,"fontStyle",f))a.fontStyle=Ac[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
|
|
855
|
+
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=cv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(fv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(fv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=cv(b,c,e,"letterSpacing",f))&&d.match(fv)&&(a.letterSpacing=d);(d=cv(b,c,e,"linePadding",f))&&d.match(fv)&&(a.linePadding=d);if(f=cv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Wu(c,e,"textDecoration"))&&hv(a,c);(b=
|
|
856
|
+
iv(b,e,"textDecoration"))&&hv(a,b)}
|
|
857
|
+
function hv(a,b){for(var c=r(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&dc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&dc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
858
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&dc(a.textDecoration,"overline")}}function cv(a,b,c,d,e){e=void 0===e?!0:e;return(a=iv(a,c,d))?a:e?Wu(b,c,d):null}function Wu(a,b,c){if(!a)return null;var d=Wf(a,Su,c);return d?d:jv(a,b,c)}function iv(a,b,c){var d=Wf(a,Su,c);return d?d:jv(a,b,c)}
|
|
859
|
+
function jv(a,b,c){a=Zu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Vf(a[e],"urn:ebu:tt:style",c);f||(f=Wf(a[e],Su,c));f||(f=iv(a[e],b,c));f&&(d=f)}return d}
|
|
860
|
+
function Zu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Vf(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function av(a,b,c,d){a=$u(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
|
|
861
|
+
function $u(a,b){var c=kv(a.getAttribute("begin"),b),d=kv(a.getAttribute("end"),b),e=kv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
|
|
862
|
+
function kv(a,b){var c=null;if(lv.test(a)){c=lv.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(mv.test(a))c=nv(mv,a);else if(ov.test(a))c=nv(ov,a);else if(pv.test(a))c=pv.exec(a),c=Number(c[1])/b.frameRate;else if(qv.test(a))c=qv.exec(a),c=Number(c[1])/b.g;else if(rv.test(a))c=nv(rv,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
863
|
+
function nv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}K("shaka.text.TtmlTextParser",Qu);Qu.prototype.parseMedia=Qu.prototype.parseMedia;Qu.prototype.setSequenceMode=Qu.prototype.setSequenceMode;Qu.prototype.parseInit=Qu.prototype.parseInit;
|
|
864
|
+
function Tu(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
865
|
+
var Uu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,gv=/^(\d{1,2}(?:\.\d+)?|100)%$/,fv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Vu=/^(\d+)px (\d+)px$/,lv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,mv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ov=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,pv=/^(\d*(?:\.\d*)?)f$/,qv=/^(\d*(?:\.\d*)?)t$/,rv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ev={left:nc,center:"center",right:"end",start:nc,
|
|
866
|
+
end:"end"},dv={left:"line-left",center:"center",right:"line-right"},Ru=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Su=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Yu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Dd["application/ttml+xml"]=function(){return new Qu};function sv(){this.g=new Qu}sv.prototype.parseInit=function(a){var b=!1;(new Ff).box("moov",Jf).box("trak",Jf).box("mdia",Jf).box("minf",Jf).box("stbl",Jf).Y("stsd",Lf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};sv.prototype.setSequenceMode=function(){};sv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Ff).box("mdat",Mf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};
|
|
867
|
+
K("shaka.text.Mp4TtmlParser",sv);sv.prototype.parseMedia=sv.prototype.parseMedia;sv.prototype.setSequenceMode=sv.prototype.setSequenceMode;sv.prototype.parseInit=sv.prototype.parseInit;Dd['application/mp4; codecs="stpp"']=function(){return new sv};Dd['application/mp4; codecs="stpp.ttml"']=function(){return new sv};Dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new sv};Dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new sv};function tv(){this.g=!1}tv.prototype.parseInit=function(){};tv.prototype.setSequenceMode=function(a){this.g=a};
|
|
868
|
+
tv.prototype.parseMedia=function(a,b){var c=dd(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new O(2,2,2E3);c=b.vttOffset;if(d[0].includes("X-TIMESTAMP-MAP")&&this.g){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=uv(new oq(e[1]));if(null==c)throw new O(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+
|
|
869
|
+
f/9E4-c}}f=[];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new oq(g);var h=new ic;rq(g);pq(g);for(var k=rq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
|
|
870
|
+
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");pq(g);k=rq(g)}f.push(h)}e=new Map;vv(e);g=[];d=r(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new gc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
|
|
868
871
|
/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(t){var w=t[2].trim().replace(";","");switch(t[1].trim()){case "background-color":n=!0;m.backgroundColor=w;break;case "color":n=!0;m.color=w;break;case "font-family":n=!0;m.fontFamily=w;break;case "font-size":n=!0;m.fontSize=w;break;case "font-weight":700<=parseInt(w,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(w){case "normal":n=!0;m.fontStyle=qc;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
|
|
869
|
-
!0;m.opacity=parseFloat(w);break;case "text-shadow":n=!0;m.textShadow=w;break;case "white-space":n=!0,m.wrapLine="noWrap"!=w}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new
|
|
870
|
-
h.startTime=m,h.endTime=n,h.payload=""):h=new gc(m,n,"");
|
|
871
|
-
function
|
|
872
|
-
function
|
|
873
|
-
function
|
|
874
|
-
"italic";break;case "u":e.textDecoration.push("underline")}}if(Yf(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())
|
|
875
|
-
function
|
|
876
|
-
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
877
|
-
function
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
c+t.
|
|
881
|
-
function
|
|
882
|
-
function
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={
|
|
886
|
-
function
|
|
872
|
+
!0;m.opacity=parseFloat(w);break;case "text-shadow":n=!0;m.textShadow=w;break;case "white-space":n=!0,m.wrapLine="noWrap"!=w}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new oq(h[0]);m=uv(k);t=qq(k,/[ \t]+--\x3e[ \t]+/g);n=uv(k);if(null==m||null==t||null==n)throw new O(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),
|
|
873
|
+
h.startTime=m,h.endTime=n,h.payload=""):h=new gc(m,n,"");wv(p,h,e);pq(k);for(m=rq(k);m;)xv(h,m,f),pq(k),m=rq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function vv(a){for(var b=r(Object.entries(yc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new gc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(zc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new gc(0,0,""),e.backgroundColor=d,a.set(c,e)}
|
|
874
|
+
function wv(a,b,c){0===c.size&&vv(c);a=yv(a);var d=hg("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())zv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
|
|
875
|
+
function yv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function Av(a,b){return a&&0<a.length?a:b}
|
|
876
|
+
function zv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Av(h.backgroundColor,e.backgroundColor),e.color=Av(h.color,e.color),e.fontFamily=Av(h.fontFamily,e.fontFamily),e.fontSize=Av(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
|
|
877
|
+
"italic";break;case "u":e.textDecoration.push("underline")}}if(Yf(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())zv(a.value,e,c,d)}
|
|
878
|
+
function xv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=kc:a.textAlign=vc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
|
|
879
|
+
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Bv(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=xc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=mc,a.line=Number(c[1]),c[2]&&(a.lineAlign=xc[c[2].toUpperCase()])}function Bv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
|
|
880
|
+
function uv(a){a=qq(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.VttTextParser",tv);tv.prototype.parseMedia=tv.prototype.parseMedia;tv.prototype.setSequenceMode=tv.prototype.setSequenceMode;tv.prototype.parseInit=tv.prototype.parseInit;Dd["text/vtt"]=function(){return new tv};Dd['text/vtt; codecs="vtt"']=function(){return new tv};
|
|
881
|
+
Dd['text/vtt; codecs="wvtt"']=function(){return new tv};function Cv(){this.g=null}Cv.prototype.parseInit=function(a){var b=this,c=!1;(new Ff).box("moov",Jf).box("trak",Jf).box("mdia",Jf).Y("mdhd",function(d){d=li(d.reader,d.version);b.g=d.timescale}).box("minf",Jf).box("stbl",Jf).Y("stsd",Lf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};Cv.prototype.setSequenceMode=function(){};
|
|
882
|
+
Cv.prototype.parseMedia=function(a,b){if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Ff).box("moof",Jf).box("traf",Jf).Y("tfdt",function(C){g=!0;c=ki(C.reader,C.version).cf}).Y("tfhd",function(C){l=ji(C.reader,C.flags).pf}).Y("trun",function(C){h=!0;d=mi(C.reader,C.version,C.flags).Jf}).box("mdat",Mf(function(C){k=!0;e=C})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);for(var m=c,n=new Cf(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var w=t.ze||l,y=t.Gd?
|
|
883
|
+
c+t.Gd:m;m=y+(w||0);var x=0;do{var v=n.R();x+=v;var D=n.R(),z=null;"vttc"==Nf(D)?8<v&&(z=n.Cb(v-8)):n.skip(v-8);w&&z&&(v=Dv(z,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(v))}while(t.sampleSize&&x<t.sampleSize)}return f.filter(Cb)};function Dv(a,b,c){var d,e,f;(new Ff).box("payl",Mf(function(g){d=dd(g)})).box("iden",Mf(function(g){e=dd(g)})).box("sttg",Mf(function(g){f=dd(g)})).parse(a);return d?Ev(d,e,f,b,c):null}
|
|
884
|
+
function Ev(a,b,c,d,e){d=new gc(d,e,"");wv(a,d,new Map);b&&(d.id=b);if(c)for(a=new oq(c),b=rq(a);b;)xv(d,b,[]),pq(a),b=rq(a);return d}K("shaka.text.Mp4VttParser",Cv);Cv.prototype.parseMedia=Cv.prototype.parseMedia;Cv.prototype.setSequenceMode=Cv.prototype.setSequenceMode;Cv.prototype.parseInit=Cv.prototype.parseInit;Dd['application/mp4; codecs="wvtt"']=function(){return new Cv};function Fv(){}Fv.prototype.parseInit=function(){};Fv.prototype.setSequenceMode=function(){};Fv.prototype.parseMedia=function(a){var b=dd(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 oq(c[0]),e=Gv(d),f=qq(d,/,/g);d=Gv(d);if(null==e||null==f||null==d)throw new O(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new gc(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
885
|
+
function Gv(a){a=qq(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",Fv);Fv.prototype.parseMedia=Fv.prototype.parseMedia;Fv.prototype.setSequenceMode=Fv.prototype.setSequenceMode;Fv.prototype.parseInit=Fv.prototype.parseInit;Dd["text/x-subviewer"]=function(){return new Fv};function Hv(){this.g=new tv}Hv.prototype.parseInit=function(){};Hv.prototype.setSequenceMode=function(){};Hv.prototype.parseMedia=function(a,b){var c=dd(a);c=Iv(c);c=Gc(hd(c));return this.g.parseMedia(c,b)};function Iv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}K("shaka.text.SrtTextParser",Hv);
|
|
886
|
+
Hv.srt2webvtt=Iv;Hv.prototype.parseMedia=Hv.prototype.parseMedia;Hv.prototype.setSequenceMode=Hv.prototype.setSequenceMode;Hv.prototype.parseInit=Hv.prototype.parseInit;Dd["text/srt"]=function(){return new Hv};function Jv(){}Jv.prototype.parseInit=function(){};Jv.prototype.setSequenceMode=function(){};
|
|
887
|
+
Jv.prototype.parseMedia=function(a){var b="",c="";a=dd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Kv.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=Lv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Mv);else if("Style"==e){e=f.split(Mv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
888
|
+
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Yd:e.Yd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Lv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Mv);else if("Dialogue"==f){g=g.split(Mv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Nv(f.Start);var k=Nv(f.End);g=new gc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Yd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Yd}}(e)))&&Ov(g,f);d.push(g)}return d};
|
|
889
|
+
function Ov(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Pv(c))a.color=c;if(c=b.BackColour)if(c=Pv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=oc;a.textAlign="start";break;case 2:a.displayAlign=oc;a.textAlign=kc;break;case 3:a.displayAlign=oc;a.textAlign="end";
|
|
887
890
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=kc;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=kc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
|
|
888
|
-
function
|
|
889
|
-
var
|
|
890
|
-
|
|
891
|
-
|
|
891
|
+
function Pv(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 Nv(a){a=Qv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}K("shaka.text.SsaTextParser",Jv);Jv.prototype.parseMedia=Jv.prototype.parseMedia;Jv.prototype.setSequenceMode=Jv.prototype.setSequenceMode;Jv.prototype.parseInit=Jv.prototype.parseInit;
|
|
892
|
+
var Kv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Lv=/^\s*([^:]+):\s*(.*)/,Mv=/\s*,\s*/,Qv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Dd["text/x-ssa"]=function(){return new Jv};function Rv(){}K("shaka.util.FairPlayUtils",Rv);Rv.commonFairPlayResponse=function(a,b){if(2===a){try{var c=dd(b.data)}catch(f){return}var d=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Hc(md(c)))}};
|
|
893
|
+
Rv.spcFairPlayRequest=function(a,b){if(2===a){var c=Gc(b.body);c=ld(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=hd("spc="+c)}};Rv.initDataTransform=function(a,b,c){function d(h){Jc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Gc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=id(b,!0):e=b;a=gd(a);a=id(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f};
|
|
894
|
+
Rv.defaultGetContentId=function(a){a=gd(a);return(new lb(a)).Za};Rv.isFairPlaySupported=function(){var a;return I(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},B(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);F(b);return b["return"](!1)})};/*
|
|
892
895
|
@license
|
|
893
896
|
EME Encryption Scheme Polyfill
|
|
894
897
|
Copyright 2019 Google LLC
|
|
895
898
|
SPDX-License-Identifier: Apache-2.0
|
|
896
899
|
*/
|
|
897
|
-
function
|
|
898
|
-
function
|
|
900
|
+
function Sv(){}var Tv;function Uv(){Tv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Tv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Vv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
901
|
+
function Vv(a,b){var c=this,d;return I(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Tv.call(c,a,b),2);d=e.h;if(Wv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Tv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Xv;return e["return"](Xv.call(c,
|
|
899
902
|
a,b))})}
|
|
900
|
-
function
|
|
901
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(t,
|
|
902
|
-
function
|
|
903
|
-
function
|
|
904
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
905
|
-
function
|
|
906
|
-
new
|
|
907
|
-
function
|
|
908
|
-
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}K("McEncryptionSchemePolyfill"
|
|
909
|
-
|
|
910
|
-
function
|
|
911
|
-
function
|
|
903
|
+
function Xv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return I(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Yv(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Zv(h.videoCapabilities,d),l=Zv(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."),
|
|
904
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(t,Tv.call(c,a,e),2)}p=t.h;return t["return"](new $v(p,d))})}function Zv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}K("EmeEncryptionSchemePolyfill",Sv);Sv.install=Uv;function aw(){}var bw;
|
|
905
|
+
function cw(){bw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(bw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=dw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
906
|
+
function dw(a){var b=this,c,d,e;return I(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,bw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&Wv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=bw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
907
|
+
navigator.mediaCapabilities.decodingInfo=ew;if(d){f.D(3);break}e=c;return u(f,fw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](ew.call(b,a))}})}
|
|
908
|
+
function ew(a){var b=this,c,d,e,f,g,h,k,l;return I(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=Yv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,bw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
909
|
+
new $v(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return u(m,fw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
|
|
910
|
+
function fw(a){var b,c;return I(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
|
|
911
|
+
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}K("McEncryptionSchemePolyfill",aw);aw.install=cw;function $v(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
912
|
+
$v.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};$v.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
913
|
+
function Yv(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 Wv(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}
|
|
914
|
+
function gw(){}function Bt(){Uv();cw()}K("EncryptionSchemePolyfills",gw);gw.install=Bt;"undefined"!==typeof module&&module.exports&&(module.exports=gw);/*
|
|
912
915
|
@license
|
|
913
916
|
Copyright 2013 Ali Al Dallal
|
|
914
917
|
|
|
@@ -932,7 +935,7 @@ function fw(){}function At(){Tv();bw()}K("EncryptionSchemePolyfills",fw);fw.inst
|
|
|
932
935
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
933
936
|
SOFTWARE.
|
|
934
937
|
*/
|
|
935
|
-
for(var
|
|
938
|
+
for(var hw={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
|
|
936
939
|
"ar-SA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"be-BY":{s:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",u:"Belarusian"},bg:{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",u:"Bulgarian"},"bg-BG":{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
|
|
937
940
|
u:"Bulgarian"},bn:{s:"\u09ac\u09be\u0982\u09b2\u09be",u:"Bengali"},"bn-IN":{s:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",u:"Bengali (India)"},"bn-BD":{s:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Catal\u00e0",u:"Catalan"},"ca-ES":{s:"Catal\u00e0",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"\u13e3\u13b3\u13a9 (tsalagi)",u:"Cherokee"},cs:{s:"\u010ce\u0161tina",
|
|
938
941
|
u:"Czech"},"cs-CZ":{s:"\u010ce\u0161tina",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (\u00d6sterreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserb\u0161\u0107ina",u:"Lower Sorbian"},el:{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",u:"Greek"},"el-GR":{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
|
|
@@ -953,55 +956,55 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
|
|
|
953
956
|
sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},"ta-IN":{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},te:{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},"te-IN":{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},tg:{s:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",u:"Tajik"},"tg-TJ":{s:"\u0442\u043e\u04b7\u0438\u043a\u04e3",u:"Tajik"},th:{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
|
|
954
957
|
u:"Thai"},"th-TH":{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",u:"Thai (Thailand)"},tl:{s:"Filipino",u:"Filipino"},"tl-PH":{s:"Filipino",u:"Filipino"},tlh:{s:"tlhIngan-Hol",u:"Klingon"},tr:{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tr-TR":{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tt-RU":{s:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",u:"Tatar"},uk:{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",u:"Ukrainian"},"uk-UA":{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
|
|
955
958
|
u:"Ukrainian"},ur:{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},"ur-PK":{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},uz:{s:"O'zbek",u:"Uzbek"},"uz-UZ":{s:"O'zbek",u:"Uzbek"},vi:{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"vi-VN":{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"xh-ZA":{s:"isiXhosa",u:"Xhosa"},yi:{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",u:"Yiddish"},"yi-DE":{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",u:"Yiddish (German)"},zh:{s:"\u4e2d\u6587",u:"Chinese"},"zh-HANS":{s:"\u4e2d\u6587\u7b80\u4f53",
|
|
956
|
-
u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},
|
|
957
|
-
|
|
958
|
-
W.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",W);W.prototype.release=W.prototype.release;function
|
|
959
|
-
function
|
|
960
|
-
""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.xa();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.xa(),this.g.ka(.5))}qa(
|
|
961
|
-
"ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&
|
|
962
|
-
c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?
|
|
963
|
-
K("shaka.ui.PlayButton",
|
|
964
|
-
!1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});
|
|
965
|
-
|
|
966
|
-
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Nb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Nb()&&(e.g=!0,
|
|
967
|
-
"mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}qa(
|
|
968
|
-
q.setValue=function(a){this.g||(this.bar.value=a)};function
|
|
969
|
-
|
|
970
|
-
"locale-changed",function(){return
|
|
971
|
-
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);
|
|
972
|
-
q.update=function(){var a=this.m.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.Ia(),g=f.end-f.start;this.setRange(f.start,f.end);
|
|
959
|
+
u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},iw=r(Object.keys(hw)),jw=iw.next();!jw.done;jw=
|
|
960
|
+
iw.next()){var kw=jw.value;hw[kw.toLowerCase()]=hw[kw]};function W(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new uf;this.localization=this.controls.za;this.player=this.controls.bc();this.video=this.controls.Bb();this.adManager=this.player.kd();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
|
|
961
|
+
W.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",W);W.prototype.release=W.prototype.release;function lw(a){return mw(a,"shaka-back-to-overflow-button")}function mw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function nw(a){a&&(a=mw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function ow(){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 X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
962
|
+
function pw(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function qw(a,b){W.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 P(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=pw(e-d,!1)+" / "+pw(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=
|
|
963
|
+
""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.xa();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.xa(),this.g.ka(.5))}qa(qw,W);qw.prototype.release=function(){this.g.stop();this.g=null;W.prototype.release.call(this)};K("shaka.ui.AdCounter",qw);function rw(a,b){W.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");X(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.o(this.localization,"locale-updated",function(){c.ad&&sw(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&sw(c)});this.eventManager.o(this.adManager,"ad-started",function(){sw(c)});this.eventManager.o(this.adManager,
|
|
964
|
+
"ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&sw(this)}qa(rw,W);function sw(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));X(a.g,!0)}}K("shaka.ui.AdPosition",rw);function tw(a,b){W.call(this,a,b);var c=this;this.button=Bk();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
|
|
965
|
+
c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?uw(c.controls):vw(c.controls)});this.ad&&(this.g(),this.h())}qa(tw,W);tw.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.$;return a};tw.prototype.g=function(){};tw.prototype.h=function(){};
|
|
966
|
+
K("shaka.ui.PlayButton",tw);function ww(a,b){tw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}qa(ww,tw);ww.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};ww.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};K("shaka.ui.BigPlayButton",ww);function xw(a,b){W.call(this,a,b);var c=this;this.j=this.controls.i;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.o(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";X(c.g,!0)}else X(c.g,
|
|
967
|
+
!1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});yw(this)}qa(xw,W);xw.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=[];W.prototype.release.call(this)};function zw(a,b){Aw.set(a,b)}function yw(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=Aw.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}K("shaka.ui.ContextMenu",xw);
|
|
968
|
+
xw.registerElement=zw;var Aw=new Map;function Bw(a,b,c,d){W.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,ia(c));this.g=!1;this.bar=document.createElement("input");this.l=new P(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ia(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);
|
|
969
|
+
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Nb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Nb()&&(e.g=!0,Cw(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(Cw(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,Cw(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
|
|
970
|
+
"mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}qa(Bw,W);q=Bw.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);W.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!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.l.T(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
|
|
971
|
+
q.setValue=function(a){this.g||(this.bar.value=a)};function Cw(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}K("shaka.ui.RangeElement",Bw);Bw.prototype.setValue=Bw.prototype.setValue;Bw.prototype.getValue=Bw.prototype.getValue;Bw.prototype.changeTo=Bw.prototype.changeTo;Bw.prototype.onChangeEnd=Bw.prototype.onChangeEnd;Bw.prototype.onChange=Bw.prototype.onChange;
|
|
972
|
+
Bw.prototype.onChangeStart=Bw.prototype.onChangeStart;Bw.prototype.setRange=Bw.prototype.setRange;function Dw(a,b){Bw.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=R("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new P(function(){c.video.currentTime=c.getValue()});this.A=new P(function(){Ew(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Fw(c)});this.eventManager.o(this.localization,
|
|
973
|
+
"locale-changed",function(){return Fw(c)});this.eventManager.o(this.adManager,"ad-started",function(){Gw(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Gw(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Hw(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Hw(c)});this.setValue(this.video.currentTime);this.update();Fw(this);this.ad&&X(this.container,!1)}qa(Dw,Bw);q=Dw.prototype;
|
|
974
|
+
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);Bw.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Je(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.T(.125))};q.onChangeEnd=function(){this.h.xa();this.controls.Je(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
975
|
+
q.update=function(){var a=this.m.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.Ia(),g=f.end-f.start;this.setRange(f.start,f.end);Gw(this)?(X(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.m.showUnbufferedStart?
|
|
973
976
|
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()+")")):X(this.container,!1)};
|
|
974
|
-
function
|
|
975
|
-
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function
|
|
976
|
-
|
|
977
|
-
!1)});this.Ma=new P(function(){e.Nb()&&
|
|
978
|
-
q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ea&&(a.ea.stop(),a.ea=null);a.I&&(a.I.stop(),a.I=null);a.Ma&&(a.Ma.stop(),a.Ma=null);
|
|
979
|
-
null;case 6:a.F=null,a.B=null,a.A=null,a.za=null,a.ma.clear(),fb.prototype.release.call(a),A(b)}})};function
|
|
980
|
-
q.configure=function(a){this.i=a;this.C.
|
|
981
|
-
this.g.appendChild(this.
|
|
982
|
-
c)}};q.
|
|
983
|
-
q.
|
|
984
|
-
q.
|
|
985
|
-
q.
|
|
986
|
-
9);case 9:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(10);break}B(d,11);return u(d,screen.orientation.lock("landscape"),13);case 13:va(d,10,5);break;case 11:F(d,5);case 10:va(d,0);break;case 5:c=F(d),a.dispatchEvent(new M("error",(new Map).set("detail",c))),d.D(0)}})};q.
|
|
987
|
-
function
|
|
988
|
-
function
|
|
989
|
-
function
|
|
990
|
-
function
|
|
977
|
+
function Ew(a){if(a.i.length){for(var b=a.player.Ia(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),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 "+
|
|
978
|
+
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Hw(a){Ew(a);var b=a.player.Ia();b=b.end-b.start;a.player.U()&&5<b&&a.A.ka(1)}function Gw(a){var b=a.player.Ia();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Fw(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}K("shaka.ui.SeekBar",Dw);function Iw(){}
|
|
979
|
+
Iw.prototype.create=function(a,b){return new Dw(a,b)};Dw.Factory=Iw;function Y(a,b,c,d){fb.call(this);var e=this;this.S=!0;this.i=d;this.C=new Jn(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.fb=!0;this.A=this.C.Bb();this.B=c;this.F=this.C.bc();this.ya=a;this.j=b;this.Xa=this.F.kd();this.l=this.m=null;this.$=!1;this.G=[];this.wb=[];this.hb=!1;this.aa=new P(function(){e.j.style.cursor="none";e.hb=!1;Jw(e)});this.ea=new P(function(){e.g.removeAttribute("shown");e.I.T(2)});this.I=new P(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,
|
|
980
|
+
!1)});this.Ma=new P(function(){e.Nb()&&Kw(e)});this.J=null;this.H=[];this.za=Lw();this.h=new uf;this.configure(this.i);Mw(this);this.ma=new Set;Nw(this);this.Ma.ka(.125);this.h.o(this.za,"locale-changed",function(f){e.Xa.setLocale(f.locales[0])})}qa(Y,fb);q=Y.prototype;
|
|
981
|
+
q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ea&&(a.ea.stop(),a.ea=null);a.I&&(a.I.stop(),a.I=null);a.Ma&&(a.Ma.stop(),a.Ma=null);Ow(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return u(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.ya){b.D(6);break}return u(b,a.ya.destroy(),7);case 7:a.ya=
|
|
982
|
+
null;case 6:a.F=null,a.B=null,a.A=null,a.za=null,a.ma.clear(),fb.prototype.release.call(a),A(b)}})};function Ow(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Pw(a,b){Qw.set(a,b)}q.ag=function(a){this.fb=a;Nw(this)};q.Tg=function(){Jw(this)};
|
|
983
|
+
q.configure=function(a){this.i=a;this.C.kf(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.eb&&(this.eb=null);this.Ya&&(this.Ya=null);this.g?(Ck(this.g),Ow(this)):(Rw(this),Sw(this));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");Tw(this);this.i.addBigPlayButton&&Uw(this);this.i.customContextMenu&&(this.Ya=new xw(this.X,this),this.H.push(this.Ya));this.ba||Vw(this);this.gb=R("div");this.gb.classList.add("shaka-server-side-ad-container");
|
|
984
|
+
this.g.appendChild(this.gb);Ww(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Xw(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Jw(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.h.o(b,"click",c);this.h.o(b,"dblclick",
|
|
985
|
+
c)}};q.Fe=function(a){(this.S=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");Jw(this)};q.Mf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.Fe(!1)};q.getAd=function(){return this.m};q.mg=function(){return this.C};q.zg=function(){return this.za};q.Ng=function(){return this.j};q.Bb=function(){return this.A};q.yg=function(){return this.B};q.bc=function(){return this.F};q.xg=function(){return this.ya};
|
|
986
|
+
q.rg=function(){return this.g};q.Hg=function(){return this.gb};q.og=function(){return this.P};q.pg=function(){return this.i};q.Sg=function(){return this.$};q.Je=function(a){this.$=a};q.Qg=function(){return this.fb};q.vf=function(){return this.l?this.l.getValue():this.A.currentTime};q.Nf=function(a){this.J=a};q.ed=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.dc=function(){this.I.xa()};
|
|
987
|
+
q.rd=function(){return document.fullscreenEnabled||this.B.webkitSupportsFullscreen?!0:!1};q.fe=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.B;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
988
|
+
q.Pe=function(){var a=this,b,c;return I(function(d){switch(d.g){case 1:if(!document.fullscreenEnabled){b=a.B;b.webkitSupportsFullscreen&&(b.webkitDisplayingFullscreen?b.webkitExitFullscreen():b.webkitEnterFullscreen());d.D(0);break}if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),u(d,document.exitFullscreen(),0);B(d,5);if(!document.pictureInPictureElement){d.D(7);break}return u(d,document.exitPictureInPicture(),7);case 7:return u(d,a.j.requestFullscreen({navigationUI:"hide"}),
|
|
989
|
+
9);case 9:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(10);break}B(d,11);return u(d,screen.orientation.lock("landscape"),13);case 13:va(d,10,5);break;case 11:F(d,5);case 10:va(d,0);break;case 5:c=F(d),a.dispatchEvent(new M("error",(new Map).set("detail",c))),d.D(0)}})};q.Pf=function(){X(this.K,!0);X(this.P,!0);this.g.setAttribute("ad-active","true")};q.zf=function(){X(this.K,!1);X(this.P,!1);this.g.removeAttribute("ad-active")};
|
|
990
|
+
function vw(a){a.S&&a.A.duration&&(a.F.gf(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function uw(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
|
|
991
|
+
function Rw(a){a.g=R("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.A.duration&&(a.Nb()?a.J=Date.now():(Yw(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){Zw(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&a.rd()&&a.Pe()})}function Uw(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.eb=new ww(b,a);a.H.push(a.eb)}
|
|
992
|
+
function Tw(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function $w(a){a.K=R("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new rw(a.K,a);a.H.push(b);b=new qw(a.K,a);a.H.push(b)}
|
|
993
|
+
function Vw(a){a.ba=R("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=R("div");b.classList.add("shaka-spinner");a.ba.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");
|
|
991
994
|
b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
|
|
992
|
-
function
|
|
993
|
-
(c=
|
|
994
|
-
function
|
|
995
|
-
a.h.o(a.C,"caststatuschanged",function(){
|
|
996
|
-
|
|
997
|
-
function
|
|
998
|
-
function
|
|
999
|
-
function
|
|
1000
|
-
function
|
|
1001
|
-
function
|
|
1002
|
-
function
|
|
1003
|
-
function
|
|
1004
|
-
function
|
|
995
|
+
function Ww(a){a.N=R("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(d){d.target.closest(".shaka-overflow-button")||a.dc()});$w(a);a.X=R("div");a.X.classList.add("shaka-controls-button-panel");a.X.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.X.classList.add("shaka-tooltips-on");a.N.appendChild(a.X);for(var b=r(a.i.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,Qw.get(c)?
|
|
996
|
+
(c=Qw.get(c).create(a.X,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function Xw(a){if(a.i.addSeekBar)a.l=ax.create(a.N,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 Sw(a){a.P=R("div");a.P.classList.add("shaka-client-side-ad-container");X(a.P,!1);a.h.o(a.P,"click",function(){Zw(a)});a.j.appendChild(a.P)}
|
|
997
|
+
function Mw(a){a.h.o(a.F,"buffering",function(){a.S&&X(a.ba,a.F.Kc())});a.S&&X(a.ba,a.F.Kc());a.h.o(window,"keydown",function(b){bx(a,b)});a.h.o(window,"click",function(){return a.dc()});a.h.o(a,"submenuopen",function(){a.dc()});a.h.o(a.A,"play",function(){Jw(a)});a.h.o(a.A,"pause",function(){Jw(a)});a.h.o(a.j,"mousemove",function(b){Yw(a,b)});a.h.o(a.j,"touchmove",function(b){Yw(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Yw(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.xa()});
|
|
998
|
+
a.h.o(a.C,"caststatuschanged",function(){Nw(a)});a.h.o(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)&&Yw(a,b);if(a.i.enableKeyboardPlaybackControls)switch(c=a.i.keyboardSeekDistance,b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),cx(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),cx(a,a.l.getValue()+c));break;case "Home":a.l&&
|
|
999
|
+
cx(a,a.F.Ia().start);break;case "End":a.l&&cx(a,a.F.Ia().end);break;case " ":e&&dx(a)}});a.h.o(a.j,"keyup",function(b){a.ma["delete"](b.key)});a.h.o(a.Xa,"ad-started",function(b){a.m=b.ad;a.Pf()});a.h.o(a.Xa,"ad-stopped",function(){a.m=null;a.zf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return I(function(b){return u(b,ex(a),0)})})}
|
|
1000
|
+
function ex(a){return I(function(b){return a.A&&0!=a.A.readyState&&!a.C.qa()&&a.i.enableFullscreenOnRotation&&a.rd()?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?u(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?u(b,document.exitFullscreen(),0):b.D(0):b["return"]()})}
|
|
1001
|
+
function Yw(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Jw(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.hb=!0,a.I.stop(),a.Nb()||(Kw(a),Jw(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.T(3))}function fx(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
|
|
1002
|
+
function Jw(a){var b=a.m?a.m.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.hb||d||fx(a)?(Kw(a),a.g.setAttribute("shown","true"),a.ea.stop()):a.ea.T(a.i.fadeDelay)}function Zw(a){a.S&&(a.ed()?a.I.xa():a.i.singleClickForPlayAndPause&&dx(a))}function dx(a){a.m&&a.m.isLinear()?uw(a):vw(a)}
|
|
1003
|
+
function Nw(a){var b=a.C.qa();a.dispatchEvent(new M("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Nb=function(){return this.S?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function cx(a,b){a.l.changeTo(b);a.Nb()&&Kw(a)}
|
|
1004
|
+
function Kw(a){if(a.l)if(a.l.setValue(a.A.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"))}
|
|
1005
|
+
function bx(a,b){a.ma.add(b.key);var c=a.ed();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Jw(a),a.h.o(window,"mousedown",function(){a.h.nc(window,"mousedown")}));"Escape"==b.key&&a.I.xa();c&&a.ma.has("Tab")&&gx(a,b)}
|
|
1006
|
+
function gx(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.ma.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
1007
|
+
function Lw(){var a=new Vb("en");a.ia("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
|
|
1005
1008
|
["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
|
|
1006
1009
|
["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
|
|
1007
1010
|
["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
|
|
@@ -1059,77 +1062,77 @@ a.ia("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1059
1062
|
["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.ia("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
|
|
1060
1063
|
["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"],
|
|
1061
1064
|
["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"],
|
|
1062
|
-
["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.
|
|
1063
|
-
Y.prototype.toggleFullScreen=Y.prototype.
|
|
1064
|
-
Y.prototype.getClientSideAdContainer=Y.prototype.
|
|
1065
|
-
Y.prototype.setEnabledNativeControls=Y.prototype.
|
|
1066
|
-
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);
|
|
1067
|
-
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){
|
|
1068
|
-
function
|
|
1069
|
-
K("shaka.ui.OverflowMenu",
|
|
1070
|
-
this.i=R("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);
|
|
1071
|
-
c.player.
|
|
1072
|
-
|
|
1073
|
-
q.getConfiguration=function(){var a=
|
|
1074
|
-
function
|
|
1065
|
+
["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.jf(navigator.languages||[]);return a}K("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Nb;Y.prototype.hideAdUI=Y.prototype.zf;Y.prototype.showAdUI=Y.prototype.Pf;
|
|
1066
|
+
Y.prototype.toggleFullScreen=Y.prototype.Pe;Y.prototype.isFullScreenEnabled=Y.prototype.fe;Y.prototype.isFullScreenSupported=Y.prototype.rd;Y.prototype.hideSettingsMenus=Y.prototype.dc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.ed;Y.prototype.setLastTouchEventTime=Y.prototype.Nf;Y.prototype.getDisplayTime=Y.prototype.vf;Y.prototype.isCastAllowed=Y.prototype.Qg;Y.prototype.setSeeking=Y.prototype.Je;Y.prototype.isSeeking=Y.prototype.Sg;Y.prototype.getConfig=Y.prototype.pg;
|
|
1067
|
+
Y.prototype.getClientSideAdContainer=Y.prototype.og;Y.prototype.getServerSideAdContainer=Y.prototype.Hg;Y.prototype.getControlsContainer=Y.prototype.rg;Y.prototype.getLocalPlayer=Y.prototype.xg;Y.prototype.getPlayer=Y.prototype.bc;Y.prototype.getLocalVideo=Y.prototype.yg;Y.prototype.getVideo=Y.prototype.Bb;Y.prototype.getVideoContainer=Y.prototype.Ng;Y.prototype.getLocalization=Y.prototype.zg;Y.prototype.getCastProxy=Y.prototype.mg;Y.prototype.getAd=Y.prototype.getAd;
|
|
1068
|
+
Y.prototype.setEnabledNativeControls=Y.prototype.Mf;Y.prototype.setEnabledShakaControls=Y.prototype.Fe;Y.prototype.configure=Y.prototype.configure;Y.prototype.loadComplete=Y.prototype.Tg;Y.prototype.allowCast=Y.prototype.ag;Y.registerSeekBar=function(a){ax=a};Y.registerElement=Pw;Y.prototype.destroy=Y.prototype.destroy;var Qw=new Map,ax=new Iw;function hx(a,b){W.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=Bk();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");
|
|
1069
|
+
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);ix(this);this.eventManager.o(this.localization,"locale-updated",function(){jx(c)});this.eventManager.o(this.localization,"locale-changed",function(){jx(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&X(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Nf(Date.now());
|
|
1070
|
+
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){kx(c)});jx(this);this.ad&&this.ad.isLinear()&&X(this.g,!1)}qa(hx,W);hx.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=[];W.prototype.release.call(this)};function lx(a,b){mx.set(a,b)}
|
|
1071
|
+
function ix(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,mx.get(c)?(c=mx.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function kx(a){if(a.controls.ed())a.controls.dc();else{X(a.h,!0);Jw(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};ib(a.h.childNodes,b)&&jb(a.h.childNodes,b)[0].focus()}}function jx(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1072
|
+
K("shaka.ui.OverflowMenu",hx);hx.registerElement=lx;function nx(){}nx.prototype.create=function(a,b){return new hx(a,b)};Pw("overflow_menu",new nx);var mx=new Map;function ox(a,b){W.call(this,a,b);var c=this;this.g=Bk();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");var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");d.appendChild(this.j);
|
|
1073
|
+
this.i=R("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);px(this);qx(this);this.eventManager.o(this.localization,"locale-updated",function(){px(c)});this.eventManager.o(this.localization,"locale-changed",function(){px(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});d=this.controls.Bb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=
|
|
1074
|
+
c.player.wf()==um;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){qx(c)})}qa(ox,W);function qx(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function px(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}K("shaka.ui.AirPlayButton",ox);function rx(){}rx.prototype.create=function(a,b){return new ox(a,b)};lx("airplay",new rx);
|
|
1075
|
+
Pw("airplay",new rx);function sx(a,b,c){this.i=a;this.h=tx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.ge()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.Me(b);b.ui=this;c.ui=this}q=sx.prototype;q.destroy=function(){var a=this;return I(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.D(4);a.i=null;A(b)})};q.ge=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Yc()&&1<navigator.maxTouchPoints};
|
|
1076
|
+
q.getConfiguration=function(){var a=tx(this);fl(a,this.h,tx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=gl(a,b));fl(this.h,a,tx(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.qg=function(){return this.g};q.uh=function(a){this.g.Fe(a)};
|
|
1077
|
+
function tx(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",
|
|
1075
1078
|
"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)"},
|
|
1076
|
-
trackLabelFormat:
|
|
1077
|
-
function
|
|
1078
|
-
case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));B(t,7);return u(t,
|
|
1079
|
-
function
|
|
1080
|
-
function
|
|
1081
|
-
d.g.
|
|
1082
|
-
|
|
1083
|
-
n.
|
|
1084
|
-
break;case 3:n.
|
|
1085
|
-
function
|
|
1086
|
-
function
|
|
1087
|
-
function
|
|
1088
|
-
R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function
|
|
1089
|
-
function(){
|
|
1090
|
-
function
|
|
1091
|
-
d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);
|
|
1092
|
-
function
|
|
1093
|
-
function
|
|
1094
|
-
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.
|
|
1095
|
-
c.controls.
|
|
1096
|
-
K("shaka.ui.FullscreenButton",
|
|
1097
|
-
d.appendChild(this.l);this.g.appendChild(d);
|
|
1098
|
-
function
|
|
1099
|
-
this.eventManager.o(this.video,"volumechange",function(){
|
|
1100
|
-
function
|
|
1101
|
-
this.h=R("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);
|
|
1079
|
+
trackLabelFormat:ux,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.ge()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
|
|
1080
|
+
function vx(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return I(function(t){switch(t.g){case 1:tt();if(!Kl())return wx("shaka-ui-load-failed",xx),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),yx(f,e));t.D(2);break}h=r(a);k=h.next();
|
|
1081
|
+
case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));B(t,7);return u(t,yx(l,m),9);case 9:va(t,5);break;case 7:return F(t),wx("shaka-ui-load-failed",zx),t["return"]();case 5:k=h.next();t.D(4);break;case 2:wx("shaka-ui-loaded"),A(t)}})}
|
|
1082
|
+
function wx(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
|
|
1083
|
+
function yx(a,b){var c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:c=new S(b);d=new sx(c,a,b);e="";f=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(e=a.dataset.shakaPlayerCastReceiverId,f="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId,f="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);e.length&&d.configure({castReceiverAppId:e,castAndroidReceiverCompatible:f});b.controls&&
|
|
1084
|
+
d.g.Mf(!0);if(g=b.getAttribute("src"))h=document.createElement("source"),h.setAttribute("src",g),b.appendChild(h),b.removeAttribute("src");k=r(b.querySelectorAll("source"));l=k.next();case 2:if(l.done){n.D(0);break}m=l.value;B(n,5);return u(n,d.g.bc().load(m.getAttribute("src")),7);case 7:n.D(0);break;case 5:F(n);case 3:l=k.next(),n.D(2)}})}K("shaka.ui.Overlay",sx);sx.prototype.setEnabled=sx.prototype.uh;sx.prototype.getControls=sx.prototype.qg;sx.prototype.configure=sx.prototype.configure;
|
|
1085
|
+
sx.prototype.getConfiguration=sx.prototype.getConfiguration;sx.prototype.isMobile=sx.prototype.ge;sx.prototype.destroy=sx.prototype.destroy;var ux=0;sx.TrackLabelFormat={LANGUAGE:ux,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var xx=0,zx=1;sx.FailReasonCode={NO_BROWSER_SUPPORT:xx,PLAYER_FAILED_TO_LOAD:zx};"complete"==document.readyState?I(function(a){if(1==a.g)return u(a,Promise.resolve(),2);vx();A(a)}):window.addEventListener("load",vx);function Ax(a,b,c,d,e,f,g){function h(z,C){return z+": "+C}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=lw(b);Ck(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={Va:n.Va},p=a.next()){n.Va=p.value;p=n.Va.language;var t=
|
|
1086
|
+
n.Va.forced,w=f.resolve(Zb.Wf),y=k(n.Va),x=h(p,y);if(!m.has(x)){m.add(x);var v=Bk();v.addEventListener("click",function(z){return function(){c(z.Va)}}(n));var D=R("span");v.appendChild(D);D.textContent=Bx(p,f);switch(g){case ux:t&&(D.textContent+=" ("+w+")");break;case 1:y?D.textContent=y:(Ua("Track #"+n.Va.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");t&&(D.textContent+=" ("+w+")");break;case 2:y&&(D.textContent+=": "+y);t&&(D.textContent+=" ("+w+")");
|
|
1087
|
+
break;case 3:n.Va.label?D.textContent=n.Va.label:(Ua("Track #"+n.Va.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&x==l&&(v.appendChild(ow()),D.classList.add("shaka-chosen-item"),v.ariaSelected="true",e.textContent=D.textContent);b.appendChild(v)}}}
|
|
1088
|
+
function Bx(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=Rb(a);return a in hw?hw[a].s:c in hw?hw[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function Cx(a,b,c){W.call(this,a,b);var d=this;Dx(this,c);Ex(this);Fx(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new M("submenuopen")),X(d.menu,!0),nw(d.menu)):X(d.menu,!1)})}qa(Cx,W);
|
|
1089
|
+
function Dx(a,b){a.button=Bk();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);var c=R("label");c.classList.add("shaka-overflow-button-label");c.classList.add("shaka-overflow-menu-only");a.nameSpan=R("span");c.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
|
|
1090
|
+
function Ex(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=Bk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.dc()});var b=R("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1091
|
+
R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Fx(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}X(a.parent,!0);ib(a.parent.childNodes,b)&&jb(a.parent.childNodes,b)[0].focus();Jw(a.controls)}))}K("shaka.ui.SettingsMenu",Cx);function Gx(a,b){Cx.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.o(this.localization,"locale-updated",function(){Hx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Hx(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Qa().length;X(c.button,d);Ix(c)});this.eventManager.o(this.player,"variantchanged",
|
|
1092
|
+
function(){Ix(c)});Hx(this);Ix(this)}qa(Gx,Cx);function Ix(a){var b=a.player.Qa();Ax(b,a.menu,function(c){a.player.Hd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);nw(a.menu);a.controls.dispatchEvent(new M("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
|
|
1093
|
+
function Hx(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",Gx);function Jx(){}Jx.prototype.create=function(a,b){return new Gx(a,b)};lx("language",new Jx);Pw("language",new Jx);function Kx(a,b){W.call(this,a,b);var c=this;this.h=this.controls.C;this.g=Bk();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);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");
|
|
1094
|
+
d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);Lx(this);Mx(this);this.eventManager.o(this.localization,"locale-updated",function(){Lx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Lx(c)});this.eventManager.o(this.g,"click",function(){Nx(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Mx(c)})}qa(Kx,W);
|
|
1095
|
+
function Nx(a){var b;I(function(c){if(1==c.g){if(a.h.qa())return a.h.Qf(),c.D(0);B(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=F(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new M("error",(new Map).set("detail",b)));A(c)})}function Mx(a){var b=a.h.ef()&&a.controls.fb,c=a.h.qa();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Ox(a)}
|
|
1096
|
+
function Ox(a){a.j.textContent=a.h.qa()?a.h.Fd():a.localization.resolve("OFF")}function Lx(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Ox(a)}K("shaka.ui.CastButton",Kx);function Px(){}Px.prototype.create=function(a,b){return new Kx(a,b)};lx("cast",new Px);Pw("cast",new Px);function Qx(a,b){W.call(this,a,b);var c=this;this.g=Bk();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);Rx(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){Rx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Rx(c)});
|
|
1097
|
+
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Re(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(Qx,W);function Rx(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}K("shaka.ui.FastForwardButton",Qx);function Sx(){}Sx.prototype.create=function(a,b){return new Qx(a,b)};Pw("fast_forward",new Sx);function Tx(a,b){W.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Bk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");Ux(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);Vx(this);this.eventManager.o(this.localization,"locale-updated",function(){Vx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Vx(c)});this.eventManager.o(this.g,"click",function(){return I(function(d){return u(d,
|
|
1098
|
+
c.controls.Pe(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.fe()?"fullscreen_exit":"fullscreen";Vx(c)});this.eventManager.o(this.h,"loadedmetadata",function(){Ux(c)});this.eventManager.o(this.h,"loadeddata",function(){Ux(c)})}qa(Tx,W);function Ux(a){a.controls.rd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function Vx(a){a.g.ariaLabel=a.localization.resolve(a.controls.fe()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1099
|
+
K("shaka.ui.FullscreenButton",Tx);function Wx(){}Wx.prototype.create=function(a,b){return new Tx(a,b)};Pw("fullscreen",new Wx);function Xx(a,b){W.call(this,a,b);var c=this;this.g=Bk();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);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=R("span");this.l.classList.add("shaka-current-selection-span");
|
|
1100
|
+
d.appendChild(this.l);this.g.appendChild(d);Yx(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Yx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Yx(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.xa();c.h.ka(1)});this.m=this.video.loop;this.h=new P(function(){c.m!=c.video.loop&&(Yx(c),c.m=c.video.loop)});this.h.ka(1)}qa(Xx,W);Xx.prototype.release=function(){this.h.stop();this.h=null;W.prototype.release.call(this)};
|
|
1101
|
+
function Yx(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",Xx);function Zx(){}Zx.prototype.create=function(a,b){return new Xx(a,b)};lx("loop",new Zx);Pw("loop",new Zx);zw("loop",new Zx);function $x(a,b){W.call(this,a,b);var c=this;this.g=Bk();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);ay(this);by(this);this.eventManager.o(this.localization,"locale-updated",function(){ay(c)});this.eventManager.o(this.localization,"locale-changed",function(){ay(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
|
|
1102
|
+
this.eventManager.o(this.video,"volumechange",function(){ay(c);by(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){ay(c);by(c)});this.eventManager.o(this.adManager,"ad-muted",function(){ay(c);by(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;ay(c);by(c)})}qa($x,W);function ay(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
1103
|
+
function by(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",$x);function cy(){}cy.prototype.create=function(a,b){return new $x(a,b)};Pw("mute",new cy);function dy(a,b){W.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Bk();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);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);
|
|
1104
|
+
this.h=R("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);ey(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){ey(c)});this.eventManager.o(this.localization,"locale-changed",function(){ey(c)});this.eventManager.o(this.g,"click",function(){fy(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
|
|
1102
1105
|
"branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("ON")});this.eventManager.o(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.ariaLabel=c.localization.resolve("ENTER_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("OFF")});this.eventManager.o(this.controls,"caststatuschanged",function(e){e.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!1):
|
|
1103
|
-
document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){
|
|
1104
|
-
function
|
|
1105
|
-
function
|
|
1106
|
-
"x",d]}));
|
|
1107
|
-
function
|
|
1108
|
-
"x")}function
|
|
1109
|
-
!1):(
|
|
1110
|
-
"abrstatuschanged",function(){
|
|
1111
|
-
function
|
|
1112
|
-
for(var e={},f=r(b),g=f.next();!g.done;e={Xb:e.Xb},g=f.next()){e.Xb=g.value;g=Bk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Xb;a.player.configure({abr:{enabled:!1}});a.player.
|
|
1113
|
-
a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Bk();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});
|
|
1114
|
-
a.currentSelection.textContent);a.menu.appendChild(e);
|
|
1115
|
-
function
|
|
1116
|
-
|
|
1117
|
-
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.
|
|
1118
|
-
d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){
|
|
1119
|
-
"click",function(){c.ad.skip()});this.ad&&
|
|
1120
|
-
K("shaka.ui.SmallPlayButton",
|
|
1106
|
+
document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){gy(c)})}qa(dy,W);function fy(a){var b;I(function(c){if(1==c.g)return B(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=F(c);a.controls.dispatchEvent(new M("error",(new Map).set("detail",b)));A(c)})}
|
|
1107
|
+
function ey(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")}
|
|
1108
|
+
function gy(a){I(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.D(0);if(!a.player||!a.player.ec())return X(a.g,!0),b.D(0);X(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.D(0)})}K("shaka.ui.PipButton",dy);function hy(){}hy.prototype.create=function(a,b){return new dy(a,b)};lx("picture_in_picture",new hy);Pw("picture_in_picture",new hy);zw("picture_in_picture",new hy);function iy(a,b){Cx.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.o(this.localization,"locale-updated",function(){jy(c)});this.eventManager.o(this.localization,"locale-changed",function(){jy(c)});this.eventManager.o(this.player,"ratechange",function(){ky(c,c.player.zb())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
|
|
1109
|
+
"x",d]}));jy(this);ly(this);ky(this,this.player.zb())}qa(iy,Cx);function jy(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")}
|
|
1110
|
+
function ky(a,b){var c=mw(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(ow()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
1111
|
+
"x")}function ly(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={uc:b.uc},d=c.next()){b.uc=d.value;d=Bk();var e=R("span");e.textContent=b.uc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.uc);a.video.defaultPlaybackRate=a.g.get(f.uc)}}(b));a.menu.appendChild(d)}nw(a.menu)}K("shaka.ui.PlaybackRateSelection",iy);function my(){}my.prototype.create=function(a,b){return new iy(a,b)};lx("playback_rate",new my);Pw("playback_rate",new my);function ny(a,b){W.call(this,a,b);var c=this;this.g=Bk();this.g.classList.add("shaka-current-time");oy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Ia().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.vf(),f=c.video.duration,g=c.player.Ia(),h=g.end-g.start;c.player.U()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(oy(c,"- "+pw(e,f)),c.g.disabled=
|
|
1112
|
+
!1):(oy(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=pw(e,d),f&&(e+=" / "+pw(f,d)),oy(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}qa(ny,W);function oy(a,b){b!=a.g.textContent&&(a.g.textContent=b)}K("shaka.ui.PresentationTimeTracker",ny);function py(){}py.prototype.create=function(a,b){return new ny(a,b)};Pw("time_and_duration",new py);function qy(a,b){Cx.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.o(this.localization,"locale-updated",function(){ry(c)});this.eventManager.o(this.localization,"locale-changed",function(){ry(c)});this.eventManager.o(this.player,"variantchanged",function(){sy(c)});this.eventManager.o(this.player,"trackschanged",function(){sy(c)});this.eventManager.o(this.player,
|
|
1113
|
+
"abrstatuschanged",function(){sy(c)});sy(this)}qa(qy,Cx);
|
|
1114
|
+
function sy(a){var b=a.player.Qa(),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.ec()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ec()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=lw(a.menu);Ck(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;
|
|
1115
|
+
for(var e={},f=r(b),g=f.next();!g.done;e={Xb:e.Xb},g=f.next()){e.Xb=g.value;g=Bk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Xb;a.player.configure({abr:{enabled:!1}});a.player.De(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=a.player.ec()?Math.round(e.Xb.bandwidth/1E3)+" kbits/s":e.Xb.height+"p";g.appendChild(h);d||e.Xb!=c||(g.ariaSelected="true",g.appendChild(ow()),h.classList.add("shaka-chosen-item"),
|
|
1116
|
+
a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Bk();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});sy(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(ow()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",
|
|
1117
|
+
a.currentSelection.textContent);a.menu.appendChild(e);nw(a.menu);a.controls.dispatchEvent(new M("resolutionselectionupdated"));ry(a)}
|
|
1118
|
+
function ry(a){var b=a.player.ec()?"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",qy);function ty(){}
|
|
1119
|
+
ty.prototype.create=function(a,b){return new qy(a,b)};lx("quality",new ty);Pw("quality",new ty);function uy(a,b){W.call(this,a,b);var c=this;this.g=Bk();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);vy(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){vy(c)});this.eventManager.o(this.localization,"locale-changed",function(){vy(c)});
|
|
1120
|
+
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Re(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(uy,W);function vy(a){a.g.ariaLabel=a.localization.resolve("REWIND")}K("shaka.ui.RewindButton",uy);function wy(){}wy.prototype.create=function(a,b){return new uy(a,b)};Pw("rewind",new wy);function xy(a,b){W.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");X(this.h,!1);this.j.appendChild(this.h);this.g=Bk();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);yy(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1121
|
+
d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){yy(c)});this.eventManager.o(this.localization,"locale-changed",function(){yy(c)});this.eventManager.o(this.adManager,"ad-started",function(){zy(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
|
|
1122
|
+
"click",function(){c.ad.skip()});this.ad&&zy(this)}qa(xy,W);xy.prototype.release=function(){this.i.stop();this.i=null;W.prototype.release.call(this)};function yy(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function zy(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.xa(),a.i.ka(.5))}K("shaka.ui.SkipAdButton",xy);function Ay(a,b){tw.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(Ay,tw);Ay.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};Ay.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)}};
|
|
1123
|
+
K("shaka.ui.SmallPlayButton",Ay);function By(){}By.prototype.create=function(a,b){return new Ay(a,b)};Pw("play_pause",new By);function Cy(a,b){W.call(this,a,b);var c=R("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}qa(Cy,W);K("shaka.ui.Spacer",Cy);function Dy(){}Dy.prototype.create=function(a,b){return new Cy(a,b)};Pw("spacer",new Dy);function Ey(a,b){function c(l){return pw(h.h[l],!1)+" (m)"}function d(l){return Math.round(h.h[l]/1E3)+" (kbits/s)"}function e(l){return h.h[l].toFixed(2)+" (s)"}function f(l){return h.h[l]+" (frames)"}function g(l){return h.h[l]+" (px)"}W.call(this,a,b);var h=this;this.i=Bk();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);var k=R("label");k.classList.add("shaka-overflow-button-label");
|
|
1121
1124
|
this.A=R("span");k.appendChild(this.A);this.m=R("span");this.m.classList.add("shaka-current-selection-span");k.appendChild(this.m);this.i.appendChild(k);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.F=[];this.G=["stateHistory","switchHistory"];this.h=this.player.getStats();
|
|
1122
1125
|
this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},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(l){return h.h[l]+" (stalls)"},gapsJumped:function(l){return h.h[l]+" (gaps)"}};this.l=new P(function(){h.h=h.player.getStats();for(var l=r(h.F),m=l.next();!m.done;m=
|
|
1123
|
-
l.next())m=m.value,h.B[m].textContent=h.C[m](m)});
|
|
1124
|
-
function
|
|
1125
|
-
function
|
|
1126
|
-
|
|
1127
|
-
"texttrackvisibility",function(){
|
|
1128
|
-
function
|
|
1129
|
-
function
|
|
1130
|
-
a.currentSelection.textContent);
|
|
1131
|
-
function
|
|
1132
|
-
this.eventManager.o(this.localization,"locale-changed",function(){return
|
|
1133
|
-
function
|
|
1126
|
+
l.next())m=m.value,h.B[m].textContent=h.C[m](m)});Fy(this);Gy(this);this.eventManager.o(this.localization,"locale-updated",function(){Fy(h)});this.eventManager.o(this.localization,"locale-changed",function(){Fy(h)});this.eventManager.o(this.i,"click",function(){X(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ka(.1),X(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),X(h.g,!1));Fy(h)})}qa(Ey,W);
|
|
1127
|
+
function Fy(a){a.A.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")}
|
|
1128
|
+
function Gy(a){for(var b=r(a.controls.i.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.F.push(c)}else Ua("Unrecognized statistic element:",c)}Ey.prototype.release=function(){this.l.stop();this.l=null;W.prototype.release.call(this)};K("shaka.ui.StatisticsButton",Ey);function Hy(){}
|
|
1129
|
+
Hy.prototype.create=function(a,b){return new Ey(a,b)};lx("statistics",new Hy);zw("statistics",new Hy);function Iy(a,b){Cx.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.Ob()?this.button.ariaPressed="true":this.button.ariaPressed="false";Jy(this);this.eventManager.o(this.localization,"locale-updated",function(){Ky(c);Ly(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ky(c);Ly(c)});this.eventManager.o(this.player,
|
|
1130
|
+
"texttrackvisibility",function(){My(c);Ly(c)});this.eventManager.o(this.player,"textchanged",function(){Ly(c)});this.eventManager.o(this.player,"trackschanged",function(){Ny(c)});My(this);Ky(this);Ly(this);Ny(this)}qa(Iy,Cx);function Jy(a){var b=Bk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(ow());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1131
|
+
function My(a){a.player.Ob()?(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"))}
|
|
1132
|
+
function Ly(a){var b=a.player.Ab();Ax(b,a.menu,function(c){return Oy(a,c)},a.player.Ob(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=Bk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Le(!1);Ly(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ob()||(b.ariaSelected="true",b.appendChild(ow()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
|
|
1133
|
+
a.currentSelection.textContent);nw(a.menu);a.controls.dispatchEvent(new M("captionselectionupdated"))}function Oy(a,b){return I(function(c){a.player.Ce(b);return u(c,a.player.Le(!0),0)})}function Ky(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")}
|
|
1134
|
+
function Ny(a){var b=0<a.player.Ab().length;X(a.button,b);Ly(a)}K("shaka.ui.TextSelection",Iy);function Py(){}Py.prototype.create=function(a,b){return new Iy(a,b)};lx("captions",new Py);Pw("captions",new Py);function Qy(a,b){Bw.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return Ry(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Sy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Sy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Ry(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Ty(c)});
|
|
1135
|
+
this.eventManager.o(this.localization,"locale-changed",function(){return Ty(c)});Ry(this);Ty(this);if(this.ad)this.onChange()}qa(Qy,Bw);Qy.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 Ry(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Uy(a)}function Sy(a){var b=a.ad.getVolume();a.setValue(b);Uy(a)}
|
|
1136
|
+
function Uy(a){var b=a.h.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 Ty(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}K("shaka.ui.VolumeBar",Qy);function Vy(){}Vy.prototype.create=function(a,b){return new Qy(a,b)};Pw("volume",new Vy);}).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})();
|
|
1134
1137
|
|
|
1135
1138
|
//# sourceMappingURL=shaka-player.ui.map
|