shaka-player 4.2.7 → 4.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/selenium-lab-tests.yaml +22 -0
- package/CHANGELOG.md +16 -0
- package/dist/deps.js +3 -2
- package/dist/locales.js +31 -31
- package/dist/shaka-player.compiled.debug.js +87 -81
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.js +567 -564
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.debug.js +99 -93
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.js +691 -688
- package/dist/shaka-player.ui.map +4 -4
- package/lib/dash/segment_template.js +17 -5
- package/lib/hls/hls_parser.js +1 -1
- package/lib/player.js +1 -1
- package/lib/polyfill/media_capabilities.js +4 -1
- package/lib/text/simple_text_displayer.js +2 -64
- package/lib/text/text_utils.js +88 -0
- package/lib/text/ui_text_displayer.js +0 -5
- package/lib/text/vtt_text_parser.js +256 -95
- package/lib/text/web_vtt_generator.js +2 -64
- package/lib/util/platform.js +8 -0
- package/package.json +1 -1
- package/support.html +1 -0
- package/test/dash/dash_parser_manifest_unit.js +0 -36
- package/test/test/util/layout_tests.js +433 -0
- package/test/test/util/util.js +0 -120
- package/test/{ui → text}/text_displayer_layout_unit.js +59 -235
- package/test/text/ui_text_displayer_unit.js +2 -4
- package/test/text/vtt_text_parser_unit.js +123 -6
- package/test/text/web_vtt_layout_integration.js +528 -0
package/dist/shaka-player.ui.js
CHANGED
|
@@ -16,9 +16,9 @@ ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(v
|
|
|
16
16
|
function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ba(a)}}function ja(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},ma;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ma=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ma=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ma;
|
|
18
18
|
function u(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(qa)qa(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.hj=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={
|
|
20
|
-
function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.
|
|
21
|
-
function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.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)}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.
|
|
19
|
+
function ta(a,b){a.i={vf:b,Ff:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function A(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function B(a){a.g=0}function E(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 J(a,b){a.m=b||0;b=a.i.vf;a.i=null;return b}function wa(a){a.C=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Ff?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 ya(a){this.g=new ra;this.h=a}function za(a,b){sa(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ca(a)}
|
|
21
|
+
function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.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)}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.Ff)throw b.vf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
22
|
function Da(a){this.next=function(b){sa(a.g);a.g.l?b=Aa(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=Aa(a,a.g.l["throw"],b,a.g.B):(ta(a.g,b),b=Ca(a));return b};this.return=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}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())})}
|
|
23
23
|
function K(a){return Ea(new Da(new ya(a)))}function Fa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
24
24
|
ha("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=fa.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
@@ -31,15 +31,15 @@ while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProp
|
|
|
31
31
|
ha("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(!Ga(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
32
32
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(p){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ga(k,
|
|
33
33
|
g)&&Ga(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ga(k,g)&&Ga(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
34
|
-
ha("Map",function(a){function b(){var h={};return h.
|
|
34
|
+
ha("Map",function(a){function b(){var h={};return h.qb=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.qb;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&&Ga(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,xa:p}}return{id:l,
|
|
35
35
|
list:m,index:-1,xa: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||
|
|
36
|
-
"t"!=m.value[1]||!l.next().done?!1:!0}catch(p){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.xa?l.xa.value=k:(l.xa={next:this.g,
|
|
37
|
-
h.xa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.
|
|
36
|
+
"t"!=m.value[1]||!l.next().done?!1:!0}catch(p){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.xa?l.xa.value=k:(l.xa={next:this.g,qb:this.g.qb,head:this.g,key:h,value:k},l.list.push(l.xa),this.g.qb.next=l.xa,this.g.qb=l.xa,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.xa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.xa.qb.next=h.xa.next,h.xa.next.qb=h.xa.qb,
|
|
37
|
+
h.xa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.qb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).xa};e.prototype.get=function(h){return(h=d(this,h).xa)&&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(),
|
|
38
38
|
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 Ha(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}ha("Array.prototype.keys",function(a){return a?a:function(){return Ha(this,function(b){return b})}});
|
|
39
39
|
ha("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||
|
|
40
40
|
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;b.prototype[Symbol.iterator]=
|
|
41
41
|
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});ha("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}});
|
|
42
|
-
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{
|
|
42
|
+
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{Df:e,v:f}}return{Df:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).Df}});ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
|
|
43
43
|
ha("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,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+""}
|
|
44
44
|
ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});ha("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});ha("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=La(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
|
|
45
45
|
var Ma="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)Ga(d,e)&&(a[e]=d[e])}return a};ha("Object.assign",function(a){return a||Ma});ha("Array.prototype.values",function(a){return a?a:function(){return Ha(this,function(b,c){return c})}});
|
|
@@ -92,12 +92,12 @@ var Pb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
92
92
|
"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
93
|
"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
94
|
"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}u(Vb,fb);q=Vb.prototype;q.release=function(){fb.prototype.release.call(this)};
|
|
95
|
-
q.
|
|
95
|
+
q.mf=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 O("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 O("locale-changed",a))};
|
|
96
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 O("locale-updated"));return this};q.oh=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 O("unknown-localization",a));return""};
|
|
97
97
|
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={Yb:f.Yb},h=g.next()){f.Yb=h.value;e.add(f.Yb);e.add(Rb(f.Yb));h=jb(b.keys(),function(l){return function(m){return Qb(m,l.Yb)}}(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.Yb}}(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
98
|
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 O("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)}M("shaka.ui.Localization",Vb);Vb.prototype.resolve=Vb.prototype.resolve;
|
|
99
|
-
Vb.prototype.resolveDictionary=Vb.prototype.oh;Vb.prototype.insert=Vb.prototype.ia;Vb.prototype.changeLocale=Vb.prototype.
|
|
100
|
-
|
|
99
|
+
Vb.prototype.resolveDictionary=Vb.prototype.oh;Vb.prototype.insert=Vb.prototype.ia;Vb.prototype.changeLocale=Vb.prototype.mf;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={bi:"FULL_SCREEN",Ih:"AUTO_QUALITY",Ci:"PLAY",gi:"LOOP",Oh:"CAST",ti:"ON",Fh:"AD_TIME",Wh:"EXIT_FULL_SCREEN",ei:"LANGUAGE",mi:"MULTIPLE_LANGUAGES",Nh:"CAPTIONS",Ai:"PAUSE",Uh:"ENTER_PICTURE_IN_PICTURE",ri:"NOT_APPLICABLE",Ni:"STATISTICS",Yf:"SUBTITLE_FORCED",BACK:"BACK",Ei:"QUALITY",Yi:"UNDETERMINED_LANGUAGE",Di:"PLAYBACK_RATE",li:"MORE_SETTINGS",Ji:"SEEK",df:"LIVE",Li:"SKIP_TO_LIVE",AD_PROGRESS:"AD_PROGRESS",$i:"UNRECOGNIZED_LANGUAGE",Gh:"AIRPLAY",si:"OFF",Bi:"PICTURE_IN_PICTURE",Yh:"EXIT_PICTURE_IN_PICTURE",
|
|
100
|
+
Th:"ENTER_LOOP_MODE",Eh:"AD_DURATION",Hi:"REWIND",bj:"VOLUME",Fi:"REPLAY",Xh:"EXIT_LOOP_MODE",ai:"FAST_FORWARD",Ki:"SKIP_AD",Gi:"RESOLUTION",ni:"MUTE",Zi:"UNMUTE"};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);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,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;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,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){b=a.indexOf(b);-1<b&&a.splice(b,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={Qd:d.Qd},e=a.next()){d.Qd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Qd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
101
101
|
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
102
|
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
103
|
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}M("shaka.text.Cue",gc);var jc="auto";
|
|
@@ -112,7 +112,7 @@ function dd(a){if(!a)return"";a=Ec(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.suba
|
|
|
112
112
|
function ed(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new P(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Hc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return fd.value()(d)}
|
|
113
113
|
function gd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ec(a);if(239==c[0]&&187==c[1]&&191==c[2])return dd(c);if(254==c[0]&&255==c[1])return ed(c.subarray(2),!1);if(255==c[0]&&254==c[1])return ed(c.subarray(2),!0);if(0==c[0]&&0==c[2])return ed(a,!1);if(0==c[1]&&0==c[3])return ed(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return dd(a);throw new P(2,2,2003);}
|
|
114
114
|
function hd(a){if(window.TextEncoder&&!Zc()){var b=new TextEncoder;return Fc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Fc(b)}function id(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",cd);cd.resetFromCharCode=function(){fd.g=void 0};cd.toUTF16=id;cd.toUTF8=hd;cd.fromBytesAutoDetect=gd;cd.fromUTF16=ed;
|
|
115
|
-
cd.fromUTF8=dd;var fd=new Mc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={
|
|
115
|
+
cd.fromUTF8=dd;var fd=new Mc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={vb:65536};0<b.vb;b={vb:b.vb},b.vb/=2)if(a(b.vb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.vb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.vb));return e}}(b);return null});function jd(){}function kd(a){a=Ec(a);a=fd.value()(a);return btoa(a)}function ld(a,b){b=void 0==b?!0:b;a=kd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function md(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function nd(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
116
116
|
function od(a){var b=Ec(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function pd(){for(var a=Fa.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Ec(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",jd);jd.concat=pd;jd.toHex=od;jd.fromHex=nd;jd.fromBase64=md;jd.toBase64=ld;jd.toStandardBase64=kd;function qd(){var a=this;this.A=Jc.get("muxjs")();this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(pd(b.initSegment,b.data))});this.g.on("done",function(){var b={data:pd.apply(jd,ja(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}qd.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
|
|
117
117
|
function rd(a,b){if(!Jc.get("muxjs")()||!sd(a))return!1;if(b)return MediaSource.isTypeSupported(td(b,a));b=td("audio",a);a=td("video",a);return MediaSource.isTypeSupported(b)||MediaSource.isTypeSupported(a)}function sd(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
118
118
|
function td(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","audio"));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){var c="avc1.",d=a[1],e=Number(a[2]);c=("66"==d?c+"4200":"77"==d?c+"4d00":c+"6400")+(e>>4).toString(16);c+=(e&15).toString(16);b=b.replace(a[0],c)}return b}function ud(a,b){a.l=!0;a.h=new Lc;a.m=[];a.j=[];a.i=[];b=Ec(b);a.g.push(b);a.g.flush();a.l&&a.h.reject(new P(2,3,3018));return a.h};function vd(){}function wd(a,b){b&&(a+='; codecs="'+b+'"');return a}function xd(a,b,c){a=wd(a,b);if(sd(a)){if(Jc.get("muxjs")())return td(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
|
|
@@ -170,7 +170,7 @@ function Te(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.incl
|
|
|
170
170
|
function af(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(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 A(d,new Promise(function(e){(new Q(e)).S(c/1E3)}),2)}a.h*=a.m;B(d)})}function $e(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function bf(a,b){this.promise=a;this.i=b;this.g=!1}function cf(a){return new bf(Promise.reject(a),function(){return Promise.resolve()})}function df(){var a=Promise.reject(new P(2,7,7001));a.catch(function(){});return new bf(a,function(){return Promise.resolve()})}function ef(a){return new bf(Promise.resolve(a),function(){return Promise.resolve()})}function ff(a){return new bf(a,function(){return a.catch(function(){})})}bf.prototype.abort=function(){this.g=!0;return this.i()};
|
|
171
171
|
function gf(a){return new bf(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}bf.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
172
172
|
bf.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=hf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Lc,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new bf(f,function(){return d()})};
|
|
173
|
-
function hf(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()}}}M("shaka.util.AbortableOperation",bf);bf.prototype.chain=bf.prototype.na;bf.prototype["finally"]=bf.prototype.finally;bf.all=gf;bf.prototype.abort=bf.prototype.abort;bf.notAbortable=ff;bf.completed=ef;bf.aborted=df;bf.failed=cf;function jf(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 kf(a){var b={},c;for(c in a)b[c]=a[c];return b};function lf(){this.g=[]}function mf(a,b){a.g.push(b.finally(function(){dc(a.g,b)}))}lf.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 nf(a,b,c){fb.call(this);this.i=!1;this.m=new lf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}u(nf,fb);q=nf.prototype;q.
|
|
173
|
+
function hf(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()}}}M("shaka.util.AbortableOperation",bf);bf.prototype.chain=bf.prototype.na;bf.prototype["finally"]=bf.prototype.finally;bf.all=gf;bf.prototype.abort=bf.prototype.abort;bf.notAbortable=ff;bf.completed=ef;bf.aborted=df;bf.failed=cf;function jf(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 kf(a){var b={},c;for(c in a)b[c]=a[c];return b};function lf(){this.g=[]}function mf(a,b){a.g.push(b.finally(function(){dc(a.g,b)}))}lf.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 nf(a,b,c){fb.call(this);this.i=!1;this.m=new lf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}u(nf,fb);q=nf.prototype;q.Ie=function(a){this.A=a};function of(a,b,c,d){c=c||pf;var e=qf[a];if(!e||c>=e.priority)qf[a]={priority:c,fh:b,gh:void 0===d?!1:d}}q.hh=function(a){this.g.add(a)};q.yh=function(a){this.g.delete(a)};q.gg=function(){this.g.clear()};q.ih=function(a){this.h.add(a)};q.Ah=function(a){this.h.delete(a)};q.hg=function(){this.h.clear()};
|
|
174
174
|
function rf(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()};
|
|
175
175
|
q.request=function(a,b){var c=this,d=new sf;if(this.i){var e=Promise.reject(new P(2,7,7001));e.catch(function(){});return new tf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?jf(b.retryParameters):$e();b.uris=jf(b.uris);e=uf(this,a,b);var f=e.na(function(){return vf(c,a,b,new Ze(b.retryParameters,!1),0,null,d)}),g=f.na(function(p){return wf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
176
176
|
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.na(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.Sg||!c.l||t.fromCache||a!=xf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new tf(m.promise,function(){return m.abort()},d);mf(this.m,e);return e};
|
|
@@ -179,14 +179,14 @@ function vf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://
|
|
|
179
179
|
if(!p)return w;var C=c.retryParameters.connectionTimeout;C&&(n=new Q(function(){y=!0;w.abort()}),n.S(C/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new Q(function(){y=!0;w.abort()}));return w}).na(function(w){n&&n.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-v);var C={response:w,Sg:l};!x&&a.j&&a.j(w.headers,c,b);return C},function(w){n&&n.stop();t&&t.stop();if(a.B){var C=null,z=0;w instanceof P&&(C=w,1001==w.code&&(z=w.data[1]));a.B(c,C,z,y)}if(a.i)return df();y&&(w=new P(1,1,1003,
|
|
180
180
|
c.uris[e],b));if(w instanceof P){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return C=(new Map).set("error",w),C=new O("retry",C),a.dispatchEvent(C),e=(e+1)%c.uris.length,vf(a,b,c,d,e,w,g)}throw w;})}
|
|
181
181
|
function wf(a,b,c){var d=ef(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Xd:e.Xd},f=a.next())e.Xd=f.value,d=d.na(function(g){return function(){var h=c.response;h.data&&(h.data=Fc(h.data));return g.Xd(b,h)}}(e));return d.na(function(){return c},function(g){var h=2;if(g instanceof P){if(7001==g.code)throw g;h=g.severity}throw new P(h,1,1007,g);})}M("shaka.net.NetworkingEngine",nf);nf.prototype.request=nf.prototype.request;nf.prototype.destroy=nf.prototype.destroy;nf.makeRequest=rf;
|
|
182
|
-
nf.defaultRetryParameters=function(){return $e()};nf.prototype.clearAllResponseFilters=nf.prototype.hg;nf.prototype.unregisterResponseFilter=nf.prototype.Ah;nf.prototype.registerResponseFilter=nf.prototype.ih;nf.prototype.clearAllRequestFilters=nf.prototype.gg;nf.prototype.unregisterRequestFilter=nf.prototype.yh;nf.prototype.registerRequestFilter=nf.prototype.hh;nf.unregisterScheme=function(a){delete qf[a]};nf.registerScheme=of;nf.prototype.setForceHTTPS=nf.prototype.
|
|
182
|
+
nf.defaultRetryParameters=function(){return $e()};nf.prototype.clearAllResponseFilters=nf.prototype.hg;nf.prototype.unregisterResponseFilter=nf.prototype.Ah;nf.prototype.registerResponseFilter=nf.prototype.ih;nf.prototype.clearAllRequestFilters=nf.prototype.gg;nf.prototype.unregisterRequestFilter=nf.prototype.yh;nf.prototype.registerRequestFilter=nf.prototype.hh;nf.unregisterScheme=function(a){delete qf[a]};nf.registerScheme=of;nf.prototype.setForceHTTPS=nf.prototype.Ie;function sf(){this.g=0}
|
|
183
183
|
nf.NumBytesRemainingClass=sf;function tf(a,b,c){bf.call(this,a,b);this.h=c}u(tf,bf);nf.PendingRequest=tf;var xf=1;nf.RequestType={MANIFEST:0,SEGMENT:xf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var pf=3;nf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:pf};var qf={};function yf(a){this.g=!1;this.h=new Lc;this.i=a}yf.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 zf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Af(){this.g=new db}q=Af.prototype;q.release=function(){this.Sb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new Bf(a,b,c,d),this.g.push(b,a))};q.Fa=function(a,b,c,d){function e(g){f.sc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.sc=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.sc(),this.g.remove(b,e))}};
|
|
184
184
|
q.Sb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.sc();this.g.g={}}};M("shaka.util.EventManager",Af);Af.prototype.removeAll=Af.prototype.Sb;Af.prototype.unlisten=Af.prototype.sc;Af.prototype.listenOnce=Af.prototype.Fa;Af.prototype.listen=Af.prototype.o;Af.prototype.release=Af.prototype.release;function Bf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Cf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
185
185
|
Bf.prototype.sc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Cf(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 Df(a)?b:b.capture||!1}
|
|
186
|
-
function Df(a){var b=Ef;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}Ef=b}return b||!1}var Ef=void 0;function Ff(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 Gf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Hf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function If(a,b){this.W=Hc(a);this.h=b==Jf;this.g=0}q=If.prototype;q.Da=function(){return this.g<this.W.byteLength};q.oa=function(){return this.g};q.zg=function(){return this.W.byteLength};q.
|
|
186
|
+
function Df(a){var b=Ef;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}Ef=b}return b||!1}var Ef=void 0;function Ff(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 Gf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Hf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function If(a,b){this.W=Hc(a);this.h=b==Jf;this.g=0}q=If.prototype;q.Da=function(){return this.g<this.W.byteLength};q.oa=function(){return this.g};q.zg=function(){return this.W.byteLength};q.rb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw Kf();}};q.xe=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Kf();}};q.R=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Kf();}};
|
|
187
187
|
q.Jf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Kf();}};q.qc=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 Kf();}if(2097151<b)throw new P(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 Kf();var b=Ec(this.W,this.g,a);this.g+=a;return b};
|
|
188
188
|
q.skip=function(a){if(this.g+a>this.W.byteLength)throw Kf();this.g+=a};q.ph=function(a){if(this.g<a)throw Kf();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw Kf();this.g=a};q.Uc=function(){for(var a=this.g;this.Da()&&0!=this.W.getUint8(this.g);)this.g+=1;a=Ec(this.W,a,this.g-a);this.g+=1;return dd(a)};function Kf(){return new P(2,3,3E3)}M("shaka.util.DataViewReader",If);If.prototype.readTerminatedString=If.prototype.Uc;If.prototype.seek=If.prototype.seek;If.prototype.rewind=If.prototype.ph;
|
|
189
|
-
If.prototype.skip=If.prototype.skip;If.prototype.readBytes=If.prototype.Cb;If.prototype.readUint64=If.prototype.qc;If.prototype.readInt32=If.prototype.Jf;If.prototype.readUint32=If.prototype.R;If.prototype.readUint16=If.prototype.
|
|
189
|
+
If.prototype.skip=If.prototype.skip;If.prototype.readBytes=If.prototype.Cb;If.prototype.readUint64=If.prototype.qc;If.prototype.readInt32=If.prototype.Jf;If.prototype.readUint32=If.prototype.R;If.prototype.readUint16=If.prototype.xe;If.prototype.readUint8=If.prototype.rb;If.prototype.getLength=If.prototype.zg;If.prototype.getPosition=If.prototype.oa;If.prototype.hasMoreData=If.prototype.Da;var Jf=1;If.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Jf};function Lf(){this.i=[];this.h=[];this.g=!1}q=Lf.prototype;q.box=function(a,b){a=Mf(a);this.i[a]=Nf;this.h[a]=b;return this};q.X=function(a,b){a=Mf(a);this.i[a]=Of;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new If(a,0);for(this.g=!1;a.Da()&&!this.g;)this.Dd(0,a,b,c)};
|
|
190
190
|
q.Dd=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.qc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Of){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 If(b,0),k({parser:this,partialOkay:c||
|
|
191
191
|
!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 Pf(a){for(var b=Qf(a);a.reader.Da()&&!a.parser.g;)a.parser.Dd(a.start+b,a.reader,a.partialOkay)}function Rf(a){for(var b=Qf(a),c=a.reader.R(),d=0;d<c&&(a.parser.Dd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Sf(a){return function(b){a(b.reader.Cb(b.reader.W.byteLength-b.reader.oa()))}}
|
|
192
192
|
function Mf(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 Tf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Qf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Lf);Lf.headerSize=Qf;Lf.typeToString=Tf;Lf.allData=Sf;Lf.sampleDescription=Rf;Lf.children=Pf;Lf.prototype.parseNext=Lf.prototype.Dd;Lf.prototype.parse=Lf.prototype.parse;Lf.prototype.stop=Lf.prototype.stop;
|
|
@@ -197,11 +197,11 @@ function dg(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
|
|
|
197
197
|
function gg(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}
|
|
198
198
|
function hg(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 ig(a){a=Number(a);return 0===a%1?a:null}function jg(a){a=Number(a);return 0===a%1&&0<a?a:null}function kg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function lg(a){a=Number(a);return isNaN(a)?null:a}function mg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
199
199
|
function ng(a,b){var c=new DOMParser,d=og.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function pg(a,b){try{var c=dd(a);return ng(c,b)}catch(d){return null}}
|
|
200
|
-
var og=new Mc(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 qg(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 Af;this.i=new Map;this.F=[];this.A=new Lc;this.h=null;this.m=function(d){c.A.reject(d);a.onError(d)};this.ea=new Map;this.va=new Map;this.T=new Q(function(){return rg(c)});this.N=!1;this.K=[];this.P=!1;this.aa=(new Q(function(){ug(c)})).ka(b);this.A.catch(function(){});this.j=new yf(function(){return vg(c)});this.
|
|
201
|
-
function vg(a){return K(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.A.reject(),a.aa.stop(),a.aa=null,a.T.stop(),a.T=null,A(b,wg(a),2);case 2:if(!a.l){b.D(3);break}E(b,4);return A(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:J(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.
|
|
200
|
+
var og=new Mc(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 qg(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 Af;this.i=new Map;this.F=[];this.A=new Lc;this.h=null;this.m=function(d){c.A.reject(d);a.onError(d)};this.ea=new Map;this.va=new Map;this.T=new Q(function(){return rg(c)});this.N=!1;this.K=[];this.P=!1;this.aa=(new Q(function(){ug(c)})).ka(b);this.A.catch(function(){});this.j=new yf(function(){return vg(c)});this.Z=!1;this.H=null}q=qg.prototype;q.destroy=function(){return this.j.destroy()};
|
|
201
|
+
function vg(a){return K(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.A.reject(),a.aa.stop(),a.aa=null,a.T.stop(),a.T=null,A(b,wg(a),2);case 2:if(!a.l){b.D(3);break}E(b,4);return A(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:J(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.Z=!1,a.H=null,B(b)}})}q.configure=function(a){this.h=a};function xg(a,b,c){a.ba=!0;a.F=[];a.N=c;return yg(a,b)}
|
|
202
202
|
function zg(a,b,c){a.F=c;a.N=0<c.length;return yg(a,b)}function Ag(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 Bg(a,g,[])}
|
|
203
203
|
function yg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){if(1==v.g){if(c=Cg(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(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=Ff(a.h.servers),Dg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Eg(l),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,Fg(t,Ff(a.h.servers),Ff(a.h.advanced||{}),a.h.keySystemsMapping);
|
|
204
|
-
return A(v,ge(b,a.N,a.
|
|
204
|
+
return A(v,ge(b,a.N,a.Z),2)}y=g||Object.keys(a.h.servers).length;if(!y)return a.$=!0,v.return(Promise.resolve());x=Bg(a,void 0,b);return v.return(g?x:x.catch(function(){}))})}function Gg(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.H){c.D(2);break}return A(c,a.H,3);case 3:return zf(a.j),c.return();case 2:return E(c,4),a.H=a.l.setMediaKeys(a.C),A(c,a.H,6);case 6:va(c,5);break;case 4:b=J(c),a.m(new P(2,6,6003,b.message));case 5:zf(a.j),B(c)}})}
|
|
205
205
|
function Hg(a,b){return K(function(c){if(1==c.g)return A(c,Gg(a),2);Ig(a,b.initDataType,Ec(b.initData));B(c)})}
|
|
206
206
|
q.Cc=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.C)return b.B.Fa(a,"encrypted",function(){b.m(new P(2,6,6010))}),d.return();b.l=a;b.B.Fa(b.l,"play",function(){for(var e=r(b.K),f=e.next();!f.done;f=e.next())Jg(b,f.value);b.P=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.B.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return wg(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||"com.apple.fps"!==b.g.keySystem||b.F.length?A(d,
|
|
207
207
|
Gg(b),2):d.D(2)}Kg(b);c||b.F.length||b.h.parseInbandPsshEnabled||b.B.o(b.l,"encrypted",function(e){return Hg(b,e)});B(d)})};
|
|
@@ -219,9 +219,9 @@ function Tg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v;return K(function(w){switch(w
|
|
|
219
219
|
w.h,w.return(c);case 6:J(w);case 7:zf(a.j);case 3:h=g.next();w.D(2);break;case 4:m=r([!0,!1]),p=m.next();case 9:if(p.done){w.D(11);break}n=p.value;t=r(b.keys());h=t.next();case 12:if(h.done){p=m.next();w.D(9);break}y=h.value;x=b.get(y);v=x.drmInfos.some(function(C){return!!C.licenseServerUri});if(v!=n){w.D(13);break}E(w,15);return A(w,navigator.requestMediaKeySystemAccess(y,[x]),17);case 17:return c=w.h,w.return(c);case 15:J(w);case 16:zf(a.j);case 13:h=t.next();w.D(12);break;case 11:return w.return(c)}})}
|
|
220
220
|
function Cg(a){a=Ff(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){f=nd(f);e=nd(e);e={kty:"oct",kid:ld(f,!1),k:ld(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ec(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,
|
|
221
221
|
serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
222
|
-
function Ng(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.C.createSession("persistent-license")}catch(k){return d=new P(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):Jg(a,k)});a.B.o(c,"keystatuseschange",function(k){return Vg(a,k)});e={initData:null,initDataType:null,loaded:!1,
|
|
222
|
+
function Ng(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.C.createSession("persistent-license")}catch(k){return d=new P(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):Jg(a,k)});a.B.o(c,"keystatuseschange",function(k){return Vg(a,k)});e={initData:null,initDataType:null,loaded:!1,ue:Infinity,eb:null,type:"persistent-license"};a.i.set(c,e);E(h,2);return A(h,c.load(b),4);case 4:f=
|
|
223
223
|
h.h;zf(a.j);if(!f)return a.i.delete(c),a.m(new P(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Og(a)&&a.A.resolve();return h.return(c);case 2:g=J(h),zf(a.j,g),a.i.delete(c),a.m(new P(2,6,6005,g.message));case 3:return h.return(Promise.resolve())}})}
|
|
224
|
-
function Pg(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.m(new P(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):Jg(a,f)});a.B.o(e,"keystatuseschange",function(f){return Vg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,
|
|
224
|
+
function Pg(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.m(new P(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):Jg(a,f)});a.B.o(e,"keystatuseschange",function(f){return Vg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,ue:Infinity,eb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof P||(b=new P(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);
|
|
225
225
|
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 P(2,6,6006,f.message,f,h))}})}
|
|
226
226
|
function Jg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;K(function(v){switch(v.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=rf([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),
|
|
227
227
|
Qg(a.g.keySystem)&&Wg(g),h=Date.now(),E(v,2),l=a.G.Pb.request(2,g),A(v,l.promise,4);case 4:k=v.h;va(v,3);break;case 2:return m=J(v),p=new P(2,6,6007,m),a.m(p),d&&d.eb&&d.eb.reject(p),v.return();case 3:if(a.j.g)return v.return();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ld(k.data);E(v,5);return A(v,c.update(k.data),7);case 7:va(v,6);break;case 5:return n=J(v),t=new P(2,6,6008,n.message),a.m(t),d&&d.eb&&d.eb.reject(t),v.return();case 6:if(a.j.g)return v.return();y=new O("drmsessionupdate");a.G.onEvent(y);
|
|
@@ -235,7 +235,7 @@ function $g(a){var b;return K(function(c){if(1==c.g)return b=new Promise(functio
|
|
|
235
235
|
function wg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return A(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return E(g,2),a.ba||a.F.includes(e.sessionId)||"persistent-license"!==f.type?A(g,$g(e),5):A(g,e.remove(),5);if(2!=g.g)return va(g,0);J(g);B(g)})})),0)})}
|
|
236
236
|
function bh(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=r(b),g=f.next();!g.done;e={Wa:e.Wa},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Wa=[];e.Wa=e.Wa.concat(d.initData||[]);e.Wa=e.Wa.concat(g.initData||[]);e.Wa=e.Wa.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Wa.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ja(d.keyIds),ja(g.keyIds))):
|
|
237
237
|
d.keyIds||g.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||g.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||g.persistentStateRequired,videoRobustness:d.videoRobustness||g.videoRobustness,audioRobustness:d.audioRobustness||g.audioRobustness,serverCertificate:d.serverCertificate||g.serverCertificate,serverCertificateUri:d.serverCertificateUri||g.serverCertificateUri,
|
|
238
|
-
initData:e.Wa,keyIds:f});break}}return c}function Eg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function ug(a){a.i.forEach(function(b,c){var d=b.
|
|
238
|
+
initData:e.Wa,keyIds:f});break}}return c}function Eg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function ug(a){a.i.forEach(function(b,c){var d=b.ue,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ue=e)})}function Og(a){a=a.i.values();return hb(a,function(b){return b.loaded})}
|
|
239
239
|
function Dg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=r(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
240
240
|
function Ug(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(p){return Cc(p,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={cd:h.cd},l=k.next())h.cd=l.value,e.some(function(m){return function(p){var n=
|
|
241
241
|
m.cd;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Cc(p.initData,n.initData)}}(h))||e.push(h.cd)}if(g.Ha.keyIds)for(h=r(g.Ha.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
@@ -265,17 +265,17 @@ a=1===(a&1);if(c.h!==Jh){e=c.g;if(c.h===Ih&&b!==e.g){var g=1+b-e.h;Eh(e,g,1+e.g-
|
|
|
265
265
|
f-1),uh(b,b.g,15-b.g),c.j=a);break;case 46:uh(c.l,0,15);break;case 47:b=null,c.h!==Jh&&(b=th(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,Kh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.jb,vh(c.g,wh,b.Qa),vh(c.g,wh,d);return a}
|
|
266
266
|
function ni(a,b){var c=[];try{for(;b.Da();){var d=ai(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=ai(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new bi(e));for(var g=a.j.get(e),h=b.oa();b.oa()-h<f;){e=b;var k=ai(e),l=k.value,m=k.pts;if(16===l){var p=ai(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Uh(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=Vh(t,n,g.i));if(t.h+1>=t.H){n=t;for(var y=0,x=1;16>x;x++,
|
|
267
267
|
y++)n.i[y]=n.i[x];for(x=0;1>x;x++,y++)n.i[y]=Sh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Vh(t,n,g.i));t.i[t.h]=Sh();t.g=0;break;case 12:t.isVisible()&&(e=Vh(t,n,g.i)),Rh(t),n=t,n.h=0,n.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=ci(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Th(g.g,"\u266a"):Th(g.g,
|
|
268
|
-
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Th(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(ii.has(e)){var w=ii.get(e);Th(g.g,w)}else Th(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Th(g.g,"_"):Th(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(C){if(C instanceof P&&3E3===C.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function oi(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function pi(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,
|
|
269
|
-
function si(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={
|
|
268
|
+
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Th(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(ii.has(e)){var w=ii.get(e);Th(g.g,w)}else Th(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Th(g.g,"_"):Th(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(C){if(C instanceof P&&3E3===C.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function oi(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function pi(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,tf:c,kg:d}}function qi(a,b){return{gf:1==b?a.qc():a.R()}}function ri(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.R()}}
|
|
269
|
+
function si(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={Be:null,sampleSize:null,Hd:null};c&256&&(g.Be=a.R());c&512&&(g.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(g.Hd=0==b?a.R():a.Jf());e.push(g)}return{gj:d,Lf:e}};function ti(){this.i=new Map;this.h=this.g=0}
|
|
270
270
|
ti.prototype.init=function(a){var b=this,c=[],d=[];(new Lf).box("moov",Pf).box("mvex",Pf).X("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",Pf).X("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",Pf).X("mdhd",function(e){e=ri(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new P(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
271
|
-
ti.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Lf).box("moof",Pf).box("traf",Pf).X("trun",function(k){f=si(k.reader,k.version,k.flags).Lf}).X("tfhd",function(k){k=pi(k.reader,k.flags);d=k.
|
|
272
|
-
(k.
|
|
271
|
+
ti.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Lf).box("moof",Pf).box("traf",Pf).X("trun",function(k){f=si(k.reader,k.version,k.flags).Lf}).X("tfhd",function(k){k=pi(k.reader,k.flags);d=k.tf||b.g;e=k.kg||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).X("tfdt",function(k){g=qi(k.reader,k.version).gf}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,p=d,n=e,t=f,y=0,x=n;for(t.length&&(x=t[0].sampleSize||n);k.Da();){var v=k.R();if(6==
|
|
272
|
+
(k.rb()&31)){var w=0;t.length>y&&(w=t[y].Hd||0);w=(l+w)/m;for(var C=[],z,D=k.Cb(v-1),G=z=0;G<D.length;)2==z&&3==D[G]?(z=0,D=[].concat(ja(D)),D.splice(G,1),D=new Uint8Array(D)):0==D[G]?z++:z=0,G++;z=D;for(G=0;G<z.length;){for(D=0;255==z[G];)D+=255,G++;D+=z[G++];for(var F=0;255==z[G];)F+=255,G++;F+=z[G++];4==D&&C.push(z.subarray(G,G+F));G+=F}C=r(C);for(z=C.next();!z.done;z=C.next())c.push({eh:z.value,pts:w})}else try{k.skip(v-1)}catch(H){break}x-=v+4;0==x&&(l=t.length>y?l+(t[y].Be||p):l+p,y++,x=t.length>
|
|
273
273
|
y?t[y].sampleSize||n:n)}}).parse(a,!1);return c};function ui(){this.h=new ti;this.g=new ji}ui.prototype.init=function(a){this.h.init(a)};
|
|
274
|
-
function vi(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Ec(d.eh);if(0<e.length&&(c=a.g,d=d.pts,e=new If(e,0),181===e.
|
|
275
|
-
;function wi(a,b,c,d){this.Ra=a;this.Va=b;this.Ca=c;this.
|
|
274
|
+
function vi(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Ec(d.eh);if(0<e.length&&(c=a.g,d=d.pts,e=new If(e,0),181===e.rb()&&49===e.xe()&&1195456820===e.R()&&3===e.rb())){var f=e.rb();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.rb(),k=(h&4)>>2,l=e.rb(),m=e.rb();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Qa:l,jb:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return li(a.g)}
|
|
275
|
+
;function wi(a,b,c,d){this.Ra=a;this.Va=b;this.Ca=c;this.oe=void 0===d?null:d}wi.prototype.Kc=function(){return this.Va};wi.prototype.Gc=function(){return this.Ca};function xi(a,b){return a&&b?a.Kc()==b.Kc()&&a.Gc()==b.Gc()&&fc(a.Ra(),b.Ra()):a==b}M("shaka.media.InitSegmentReference",wi);wi.prototype.getEndByte=wi.prototype.Gc;wi.prototype.getStartByte=wi.prototype.Kc;
|
|
276
276
|
function yi(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){l=void 0===l?[]:l;t=void 0===t?zi:t;this.startTime=a;this.j=this.endTime=b;this.B=c;this.Va=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.A=void 0===p?null:p;this.g=void 0===n?null:n;this.status=t;this.l=void 0===y?null:y;this.m=0}q=yi.prototype;q.Ra=function(){return this.B()};q.getStartTime=function(){return this.startTime};q.xg=function(){return this.endTime};
|
|
277
|
-
q.Kc=function(){return this.Va};q.Gc=function(){return this.Ca};q.Pg=function(){return this.tilesLayout};q.Og=function(){return this.A};q.fc=function(){return this.status};q.Yg=function(){this.status=Ai};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=r(this.h),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};q.
|
|
278
|
-
M("shaka.media.SegmentReference",yi);yi.prototype.syncAgainst=yi.prototype.
|
|
277
|
+
q.Kc=function(){return this.Va};q.Gc=function(){return this.Ca};q.Pg=function(){return this.tilesLayout};q.Og=function(){return this.A};q.fc=function(){return this.status};q.Yg=function(){this.status=Ai};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=r(this.h),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};q.Qe=function(a){null==this.g?Ta("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};
|
|
278
|
+
M("shaka.media.SegmentReference",yi);yi.prototype.syncAgainst=yi.prototype.Qe;yi.prototype.offset=yi.prototype.offset;yi.prototype.markAsUnavailable=yi.prototype.Yg;yi.prototype.getStatus=yi.prototype.fc;yi.prototype.getTileDuration=yi.prototype.Og;yi.prototype.getTilesLayout=yi.prototype.Pg;yi.prototype.getEndByte=yi.prototype.Gc;yi.prototype.getStartByte=yi.prototype.Kc;yi.prototype.getEndTime=yi.prototype.xg;yi.prototype.getStartTime=yi.prototype.getStartTime;yi.prototype.getUris=yi.prototype.Ra;
|
|
279
279
|
var zi=0,Ai=1;yi.Status={Jh:zi,Xi:Ai,ki:2};function Bi(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 Ci(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Di(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)}
|
|
280
280
|
function Ei(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(Fi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}function Gi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Fi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
|
|
281
281
|
function Fi(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 Hi(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.T=d||function(){};this.i={};this.B=new Af;this.A={};this.F=b;this.I=new Lc;this.l=Ii(this,this.I);this.G=new yf(function(){return Ji(e)});this.J="";this.C=!1;this.P=new Lc}function Ii(a,b){var c=new MediaSource;a.B.Fa(c,"sourceopen",function(){URL.revokeObjectURL(a.J);b.resolve()});a.J=Ki(c);a.j.src=a.J;return c}q=Hi.prototype;q.destroy=function(){return this.G.destroy()};
|
|
@@ -283,7 +283,7 @@ function Ji(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in
|
|
|
283
283
|
B(l)})}
|
|
284
284
|
q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return K(function(p){if(1==p.g)return e=Jb,A(p,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?Li(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(n){return function(){d.i[n.Ga][0].p.reject(new P(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.B.o(m,"updateend",
|
|
285
285
|
function(n){return function(){return Mi(d,n.Ga)}}(f)),d.h[f.Ga]=m,d.N[f.Ga]=l,d.i[f.Ga]=[],d.K[f.Ga]=!!k.drmInfos.length);B(p)})};function Li(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 Ni(a){return a.l?"ended"==a.l.readyState:!0}function Oi(a,b){return b==Ib?a.g.g:Bi(Pi(a,b))}
|
|
286
|
-
function Qi(a,b){return b==Ib?a.g.h:Ci(Pi(a,b))}function Ri(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=Pi(a,b);return Ei(a,c)}q.
|
|
286
|
+
function Qi(a,b){return b==Ib?a.g.h:Ci(Pi(a,b))}function Ri(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=Pi(a,b);return Ei(a,c)}q.mb=function(){var a={total:Fi(this.j.buffered),audio:Fi(Pi(this,"audio")),video:Fi(Pi(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 Pi(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
287
287
|
function Si(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H;return K(function(I){switch(I.g){case 1:h=Jb;if(b!=h.ha){I.D(2);break}if(!a.C){I.D(3);break}return A(I,a.P,4);case 4:k=I.h,a.g.B=k;case 3:return A(I,Ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return I.return();case 2:if(!a.A[b]){e&&(a.g||Li(a,"text/vtt",a.C),d?(l=vi(a.F,c),l.length&&(m=a.h[h.La].timestampOffset,Ld(a.g,l,d.startTime,d.endTime,m))):a.F.init(c));I.D(6);break}f&&a.A[b].g.resetCaptions();
|
|
288
288
|
return A(I,ud(a.A[b],c),7);case 7:p=I.h,a.g||Li(a,"text/vtt",a.C),p.metadata&&(n=a.h[b].timestampOffset,a.T(p.metadata,n,d?d.endTime:null)),p.captions&&p.captions.length&&(t=a.h[h.La].timestampOffset,y=Hd(p.captions),Ld(a.g,y,d?d.startTime:null,d?d.endTime:null,t)),c=p.data;case 6:c=Ti(a,c,d?d.startTime:null,b);x=a.h[b];v=Ui;if(!a.C||x.mode==v||!d){I.D(8);break}w=a.l.duration;C=b==h.La||!(h.La in a.h);if(!C){I.D(9);break}z=[x.appendWindowStart,x.appendWindowEnd];x.appendWindowStart=0;x.appendWindowEnd=
|
|
289
289
|
Infinity;D=x.timestampOffset;x.timestampOffset=0;return A(I,Vi(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return A(I,Vi(a,b,function(){return Wi(a,b)}),11);case 11:return x.timestampOffset=D,x.appendWindowStart=z[0],x.appendWindowEnd=z[1],G=Bi(Pi(a,b)),F=(d.startTime||0)-(G||0),a.P.resolve(F),A(I,Vi(a,b,function(){return Xi(a,b,0,w)}),12);case 12:if(b!=h.La){I.D(9);break}return A(I,Vi(a,b,function(){a.j.currentTime-=.001;Mi(a,b)}),9);case 9:return x.mode=v,A(I,a.Ua(w),8);case 8:return d&&
|
|
@@ -293,21 +293,21 @@ function bj(a,b,c,d,e,f){var g;return K(function(h){g=Jb;return b==g.ha?(f||(a.g
|
|
|
293
293
|
function cj(a,b,c){var d;return K(function(e){d=Jb;if(b==d.ha)return e.return();Vi(a,b,function(){return Wi(a,b)});return A(e,Vi(a,b,function(){return Yi(a,b,c)}),0)})}q.endOfStream=function(a){var b=this;return K(function(c){return A(c,dj(b,function(){Ni(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.Ua=function(a){var b=this;return K(function(c){return A(c,dj(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Lc};b.i[d].unshift(e)}b.l.duration=a}),0)})};
|
|
294
294
|
q.getDuration=function(){return this.l.duration};function Xi(a,b,c,d){d<=c?Mi(a,b):a.h[b].remove(c,d)}function Wi(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;Mi(a,b)}function Yi(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Mi(a,b)}function Mi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),ej(a,b))}function Vi(a,b,c){zf(a.G);c={start:c,p:new Lc};a.i[b].push(c);1==a.i[b].length&&fj(a,b);return c.p}
|
|
295
295
|
function dj(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:zf(a.G);c=[];d={};for(e in a.h)d.zc=new Lc,f={start:function(l){return function(){return l.zc.resolve()}}(d),p:d.zc},a.i[e].push(f),c.push(d.zc),1==a.i[e].length&&f.start(),d={zc:d.zc};E(k,2);return A(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=J(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)ej(a,h)}B(k)}})}function ej(a,b){a.i[b].shift();fj(a,b)}
|
|
296
|
-
function fj(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),ej(a,b)}}function Ti(a,b,c,d){var e=a.K[d];null==c&&e&&(Wc()||Rc())&&"mp4"==a.N[d].split(";")[0].split("/")[1]&&(b=jh(b));return b}var Ki=window.URL.createObjectURL,Ui="sequence",gj=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function R(a,b,c){this.l=a;this.Ed=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=R.prototype;q.getDuration=function(){return this.i};q.Fg=function(){return this.g};q.Ua=function(a){this.i=a};q.Jg=function(){return this.l};q.Nf=function(a){this.A=a};q.Zc=function(a){this.B=a};q.
|
|
297
|
-
q.mc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.
|
|
298
|
-
q.U=function(){return Infinity==this.i&&!this.B};q.Mb=function(){return Infinity!=this.i&&!this.B};q.
|
|
299
|
-
q.
|
|
300
|
-
R.prototype.setUserSeekStart=R.prototype.Qf;R.prototype.getSegmentAvailabilityStart=R.prototype.
|
|
301
|
-
R.prototype.setSegmentAvailabilityDuration=R.prototype.
|
|
296
|
+
function fj(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),ej(a,b)}}function Ti(a,b,c,d){var e=a.K[d];null==c&&e&&(Wc()||Rc())&&"mp4"==a.N[d].split(";")[0].split("/")[1]&&(b=jh(b));return b}var Ki=window.URL.createObjectURL,Ui="sequence",gj=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function R(a,b,c){this.l=a;this.Ed=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=R.prototype;q.getDuration=function(){return this.i};q.Fg=function(){return this.g};q.Ua=function(a){this.i=a};q.Jg=function(){return this.l};q.Nf=function(a){this.A=a};q.Zc=function(a){this.B=a};q.Me=function(a){this.m=a};q.wh=function(a){this.Ed=a};q.wg=function(){return this.Ed};
|
|
297
|
+
q.mc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.se(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.me=function(){this.H=!0};q.se=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.re=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)};
|
|
298
|
+
q.U=function(){return Infinity==this.i&&!this.B};q.Mb=function(){return Infinity!=this.i&&!this.B};q.pb=function(){return Math.max(this.C,this.Jb()-this.m)};q.Qf=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.Jc=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.ob()))};q.ec=function(){return this.Jc(0)};
|
|
299
|
+
q.ob=function(){return Math.max(0,this.Jb()-(this.U()||this.Mb()?this.Ed:0))};q.Uf=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.Mf=function(a){this.G=a};M("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.Mf;R.prototype.usingPresentationStartTime=R.prototype.Uf;R.prototype.getSeekRangeEnd=R.prototype.ob;R.prototype.getSeekRangeStart=R.prototype.ec;R.prototype.getSafeSeekRangeStart=R.prototype.Jc;R.prototype.getSegmentAvailabilityEnd=R.prototype.Jb;
|
|
300
|
+
R.prototype.setUserSeekStart=R.prototype.Qf;R.prototype.getSegmentAvailabilityStart=R.prototype.pb;R.prototype.isInProgress=R.prototype.Mb;R.prototype.isLive=R.prototype.U;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.re;R.prototype.notifyMinSegmentStartTime=R.prototype.se;R.prototype.lockStartTime=R.prototype.me;R.prototype.notifySegments=R.prototype.mc;R.prototype.getDelay=R.prototype.wg;R.prototype.setDelay=R.prototype.wh;
|
|
301
|
+
R.prototype.setSegmentAvailabilityDuration=R.prototype.Me;R.prototype.setStatic=R.prototype.Zc;R.prototype.setClockOffset=R.prototype.Nf;R.prototype.getPresentationStartTime=R.prototype.Jg;R.prototype.setDuration=R.prototype.Ua;R.prototype.getMaxSegmentDuration=R.prototype.Fg;R.prototype.getDuration=R.prototype.getDuration;function hj(a,b,c){this.l=c;this.j=a;this.B=ij(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.A=0;this.C=b;this.i=function(){}}hj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function jj(a,b){a.i=b}function kj(a){this.g=a}function ij(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(Fi(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 lj(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.G=c;this.i=new Af;this.m=!1;this.F=a.readyState;this.C=0;this.h=d;this.l=!1;this.i.o(a,"waiting",function(){return mj(f)});this.j=(new Q(function(){mj(f)})).ka(.25)}lj.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};lj.prototype.ve=function(){this.l=!0;mj(this)};
|
|
302
302
|
function mj(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=ij(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 O("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Gi(c,b,a.G.gapDetectionThreshold),null==
|
|
303
|
-
d||0==d&&!a.l||(e=c.start(d),e>=a.B.
|
|
303
|
+
d||0==d&&!a.l||(e=c.start(d),e>=a.B.ob()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.C++,a.A(new O("gapjumped")))))}}};function nj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=oj.value().get(b),c.Fa(a,b,d))}var oj=new Mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function pj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new Af;this.i=new qj(a);nj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){rj(d,d.j)})}pj.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 sj(a){return a.m?a.g.currentTime:a.j}function tj(a,b){0<a.g.readyState?uj(a.i,b):nj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){rj(a,a.j)})}
|
|
304
304
|
function rj(a,b){.001>Math.abs(a.g.currentTime-b)?vj(a):(a.h.Fa(a.g,"seeking",function(){vj(a)}),uj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function vj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function qj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}qj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
305
|
-
function uj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function wj(a){this.g=a;this.j=!1;this.h=null;this.i=new Af}q=wj.prototype;q.be=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;nj(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.ce=function(a){this.h=this.j?this.h:a};q.gd=function(){return(this.j?this.g.currentTime:this.h)||0};q.
|
|
306
|
-
q
|
|
307
|
-
function xj(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=yj(a,c,f);this.j=new lj(a,b.presentationTimeline,c,this.A,f);this.h=new pj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=sj(g.h);h=zj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;tj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Aj(this,d));this.m=new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=sj(g.h),k=g.g.ec(),l=g.g.
|
|
308
|
-
l-k&&(k=l-3);h<k&&(h=zj(g,h),g.i.currentTime=h)}})}q=xj.prototype;q.be=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.ce=function(a){tj(this.h,a)};q.gd=function(){var a=sj(this.h);return 0<this.i.readyState&&!this.i.paused?Bj(this,a):a};q.
|
|
309
|
-
function Aj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.ec():a.g.
|
|
310
|
-
function Bj(a,b){var c=a.g.ec();if(b<c)return c;a=a.g.
|
|
305
|
+
function uj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function wj(a){this.g=a;this.j=!1;this.h=null;this.i=new Af}q=wj.prototype;q.be=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;nj(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.ce=function(a){this.h=this.j?this.h:a};q.gd=function(){return(this.j?this.g.currentTime:this.h)||0};q.cf=function(){return 0};
|
|
306
|
+
q.bf=function(){return 0};q.Hf=function(){};
|
|
307
|
+
function xj(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=yj(a,c,f);this.j=new lj(a,b.presentationTimeline,c,this.A,f);this.h=new pj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=sj(g.h);h=zj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;tj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Aj(this,d));this.m=new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=sj(g.h),k=g.g.ec(),l=g.g.ob();3>
|
|
308
|
+
l-k&&(k=l-3);h<k&&(h=zj(g,h),g.i.currentTime=h)}})}q=xj.prototype;q.be=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.ce=function(a){tj(this.h,a)};q.gd=function(){var a=sj(this.h);return 0<this.i.readyState&&!this.i.paused?Bj(this,a):a};q.cf=function(){return this.A?this.A.A:0};q.bf=function(){return this.j.C};
|
|
309
|
+
function Aj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.ec():a.g.ob():0>b&&(b=a.g.ob()+b);return Cj(a,Bj(a,b))}q.Hf=function(){this.j.ve()};function Cj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function zj(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.ec(),f=a.g.ob(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Jc(c),k=a.g.Jc(d);c=a.g.Jc(c+d);return b>=g?Cj(a,b):b>f?f:b<e?Di(a.i.buffered,k)?k:c:b>=h||Di(a.i.buffered,b)?b:c}
|
|
310
|
+
function Bj(a,b){var c=a.g.ec();if(b<c)return c;a=a.g.ob();return b>a?a:b}function yj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new hj(new kj(a),b.stallThreshold,c);jj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Dj(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=Dj.prototype;q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.Zg=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]};
|
|
311
311
|
q.offset=function(a){if(!this.i)for(var b=r(this.M),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.Sc=function(a){if(!this.i&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.M=this.M.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.M.push.apply(this.M,ja(a))}};q.lc=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.Sc(a);this.Hb(b)};
|
|
312
312
|
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}};
|
|
313
313
|
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 yi(a.startTime,b,a.B,a.Va,a.Ca,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.A,a.g,a.status,a.l))}};
|
|
@@ -316,623 +316,626 @@ function Fj(a,b,c){return new Dj([new yi(a,a+b,function(){return c},0,null,null,
|
|
|
316
316
|
Dj.prototype.release=Dj.prototype.release;function Ej(a,b,c){this.i=a;this.g=b;this.h=c}Ej.prototype.jg=function(){return this.g};Ej.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.Ra().length&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};
|
|
317
317
|
Ej.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.Ra().length&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Ej);Ej.prototype.next=Ej.prototype.next;Ej.prototype.current=Ej.prototype.current;Ej.prototype.currentPosition=Ej.prototype.jg;function Gj(){Dj.call(this,[]);this.j=[]}u(Gj,Dj);q=Gj.prototype;q.clone=function(){var a=new Gj;a.j=this.j.slice();return a};
|
|
318
318
|
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};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.Sc=function(){};q.Hb=function(){};q.lc=function(){};q.yb=function(){};q.Jd=function(){};
|
|
319
|
-
M("shaka.media.MetaSegmentIndex",Gj);Gj.prototype.updateEvery=Gj.prototype.Jd;Gj.prototype.fit=Gj.prototype.yb;Gj.prototype.mergeAndEvict=Gj.prototype.lc;Gj.prototype.evict=Gj.prototype.Hb;Gj.prototype.merge=Gj.prototype.Sc;Gj.prototype.offset=Gj.prototype.offset;Gj.prototype.get=Gj.prototype.get;Gj.prototype.find=Gj.prototype.find;Gj.prototype.release=Gj.prototype.release;function Hj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.rd();this.h=new Q(function(){b.g.Gf(.25*b.i)})}Hj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Hj.prototype.set=function(a){this.i=a;Ij(this)};Hj.prototype.od=function(){return this.g.od()};function Ij(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.rd()!=b&&a.g.
|
|
320
|
-
Lj.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.Tc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.
|
|
321
|
-
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.
|
|
319
|
+
M("shaka.media.MetaSegmentIndex",Gj);Gj.prototype.updateEvery=Gj.prototype.Jd;Gj.prototype.fit=Gj.prototype.yb;Gj.prototype.mergeAndEvict=Gj.prototype.lc;Gj.prototype.evict=Gj.prototype.Hb;Gj.prototype.merge=Gj.prototype.Sc;Gj.prototype.offset=Gj.prototype.offset;Gj.prototype.get=Gj.prototype.get;Gj.prototype.find=Gj.prototype.find;Gj.prototype.release=Gj.prototype.release;function Hj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.rd();this.h=new Q(function(){b.g.Gf(.25*b.i)})}Hj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Hj.prototype.set=function(a){this.i=a;Ij(this)};Hj.prototype.od=function(){return this.g.od()};function Ij(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.rd()!=b&&a.g.Ke(b);return}catch(c){}a.h.ka(.25);0!=a.g.rd()&&a.g.Ke(0)};function Jj(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Kj(b,!1)})).ka(.25)}Jj.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 Kj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Lj(a){fb.call(this);this.g=new Map;this.h=a}u(Lj,fb);Lj.prototype.release=function(){this.g.clear();fb.prototype.release.call(this)};function Mj(a,b){var c=a.g.get(b);c||(c={Tc:[],qf:null,contentType:b},a.g.set(b,c));return c}function Nj(a,b,c){var d=Mj(a,b.contentType);Oj(a,d);a={oe:b,position:c};d=d.Tc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
320
|
+
Lj.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.Tc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.oe;break a}}d=null}if(e=d)e=c.qf,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);
|
|
321
|
+
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.qf=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Oj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Tc;b.Tc=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Tc=[]};function Pj(a){fb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(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 O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ka(2)}u(Pj,fb);Pj.prototype.release=function(){this.g.clear();this.h.stop();fb.prototype.release.call(this)};function Qj(a){fb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Wb:null,Vb:Rj,Lb:function(c,d){return Sj(b,"enter",c,d)}},{Wb:Tj,Vb:Rj,Lb:function(c,d){return Sj(b,"enter",c,d)}},{Wb:Uj,Vb:Rj,Lb:function(c,d){return Sj(b,"enter",c,d)}},{Wb:Rj,Vb:Tj,Lb:function(c,d){return Sj(b,"exit",c,d)}},{Wb:Rj,Vb:Uj,Lb:function(c,d){return Sj(b,"exit",c,d)}},{Wb:Tj,Vb:Uj,Lb:function(c,d){return Sj(b,"skip",c,d)}},{Wb:Uj,Vb:Tj,Lb:function(c,d){return Sj(b,"skip",c,d)}}];this.h=new Af;this.h.o(this.i,"regionremove",
|
|
322
322
|
function(c){b.g.delete(c.region)})}u(Qj,fb);Qj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;fb.prototype.release.call(this)};Qj.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?Tj:a>d.endTime?Uj:Rj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Wb==e&&h.Vb==f&&h.Lb(d,b)}};
|
|
323
323
|
function Sj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Tj=1,Rj=2,Uj=3;function Vj(a,b,c,d,e){a=rf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Wj(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 yf(function(){return Xj(c)})}q=Wj.prototype;q.destroy=function(){return this.h.destroy()};function Xj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Yj(e),b.push(Zj(e));return A(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;B(f)})}
|
|
324
324
|
q.configure=function(a){this.j=a;this.G=new Ze({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 K(function(b){if(1==b.g)return A(b,ak(a),2);zf(a.h);a.F=!0;B(b)})};
|
|
325
325
|
function bk(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=Jb,E(k,2),A(k,aj(a.g.V,c.ha),4);case 4:va(k,3);break;case 2:if(d=J(k),a.g)a.g.onError(d);case 3:e=wd(b.mimeType,b.codecs);Li(a.g.V,e,a.m.sequenceMode);f=a.g.V.m;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=ck(b),a.i.set(c.ha,h),dk(a,h,0);B(k)}})}function ek(a){var b=a.i.get(Ib);b&&(Yj(b),Zj(b).catch(function(){}),a.i.delete(Ib));a.A=null}
|
|
326
326
|
function fk(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Tb&&(gk(a,b,!1,0,!1),c.Tb=d);else if(d=c.Tb)c.Tb=null,gk(a,d,!0,0,!1)}}function hk(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&&gk(a,b.video,c,d,e,f),b.audio&&gk(a,b.audio,c,d,e,f))}function ik(a,b){a.A=b;a.F&&gk(a,b,!0,0,!1)}
|
|
327
|
-
function gk(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ib?g&&(g.Tb&&(b.trickModeVideo?(g.Tb=b,b=b.trickModeVideo):g.Tb=null),g.stream!=b||e)&&(b.type==Ib&&Li(a.g.V,wd(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.sa=null,g.
|
|
327
|
+
function gk(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ib?g&&(g.Tb&&(b.trickModeVideo?(g.Tb=b,b=b.trickModeVideo):g.Tb=null),g.stream!=b||e)&&(b.type==Ib&&Li(a.g.V,wd(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.sa=null,g.ef=!!f,c&&(g.Dc?g.Md=!0:g.Ja?(g.Eb=!0,g.ld=d,g.Md=!0):(Yj(g),jk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),kk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):bk(a,b)}
|
|
328
328
|
function kk(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.Ma)return e.return();c=b.stream;d=b.Ma;return c.segmentIndex?e.D(2):A(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e.return();var f=a.g.qd();var g=Qi(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ia?b.Ia.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ca?k.Ca-k.Va:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.Ca?k.Ca-k.Va:null)||0),k=a.g.getBandwidthEstimate(),
|
|
329
329
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();B(e)})}
|
|
330
330
|
q.Wc=function(){if(this.g)for(var a=this.g.qd(),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=Pi(e,d),e=Di(e,a));if(!e){(null!=Qi(this.g.V,d)||c.Ja)&&lk(this,c);c.Ma&&(c.Ma.abort(),c.Ma=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,ki(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())fi(e.value);c.Wc=!0}}};
|
|
331
331
|
function lk(a,b){b.Dc||b.Eb||(b.Ja?(b.Eb=!0,b.ld=0):null==Oi(a.g.V,b.type)?null==b.fb&&dk(a,b,0):(Yj(b),jk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
332
332
|
function ak(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){if(1==p.g){b=Jb;if(!a.l)throw new P(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.La,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 A(p,e.init(c,f,a.m.sequenceMode),2)}zf(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=ck(l),a.i.set(k,m),dk(a,m,0));B(p)})}
|
|
333
|
-
function ck(a){return{stream:a,type:a.type,sa:null,Ia:null,ud:null,
|
|
333
|
+
function ck(a){return{stream:a,type:a.type,sa:null,Ia:null,ud:null,le:null,ke:null,je:null,Tb:null,endOfStream:!1,Ja:!1,fb:null,Eb:!1,ld:0,Md:!1,Dc:!1,Wc:!0,qe:!1,ye:!1,Mc:!1,Ma:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.V.Ua(a):this.g.V.Ua(Math.pow(2,32))};
|
|
334
334
|
function mk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:zf(a.h);if(b.Ja||null==b.fb||b.Dc)return h.return();b.fb=null;if(!b.Eb){h.D(2);break}return A(h,jk(a,b,b.Md,b.ld),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return A(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ja||b.fb||dk(a,b,0),h.return();case 4:E(h,6);d=nk(a,b);null!=d&&(dk(a,b,d),b.Mc=!1);va(h,7);break;case 6:return e=
|
|
335
335
|
J(h),A(h,ok(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 A(h,a.g.V.endOfStream(),10);case 10:zf(a.h),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ua(g),B(h)}})}
|
|
336
336
|
function nk(a,b){if(pk(b))return Zi(a.g.V,b.stream.originalId||""),null;b.type==Ib&&$i(a.g.V);var c=a.g.qd(),d=b.Ia?b.Ia.endTime:c,e=Ri(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=Qi(a.g.V,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Ib))&&pk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=qk(a,b,c,h);if(!e)return a.j.updateIntervalSeconds;
|
|
337
337
|
f=Infinity;g=Array.from(a.i.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,pk(h)||h.sa&&!h.sa.current()||(f=Math.min(f,h.Ia?h.Ia.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;rk(a,b,c,e).catch(function(){});return null}
|
|
338
|
-
function qk(a,b,c,d){if(b.sa)return b.sa.current();if(b.Ia||d)return c=b.Ia?b.Ia.endTime:d,b.
|
|
338
|
+
function qk(a,b,c,d){if(b.sa)return b.sa.current();if(b.Ia||d)return c=b.Ia?b.Ia.endTime:d,b.qe=!0,b.sa=b.stream.segmentIndex.cc(c),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.cc(d),e=b.sa&&b.sa.next().value);e||(b.sa=b.stream.segmentIndex.cc(c),e=b.sa&&b.sa.next().value);return e}
|
|
339
339
|
function rk(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,y,x,v,w,C;return K(function(z){switch(z.g){case 1:e=Jb;f=b.stream;g=b.sa;b.Ja=!0;E(z,2);if(2==d.fc())throw new P(1,1,1011);return A(z,sk(a,b,d),4);case 4:zf(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&&!d.l)return p=new Uint8Array(0),t=n=!1,y=function(D){var G,F,H;return K(function(I){if(n)return I.return();t=!0;zf(a.h);if(a.B)return I.return();p=tk(p,D);G=!1;F=0;(new Lf).box("mdat",
|
|
340
340
|
function(L){F=L.size+L.start;G=!0}).parse(p,!1,!0);if(!G)return I.D(0);H=p.subarray(0,F);p=p.subarray(F);return A(I,uk(a,b,c,f,d,H),0)})},A(z,vk(a,b,d,y),11);l=vk(a,b,d);return A(z,l,7);case 7:m=z.h;zf(a.h);if(a.B)return z.return();if(!d.l){z.D(8);break}return A(z,wk(m,d,g),9);case 9:m=z.h;case 8:return zf(a.h),b.Eb?(b.Ja=!1,dk(a,b,0),z.return()):A(z,uk(a,b,c,f,d,m),6);case 11:x=z.h;if(t){z.D(6);break}n=!0;zf(a.h);return a.B?z.return():b.Eb?(b.Ja=!1,dk(a,b,0),z.return()):A(z,uk(a,b,c,f,d,x),6);case 6:zf(a.h);
|
|
341
|
-
if(a.B)return z.return();b.Ia=d;g.next();b.Ja=!1;b.
|
|
341
|
+
if(a.B)return z.return();b.Ia=d;g.next();b.Ja=!1;b.ye=!1;v=a.g.V.mb();w=v[b.type];$a(JSON.stringify(w));b.Eb||a.g.ve();dk(a,b,0);va(z,0);break;case 2:C=J(z);zf(a.h,C);if(a.B)return z.return();b.Ja=!1;if(7001==C.code)b.Ja=!1,Yj(b),dk(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==C.code)xk(a,b,C),z.D(0);else return b.Mc=!0,C.severity=2,A(z,ok(a,C),0)}})}
|
|
342
342
|
function wk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.D(2):A(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ec(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function tk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
343
|
-
function xk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.
|
|
344
|
-
function sk(a,b,c){var d,e,f,g,h,k,l,m;return K(function(p){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.
|
|
345
|
-
2),A(x,k,4);case 4:return n=x.h,zf(a.h),t=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,A(x,a.g.
|
|
343
|
+
function xk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.ye})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Mc=!0;a.B=!0;a.g.onError(c);return}b.ye=!0}dk(a,b,4)}
|
|
344
|
+
function sk(a,b,c){var d,e,f,g,h,k,l,m;return K(function(p){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.le||e!=b.ke||f!=b.je)h=function(){var n;return K(function(t){if(1==t.g)return E(t,2),b.ke=e,b.je=f,b.le=g,A(t,bj(a.g.V,b.type,g,e,f,a.m.sequenceMode),4);if(2!=t.g)return va(t,0);n=J(t);b.ke=null;b.je=null;b.le=null;throw n;})},d.push(h());!xi(c.i,b.ud)&&(b.ud=c.i)&&(k=vk(a,b,c.i),l=function(){var n,t,y;return K(function(x){switch(x.g){case 1:return E(x,
|
|
345
|
+
2),A(x,k,4);case 4:return n=x.h,zf(a.h),t=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,A(x,a.g.hf(b.type,n),5);case 5:return A(x,Si(a.g.V,b.type,n,null,t),6);case 6:va(x,0);break;case 2:throw y=J(x),b.ud=null,y;}})},a.g.bh(c.startTime,c.i),d.push(l()));a.m.sequenceMode&&(m=b.Ia?b.Ia.m:null,c.m!=m||b.qe)&&(b.qe=!1,d.push(cj(a.g.V,b.type,c.startTime)));return A(p,Promise.all(d),0)})}
|
|
346
346
|
function uk(a,b,c,d,e,f){var g,h,k;return K(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 Lf).X("emsg",function(m){var p=d.emsgSchemeIdUris;if(0===m.version){var n=m.reader.Uc();var t=m.reader.Uc();var y=m.reader.R();var x=m.reader.R();var v=m.reader.R();var w=m.reader.R();var C=e.startTime+x/y}else y=m.reader.R(),C=m.reader.qc()/y+e.timestampOffset,x=C-e.startTime,v=m.reader.R(),
|
|
347
|
-
w=m.reader.R(),n=m.reader.Uc(),t=m.reader.Uc();m=m.reader.Cb(m.reader.W.byteLength-m.reader.oa());if(p&&p.includes(n)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==n?a.g.dh():(p=(new Map).set("detail",{startTime:C,endTime:C+v/y,schemeIdUri:n,value:t,timescale:y,presentationTimeDelta:x,eventDuration:v,id:w,messageData:m}),p=new O("emsg",p),a.g.onEvent(p))}).parse(f),A(l,yk(a,b,c),2);case 2:return zf(a.h),h=b.Wc,b.Wc=!1,k=b.
|
|
347
|
+
w=m.reader.R(),n=m.reader.Uc(),t=m.reader.Uc();m=m.reader.Cb(m.reader.W.byteLength-m.reader.oa());if(p&&p.includes(n)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==n?a.g.dh():(p=(new Map).set("detail",{startTime:C,endTime:C+v/y,schemeIdUri:n,value:t,timescale:y,presentationTimeDelta:x,eventDuration:v,id:w,messageData:m}),p=new O("emsg",p),a.g.onEvent(p))}).parse(f),A(l,yk(a,b,c),2);case 2:return zf(a.h),h=b.Wc,b.Wc=!1,k=b.ef,b.ef=!1,A(l,a.g.hf(b.type,f),3);case 3:return A(l,Si(a.g.V,b.type,
|
|
348
348
|
f,e,g,h,k),4);case 4:zf(a.h),B(l)}})}function yk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=Oi(a.g.V,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():A(h,a.g.V.remove(b.type,e,e+g),2)}zf(a.h);B(h)})}function pk(a){return a&&a.type==Ib&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
349
349
|
function vk(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=xf,f=Vj(c.Ra(),c.Va,c.Ca,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof wi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Pb.request(e,f),b.Ma=h,A(l,h.promise,2);k=l.h;b.Ma=null;return l.return(k.data)})}
|
|
350
350
|
function jk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.Eb=!1,b.Md=!1,b.ld=0,b.Dc=!0,b.Ia=null,b.ud=null,b.sa=null,d?(e=a.g.qd(),f=a.g.V.getDuration(),A(g,a.g.V.remove(b.type,e+d,f),3)):A(g,aj(a.g.V,b.type),4);if(3!=g.g)return zf(a.h),c?A(g,a.g.V.flush(b.type),3):g.D(3);zf(a.h);b.Dc=!1;b.endOfStream=!1;b.Ja||b.fb||dk(a,b,0);B(g)})}
|
|
351
351
|
function dk(a,b,c){var d=b.type;if(d!=Ib||a.i.has(d))b.fb=(new Nc(function(){var e;return K(function(f){if(1==f.g)return E(f,2),A(f,mk(a,b),4);if(2!=f.g)return va(f,0);e=J(f);if(a.g)a.g.onError(e);B(f)})})).S(c)}function Yj(a){null!=a.fb&&(a.fb.stop(),a.fb=null)}function Zj(a){return K(function(b){return a.Ma?A(b,a.Ma.abort(),0):b.D(0)})}function ok(a,b){return K(function(c){if(1==c.g)return A(c,af(a.G),2);zf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);B(c)})};function zk(a,b){var c=Ak(),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 Bk(d)});this.B=new yf(function(){return Ck(d)})}zk.prototype.destroy=function(){return this.B.destroy()};function Ck(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Dk(a),A(e,a.C,2);a.g&&a.g.cb.Rb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.cb.Rb();a.g=null;a.m=[];a.j=null;B(e)})}
|
|
352
352
|
function Ek(a,b){var c={nc:function(){},zd:function(){},Rb:function(){},onError:function(){},Cd:function(){},fj:function(){}};a.m.push({create:b,cb:c});a.h&&a.h.abort();Dk(a);return c}
|
|
353
353
|
function Bk(a){return K(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.cb.Rb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.cb.nc(),a.g={node:d.node,payload:d.payload,Kb:d.Kb,cb:c.cb}):c.cb.Cd();c=!0}c?c=Promise.resolve():a.g?c=Fk(a):(a.j.ah(a.i),a.A=new Lc,c=a.A);b=A(b,c,1)}return b})}
|
|
354
|
-
function Fk(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.Hg(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.lg(a.i,a.l,a.g.payload),A(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.cb.zd(),a.g=null);va(d,0);break;case 2:b=J(d);if(7001==b.code)a.g.cb.Rb();else a.g.cb.onError(b);a.g=null;a.h=null;c=a;return A(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,B(d)}})}function Dk(a){a.A&&(a.A.resolve(),a.A=null)};function Gk(a){
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
function
|
|
359
|
-
function
|
|
360
|
-
!0)}),this.l.observe(this.g));this.A=new Map}q=
|
|
361
|
-
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});
|
|
362
|
-
function
|
|
363
|
-
t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Vc?(c.appendChild(d.Vc),d.Vc.appendChild(d.ee)):c.appendChild(d.ee)}}function
|
|
364
|
-
function
|
|
354
|
+
function Fk(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.Hg(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.lg(a.i,a.l,a.g.payload),A(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.cb.zd(),a.g=null);va(d,0);break;case 2:b=J(d);if(7001==b.code)a.g.cb.Rb();else a.g.cb.onError(b);a.g=null;a.h=null;c=a;return A(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,B(d)}})}function Dk(a){a.A&&(a.A.resolve(),a.A=null)};function Gk(a){var b=[],c=700<=a.fontWeight,d="italic"==a.fontStyle,e=a.textDecoration.includes("underline");c&&b.push("b");d&&b.push("i");e&&b.push("u");c=b.reduce(function(f,g){return f+"<"+g+">"},"");b=b.reduceRight(function(f,g){return f+"</"+g+">"},"");return a.lineBreak?"\n":a.nestedCues.length?a.nestedCues.map(Gk).join(""):c+a.payload+b}
|
|
355
|
+
function Hk(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.isContainer)Hk(c.nestedCues,b);else{var d=c.clone();d.nestedCues=[];d.payload=Gk(c);b.push(d)}return b};function Ik(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=Ik.prototype;q.remove=function(a,b){if(!this.g)return!1;Jk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
356
|
+
q.append=function(a){var b=Hk(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=r(b);for(var e=b.next();!e.done;d={Xb:d.Xb},e=b.next())d.Xb=e.value,a.some(function(f){return function(g){return g.startTime==f.Xb.startTime&&g.endTime==f.Xb.endTime&&g.text==f.Xb.payload?!0:!1}}(d))||(e=Kk(d.Xb))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
|
|
357
|
+
c.indexOf(g)});a=r(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&(Jk(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"};
|
|
358
|
+
function Kk(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
359
|
+
function Jk(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}M("shaka.text.SimpleTextDisplayer",Ik);Ik.prototype.setTextVisibility=Ik.prototype.setTextVisibility;Ik.prototype.isTextVisible=Ik.prototype.isTextVisible;Ik.prototype.destroy=Ik.prototype.destroy;Ik.prototype.append=Ik.prototype.append;Ik.prototype.remove=Ik.prototype.remove;function Lk(){}function S(a){return document.createElement(a)}function Mk(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Nk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Lk);Lk.removeAllChildren=Nk;function Ok(a,b){var c=this;this.j=!1;this.i=[];this.F=a;this.m=b;this.g=S("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 Q(function(){Pk(c)})).ka(.25);this.h=new Map;this.B=new Af;this.B.o(document,"fullscreenchange",function(){Pk(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){Pk(c,
|
|
360
|
+
!0)}),this.l.observe(this.g));this.A=new Map}q=Ok.prototype;q.append=function(a){var b=[].concat(ja(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={bd:c.bd},d=a.next())c.bd=d.value,b.some(function(e){return function(f){return rc(f,e.bd)}}(c))||this.i.push(c.bd);Pk(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)};
|
|
361
|
+
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});Pk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};function Qk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
362
|
+
function Rk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,p=l?l.Vf:null;l&&(g.push(l.ee),l.Vc&&g.push(l.Vc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Qk(a,p)||(f=!0):(Sk(a,k,e),l=a.h.get(k),p=l.Vf,f=!0));0<k.nestedCues.length&&p&&Rk(a,k.nestedCues,p,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(n,t){return n.startTime!=
|
|
363
|
+
t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Vc?(c.appendChild(d.Vc),d.Vc.appendChild(d.ee)):c.appendChild(d.ee)}}function Pk(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.A.values());for(var d=b.next();!d.done;d=b.next())Nk(d.value);Nk(a.g);a.h.clear();a.A.clear()}if(a.j){b=new Map;d=r(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));Rk(a,a.i,a.g,c,[])}}}
|
|
364
|
+
function Sk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&Tk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==zc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==zc?"%":"px"),a.A.has(e))c=a.A.get(e);else{var g=S("span"),h=c.heightUnits==zc?"%":"px",k=c.widthUnits==zc?"%":"px",l=c.viewportAnchorUnits==zc?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");
|
|
365
365
|
g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(e,g);c=g}e=f;d&&(e=S("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{ee:f,Vf:e,Vc:c})}
|
|
366
|
-
function
|
|
367
|
-
"no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=
|
|
368
|
-
"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=
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
function
|
|
375
|
-
function
|
|
376
|
-
function
|
|
377
|
-
function
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
function
|
|
381
|
-
function
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
function wl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:$e(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=tl(g),g=ul(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Rc()},c={retryParameters:$e(),availabilityWindowOverride:NaN,disableAudio:!1,
|
|
366
|
+
function Tk(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=Uk(c.linePadding,c,a.m);f.paddingRight=Uk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
|
|
367
|
+
"no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Vk(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?
|
|
368
|
+
"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=Uk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==lc?(f.width="100%",c.lineAlign==nc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==nc?f.left=c.line+"%":"end"==c.lineAlign&&
|
|
369
|
+
(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==nc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==lc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||
|
|
370
|
+
(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==lc?f.width=c.size+"%":f.height=c.size+"%")}function Uk(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Vk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}
|
|
371
|
+
M("shaka.text.UITextDisplayer",Ok);Ok.prototype.setTextVisibility=Ok.prototype.setTextVisibility;Ok.prototype.isTextVisible=Ok.prototype.isTextVisible;Ok.prototype.remove=Ok.prototype.remove;Ok.prototype.destroy=Ok.prototype.destroy;Ok.prototype.append=Ok.prototype.append;function Wk(a,b){function c(f){for(var g=f,h=r(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Hk(a,[]);a="WEBVTT\n\n";d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
|
|
372
|
+
break;case "right":g.push("align:right");break;case kc:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}M("shaka.text.WebVttGenerator",function(){});function Xk(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function Yk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?Zk:$k};d.ot=al(c);var e=d.ot===bl||d.ot===cl||d.ot===dl||d.ot===el;e&&(d.bl=fl(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==el&&(d.tb=gl(a,d.ot)/1E3);hl(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
|
|
373
|
+
function il(a,b,c){try{if(!a.g.enabled)return b;var d=jl(a);a:{switch(c){case "video/webm":case "video/mp4":var e=dl;break a;case "application/x-mpegurl":e=kl;break a}e=void 0}d.ot=e;d.su=!0;var f=ll(d);return ml(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function jl(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}}
|
|
374
|
+
function hl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,jl(a));c.pr=a.h.zb();var e=c.ot===bl||c.ot===dl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=nl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=ll(c);f&&(b.uris=b.uris.map(function(g){return ml(g,f)}))}}}
|
|
375
|
+
function al(a){var b=a.type;if(a.init)return ol;if("video"==b)return a.codecs.includes(",")?dl:bl;if("audio"==b)return cl;if("text"==b)return"application/mp4"===a.mimeType?el:pl}function fl(a,b){b=a.h.mb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
|
|
376
|
+
function gl(a,b){var c=a.h.Sa();if(!c.length)return NaN;a=c[0];c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case bl:return a.videoBandwidth||NaN;case cl:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
377
|
+
function ll(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
378
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function nl(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=ll(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
379
|
+
function ml(a,b){if(!b||a.includes("offline:"))return a;a=new lb(a);a.g.set("CMCD",b);return a.toString()}var kl="m",cl="a",bl="v",dl="av",ol="i",pl="c",el="tt",$k="v",Zk="l";M("shaka.util.CmcdManager.StreamingFormat",{Ph:"d",di:"h",Mi:"s",wi:"o"});function ql(){}
|
|
380
|
+
function rl(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]=jf(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=jf(l)),k=rl(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 "+
|
|
381
|
+
k),g=!1)}return g}function sl(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 tl(a,b){return a&&b}M("shaka.util.ConfigUtils",ql);ql.convertToConfigObject=sl;ql.mergeConfigObjects=rl;function ul(){}function vl(a){a=gd(a);return(new lb(a)).bb}function wl(a,b,c){function d(h){Hc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ec(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(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}M("shaka.util.FairPlayUtils",ul);
|
|
382
|
+
ul.commonFairPlayResponse=function(a,b){if(2===a){try{var c=dd(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Fc(md(c)))}};ul.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};ul.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
|
|
383
|
+
ul.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ec(b.body),a=ld(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=hd("spc="+a))};ul.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=gd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return wl(a,d,b)};
|
|
384
|
+
ul.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=gd(a).split(";").pop();return wl(a,c,b)};ul.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=gd(a).split("skd://").pop();return wl(a,c,b)};ul.initDataTransform=wl;ul.defaultGetContentId=vl;
|
|
385
|
+
ul.isFairPlaySupported=function(){var a;return K(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},E(b,2),A(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);J(b);return b.return(!1)})};function xl(){}
|
|
386
|
+
function yl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:$e(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=vl(g),g=wl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Rc()},c={retryParameters:$e(),availabilityWindowOverride:NaN,disableAudio:!1,
|
|
388
387
|
disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
|
|
389
|
-
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return
|
|
390
|
-
d={retryParameters:$e(),failureCallback:function(g){return
|
|
391
|
-
maxDisabledTime:30};if(Sc("Web0S")||Wc()||Sc("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return K(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?A(k,navigator.storage.estimate(),3):k.return(!0);h=k.h;return k.return(h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return
|
|
388
|
+
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return tl([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},
|
|
389
|
+
d={retryParameters:$e(),failureCallback:function(g){return tl([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,
|
|
390
|
+
maxDisabledTime:30};if(Sc("Web0S")||Wc()||Sc("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return K(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?A(k,navigator.storage.estimate(),3):k.return(!0);h=k.h;return k.return(h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return tl([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,
|
|
392
391
|
streaming:d,offline:e,abrFactory:function(){return new Ce},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,ignoreDevicePixelRatio:!1},
|
|
393
392
|
preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,
|
|
394
|
-
sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h.return(
|
|
395
|
-
function
|
|
396
|
-
2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=Ib&&"image"!=d.type||b.push(d);return b}M("shaka.util.PlayerConfiguration",
|
|
397
|
-
function
|
|
398
|
-
this.
|
|
399
|
-
f){return ff(
|
|
400
|
-
function(e,f){return
|
|
401
|
-
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?A(f,
|
|
402
|
-
q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==
|
|
393
|
+
sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h.return(zl(g,f.preferredAudioLanguage))})};return f}function Al(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 rl(a,b,c||yl(),d,"")}
|
|
394
|
+
function zl(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=Ub(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return Mb(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
|
|
395
|
+
2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=Ib&&"image"!=d.type||b.push(d);return b}M("shaka.util.PlayerConfiguration",xl);xl.mergeConfigObjects=Al;xl.createDefault=yl;function Bl(){this.g=null;this.h=[]}function Cl(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 Dl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
|
|
396
|
+
function El(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 Fl(){this.i=this.h=null;this.g=[]}function Gl(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 Hl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.P=this.T=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new Bl;this.h=new Fl};function T(a,b){fb.call(this);var c=this;this.l=Il;this.td=this.g=null;this.ba=!1;this.yd=new Af;this.gb=new Af;this.B=new Af;this.we=this.C=this.hb=this.i=this.Fd=this.J=this.j=this.ea=this.T=this.ma=this.N=this.vd=this.I=this.$a=this.F=this.K=this.m=this.H=null;this.Xf=1E9;this.h=Jl(this);this.Lc={width:Infinity,height:Infinity};this.A=null;this.Aa=new Re(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Oa=this.h.preferredTextLanguage;this.Fc=this.h.preferredTextRole;
|
|
397
|
+
this.xb=this.h.preferForcedSubs;this.ib=[];this.Nc=null;b&&b(this);this.H=Kl(this);this.H.Ie(this.h.streaming.forceHTTPS);this.G=null;Ll&&(this.G=Ll());this.yd.o(window,"online",function(){c.ze()});this.P={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Ze={name:"manifest-parser"};this.Ye={name:"manifest"};this.Za={name:"media-source"};this.Ae={name:"drm-engine"};this.$={name:"load"};this.$e={name:"src-equals-drm-engine"};this.ab={name:"src-equals"};var d=new Map;d.set(this.Z,function(e,
|
|
398
|
+
f){return ff(Ml(c,e,f))});d.set(this.P,function(e){e.O&&(c.gb.Sb(),e.O=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return ff(e)});d.set(this.aa,function(e){return ff(Nl(c,e))});d.set(this.Za,function(e){e=Ol(c,e);return ff(e)});d.set(this.Ze,function(e,f){e=Pl(c,e,f);return ff(e)});d.set(this.Ye,function(e){return Ql(c,e)});d.set(this.Ae,function(e){e=Rl(c,e);return ff(e)});d.set(this.$,function(e,f){return ff(Sl(c,e,f))});d.set(this.$e,function(e,f){e=Tl(c,e,f);return ff(e)});d.set(this.ab,
|
|
399
|
+
function(e,f){return Ul(c,e,f)});this.ua=new zk(this.P,{Hg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.Z);e==c.Z&&(k=g==c.P||f.O!=h.O?c.P:g==c.Z?c.Z:g==c.Za||g==c.$?c.Za:g==c.ab?c.$e:null);e==c.Za&&(k=g==c.$&&f.O==h.O?c.Ze:c.aa);e==c.Ze&&(k=Vl(c.$,c.Ye,c.aa,g,f,h));e==c.Ye&&(k=Vl(c.$,c.Ae,c.aa,g,f,h));e==c.Ae&&(k=Vl(c.$,c.$,c.aa,g,f,h));e==c.$e&&(k=g==c.ab&&f.O==h.O?c.ab:c.aa);if(e==c.$||e==c.ab)k=c.aa;e==c.aa&&(k=h.O&&f.O==h.O?c.Z:c.P);return k},lg:function(e,f,g){c.dispatchEvent(Wl("onstatechange",
|
|
400
|
+
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?A(f,Nl(c,e),2):f.return(e.O?c.Z:c.P)})},ah:function(e){c.dispatchEvent(Wl("onstateidle",(new Map).set("state",e.name)))}});this.Wf=new Q(function(){ae(c.i.variants,c.h.restrictions,c.Lc)&&Xl(c)});a&&this.Cc(a,!0)}u(T,fb);function Wl(a,b){return new O(a,b)}q=T.prototype;
|
|
401
|
+
q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Yl)return c.return();a.l=Yl;b=Ek(a.ua,function(){return{node:a.P,payload:Ak(),Kb:!1}});return A(c,new Promise(function(d){b.nc=function(){};b.zd=function(){d()};b.Rb=function(){d()};b.onError=function(){d()};b.Cd=function(){d()}}),2);case 2:return A(c,a.ua.destroy(),3);case 3:a.yd&&(a.yd.release(),a.yd=null);a.gb&&(a.gb.release(),a.gb=null);a.B&&(a.B.release(),a.B=null);a.we=null;a.C=null;a.h=null;a.A=null;a.td=null;
|
|
403
402
|
a.T=null;if(!a.H){c.D(4);break}return A(c,a.H.destroy(),5);case 5:a.H=null;case 4:fb.prototype.release.call(a),B(c)}})};
|
|
404
|
-
function
|
|
405
|
-
q.Cc=function(a,b){b=void 0===b?!0:b;if(this.l==
|
|
406
|
-
q.
|
|
407
|
-
q.load=function(a,b,c){var d=this;this.Nc=null;if(this.l==
|
|
408
|
-
g.Rb=function(){return k(
|
|
409
|
-
function
|
|
403
|
+
function Zl(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Sc("Trident/"))return!1;var a=$c();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Oc()?!0:Pc("application/x-mpegurl")}
|
|
404
|
+
q.Cc=function(a,b){b=void 0===b?!0:b;if(this.l==Yl)return Promise.reject($l());var c=Ak();c.O=a;Oc()||(b=!1);var d=b?this.Za:this.Z;a=Ek(this.ua,function(){return{node:d,payload:c,Kb:!1}});a.nc=function(){};return am(a)};q.detach=function(){var a=this;if(this.l==Yl)return Promise.reject($l());var b=Ek(this.ua,function(){return{node:a.P,payload:Ak(),Kb:!1}});b.nc=function(){};return am(b)};
|
|
405
|
+
q.We=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Yl)return Promise.reject($l());Oc()||(a=!1);var c=Ak(),d=Ek(this.ua,function(e){var f=e.O&&a?b.Za:e.O?b.Z:b.P;c.O=e.O;return{node:f,payload:c,Kb:!1}});d.nc=function(){};return am(d)};q.Dh=function(a){this.Nc=a};
|
|
406
|
+
q.load=function(a,b,c){var d=this;this.Nc=null;if(this.l==Yl)return Promise.reject($l());this.dispatchEvent(Wl("loading"));var e=Ak();e.uri=a;e.Pe=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=bm(this,e)?this.ab:this.$,g=Ek(this.ua,function(h){if(null==h.O)return null;e.O=h.O;return{node:f,payload:e,Kb:!0}});this.A=new Hl;this.T=cm(this);g.nc=function(){};return new Promise(function(h,k){g.Cd=function(){return k(new P(2,7,7002))};g.zd=function(){h();d.dispatchEvent(Wl("loaded"))};
|
|
407
|
+
g.Rb=function(){return k($l())};g.onError=function(l){return k(l)}})};function bm(a,b){if(!Oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=gh(d),c=dm[c]);if(c){if(""==(b.O||Qc()).canPlayType(c))return!1;if(!Oc()||!(c in fh||gh(d)in hh)||a.h.streaming.preferNativeHls)return!0;if(Yc())return a.h.streaming.useNativeHlsOnSafari}return!1}function Ml(a,b,c){null==b.O&&(b.O=c.O,a.gb.o(b.O,"error",function(){var d=em(a);d&&fm(a,d)}));a.g=b.O;return Promise.resolve()}
|
|
408
|
+
function Nl(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return a.l!=Yl&&(a.l=Il),c=a.ib.map(function(n){return n()}),a.ib=[],A(p,Promise.all(c),2);case 2:a.dispatchEvent(Wl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.ma&&(a.ma.release(),a.ma=null);b.O&&a.B.Sb();a.Wf.stop();a.$a&&(a.$a.release(),a.$a=null);a.vd&&(a.vd.stop(),a.vd=null);if(!a.J){p.D(3);break}return A(p,a.J.stop(),4);case 4:a.J=null,a.Fd=null;case 3:if(!a.C){p.D(5);break}return A(p,a.C.stop(),5);
|
|
410
409
|
case 5:if(!a.j){p.D(7);break}return A(p,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){p.D(9);break}return A(p,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.O||!b.O.src){p.D(11);break}return A(p,new Promise(function(n){return(new Q(n)).S(.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){p.D(13);break}return A(p,a.m.destroy(),14);case 14:a.m=
|
|
411
|
-
null;case 13:a.hb=null;a.N=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.A=new
|
|
412
|
-
function
|
|
413
|
-
function
|
|
414
|
-
function
|
|
415
|
-
height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(
|
|
416
|
-
f)},onTimelineRegionAdded:function(f){var g=a.ma;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new O("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return
|
|
417
|
-
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()}},e=Date.now()/1E3;return new bf(function(){var f,g,h,k;return K(function(l){if(1==l.g)return f=a,A(l,a.J.start(c,d),2);f.i=l.h;g=
|
|
418
|
-
function
|
|
419
|
-
function
|
|
420
|
-
(a.
|
|
421
|
-
k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);
|
|
422
|
-
break}p=a.F.gd();return A(x,
|
|
423
|
-
a.B.Fa(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.
|
|
424
|
-
function
|
|
410
|
+
null;case 13:a.hb=null;a.N=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.A=new Hl;a.Ve=null;gm(a);B(p)}})}
|
|
411
|
+
function Ol(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new ui,d=a.h.textDisplayFactory,e=d(),a.Ve=d,f=hm(b.O,c,e,function(l,m,p){l=r(l);for(var n=l.next();!n.done;n=l.next())if(n=n.value,n.data&&n.cueTime&&n.frames){for(var t=n.cueTime+m,y=p,x=r(n.frames),v=x.next();!v.done;v=x.next())im(a,t,y,"ID3",v.value);if(a.G)a.G.onHlsTimedMetadata(n,t)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.H=h,A(k,f.I,2);a.K=f;B(k)})}
|
|
412
|
+
function Pl(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.hb=d,f=a,A(h,eh(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Fd=h.h;a.J=a.Fd();g=jf(a.h.manifest);c.O&&"AUDIO"===c.O.nodeName&&(g.disableVideo=!0);a.J.configure(g);B(h)})}
|
|
413
|
+
function Ql(a,b){var c=b.uri;b=a.H;a.ma=new Pj(function(){return a.Ka()});a.ma.addEventListener("regionadd",function(f){f=f.region;jm(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.ea=null;a.h.streaming.observeQualityChanges&&(a.ea=new Lj(function(){return a.mb()}),a.ea.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
|
|
414
|
+
height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(Wl("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.T;try{h.g.enabled&&(h.A=g.format,hl(h,f,{ot:kl,su:!h.i}))}catch(k){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){Yk(a.T,f,g)},filter:function(f){return km(a,f)},makeTextStreamsForClosedCaptions:function(f){return lm(a,
|
|
415
|
+
f)},onTimelineRegionAdded:function(f){var g=a.ma;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new O("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return fm(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
|
|
416
|
+
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()}},e=Date.now()/1E3;return new bf(function(){var f,g,h,k;return K(function(l){if(1==l.g)return f=a,A(l,a.J.start(c,d),2);f.i=l.h;g=Wl("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new P(2,4,4036);mm(a.i);h=Date.now()/1E3;k=h-e;a.A.H=k;B(l)})}(),function(){return a.J.stop()})}
|
|
417
|
+
function Rl(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=nm(a,{Pb:a.H,onError:function(f){fm(a,f)},Bd:function(f){om(a,f)},onExpirationUpdated:function(f,g){pm(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),A(e,zg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?A(e,a.m.Cc(b.O),3):A(e,km(a,a.i),0)})}
|
|
418
|
+
function Sl(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y;return K(function(x){switch(x.g){case 1:b.startTime=c.startTime;null!=a.Nc&&(b.startTime=a.Nc,a.Nc=null);d=b.O;e=b.uri;a.hb=e;a.I=new Hj({rd:function(){return d.playbackRate},od:function(){return d.defaultPlaybackRate},Ke:function(v){d.playbackRate=v},Gf:function(v){d.currentTime+=v}});f=function(){return qm(a)};g=function(){return rm(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.we==h||
|
|
419
|
+
(a.we=h,a.C=h(),"function"!=typeof a.C.setMediaElement&&(He(),a.C.setMediaElement=function(){}),a.C.configure(a.h.abr));a.Aa=new Re(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Oa=a.h.preferredTextLanguage;a.Fc=a.h.preferredTextRole;a.xb=a.h.preferForcedSubs;sm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(v,w,C){a.j&&v!=a.j.l&&tm(a,v,!0,void 0===w?!1:w,void 0===C?0:C)});a.C.setMediaElement(d);a.F=um(a,b.startTime);a.$a=vm(a);
|
|
420
|
+
k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);wm(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=xm(a);a.j.configure(a.h.streaming);a.l=ym;d.textTracks&&a.B.o(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":zm(a,v)}});a.dispatchEvent(Wl("streaming"));l=null;if(m=a.Sa().find(function(v){return v.active})){x.D(2);break}l=Xl(a);tm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.D(3);
|
|
421
|
+
break}p=a.F.gd();return A(x,Am(l,p),4);case 4:n=x.h,a.F.ce(n);case 3:Bm(a,null,pe(l));case 2:return a.F.be(),t=a.Ab().find(function(v){return v.active}),t||((y=ze(a.i.textStreams,a.Oa,a.Fc,a.xb)[0]||null)&&Gl(a.A.h,y,!0),l&&(y?(l.audio&&Cm(a,l.audio,y)&&(a.ba=!0),a.ba&&a.K.m.setTextVisibility(!0),Dm(a)):a.ba=!1),y&&(a.h.streaming.alwaysStreamText||a.Ob())&&ik(a.j,y)),A(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.C.enable(),Em(a)),de(a.j?a.j.l:null,a.i),Fm(a.i),Gm(a),Hm(a),a.i.variants.some(function(v){return v.primary}),
|
|
422
|
+
a.B.Fa(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.Pe}),B(x)}})}
|
|
423
|
+
function Tl(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=Jb,e=Date.now()/1E3,f=!0,a.m=nm(a,{Pb:a.H,onError:function(p){fm(a,p)},Bd:function(p){om(a,p)},onExpirationUpdated:function(p,n){pm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.A.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=gh(g),k=dm[h],"application/x-mpegurl"==k&&Yc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
|
|
425
424
|
primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Ad(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
426
|
-
a.m.
|
|
427
|
-
function
|
|
428
|
-
e.preload&&a.B.Fa(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.
|
|
429
|
-
"change",function(){return
|
|
430
|
-
|
|
431
|
-
function
|
|
432
|
-
function
|
|
433
|
-
function
|
|
434
|
-
function
|
|
435
|
-
function
|
|
436
|
-
function
|
|
437
|
-
function
|
|
438
|
-
function
|
|
439
|
-
function
|
|
425
|
+
a.m.Z=!0,A(m,zg(a.m,[l],[]),2)):A(m,a.m.Cc(b.O),0)})}
|
|
426
|
+
function Ul(a,b,c){function d(){return qm(a)}b.uri=c.uri;b.startTime=c.startTime;a.hb=b.uri;var e=b.O;a.F=new wj(e);var f=!1;a.ib.push(function(){f=!0});null!=b.startTime&&a.F.ce(b.startTime);a.I=new Hj({rd:function(){return e.playbackRate},od:function(){return e.defaultPlaybackRate},Ke:function(k){e.playbackRate=k},Gf:function(k){e.currentTime+=k}});wm(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 rm(a)});"none"!=
|
|
427
|
+
e.preload&&a.B.Fa(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.Pe});e.audioTracks&&(a.B.o(e.audioTracks,"addtrack",function(){return Gm(a)}),a.B.o(e.audioTracks,"removetrack",function(){return Gm(a)}),a.B.o(e.audioTracks,"change",function(){return Gm(a)}));e.textTracks&&(a.B.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Im(a,k);break;case "chapters":zm(a,k);break;default:Gm(a)}}),a.B.o(e.textTracks,"removetrack",function(){return Gm(a)}),a.B.o(e.textTracks,
|
|
428
|
+
"change",function(){return Gm(a)}));var g=gh(b.uri);e.src=il(a.T,b.uri,dm[g]);(Wc()||Sc("Web0S"))&&e.load();a.l=Jm;a.dispatchEvent(Wl("streaming"));var h=new Lc;nj(e,HTMLMediaElement.HAVE_METADATA,a.B,function(){a.F.be();h.resolve()});nj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.B,function(){var k;return K(function(l){if(1==l.g)return Km(a),k=Lm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):A(l,new Promise(function(m){a.B.Fa(e.textTracks,"change",m);(new Q(m)).S(1)}),2);if(f)return l.return();
|
|
429
|
+
Mm(a);B(l)})});e.error?h.reject(em(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(em(a))});return new bf(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
|
|
430
|
+
function Km(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Id(b);var c=a.h.preferredVariantRole;""!=c&&a.Id(b,c)}}function Mm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.De(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.De(b,d,c)}}
|
|
431
|
+
function Im(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,im(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=Nm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).za().S(.5);a.ib.push(function(){c.stop()})}}
|
|
432
|
+
function im(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Wl("metadata",b))}function zm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).za().S(.5);a.ib.push(function(){c.stop()})}}function mm(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 nm(a,b){return new qg(b,a.h.drm.updateExpirationTime)}
|
|
433
|
+
function Kl(a){return new nf(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(Wl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Wl("downloadfailed",b))})}
|
|
434
|
+
function um(a,b){return new xj(a.g,a.i,a.h.streaming,b,function(){a.$a&&Kj(a.$a,!0);a.j&&a.j.Wc();a.N&&Om(a)},function(c){return a.dispatchEvent(c)})}
|
|
435
|
+
function vm(a){var b=new Qj(a.ma);b.addEventListener("enter",function(d){jm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){jm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(jm(a,"timelineregionenter",e),jm(a,"timelineregionexit",e))});var c=new Jj(a.g);c.g.add(b);a.ea&&c.g.add(a.ea);return c}function wm(a,b){a.N=new Ve;a.N.g=Xe;Ye(a.N,b,Math.min(.5,b/2));gm(a);a.vd=(new Q(function(){Om(a)})).ka(.25)}
|
|
436
|
+
function Om(a){switch(a.l){case Jm:if(a.g.ended)var b=!0;else{var c=Ci(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case ym:a:if(a.g.ended||Ni(a.K))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Jb();var d=Ci(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ei(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?We:Xe;c.g=d;b!=d&&gm(a)}function hm(a,b,c,d){return new Hi(a,b,c,d)}
|
|
437
|
+
function cm(a){return new Xk({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},mb:function(){return a.mb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Sa:function(){return a.Sa()},zb:function(){return a.zb()},U:function(){return a.U()}},a.h.cmcd)}
|
|
438
|
+
function xm(a){return new Wj(a.i,{qd:function(){return a.F.gd()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Yk(a.T,b,c)},V:a.K,Pb:a.H,onError:function(b){return fm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},dh:function(){a.J&&a.J.update&&a.J.update()},ve:function(){a.F&&a.F.Hf();Om(a)},bh:function(b,c){(c=c.oe)&&a.ea&&Nj(a.ea,c,b)},hf:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){c=new Uf(Ec(c));
|
|
440
439
|
var e=0,f=r(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=r(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Ig(d,"cenc",e);d=d.A}}else d=Promise.resolve();return d}})}
|
|
441
|
-
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
442
|
-
function
|
|
443
|
-
c);a.
|
|
444
|
-
q.og=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.Ka().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.nh=function(){for(var a in this.h)delete this.h[a];
|
|
440
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=sl(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=Al(this.h,a,Jl(this));Pm(this);return c};
|
|
441
|
+
function Pm(a){if(a.J){var b=jf(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{Qm(a,a.i)}catch(f){fm(a,f)}a.C&&Hm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Rm(a)}a.H&&a.H.Ie(a.h.streaming.forceHTTPS);if(a.K&&(a.K.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Ve!=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=
|
|
442
|
+
c);a.Ve=b;a.j&&(b=a.j,(c=b.i.get(Ib))&&gk(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),Em(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ye(a.N,b,Math.min(.5,b/2)));a.i&&sm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Jl(this);Al(a,this.h,Jl(this));return a};
|
|
443
|
+
q.og=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.Ka().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.nh=function(){for(var a in this.h)delete this.h[a];Al(this.h,Jl(this),Jl(this));Pm(this)};q.zf=function(){return this.l};q.Gg=function(){return this.g};q.Ic=function(){return this.H};q.fe=function(){return this.hb};
|
|
445
444
|
q.nd=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.ic=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};
|
|
446
|
-
q.Ka=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.ec(),end:a.
|
|
447
|
-
q.Pc=function(){return this.N?this.N.g==Xe:!1};q.zb=function(){return this.g?this.I?this.I.i:1:0};q.
|
|
445
|
+
q.Ka=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.ec(),end:a.ob()}}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.Rg=function(){this.U()&&(this.g.currentTime=this.Ka().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Hc=function(){return this.m?this.m.Hc():Infinity};q.pd=function(){return this.m?this.m.pd():{}};
|
|
446
|
+
q.Pc=function(){return this.N?this.N.g==Xe:!1};q.zb=function(){return this.g?this.I?this.I.i:1:0};q.Ue=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==ym&&(this.C.playbackRateChanged(a),fk(this.j,1<Math.abs(a))))};q.kf=function(){var a=this.I.od();this.l==Jm&&this.I.set(a);this.l==ym&&(this.I.set(a),this.C.playbackRateChanged(a),fk(this.j,!1))};
|
|
448
447
|
q.Sa=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)}):[]};
|
|
449
|
-
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?
|
|
448
|
+
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?Lm(this).map(function(f){return ue(f)}):[]};q.yg=function(){return this.i?this.i.imageStreams.map(function(a){return re(a)}):[]};
|
|
450
449
|
q.Ng=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D;return K(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(F){return F.id==a}))?d.segmentIndex?G.D(3):A(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);p=parseInt(h[2],10);n=k/m;t=l/p;y=m*p;x=f.j-
|
|
451
450
|
f.startTime;v=f.A||x/y;w=f.startTime;z=C=0;1<y&&(D=Math.floor((b-f.startTime)/v),w=f.startTime+D*v,C=D%m*n,z=Math.floor(D/m)*t);return G.return({imageHeight:l,imageWidth:k,height:t,positionX:C,positionY:z,startTime:w,duration:v,uris:f.Ra(),width:n})}return G.return(null)})};
|
|
452
|
-
q.
|
|
453
|
-
q.
|
|
454
|
-
se(c)==a.id){
|
|
455
|
-
q.Id=function(a,b){if(this.i&&this.F){this.Aa=new Re(a,b||"",0,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var c=this.Aa.create(this.i.variants),d=null;c=r(c.values());for(var e=c.next();!e.done;e=c.next())if(e=e.value,!d||b(d,a)>b(e,a))d=e;d?(b=pe(d),this.
|
|
456
|
-
r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=we(f);Mb(g.language)==a&&(d=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?
|
|
457
|
-
q.
|
|
458
|
-
q.qh=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.Aa=new Re(b.language,"",0,a),
|
|
459
|
-
q.qg=function(a){var b=Mb(a),c=
|
|
460
|
-
function
|
|
461
|
-
q.
|
|
451
|
+
q.Ee=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&&(Gl(this.A.h,b,!1),ik(this.j,b),Sm(this),this.Oa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Lm(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";Sm(this)}};
|
|
452
|
+
q.Fe=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)&&(tm(this,d,!1,b,c),this.Aa=new Qe(d),Hm(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,
|
|
453
|
+
se(c)==a.id){Tm(this,c);break}};q.ng=function(){return Um(this.Sa())};q.Mg=function(){return Um(this.Ab())};q.mg=function(){return Array.from(Vm(this.Sa()))};q.Lg=function(){return Array.from(Vm(this.Ab()))};
|
|
454
|
+
q.Id=function(a,b){if(this.i&&this.F){this.Aa=new Re(a,b||"",0,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var c=this.Aa.create(this.i.variants),d=null;c=r(c.values());for(var e=c.next();!e.done;e=c.next())if(e=e.value,!d||b(d,a)>b(e,a))d=e;d?(b=pe(d),this.Fe(b,!0)):Rm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);a=Mb(a);c=d=null;e=
|
|
455
|
+
r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=we(f);Mb(g.language)==a&&(d=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Tm(this,c):d&&Tm(this,d)}};
|
|
456
|
+
q.De=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Oa=a,this.Fc=b||"",this.xb=c,(a=ze(this.i.textStreams,this.Oa,this.Fc,this.xb)[0]||null)&&a!=this.j.A&&(Gl(this.A.h,a,!1),this.h.streaming.alwaysStreamText||this.Ob()))ik(this.j,a),Sm(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.Ee(a)}};
|
|
457
|
+
q.qh=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.Aa=new Re(b.language,"",0,a),Rm(this))}};q.Ob=function(){var a=this.ba;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Lm(this).some(function(b){return"showing"==b.mode}):a};q.xf=function(){return this.g&&this.g.src&&this.g.textTracks?Wm(this).map(function(a){return ue(a)}):[]};
|
|
458
|
+
q.qg=function(a){var b=Mb(a),c=Wm(this).filter(function(h){return Mb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
459
|
+
function Lm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Nm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Wm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
460
|
+
q.Ne=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==ym)this.K.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ze(this.i.textStreams,this.Oa,this.Fc,this.xb),0<a.length&&(ik(this.j,a[0]),Sm(this))):ek(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Lm(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")}Dm(this)}};
|
|
462
461
|
q.Ig=function(){if(!this.U())return null;var a=this.ua.l,b=0;if(this.F)b=this.F.gd();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};
|
|
463
|
-
q.
|
|
464
|
-
q.getStats=function(){if(this.l!=
|
|
465
|
-
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.A.P=this.F
|
|
466
|
-
1E3*this.Ka().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==
|
|
462
|
+
q.Af=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.mb=function(){if(this.l==ym)return this.K.mb();var a={total:[],audio:[],video:[],text:[]};this.l==Jm&&(a.total=Fi(this.g.buffered));return a};
|
|
463
|
+
q.getStats=function(){if(this.l!=ym&&this.l!=Jm)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:[]};qm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.A;b=
|
|
464
|
+
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.A.P=this.F.bf(),this.A.T=this.F.cf());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==ym){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.Af().valueOf()+
|
|
465
|
+
1E3*this.Ka().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==Jm&&(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.T,k=e.P,l=e.C,m=e.i,p=e.m,n=e.H,t=e.j,y=Dl(e.g,"playing"),x=Dl(e.g,"paused"),v=Dl(e.g,"buffering"),w=e.B,C=e.G,z=e.I,D=El(e.g),G=[];e=r(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,G.push({timestamp:F.timestamp,
|
|
467
466
|
id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:y,pauseTime:x,bufferingTime:v,licenseTime:w,liveLatency:C,maxSegmentDuration:z,stateHistory:D,switchHistory:G}};
|
|
468
|
-
q.cg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,y,x,v,w,C;return K(function(z){switch(z.g){case 1:if(h.l!=
|
|
469
|
-
Jb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new P(1,4,4033);if(!k.length){z.D(6);break}return A(z,
|
|
470
|
-
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=wd(v.mimeType,v.codecs);C=Cd(w);if(!C)throw new P(2,2,2014,d);h.i.textStreams.push(v);
|
|
471
|
-
q.ag=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=
|
|
472
|
-
case 5:throw new P(1,2,2012);}})};function
|
|
473
|
-
function
|
|
474
|
-
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function
|
|
475
|
-
function
|
|
467
|
+
q.cg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,y,x,v,w,C;return K(function(z){switch(z.g){case 1:if(h.l!=ym&&h.l!=Jm)throw new P(1,7,7004);if(d){z.D(2);break}return A(z,Xm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(D){}if(h.l!=Jm){z.D(4);break}g&&(c="forced");return A(z,Ym(h,a,b,c,d,f||"",k),5);case 5:l=h.Ab();if(m=l.find(function(D){return D.language==b&&D.label==(f||"")&&D.kind==c}))return Gm(h),z.return(m);throw new P(1,2,2012);case 4:p=
|
|
468
|
+
Jb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new P(1,4,4033);if(!k.length){z.D(6);break}return A(z,Zm(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,y=$m(h,t,d,k),x=new Blob([y],{type:"text/vtt"}),a=Ki(x),d="text/vtt";case 6:v={id:h.Xf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Fj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ha,primary:!1,trickModeVideo:null,
|
|
469
|
+
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=wd(v.mimeType,v.codecs);C=Cd(w);if(!C)throw new P(2,2,2014,d);h.i.textStreams.push(v);Gm(h);return z.return(qe(v))}})};
|
|
470
|
+
q.ag=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=ym&&d.l!=Jm)throw new P(1,7,7004);if(c){k.D(2);break}return A(k,Xm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return A(k,Ym(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.xf();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return A(k,new Promise(function(l,m){d.B.Fa(f,"load",l);d.B.Fa(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return k.return(h);
|
|
471
|
+
case 5:throw new P(1,2,2012);}})};function Xm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=gh(b);if(d=an[c])return e.return(d);E(e,2);return A(e,ih(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:J(e);case 3:if(d)return e.return(d);throw new P(1,2,2011,c);}})}
|
|
472
|
+
function Ym(a,b,c,d,e,f,g){var h,k,l,m;return K(function(p){if(1==p.g)return"text/vtt"!=e||g.length?A(p,Zm(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=$m(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ki(l),e="text/vtt");m=document.createElement("track");var n=a.T,t=b;try{if(n.g.enabled){var y=jl(n);y.ot=pl;y.su=!0;var x=ll(y);var v=ml(t,x)}else v=t}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),v=t}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
473
|
+
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function Zm(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=xf;f=rf([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&hl(k,f,{ot:pl,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return A(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
474
|
+
function $m(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=Ec(b),b=c.parseMedia(b,a),Wk(b,d);throw new P(2,2,2014,c);}q.Je=function(a,b){this.Lc.width=a;this.Lc.height=b};q.ze=function(a){if(this.l==ym){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.Mc||d.Ja||d.fb||(d.Mc=!1,dk(b,d,a));b=!0}}else b=!1;return b};
|
|
476
475
|
q.Dg=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.Eg=function(){return this.Fd};
|
|
477
|
-
function
|
|
478
|
-
function
|
|
479
|
-
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
|
|
480
|
-
function
|
|
481
|
-
function
|
|
482
|
-
function
|
|
483
|
-
function
|
|
484
|
-
function
|
|
485
|
-
function
|
|
486
|
-
function
|
|
487
|
-
function
|
|
488
|
-
function
|
|
489
|
-
function
|
|
490
|
-
function
|
|
491
|
-
function
|
|
492
|
-
(e=!0)}}}if(!e||
|
|
493
|
-
function
|
|
494
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new P(2,4,4012,a);}function
|
|
495
|
-
function
|
|
496
|
-
h.push({language:l,role:m,label:p})}});return h}function
|
|
497
|
-
T.prototype.getManifestParserFactory=T.prototype.Eg;T.prototype.getManifest=T.prototype.Dg;T.prototype.retryStreaming=T.prototype.
|
|
498
|
-
T.prototype.setTextTrackVisibility=T.prototype.
|
|
499
|
-
T.prototype.getAudioLanguagesAndRoles=T.prototype.ng;T.prototype.selectVariantTrack=T.prototype.
|
|
476
|
+
function Jl(a){var b=yl();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.ze(d))}};b.textDisplayFactory=function(){return a.td?new Ok(a.g,a.td):new Ik(a.g)};return b}q.Oe=function(a){this.td=a};
|
|
477
|
+
function lm(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Gj;h={id:a.Xf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
478
|
+
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 km(a,b){return K(function(c){if(1==c.g)return A(c,bn(a,b),2);Qm(a,b);B(c)})}
|
|
479
|
+
function bn(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,A(d,be(c,b),2);Fm(b);B(d)})}
|
|
480
|
+
function Qm(a,b){if(a.l!=Yl){ae(b.variants,a.h.restrictions,a.Lc)&&a.j&&Gm(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,Ig(a.m,g.initDataType,g.initData)}}cn(a,b)}}
|
|
481
|
+
function Am(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return K(function(t){if(1==t.g)return k?A(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.cc(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},A(h,e(c,b),2);if(3!=h.g)return f=h.h,A(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
|
|
482
|
+
function gm(a){var b=a.Pc();if(a.A&&a.N&&a.F){var c=a.I;c.j=b;Ij(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);qm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Wl("buffering",b))}function rm(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=Wl("ratechange"),a.dispatchEvent(b))}function qm(a){if(a.A&&a.N){var b=a.A.g;a.N.g==Xe?Cl(b,"buffering"):a.g.paused?Cl(b,"paused"):a.g.ended?Cl(b,"ended"):Cl(b,"playing")}}
|
|
483
|
+
function Hm(a){try{cn(a,a.i)}catch(c){return fm(a,c),!1}var b=a.i.variants.filter(function(c){return xe(c)});b=a.Aa.create(b);a.C.setVariants(Array.from(b.values()));return!0}function Xl(a){return Hm(a)?a.C.chooseVariant():null}function Rm(a){var b=Xl(a);b&&tm(a,b,!0,!0,0)}
|
|
484
|
+
function tm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&hk(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}));hk(a.j,b,d,e,void 0,c);d=null;f&&(d=pe(f));b=pe(b);c?Bm(a,d,b):dn(a,d,b)}}function Tm(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=we(c);b=we(b);dn(a,c,b)}
|
|
485
|
+
function Cm(a,b,c){a=Mb(a.h.preferredTextLanguage);b=Mb(b.language);c=Mb(c.language);return Lb(c,a)&&!Lb(b,c)}function Bm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Wl("adaptation",b);en(a,b)}function Gm(a){var b=Wl("trackschanged");en(a,b)}function dn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Wl("variantchanged",b);en(a,b)}function Sm(a){var b=Wl("textchanged");en(a,b)}function Dm(a){var b=Wl("texttrackvisibility");en(a,b)}
|
|
486
|
+
function Em(a){var b=(new Map).set("newStatus",a.h.abr.enabled);en(a,Wl("abrstatuschanged",b))}
|
|
487
|
+
function fn(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;b=a.Sa().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);ae(d.variants,a.h.restrictions,a.Lc);b=Xl(a);if(!b)return!1;d=a.mb().video.reduce(function(g,h){return g+h.end-h.start},0);tm(a,b,!1,!0,d);a.Wf.S(c);return!0}
|
|
488
|
+
function fm(a,b){if(a.l!=Yl)if(fn(a,b))b.handled=!0;else{var c=Wl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function jm(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(Wl(b,c))}
|
|
489
|
+
function em(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 P(2,3,3016,b,c,a.g.error.message)}
|
|
490
|
+
function om(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&&!gn.includes(l)}h!=f.allowedByKeySystem&&
|
|
491
|
+
(e=!0)}}}if(!e||Hm(a))(b=a.j.l)&&!b.allowedByKeySystem&&Rm(a),e&&Gm(a)}}function pm(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=Wl("expirationupdated");a.dispatchEvent(b)}function sm(a,b,c){0<b&&(a.U()||a.Qf(b));b=a.getDuration();c<b&&(a.U()||a.Ua(c))}
|
|
492
|
+
function cn(a,b){a=a.m?a.m.pd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var p=a[c?"00":m];p?gn.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
493
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new P(2,4,4012,a);}function Fm(a){if(!a.variants.some(xe))throw new P(2,4,4032);}function en(a,b){K(function(c){if(1==c.g)return A(c,Promise.resolve(),2);a.l!=Yl&&a.dispatchEvent(b);B(c)})}function Vm(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}
|
|
494
|
+
function Um(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){k=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var p=null;c.has(l)&&c.get(l).has(m)&&(p=c.get(l).get(m));
|
|
495
|
+
h.push({language:l,role:m,label:p})}});return h}function $l(){return new P(2,7,7E3)}function Vl(a,b,c,d,e,f){return d==a&&e.O==f.O&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Ak(){return{O:null,mimeType:null,startTime:null,Pe:NaN,uri:null}}function am(a){return new Promise(function(b,c){a.Rb=function(){return c($l())};a.zd=function(){return b()};a.onError=function(d){return c(d)};a.Cd=function(){return c($l())}})}M("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.Oe;
|
|
496
|
+
T.prototype.getManifestParserFactory=T.prototype.Eg;T.prototype.getManifest=T.prototype.Dg;T.prototype.retryStreaming=T.prototype.ze;T.prototype.setMaxHardwareResolution=T.prototype.Je;T.prototype.addChaptersTrack=T.prototype.ag;T.prototype.addTextTrackAsync=T.prototype.cg;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.mb;T.prototype.getPresentationStartTimeAsDate=T.prototype.Af;T.prototype.getPlayheadTimeAsDate=T.prototype.Ig;
|
|
497
|
+
T.prototype.setTextTrackVisibility=T.prototype.Ne;T.prototype.getChapters=T.prototype.qg;T.prototype.getChaptersTracks=T.prototype.xf;T.prototype.isTextTrackVisible=T.prototype.Ob;T.prototype.selectVariantsByLabel=T.prototype.qh;T.prototype.selectTextLanguage=T.prototype.De;T.prototype.selectAudioLanguage=T.prototype.Id;T.prototype.getTextLanguages=T.prototype.Lg;T.prototype.getAudioLanguages=T.prototype.mg;T.prototype.getTextLanguagesAndRoles=T.prototype.Mg;
|
|
498
|
+
T.prototype.getAudioLanguagesAndRoles=T.prototype.ng;T.prototype.selectVariantTrack=T.prototype.Fe;T.prototype.selectTextTrack=T.prototype.Ee;T.prototype.getThumbnails=T.prototype.Ng;T.prototype.getImageTracks=T.prototype.yg;T.prototype.getTextTracks=T.prototype.Ab;T.prototype.getVariantTracks=T.prototype.Sa;T.prototype.cancelTrickPlay=T.prototype.kf;T.prototype.trickPlay=T.prototype.Ue;T.prototype.getPlaybackRate=T.prototype.zb;T.prototype.isBuffering=T.prototype.Pc;T.prototype.getKeyStatuses=T.prototype.pd;
|
|
500
499
|
T.prototype.getExpiration=T.prototype.Hc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Rg;T.prototype.seekRange=T.prototype.Ka;T.prototype.isAudioOnly=T.prototype.ic;T.prototype.isInProgress=T.prototype.Mb;T.prototype.isLive=T.prototype.U;T.prototype.getAdManager=T.prototype.nd;T.prototype.getAssetUri=T.prototype.fe;T.prototype.getNetworkingEngine=T.prototype.Ic;T.prototype.getMediaElement=T.prototype.Gg;
|
|
501
|
-
T.prototype.getLoadMode=T.prototype.
|
|
500
|
+
T.prototype.getLoadMode=T.prototype.zf;T.prototype.resetConfiguration=T.prototype.nh;T.prototype.getBufferFullness=T.prototype.og;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.Dh;T.prototype.unload=T.prototype.We;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.Cc;
|
|
502
501
|
T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?A(h,Zg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Oc()){for(var l in fh)k[l]=!0;for(var m in hh)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=Oc()?!!fh[p]:Pc(p);for(var n in l)k[n]=
|
|
503
502
|
Oc()?!!hh[n]:Pc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(ja(gj));
|
|
504
|
-
k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Oc()?Cd(l)?!0:MediaSource.isTypeSupported(l)||rd(l):Pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=
|
|
505
|
-
var
|
|
506
|
-
var
|
|
507
|
-
ssa:"text/x-ssa",ass:"text/x-ssa"};function
|
|
503
|
+
k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Oc()?Cd(l)?!0:MediaSource.isTypeSupported(l)||rd(l):Pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=hn;for(g in f)e[g]=f[g]();return h.return(e)})};T.isBrowserSupported=Zl;T.setAdManagerFactory=function(a){Ll=a};T.registerSupportPlugin=function(a,b){hn[a]=b};T.prototype.destroy=T.prototype.destroy;var Yl=0,Il=1,ym=2,Jm=3;T.LoadMode={DESTROYED:Yl,NOT_LOADED:Il,MEDIA_SOURCE:ym,SRC_EQUALS:Jm};T.version="v4.2.8";
|
|
504
|
+
var jn=["4","2"];Ie=new function(a){this.g=a;this.i=Je;this.h=Ke}(new Ge(Number(jn[0]),Number(jn[1])));
|
|
505
|
+
var gn=["output-restricted","internal-error"],hn={},Ll=null,dm={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"},an={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
506
|
+
ssa:"text/x-ssa",ass:"text/x-ssa"};function kn(){this.h=[];this.j=this.i=this.g=0};function ln(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 Af;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=ln.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};
|
|
508
507
|
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()};
|
|
509
508
|
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()};
|
|
510
|
-
q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};M("shaka.ads.ClientSideAd",
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
function(f){
|
|
514
|
-
function
|
|
515
|
-
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,
|
|
516
|
-
{once:!0})}catch(e){
|
|
517
|
-
function
|
|
518
|
-
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
509
|
+
q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};M("shaka.ads.ClientSideAd",ln);ln.prototype.release=ln.prototype.release;ln.prototype.getPositionInSequence=ln.prototype.getPositionInSequence;ln.prototype.getSequenceLength=ln.prototype.getSequenceLength;ln.prototype.setMuted=ln.prototype.setMuted;ln.prototype.resize=ln.prototype.resize;ln.prototype.isLinear=ln.prototype.isLinear;ln.prototype.isMuted=ln.prototype.isMuted;
|
|
510
|
+
ln.prototype.setVolume=ln.prototype.setVolume;ln.prototype.getVolume=ln.prototype.getVolume;ln.prototype.play=ln.prototype.play;ln.prototype.pause=ln.prototype.pause;ln.prototype.skip=ln.prototype.skip;ln.prototype.canSkipNow=ln.prototype.canSkipNow;ln.prototype.getTimeUntilSkippable=ln.prototype.getTimeUntilSkippable;ln.prototype.isSkippable=ln.prototype.isSkippable;ln.prototype.isPaused=ln.prototype.isPaused;ln.prototype.getRemainingTime=ln.prototype.getRemainingTime;
|
|
511
|
+
ln.prototype.getMinSuggestedDuration=ln.prototype.getMinSuggestedDuration;ln.prototype.getDuration=ln.prototype.getDuration;function mn(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 Af;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.2.8");this.g=null;this.h.Fa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){nn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
512
|
+
function(f){on(e,f)});this.i.onended=function(){e.m.contentComplete()}}mn.prototype.stop=function(){this.g&&this.g.stop();this.A&&Nk(this.A)};mn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function on(a,b){b.getError();pn(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
513
|
+
function nn(a,b){a.l(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",b)))}qn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,rn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
|
|
514
|
+
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,rn(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,rn(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,rn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
|
|
515
|
+
{once:!0})}catch(e){pn(a,null)}}function rn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
516
|
+
function qn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new O(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){on(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){sn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){sn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
517
|
+
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){pn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){pn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
519
518
|
a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.o(a.g,
|
|
520
519
|
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,google.ima.AdEvent.Type.AD_METADATA,
|
|
521
|
-
function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function
|
|
522
|
-
function
|
|
520
|
+
function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function sn(a,b){var c=b.getAd();a.j=new ln(c,a.g,a.i);b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new O("ad-started",b));a.j.isLinear()&&(a.A.setAttribute("ad-active","true"),a.i.pause())}
|
|
521
|
+
function pn(a,b){a.l(new O("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.play())};function tn(a,b){this.i=a;this.h=null;this.g=b}q=tn.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
523
522
|
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
524
|
-
q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new
|
|
523
|
+
q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",tn);tn.prototype.release=tn.prototype.release;tn.prototype.getPositionInSequence=tn.prototype.getPositionInSequence;tn.prototype.getSequenceLength=tn.prototype.getSequenceLength;tn.prototype.setMuted=tn.prototype.setMuted;
|
|
524
|
+
tn.prototype.resize=tn.prototype.resize;tn.prototype.isLinear=tn.prototype.isLinear;tn.prototype.isMuted=tn.prototype.isMuted;tn.prototype.setVolume=tn.prototype.setVolume;tn.prototype.getVolume=tn.prototype.getVolume;tn.prototype.play=tn.prototype.play;tn.prototype.pause=tn.prototype.pause;tn.prototype.skip=tn.prototype.skip;tn.prototype.canSkipNow=tn.prototype.canSkipNow;tn.prototype.getTimeUntilSkippable=tn.prototype.getTimeUntilSkippable;tn.prototype.isSkippable=tn.prototype.isSkippable;
|
|
525
|
+
tn.prototype.isPaused=tn.prototype.isPaused;tn.prototype.getRemainingTime=tn.prototype.getRemainingTime;tn.prototype.getMinSuggestedDuration=tn.prototype.getMinSuggestedDuration;tn.prototype.getDuration=tn.prototype.getDuration;function un(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.A=null;this.F="";this.G=[];this.h=new Af;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new O("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){vn(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
|
|
526
|
+
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new tn(f,e.l);e.C&&(e.m.h=e.C);e.i(new O("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
|
|
528
527
|
var f=e.l.currentTime;e.A&&e.A>f&&(e.l.currentTime=e.A,e.A=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new O("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new O("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new O("ad-third-quartile"))});
|
|
529
528
|
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new O("ad-complete"));e.i(new O("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new O("ad-skipped"));e.i(new O("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
|
|
530
|
-
f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}
|
|
531
|
-
function
|
|
532
|
-
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 O("ad-stopped"));this.h=new
|
|
533
|
-
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new
|
|
534
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(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.2.
|
|
535
|
-
(c.H=!0),c.j=new Lc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(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.2.
|
|
529
|
+
f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}un.prototype.stop=function(){this.F="";this.A=null;this.G=[]};un.prototype.release=function(){this.stop();this.h&&this.h.release()};un.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
|
|
530
|
+
function vn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.A=c,a.l.currentTime=d.start)}})};function U(){fb.call(this);this.g=this.i=null;this.h=new kn;this.j=navigator.language}u(U,fb);q=U.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 P(2,10,1E4);this.i&&this.i.release();this.i=new mn(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)})};
|
|
531
|
+
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 O("ad-stopped"));this.h=new kn};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
|
|
532
|
+
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new un(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)})};
|
|
533
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(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.2.8";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
534
|
+
(c.H=!0),c.j=new Lc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(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.2.8";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
|
|
536
535
|
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)};M("shaka.ads.AdManager",U);
|
|
537
536
|
U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
|
|
538
537
|
U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";
|
|
539
538
|
U.AD_VOLUME_CHANGED="ad-volume-changed";U.AD_MUTED="ad-muted";U.AD_PAUSED="ad-paused";U.AD_RESUMED="ad-resumed";U.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";U.CUEPOINTS_CHANGED="ad-cue-points-changed";U.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";U.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";U.AD_CLICKED="ad-clicked";U.AD_PROGRESS="ad-progress";U.AD_BUFFERING="ad-buffering";U.AD_IMPRESSION="ad-impression";U.AD_DURATION_CHANGED="ad-duration-changed";U.AD_CLOSED="ad-closed";
|
|
540
|
-
U.AD_LOADED="ad-loaded";U.ALL_ADS_COMPLETED="all-ads-completed";U.AD_LINEAR_CHANGED="ad-linear-changed";U.AD_METADATA="ad-metadata";U.AD_RECOVERABLE_ERROR="ad-recoverable-error";U.AD_BREAK_READY="ad-break-ready";U.AD_INTERACTION="ad-interaction";
|
|
539
|
+
U.AD_LOADED="ad-loaded";U.ALL_ADS_COMPLETED="all-ads-completed";U.AD_LINEAR_CHANGED="ad-linear-changed";U.AD_METADATA="ad-metadata";U.AD_RECOVERABLE_ERROR="ad-recoverable-error";U.AD_BREAK_READY="ad-break-ready";U.AD_INTERACTION="ad-interaction";Ll=function(){return new U};function wn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof O){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
|
|
541
540
|
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(Fi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
|
|
542
|
-
function
|
|
543
|
-
function
|
|
544
|
-
var
|
|
545
|
-
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},
|
|
546
|
-
|
|
547
|
-
n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;
|
|
548
|
-
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.I,[],null,this.P,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(
|
|
549
|
-
|
|
550
|
-
function
|
|
551
|
-
q.get=function(a,b){var c=this;if("video"==a){if(
|
|
552
|
-
q.set=function(a,b,c){this.g[a][b]=c;
|
|
553
|
-
q.Kf=function(a,b){
|
|
554
|
-
function
|
|
555
|
-
function
|
|
556
|
-
q.destroy=function(a){a&&this.g.ac();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.dc=function(){return this.B};q.
|
|
557
|
-
q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=
|
|
558
|
-
q.
|
|
559
|
-
function
|
|
560
|
-
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
561
|
-
function
|
|
562
|
-
function
|
|
563
|
-
function
|
|
564
|
-
function
|
|
541
|
+
function xn(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=yn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
542
|
+
function yn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
543
|
+
var zn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),An="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Bn=["loop","playbackRate"],Cn=["pause","play"],Dn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
544
|
+
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},En={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Fn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Gn=[["getConfiguration","configure"]],Hn=[["isTextTrackVisible","setTextTrackVisibility"]],In="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
545
|
+
Jn=["attach","detach","load","unload"];function Kn(a,b,c,d,e,f,g){var h=this;this.I=a;this.P=g;this.j=new Q(b);this.T=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 Ln(h)};this.G=function(k,l){k=xn(l);switch(k.type){case "event":var m=k.targetName,p=Qa(k.event);h.B(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.C&&(h.T(),h.C=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new P(n.severity,n.category,
|
|
546
|
+
n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;Mn.add(this)}q=Kn.prototype;q.destroy=function(){Mn.delete(this);Nn(this);On&&Pn(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.Gd=function(){return this.N};
|
|
547
|
+
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.I,[],null,this.P,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Mn),d=c.next();!d.done;d=c.next())Qn(d.value,b)},function(b){for(var c=r(Mn),d=c.next();!d.done;d=c.next())d=d.value,Rn="available"==b,d.j.za()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Rn&&this.j.S(Sn);(a=On)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
548
|
+
Qn(this,a):On=null}else window.__onGCastApiAvailable!==Tn&&(Un=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Tn)};q.Ge=function(a){this.A=a;this.h&&Vn(this,{type:"appData",appData:this.A})};q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new P(1,8,8E3);if(!Rn)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Lc;chrome.cast.requestSession(function(d){return Wn(b,a,d)},function(d){return Xn(b,d)});return A(c,b.l,0)})};
|
|
549
|
+
function Yn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Wn(a,b,c)},function(c){return Xn(a,c)})}}q.ac=function(){if(this.h){Nn(this);if(On){Pn(this);try{On.stop(function(){},function(){})}catch(a){}On=null}Ln(this)}};
|
|
550
|
+
q.get=function(a,b){var c=this;if("video"==a){if(Cn.includes(b))return function(){return c.Kf.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))}}else if("player"==a){if(Fn[b]&&!this.get("player","isLive")())return function(){};if(In.includes(b))return function(){return c.Kf.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))};if(Jn.includes(b))return function(){return c.kh.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))};if(Dn[b]||En[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
551
|
+
q.set=function(a,b,c){this.g[a][b]=c;Vn(this,{type:"set",targetName:a,property:b,value:c})};function Wn(a,b,c){On=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Ln(a);Vn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function Xn(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 P(2,8,c,b))}
|
|
552
|
+
q.Kf=function(a,b){Vn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.kh=function(a,b){var c=Fa.apply(2,arguments),d=new Lc,e=this.J.toString();this.J++;this.i[e]=d;try{Vn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Qn(a,b){var c=a.K();a.l=new Lc;a.C=!0;Wn(a,c,b)}function Pn(a){var b=On;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
553
|
+
function Ln(a){var b=On?"connected"==On.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Nn(a)}a.h=b;a.N=b?On.receiver.friendlyName:"";a.j.za()}function Nn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function Vn(a,b){b=wn(b);var c=On;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new P(2,8,8005,d),c=new O("error",(new Map).set("detail",b)),a.B("player",c),a.ac(),b;}}var Sn=.02,Rn=!1,On=null,Un=null,Mn=new Set;
|
|
554
|
+
function Tn(a){Un?window.__onGCastApiAvailable=Un:delete window.__onGCastApiAvailable;Un=null;if(a)for(var b=r(Mn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Zn(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 Kn(c,function(){return $n(e)},function(){return ao(e)},function(f,g){return bo(e,f,g)},function(){return co(e)},function(){return eo(e)},d);fo(this)}u(Zn,fb);q=Zn.prototype;
|
|
555
|
+
q.destroy=function(a){a&&this.g.ac();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.dc=function(){return this.B};q.jf=function(){return this.g.m&&Rn};q.qa=function(){return this.g.qa()};q.Gd=function(){return this.g.Gd()};
|
|
556
|
+
q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=eo(a),A(c,a.g.cast(b),2)):a.h?A(c,a.h.We(),0):c.return()})};q.Ge=function(a){this.g.Ge(a)};q.Sf=function(){Yn(this.g)};q.ac=function(){this.g.ac()};
|
|
557
|
+
q.nf=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.ac();return A(d,c.g.destroy(),2)}c.g=null;c.g=new Kn(a,function(){return $n(c)},function(){return ao(c)},function(e,f){return bo(c,e,f)},function(){return co(c)},function(){return eo(c)},b);c.g.init();B(d)})};
|
|
558
|
+
function fo(a){a.g.init();a.m=new Af;for(var b=r(zn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.qa()||(f=Qa(f),a.j.dispatchEvent(f))});for(var d in Ra)a.m.o(a.h,Ra[d],function(f){a.g.qa()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.wc=e,Object.defineProperty(a.l,b.wc,{configurable:!1,enumerable:!0,get:function(f){return function(){return go(a,f.wc)}}(b),set:function(f){return function(g){var h=f.wc;a.g.qa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={wc:b.wc};a.B={};ho(a,
|
|
559
|
+
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return io(a,f)}})});jo(a);a.j=new fb;a.j.wd=a.l;a.A=new fb;a.A.wd=a.B}function jo(a){var b=new Map;ho(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
|
|
560
|
+
function ho(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=r(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
561
|
+
function eo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.fe(),startTime:null};a.i.pause();for(var c=r(Bn),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(Gn);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(Hn);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 $n(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
|
|
562
|
+
function ao(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
563
|
+
function co(a){for(var b=r(Gn),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(Bn);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(Bn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(Hn);for(k=
|
|
565
564
|
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 O("error",h);a.h.dispatchEvent(h)})}
|
|
566
|
-
function
|
|
567
|
-
function
|
|
568
|
-
if("setVideoContainer"==b)return function(c){return a.h.
|
|
569
|
-
function
|
|
570
|
-
|
|
565
|
+
function go(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):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
566
|
+
function io(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.Ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.nd()};
|
|
567
|
+
if("setVideoContainer"==b)return function(c){return a.h.Oe(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&&(Dn[b]||En[b])||!a.g.qa()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
568
|
+
function bo(a,b,c){a.g.qa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}M("shaka.cast.CastProxy",Zn);Zn.prototype.changeReceiverId=Zn.prototype.nf;Zn.prototype.forceDisconnect=Zn.prototype.ac;Zn.prototype.suggestDisconnect=Zn.prototype.Sf;Zn.prototype.setAppData=Zn.prototype.Ge;Zn.prototype.cast=Zn.prototype.cast;Zn.prototype.receiverName=Zn.prototype.Gd;Zn.prototype.isCasting=Zn.prototype.qa;Zn.prototype.canCast=Zn.prototype.jf;Zn.prototype.getPlayer=Zn.prototype.dc;
|
|
569
|
+
Zn.prototype.getVideo=Zn.prototype.Bb;Zn.prototype.destroy=Zn.prototype.destroy;function ko(a,b,c,d){fb.call(this);var e=this;this.g=a;this.h=b;this.j=new Af;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 Q(function(){lo(e)});mo(this)}u(ko,fb);q=ko.prototype;q.isConnected=function(){return this.H};q.Ug=function(){return this.A};q.uh=function(a){this.i=a};q.ig=function(){this.i=null};
|
|
571
570
|
q.vh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.sh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.rh=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
572
571
|
q.destroy=function(){var a=this,b,c;return K(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),A(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();B(d)})};
|
|
573
|
-
function
|
|
574
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
575
|
-
!1;
|
|
576
|
-
function
|
|
577
|
-
function
|
|
578
|
-
a.g.autoplay=f;b.manifest&&(a.g.play(),
|
|
579
|
-
function
|
|
580
|
-
1);
|
|
581
|
-
function
|
|
582
|
-
"player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return
|
|
583
|
-
function
|
|
584
|
-
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||
|
|
585
|
-
function
|
|
586
|
-
M("shaka.cast.CastReceiver",
|
|
587
|
-
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{
|
|
588
|
-
function
|
|
589
|
-
function
|
|
590
|
-
function
|
|
591
|
-
226,251,75]),m=new Uint8Array([]);k=[{initData:Vf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Eb(g,f.init||a||h||k);if(g=
|
|
592
|
-
function
|
|
593
|
-
var
|
|
572
|
+
function mo(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return no(a)};b.onSenderDisconnected=function(){return no(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&oo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);oo(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 po(a,
|
|
573
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return qo(a,e)};b.start();b=r(zn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return ro(a,"video",e)});for(var d in Ra)a.j.o(a.h,Ra[d],function(e){return ro(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Je(3840,2160):a.h.Je(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
|
|
574
|
+
!1;so(a)});a.j.o(a.g,"playing",function(){a.A=!1;so(a)});a.j.o(a.g,"pause",function(){so(a)});a.j.o(a.h,"unloading",function(){a.A=!0;so(a)});a.j.o(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.A=!0,so(a))})).S(to)})}function no(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;so(a)}
|
|
575
|
+
function so(a){var b;K(function(c){if(1==c.g)return A(c,Promise.resolve(),2);if(!a.h)return c.return();b=new O("caststatuschanged");a.dispatchEvent(b);uo(a)||vo(a);B(c)})}
|
|
576
|
+
function wo(a,b,c){var d,e,f,g,h,k,l,m,p,n;K(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,E(t,5),A(t,a.h.load(b.manifest,b.startTime),7)):A(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=J(t),h=(new Map).set("detail",g),k=new O("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
|
|
577
|
+
a.g.autoplay=f;b.manifest&&(a.g.play(),vo(a));B(t)}})}function ro(a,b,c){a.h&&(lo(a),oo(a,{type:"event",targetName:b,event:c},a.l))}
|
|
578
|
+
function lo(a){a.I.S(xo);for(var b={video:{},player:{}},c=r(An),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 Fn)0==a.m%Fn[e]&&(b.player[e]=a.h[e]());for(var f in Dn)0==a.m%Dn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;oo(a,{type:"update",update:b},a.l);for(var g in En)0==a.m%En[g]&&(b={player:{}},b.player[g]=a.h[g](),oo(a,{type:"update",update:b},a.l));a.F&&(a.m+=
|
|
579
|
+
1);uo(a)}function uo(a){return a.C&&(a.g.duration||a.h.U())?(yo(a),a.C=!1,!0):!1}function yo(a,b){var c={contentId:a.h.fe(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);vo(a,void 0===b?0:b,c)}
|
|
580
|
+
function qo(a,b){var c=xn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;wo(a,c.initState,c.appData);lo(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
581
|
+
"player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return zo(a,g,f,null)},function(h){return zo(a,g,f,h)})}}
|
|
582
|
+
function po(a,b){var c=xn(b.data);switch(c.type){case "PLAY":a.g.play();vo(a);break;case "PAUSE":a.g.pause();vo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),vo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),vo(a));break;case "STOP":a.h.We().then(function(){a.h&&vo(a)});break;case "GET_STATUS":yo(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
583
|
+
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||vo(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&yo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");oo(a,{requestId:Number(c.requestId),type:h},a.B)});break;default:oo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
|
|
584
|
+
function zo(a,b,c,d){a.h&&oo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function oo(a,b,c,d){a.H&&(a=wn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function vo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?Ao:a.h.Pc()?Bo:a.g.paused?Co:Do,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);oo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
|
|
585
|
+
M("shaka.cast.CastReceiver",ko);ko.prototype.destroy=ko.prototype.destroy;ko.prototype.setContentArtist=ko.prototype.rh;ko.prototype.setContentImage=ko.prototype.sh;ko.prototype.setContentTitle=ko.prototype.vh;ko.prototype.clearContentMetadata=ko.prototype.ig;ko.prototype.setContentMetadata=ko.prototype.uh;ko.prototype.isIdle=ko.prototype.Ug;ko.prototype.isConnected=ko.prototype.isConnected;var xo=.5,to=5,Ao="IDLE",Do="PLAYING",Bo="BUFFERING",Co="PAUSED";function Eo(a,b,c){var d=Fo(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 P(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Ce?(e=h.init||e,!1):!0}),f.length&&(a=Go(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=
|
|
586
|
+
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{rf:g,dj:e,drmInfos:a,wf:!0}}function Ho(a,b,c,d){var e=Eo(a,c,d);if(b.wf){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.wf=!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 P(2,4,4008);return e.rf||b.rf}
|
|
587
|
+
function Io(a){var b=0,c=Hc(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=Ec(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
588
|
+
function Jo(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 Ko(a){a=Yf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=md(a.textContent);a=Io(a).filter(function(b){return b.type===Lo})[0];if(!a)return"";a=ed(a.value,!0);return(a=ng(a,"WRMHEADER"))?Jo(a):""}
|
|
589
|
+
function Go(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.Ce];if(g){var h;if(h=Yf(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:Vf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Ce)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,
|
|
590
|
+
226,251,75]),m=new Uint8Array([]);k=[{initData:Vf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Eb(g,f.init||a||h||k);if(g=Mo.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Fo(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=No(c.value))&&b.push(c);return b}
|
|
591
|
+
function No(a){var b=a.getAttribute("schemeIdUri"),c=ag(a,"urn:mpeg:cenc:2013","default_KID"),d=Zf(a,"urn:mpeg:cenc:2013","pssh").map(cg);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:md(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,Ce:b,keyId:c,init:0<e.length?e:null}}
|
|
592
|
+
var Lo=1,Mo=(new Map).set("com.widevine.alpha",function(a){return(a=Yf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Ko).set("com.microsoft.playready.recommendation",Ko).set("com.microsoft.playready.software",Ko).set("com.microsoft.playready.hardware",Ko).set("org.w3.clearkey",function(a){return(a=Yf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Oo(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=
|
|
594
593
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
595
|
-
function
|
|
596
|
-
m)if(p){p=eg(p,"t",kg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Bh:n}),n=k}b=h}return{timescale:d,ya:c,rc:g,
|
|
597
|
-
function
|
|
598
|
-
function
|
|
599
|
-
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return
|
|
600
|
-
function
|
|
601
|
-
function
|
|
602
|
-
function
|
|
603
|
-
d)}function
|
|
604
|
-
function
|
|
605
|
-
function
|
|
606
|
-
function
|
|
607
|
-
function
|
|
608
|
-
I=new
|
|
609
|
-
function
|
|
610
|
-
function
|
|
611
|
-
Infinity,b);f&&(f.segmentIndex=e);return{bc:function(){e&&0!=e.M.length||e.Sc(g);return Promise.resolve(e)}}}function
|
|
612
|
-
function
|
|
613
|
-
function
|
|
614
|
-
Infinity,n
|
|
615
|
-
function
|
|
616
|
-
function
|
|
617
|
-
y=b.timescale,x=b.
|
|
618
|
-
function
|
|
619
|
-
function
|
|
620
|
-
function
|
|
621
|
-
n=r(m);for(t=n.next();!t.done;t=n.next())y=t.value,y.push(
|
|
594
|
+
function Po(a,b){var c=Qo(a,b,"timescale"),d=1;c&&(d=jg(c)||1);var e=Qo(a,b,"duration");c=jg(e||"");"image"==a.L.contentType&&(c=lg(e||""));c&&(c/=d);var f=Qo(a,b,"startNumber");e=Number(Qo(a,b,"presentationTimeOffset"))||0;var g=kg(f||"");if(null==f||null==g)g=1;f=Ro(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.Y.duration||Infinity;f=Xf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=eg(m,"t",kg),t=eg(m,"d",kg);m=eg(m,"r",ig);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
|
|
595
|
+
m)if(p){p=eg(p,"t",kg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Bh:n}),n=k}b=h}return{timescale:d,ya:c,rc:g,sb:e/d||0,Xe:e,timeline:b}}function Qo(a,b,c){return[b(a.L),b(a.wa),b(a.ra)].filter(Bb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
596
|
+
function Ro(a,b,c){return[b(a.L),b(a.wa),b(a.ra)].filter(Bb).map(function(d){return Wf(d,c)}).reduce(function(d,e){return d||e})}
|
|
597
|
+
function So(a,b,c,d,e,f){for(var g=ag(a,"http://www.w3.org/1999/xlink","href"),h=ag(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 cf(new P(2,4,4028));if("onLoad"!=h)return cf(new P(2,4,4027));var m=Cb([d],[g]);return e.request(0,rf(m,b)).na(function(p){p=pg(p.data,a.tagName);if(!p)return cf(new P(2,4,4001,g));
|
|
598
|
+
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return To(a,b,c,m[0],e,f+1)})}
|
|
599
|
+
function To(a,b,c,d,e,f){f=void 0===f?0:f;if(ag(a,"http://www.w3.org/1999/xlink","href")){var g=So(a,b,c,d,e,f);c&&(g=g.na(void 0,function(){return To(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"==ag(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(To(k,b,c,d,e,f)));return gf(g).na(function(){return a})};function Uo(a,b,c,d,e,f,g){var h,k=(new Lf).X("sidx",function(l){h=Vo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
|
|
600
|
+
function Vo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.qc(),m=g.reader.qc();g.reader.skip(2);var p=g.reader.xe();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.R(),t=(n&2147483648)>>>31;n&=2147483647;var y=g.reader.R();g.reader.skip(4);if(1==t)throw new P(2,3,3006);h.push(new yi(l/k+c,(l+y)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=y;a+=n}g.parser.stop();return h};function Wo(a){this.h=Hc(a);this.g=new If(this.h,0)}Wo.prototype.Da=function(){return this.g.Da()};
|
|
601
|
+
function Xo(a){var b=Yo(a);if(7<b.length)throw new P(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=Yo(a);a:{d=r(Zo);for(var e=d.next();!e.done;e=d.next())if(Cc(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 P(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=Hc(a.h,a.g.oa(),b);a.g.skip(b);return new $o(c,
|
|
602
|
+
d)}function Yo(a){var b=a.g.oa(),c=a.g.rb();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ec(a.h,b,c)}var Zo=[[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 $o(a,b){this.id=a;this.g=b}
|
|
603
|
+
function ap(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(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 bp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Wo(a.g);for(var p=null,n=null;a.Da();){var t=Xo(a);if(187==t.id){var y=cp(t);y&&(t=c*y.Ch,y=b+y.jh,null!=p&&m.push(new yi(p+g,t+g,l,n,y-1,f,g,h,k)),p=t,n=y)}}null!=p&&m.push(new yi(p+g,d+g,l,n,null,f,g,h,k));return m}
|
|
604
|
+
function cp(a){var b=new Wo(a.g);a=Xo(b);if(179!=a.id)throw new P(2,3,3013);a=ap(a);b=Xo(b);if(183!=b.id)throw new P(2,3,3012);b=new Wo(b.g);for(var c=0;b.Da();){var d=Xo(b);if(241==d.id){c=ap(d);break}}return{Ch:a,jh:c}};function dp(a,b){b=Ro(a,b,"Initialization");if(!b)return null;var c=a.L.Pa,d=b.getAttribute("sourceURL");d&&(c=Cb(a.L.Pa,[d]));d=0;var e=null;if(b=eg(b,"range",hg))d=b.start,e=b.end;return new wi(function(){return c},d,e,ep(a))}
|
|
605
|
+
function fp(a,b){var c=Number(Qo(a,gp,"presentationTimeOffset"))||0,d=Qo(a,gp,"timescale"),e=1;d&&(e=jg(d)||1);var f=c/e||0,g=dp(a,gp);hp(a,g);var h=kf(a);return{bc:function(){var k=Ro(h,gp,"RepresentationIndex"),l=h.L.Pa;k&&(k=k.getAttribute("sourceURL"))&&(l=Cb(h.L.Pa,[k]));k=kp(h);return lp(h,b,g,l,k.start,k.end,f)}}}
|
|
606
|
+
function lp(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,C,z,D,G;return K(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.kb||!a.Y.ge,l=a.Y.start,m=a.Y.duration,p=a.L.mimeType.split("/")[1],n=b,t=null,y=[n(d,e,f),"webm"==p?n(c.Ra(),c.Va,c.Ca):null],n=null,A(F,Promise.all(y),2);x=F.h;v=x[0];w=x[1]||null;C=null;z=l-g;D=l;G=m?l+m:Infinity;if("mp4"==p)var H=Uo(v,e,d,c,z,D,G);else{H=new Wo(w);if(440786851!=Xo(H).id)throw new P(2,3,3008);var I=Xo(H);if(408125543!=I.id)throw new P(2,3,3009);H=I.g.byteOffset;
|
|
607
|
+
I=new Wo(I.g);for(var L=null;I.Da();){var N=Xo(I);if(357149030==N.id){L=N;break}}if(!L)throw new P(2,3,3010);L=new Wo(L.g);N=1E6;for(I=null;L.Da();){var V=Xo(L);if(2807729==V.id)N=ap(V);else if(17545==V.id)if(4==V.g.byteLength)I=V.g.getFloat32(0);else if(8==V.g.byteLength)I=V.g.getFloat64(0);else throw new P(2,3,3003);}if(null==I)throw new P(2,3,3011);L=N/1E9;I*=L;N=Xo(new Wo(v));if(475249515!=N.id)throw new P(2,3,3007);H=bp(N,H,L,I,d,c,z,D,G)}C=H;h.mc(C);t=new Dj(C);k&&t.yb(D,G,!0);return F.return(t)})}
|
|
608
|
+
function gp(a){return a.Xc}function kp(a){var b=Ro(a,gp,"RepresentationIndex");a=Qo(a,gp,"indexRange");a=hg(a||"");b&&(a=eg(b,"range",hg,a));return a}function hp(a,b){mp(a,b);if(!kp(a))throw new P(2,4,4002);}function mp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Ib&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
|
|
609
|
+
function ep(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.xd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function np(a,b){var c=dp(a,op),d=pp(a);if(!d.ya&&!d.timeline&&1<d.kc.length)throw new P(2,4,4002);if(!d.ya&&!a.Y.duration&&!d.timeline&&1==d.kc.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(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=qp(a.Y.start,a.Y.duration,a.L.Pa,d,c);b=!e;e?e.lc(g,a.presentationTimeline.pb()):e=new Dj(g);a.presentationTimeline.mc(g);a.kb&&a.Y.ge||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
|
|
610
|
+
Infinity,b);f&&(f.segmentIndex=e);return{bc:function(){e&&0!=e.M.length||e.Sc(g);return Promise.resolve(e)}}}function op(a){return a.Db}function pp(a){var b=rp(a);a=Po(a,op);var c=a.rc;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,rc:c,sb:a.sb,timeline:a.timeline,kc:b}}
|
|
611
|
+
function qp(a,b,c,d,e){var f=d.kc.length;d.timeline&&d.timeline.length!=d.kc.length&&(f=Math.min(d.timeline.length,d.kc.length));for(var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Sd:m.Sd},p++){var n=d.kc[p];m.Sd=Cb(c,[n.$g]);var t=void 0;t=null!=d.ya?l+d.ya:d.timeline?d.timeline[p].end:l+b;k.push(new yi(a+l,a+t,function(y){return function(){return y.Sd}}(m),n.start,n.end,e,g,a,h));l=t}return k}
|
|
612
|
+
function rp(a){return[a.L.Db,a.wa.Db,a.ra.Db].filter(Bb).map(function(b){return Xf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ef&&(a.Ef=!0);var c=b.getAttribute("media");b=eg(b,"mediaRange",hg,{start:0,end:null});return{$g:c,start:b.start,end:b.end}})};function sp(a,b,c,d,e,f){var g=tp(a),h=up(a);vp(h);var k=kf(a);if(h.Oc)return mp(a,g),{bc:function(){var t=Oo(h.Oc,k.L.id,null,k.bandwidth||null,null);t=Cb(k.L.Pa,[t]);return lp(k,b,g,t,0,null,h.sb)}};if(h.ya)return d||"image"===a.wa.contentType||(a.presentationTimeline.re(h.ya),a.presentationTimeline.se(a.Y.start)),{bc:function(){return wp(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=xp(k,h,g);c=a.Y.start;var p=a.Y.duration?a.Y.start+a.Y.duration:
|
|
613
|
+
Infinity,n=!(a.kb&&a.Y.ge);l?(n&&(new Dj(m)).yb(c,p,!0),l.lc(m,a.presentationTimeline.pb())):l=new Dj(m);a.presentationTimeline.mc(m);n&&l.yb(c,p);d&&a.kb&&(d.segmentIndex=l);return{bc:function(){l&&0!=l.M.length||l.Sc(m);return Promise.resolve(l)}}}function yp(a){return a.Yc}function up(a){var b=Po(a,yp),c=Qo(a,yp,"media");a=Qo(a,yp,"index");return{ya:b.ya,timescale:b.timescale,rc:b.rc,sb:b.sb,Xe:b.Xe,timeline:b.timeline,pe:c,Oc:a}}
|
|
614
|
+
function vp(a){var b=a.Oc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Oc&&(a.timeline=null),a.ya=null);if(!a.Oc&&!a.pe)throw new P(2,4,4002);}
|
|
615
|
+
function wp(a,b,c,d,e){function f(L){var N=(L-t)*n,V=N+b.sb,aa=N+l;N=aa+n;var ea=Math.min(N,h());aa=new yi(aa,ea,function(){var la=Oo(x,w,L,v,V*y);return Cb(C,[la])},0,null,d,z,l,h());aa.j=N;return aa}function g(){var L=[Math.max(k.pb(),l),Math.min(k.Jb(),h())].map(function(N){return N-l});return[Math.ceil(L[0]/n),Math.ceil(L[1]/n)-1].map(function(N){return N+t})}function h(){var L=null!=m&&e[m]||p;return L?l+L:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.ra.id,p=a.Y.duration,n=b.ya,t=b.rc,
|
|
616
|
+
y=b.timescale,x=b.pe,v=a.bandwidth||null,w=a.L.id,C=a.L.Pa,z=l-b.sb,D=g();a=a.kb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var G=a;G<=D;++G){var F=f(G);c.push(F)}var H=new Dj(c);c=k.Jb()<h();G=k.U();if(c||G){var I=Math.max(a,D+1);H.Jd(n,function(){var L=k.pb();H.Hb(L);var N=r(g());N.next();N=N.next().value;for(var V=[];I<=N;){var aa=f(I);V.push(aa);I++}return L>h()&&!V.length?null:V})}return Promise.resolve(H)}
|
|
617
|
+
function xp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.sb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Rd:h.Rd,Vd:h.Vd,Yd:h.Yd,Od:h.Od,$d:h.$d,Pd:h.Pd},k++){var l=b.timeline[k],m=l.start,p=l.Bh;l=l.end;h.Yd=k+b.rc;h.$d=p+b.Xe;h.Vd=a.L.id;h.Od=a.bandwidth||null;h.Rd=b.pe;h.Pd=a.L.Pa;g.push(new yi(d+m,d+l,function(n){return function(){var t=Oo(n.Rd,n.Vd,n.Yd,n.Od||null,n.$d);return Cb(n.Pd,[t]).map(function(y){return y.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
618
|
+
function tp(a){var b=Qo(a,yp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Pa;return new wi(function(){var f=Oo(b,c,null,d,null);return Cb(e,[f])},0,null,ep(a))};function zp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}zp.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=[]};
|
|
619
|
+
function Ap(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L,N,V,aa,ea,la,Ba,Ia;return K(function(Ja){switch(Ja.g){case 1:d=Jb;Bp(b);Cp(b);Dp(b);Ep(b);if(!c&&1==b.length){e=b[0];a.g=e.jd;a.h=e.Ld;a.j=e.textStreams;a.i=e.imageStreams;Ja.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 Ja.return();k=b.map(function(Na){return Na.jd});l=b.map(function(Na){return Na.Ld});m=b.map(function(Na){return Na.textStreams});p=b.map(function(Na){return Na.imageStreams});
|
|
620
|
+
n=r(m);for(t=n.next();!t.done;t=n.next())y=t.value,y.push(Fp(d.ha));x=r(p);for(v=x.next();!v.done;v=x.next())w=v.value,w.push(Fp(d.Bc));return A(Ja,Gp(a.g,k,f,Hp,Ip),3);case 3:return A(Ja,Gp(a.h,l,f,Hp,Ip),4);case 4:return A(Ja,Gp(a.j,m,f,Hp,Ip),5);case 5:return A(Ja,Gp(a.i,p,f,Hp,Ip),2);case 2:C=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,aa=r(a.h),ea=aa.next();!ea.done;ea=aa.next())la=ea.value,Ba=bh(V.drmInfos,la.drmInfos),V.drmInfos.length&&la.drmInfos.length&&
|
|
622
621
|
!Ba.length||(Ia=C++,z.push({id:Ia,language:V.language,primary:V.primary,audio:V,video:la,bandwidth:(V.bandwidth||0)+(la.bandwidth||0),drmInfos:Ba,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(D=a.h.concat(a.g),G=r(D),F=G.next();!F.done;F=G.next())H=F.value,I=C++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.La?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
623
|
-
a.l=z;B(Ja)}})}function
|
|
624
|
-
function
|
|
625
|
-
function
|
|
626
|
-
function
|
|
627
|
-
function
|
|
628
|
-
h.value,k.push(
|
|
622
|
+
a.l=z;B(Ja)}})}function Bp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.jd),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.jd=c}}
|
|
623
|
+
function Dp(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}}
|
|
624
|
+
function Cp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Ld),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)&&Hf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Ld=c}}
|
|
625
|
+
function Ep(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}}
|
|
626
|
+
function Jp(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L,N,V;return K(function(aa){switch(aa.g){case 1:b=Jb;if(1==a.length)return aa.return(a[0]);c=a.map(function(ea){return ea.filter(function(la){return la.type==b.Gb})});d=a.map(function(ea){return ea.filter(function(la){return la.type==b.La})});e=a.map(function(ea){return ea.filter(function(la){return la.type==b.ha})});f=a.map(function(ea){return ea.filter(function(la){return la.type==b.Bc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
|
|
627
|
+
h.value,k.push(Kp(b.ha));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(Kp(b.Bc));return A(aa,Gp([],c,0,Lp,Mp),2);case 2:return n=aa.h,A(aa,Gp([],d,0,Lp,Mp),3);case 3:return t=aa.h,A(aa,Gp([],e,0,Lp,Mp),4);case 4:return y=aa.h,A(aa,Gp([],f,0,Lp,Mp),5);case 5:x=aa.h;v=0;if(t.length&&n.length)for(G=r(n),F=G.next();!F.done;F=G.next())for(H=F.value,I=r(t),L=I.next();!L.done;L=I.next())N=L.value,V=v++,N.variantIds.push(V),H.variantIds.push(V);else for(w=t.concat(n),C=r(w),z=C.next();!z.done;z=
|
|
629
628
|
C.next())D=z.value,D.variantIds=[v++];return aa.return(t.concat(n).concat(y).concat(x))}})}
|
|
630
|
-
function
|
|
631
|
-
z.next())for(D=t.value,G={},F=r(D),v=F.next();!v.done;G={
|
|
632
|
-
function
|
|
633
|
-
function
|
|
634
|
-
function
|
|
635
|
-
function
|
|
636
|
-
function
|
|
637
|
-
function
|
|
638
|
-
(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=
|
|
639
|
-
function
|
|
640
|
-
function
|
|
641
|
-
function
|
|
642
|
-
function
|
|
643
|
-
d=
|
|
644
|
-
function
|
|
645
|
-
function
|
|
646
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
647
|
-
function
|
|
648
|
-
function
|
|
649
|
-
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 K(function(c){if(1==c.g)return E(c,2),A(c,
|
|
650
|
-
function
|
|
651
|
-
function
|
|
652
|
-
function
|
|
653
|
-
"timeShiftBufferDepth",gg);x=a.g.dash.ignoreSuggestedPresentationDelay;v=null;x||(v=eg(b,"suggestedPresentationDelay",gg));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=eg(b,"maxSegmentDuration",gg));z=b.getAttribute("type")||"static";if(a.i)for(D=a.i.presentationTimeline,G=r(Object.values(a.l)),F=G.next();!F.done;F=G.next())H=F.value,H.segmentIndex&&H.segmentIndex.Hb(D.
|
|
654
|
-
!isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);D.
|
|
655
|
-
D.
|
|
656
|
-
function
|
|
657
|
-
null;break}g=m+t}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,
|
|
658
|
-
function
|
|
659
|
-
}d=c.filter(function(m){return!m.
|
|
660
|
-
[]:
|
|
661
|
-
function
|
|
662
|
-
function
|
|
629
|
+
function Gp(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L;return K(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 A(N,Np(m,b,c,e,g),5);case 5:p=N.h;if(!p)throw new P(2,4,4037);l=k.next();N.D(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(y=t.value,x=r(y),v=x.next();!v.done;v=x.next())w=v.value,(C=Op(w,b,d,e,g))&&a.push(C);z=r(g);for(t=z.next();!t.done;t=
|
|
630
|
+
z.next())for(D=t.value,G={},F=r(D),v=F.next();!v.done;G={wb:G.wb},v=F.next())if(G.wb=v.value,H=G.wb.type==f.ha&&!G.wb.language,I=G.wb.type==f.Bc&&!G.wb.tilesLayout,!H&&!I&&(L=a.some(function(V){return function(aa){return aa.mimeType==V.wb.mimeType&&yd(aa.codecs)==yd(V.wb.codecs)}}(G))))throw new P(2,4,4037);return N.return(a)}})}
|
|
631
|
+
function Np(a,b,c,d,e){return K(function(f){if(1==f.g)return Pp(b,a),a.matchedStreams?a.segmentIndex?A(f,Qp(a,c),2):f.D(2):f.return(!1);Rp(a,c,d,e);return f.return(!0)})}
|
|
632
|
+
function Qp(a,b){var c,d,e,f,g,h,k;return K(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 A(l,Promise.all(c),2)}if(a.segmentIndex instanceof Gj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);B(l)})}
|
|
633
|
+
function Op(a,b,c,d,e){var f=c(a);Pp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Gj;return A(g,Qp(f,0),0)})});if(!f.matchedStreams)return null;Rp(f,0,d,e);return f}function Rp(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)}}
|
|
634
|
+
function Hp(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}
|
|
635
|
+
function Lp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
636
|
+
function Ip(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(ja(f),ja(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=bh(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
|
|
637
|
+
(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=Hp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Ip(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Ip(a.trickModeVideo,b)}
|
|
638
|
+
function Mp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ja(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
|
|
639
|
+
function Pp(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Sp,video:Sp,text:Tp,image:Up}[e.type],g={audio:Vp,video:Wp,text:Xp,image:Yp}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function Sp(a,b){var c;!(c=b.mimeType!=a.mimeType||yd(b.codecs)!=yd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<bh(a,b).length:1));return c?!1:!0}
|
|
640
|
+
function Tp(a,b){return a.language?b.language?0==Sb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Up(a){return a.tilesLayout?!0:!1}
|
|
641
|
+
function Vp(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;
|
|
642
|
+
d=Zp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==$p)return!0;if(d==aq)return!1;d=Zp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==$p?!0:d==aq?!1:a.bandwidth&&bq(a.bandwidth,b.bandwidth,c.bandwidth)==$p?!0:!1}
|
|
643
|
+
function Wp(a,b,c){if(a.id==c.id)return!0;var d=Zp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==$p)return!0;if(d==aq)return!1;if(a.frameRate){d=Zp(a.frameRate,b.frameRate,c.frameRate);if(d==$p)return!0;if(d==aq)return!1}return a.bandwidth&&bq(a.bandwidth,b.bandwidth,c.bandwidth)==$p?!0:!1}
|
|
644
|
+
function Xp(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!=
|
|
645
|
+
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Yp(a,b,c){return a.id==c.id?!0:Zp(a.width*a.height,b.width*b.height,c.width*c.height)==$p?!0:!1}function Kp(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}}
|
|
646
|
+
function Fp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dj([]),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}}
|
|
647
|
+
function Zp(a,b,c){if(b==a&&a!=c)return aq;if(c==a&&a!=b)return $p;if(b>a){if(c<=a||c-a<b-a)return $p;if(c-a>b-a)return aq}else{if(c>a)return aq;if(a-c<a-b)return $p;if(a-c>a-b)return aq}return cq}function bq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?$p:b<a?aq:cq}var $p=1,cq=0,aq=-1;function dq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new zp;this.H=0;this.J=new $b(5);this.G=new Q(function(){eq(a)});this.A=new lf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=dq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,A(e,fq(c),2);d=e.h;c.h&&gq(c,d);if(!c.h)throw new P(2,7,7001);return e.return(c.i)})};
|
|
648
|
+
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 K(function(c){if(1==c.g)return E(c,2),A(c,fq(a),4);if(2!=c.g)return va(c,0);b=J(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
|
|
649
|
+
function fq(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=rf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),mf(a.A,e),A(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 A(k,hq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
|
|
650
|
+
function hq(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=pg(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(iq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=To(d,a.g.retryParameters,f,c,a.h.networkingEngine);mf(a.A,g);return A(k,g.promise,2)}h=k.h;return k.return(iq(a,h,c))})}
|
|
651
|
+
function iq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L,N,V,aa,ea,la,Ba,Ia,Ja,Na;return K(function(Oa){switch(Oa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Xf(b,"Location").map(cg).filter(Bb);0<f.length&&(g=Cb(e,f),e=a.m=g);h=Xf(b,"BaseURL");k=h.map(cg);l=Cb(e,k);m=0;h&&h.length&&(m=eg(h[0],"availabilityTimeOffset",lg)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=eg(b,"minBufferTime",gg)||0);a.H=eg(b,"minimumUpdatePeriod",gg,-1);t=eg(b,"availabilityStartTime",fg);y=eg(b,
|
|
652
|
+
"timeShiftBufferDepth",gg);x=a.g.dash.ignoreSuggestedPresentationDelay;v=null;x||(v=eg(b,"suggestedPresentationDelay",gg));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=eg(b,"maxSegmentDuration",gg));z=b.getAttribute("type")||"static";if(a.i)for(D=a.i.presentationTimeline,G=r(Object.values(a.l)),F=G.next();!F.done;F=G.next())H=F.value,H.segmentIndex&&H.segmentIndex.Hb(D.pb());else I=a.g.defaultPresentationDelay||1.5*n,L=null!=v?v:I,D=new R(t,L,a.g.dash.autoCorrectDrift);D.Zc("static"==z);(N=D.U())&&
|
|
653
|
+
!isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);D.Me(y);V=b.getAttribute("profiles")||"";aa={kb:"static"!=z,presentationTimeline:D,ra:null,Y:null,wa:null,L:null,bandwidth:0,Ef:!1,$b:m,profiles:V.split(",")};ea=jq(a,aa,l,b);la=ea.duration;Ba=ea.periods;"static"!=z&&ea.uf||D.Ua(la||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?D.Mf(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.");
|
|
654
|
+
D.re(C||1);return A(Oa,Ap(a.j,Ba,aa.kb),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);Oa.D(3);break}a.i={presentationTimeline:D,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!D.Uf()){Oa.D(4);break}Ja=Xf(b,"UTCTiming");return A(Oa,kq(a,l,Ja),5);case 5:Na=Oa.h;if(!a.h)return Oa.return();D.Nf(Na);case 4:D.me();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),B(Oa)}})}
|
|
655
|
+
function jq(a,b,c,d){var e=eg(d,"mediaPresentationDuration",gg),f=[],g=0;d=Xf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=eg(k,"start",gg,g),p=k.id,n=eg(k,"duration",gg),t=null;if(l){var y=eg(l,"start",gg);null!=y&&(t=y-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=lq(a,b,c,{start:m,duration:t,node:k,ge:null==t||!l});f.push(g);b.ra.id&&t&&(a.N[b.ra.id]=t);if(null==t){g=
|
|
656
|
+
null;break}g=m+t}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,uf:!1}:{periods:f,duration:g,uf:!0}}
|
|
657
|
+
function lq(a,b,c,d){b.ra=mq(d.node,null,c);b.Y=d;b.ra.$b=b.$b;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=Xf(d.node,"EventStream");c=b.presentationTimeline.pb();e=r(e);for(var f=e.next();!f.done;f=e.next())nq(a,d.start,d.duration,f.value,c);c=Xf(d.node,"AdaptationSet").map(function(m){return oq(a,b,m)}).filter(Bb);if(b.kb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.mh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
|
|
658
|
+
}d=c.filter(function(m){return!m.Te});c=c.filter(function(m){return m.Te});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Te.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={fd:h.fd},l=k.next())h.fd=l.value,h.fd.trickModeVideo=e.streams.find(function(m){return function(p){return yd(m.fd.codecs)==yd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:pq(d,"audio");g=a.g.disableVideo?[]:pq(d,"video");f=a.g.disableText?
|
|
659
|
+
[]:pq(d,Ib);c=a.g.disableThumbnails?[]:pq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.ra.id,jd:d,Ld:e,textStreams:g,imageStreams:f}}
|
|
660
|
+
function pq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
661
|
+
function oq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.wa=mq(c,b.ra,null);var e=!1,f=Xf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter(Bb),h=void 0,k=b.wa.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=
|
|
663
662
|
l}}var p;m=Xf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=Xf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
|
|
664
663
|
10)));m=Xf(c,"Accessibility");var y=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var x=r(t),v=x.next();!v.done;v=x.next()){var w=v.value,C=v=void 0;w.includes("=")?(w=w.split("="),v=w[0].startsWith("CC")?w[0]:"CC"+w[0],C=w[1]||"und"):(v="CC"+n,2==t.length?n+=2:n++,C=w);y.set(v,Mb(C))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
|
|
665
|
-
1,null!=t)for(t=r(t.split(";")),v=t.next();!v.done;v=t.next())v=v.value,w=x=void 0,v.includes("=")?(v=v.split("="),x="svc"+v[0],w=v[1].split(",")[0].split(":").pop()):(x="svc"+n,n++,w=v),y.set(x,Mb(w));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Xf(c,"ContentProtection");var z=
|
|
666
|
-
(l=l[0],l.textContent&&(G=l.textContent));l=Xf(c,"Representation");c=l.map(function(F){if(F=
|
|
667
|
-
m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ja(t.keyIds),ja(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter(Bb);return{id:b.wa.id||"__fake__"+a.I++,contentType:b.wa.contentType,language:D,ej:e,streams:c,drmInfos:z.drmInfos,
|
|
668
|
-
function
|
|
669
|
-
throw H;}t=Xf(l,"ContentProtection");t=
|
|
670
|
-
(z=l.getAttribute("value")),!z))return null;var D;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"))&&(D="PQ");var G=b.L.id?b.ra.id+","+b.L.id:"",F={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,I,L;return K(function(N){if(1==N.g){I=(H=G&&b.
|
|
664
|
+
1,null!=t)for(t=r(t.split(";")),v=t.next();!v.done;v=t.next())v=v.value,w=x=void 0,v.includes("=")?(v=v.split("="),x="svc"+v[0],w=v[1].split(",")[0].split(":").pop()):(x="svc"+n,n++,w=v),y.set(x,Mb(w));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Xf(c,"ContentProtection");var z=Eo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),D=Mb(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Xf(c,"Label"))&&l.length&&
|
|
665
|
+
(l=l[0],l.textContent&&(G=l.textContent));l=Xf(c,"Representation");c=l.map(function(F){if(F=qq(a,b,z,h,D,G,e,g,y,F))F.hdr=F.hdr||p;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.wa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.wa.contentType||"application"==b.wa.contentType)for(b.wa.contentType=rq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.wa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
666
|
+
m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ja(t.keyIds),ja(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter(Bb);return{id:b.wa.id||"__fake__"+a.I++,contentType:b.wa.contentType,language:D,ej:e,streams:c,drmInfos:z.drmInfos,Te:f,mh:k}}
|
|
667
|
+
function qq(a,b,c,d,e,f,g,h,k,l){b.L=mq(l,b.wa,null);a.C=Math.min(a.C,b.L.$b);if(!sq(b.L))return null;var m=b.Y.start;b.bandwidth=eg(l,"bandwidth",jg)||0;var p=b.L.contentType,n=p==Ib||"application"==p;p="image"==p;try{var t=function(H,I,L){return tq(a,H,I,L)};if(b.L.Xc)var y=fp(b,t);else if(b.L.Db)y=np(b,a.l);else if(b.L.Yc)y=sp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var x=b.L.Pa,v=b.Y.duration||0;y={bc:function(){return Promise.resolve(Fj(m,v,x))}}}}catch(H){if((n||p)&&4002==H.code)return null;
|
|
668
|
+
throw H;}t=Xf(l,"ContentProtection");t=Ho(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Xf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var C=!1;n&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Xf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
669
|
+
(z=l.getAttribute("value")),!z))return null;var D;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"))&&(D="PQ");var G=b.L.id?b.ra.id+","+b.L.id:"",F={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,I,L;return K(function(N){if(1==N.g){I=(H=G&&b.kb&&a.l[G])?a.l[G]:F;if(I.segmentIndex)return N.D(0);L=I;return A(N,y.bc(),3)}L.segmentIndex=N.h;B(N)})},closeSegmentIndex:function(){F.segmentIndex&&
|
|
671
670
|
(F.segmentIndex.release(),F.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.wa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.xd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,
|
|
672
|
-
hdr:D,tilesLayout:z,matchedStreams:[]};G&&b.
|
|
673
|
-
function
|
|
674
|
-
m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Xf(a,"AudioChannelConfiguration");m=
|
|
671
|
+
hdr:D,tilesLayout:z,matchedStreams:[]};G&&b.kb&&!a.l[G]&&(a.l[G]=F);return F}function eq(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,E(d,2),A(d,fq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=J(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();gq(a,b);B(d)}})}function gq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,ac(a.J)))}
|
|
672
|
+
function mq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,xd:null,audioSamplingRate:null,$b:0};c=c||b.Pa;var d=Xf(a,"BaseURL"),e=d.map(cg),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=eg(a,"frameRate",mg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Xf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
|
|
673
|
+
m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Xf(a,"AudioChannelConfiguration");m=uq(m)||b.xd;n=eg(a,"audioSamplingRate",kg)||b.audioSamplingRate;f||(f=rq(g,h));var t=Wf(a,"SegmentBase"),y=Wf(a,"SegmentTemplate"),x=t?eg(t,"availabilityTimeOffset",lg)||0:0,v=y?eg(y,"availabilityTimeOffset",lg)||0:0;d=d&&d.length?eg(d[0],"availabilityTimeOffset",lg)||0:0;d=b.$b+d+x+v;return{Pa:Cb(c,e),Xc:t||b.Xc,Db:Wf(a,"SegmentList")||b.Db,Yc:y||b.Yc,width:eg(a,"width",kg)||b.width,height:eg(a,
|
|
675
674
|
"height",kg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),xd:m,audioSamplingRate:n,$b:d}}
|
|
676
|
-
function
|
|
677
|
-
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
|
|
678
|
-
function
|
|
679
|
-
function
|
|
680
|
-
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}p.D(9);break;case 7:return A(p,
|
|
675
|
+
function uq(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=
|
|
676
|
+
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 sq(a){var b=a.Xc?1:0;b+=a.Db?1:0;b+=a.Yc?1:0;if(0==b)return a.contentType==Ib||"application"==a.contentType?!0:!1;1!=b&&(a.Xc&&(a.Db=null),a.Yc=null);return!0}
|
|
677
|
+
function vq(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=Cb(b,[c]),f=rf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),mf(a.A,g),A(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())})}
|
|
678
|
+
function kq(a,b,c){var d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){p.D(4);break}h=g.value;E(p,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return p.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 p.D(8);
|
|
679
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}p.D(9);break;case 7:return A(p,vq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return A(p,vq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:va(p,
|
|
681
680
|
3);break;case 5:J(p);case 3:g=f.next();p.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!"),p.return(0)}})}
|
|
682
|
-
function
|
|
683
|
-
function
|
|
684
|
-
|
|
685
|
-
function
|
|
686
|
-
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=
|
|
687
|
-
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new
|
|
688
|
-
var
|
|
689
|
-
M("shaka.net.DataUriPlugin",
|
|
690
|
-
q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,
|
|
691
|
-
q.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.m==
|
|
692
|
-
function
|
|
681
|
+
function nq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=eg(d,"timescale",kg)||1;d=r(Xf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=eg(k,"presentationTime",kg)||0,m=eg(k,"duration",kg)||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))}}
|
|
682
|
+
function tq(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=xf,f=Vj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),mf(a.A,h),A(l,h.promise,2);k=l.h;return l.return(k.data)})}function rq(a,b){return Cd(wd(a,b))?Ib:a.split("/")[0]}M("shaka.dash.DashParser",dq);hh.mpd=function(){return new dq};fh["application/dash+xml"]=function(){return new dq};fh["video/vnd.mpeg.dash.mpd"]=function(){return new dq};function wq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function xq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}xq.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};
|
|
683
|
+
xq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function W(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function yq(a,b){a=a.getAttribute(b);if(!a)throw new P(2,4,4023,b);return a.value}function zq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function Aq(a,b){this.name=a;this.value=b};function Bq(a,b){return a.filter(function(c){return c.name==b})}function Cq(a,b){return a.filter(function(c){return yq(c,"TYPE")==b})}function Dq(a,b){a=Bq(a,b);return a.length?a[0]:null}function Eq(a,b){var c=0;c=void 0===c?0:c;return(a=Dq(a,b))?Number(a.value):c}function Fq(a,b){return Cb([a],[b])[0]};function Gq(a){this.h=a;this.g=0}function Hq(a){Iq(a,/[ \t]+/gm)}function Iq(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Jq(a){return a.g==a.h.length?null:(a=Iq(a,/[^ \t\n]*/gm))?a[0]:null};function Kq(){this.g=0}
|
|
684
|
+
function Lq(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 P(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=Mq(a,g),--a.g,Nq.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=Mq(a,h);if(Oq.includes(h.name)){if(1!=b)throw new P(2,4,4017);
|
|
685
|
+
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=Mq(a,m),Nq.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"==W(m,"TYPE")?k.push(m):"MAP"==W(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Fq(d,m.trim()),h&&g.push(h),e.push(new zq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new zq("",g,k)));return new wq(c,b,f,e)}f.push(h);
|
|
686
|
+
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Aq("URI",k)),e=!0)}}return new wq(c,b,f)}function Mq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new P(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Gq(d);var f;(f=Iq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Iq(d,g);)c.push(new Aq(f[1],f[2]||f[3])),Hq(d)}return new xq(a,b,c,e)}
|
|
687
|
+
var Nq="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(" "),Oq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Pq(){}function Qq(a){try{var b=Rq(a);return ef({uri:a,If:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return cf(c)}}function Rq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(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}}
|
|
688
|
+
M("shaka.net.DataUriPlugin",Pq);Pq.parse=Qq;of("data",Qq);function Sq(){var a=this;this.g=this.i=null;this.Aa=1;this.A=new Map;this.C=new Map;this.ua=new Set;this.h=new Map;this.j=null;this.N="";this.va=new Kq;this.ma=0;this.T=!1;this.P=null;this.$=Infinity;this.F=new Q(function(){Tq(a)});this.m=Uq;this.J=null;this.ba=0;this.H=Infinity;this.Z=this.ea=0;this.G=new lf;this.I=[];this.K=new Map;this.B=new Map;this.aa=new Map;this.l=!1}q=Sq.prototype;q.configure=function(a){this.g=a};
|
|
689
|
+
q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,Vq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,A(f,Wq(c,d.data,a),3);e=c.ma;0<e&&c.F.S(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.ua.clear();this.J=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
|
|
690
|
+
q.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.m==Uq)return h.return();b=[];c=Array.from(a.h.values());return c.length?A(h,Xq(a,c[0]),2):h.D(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Xq(a,c[d]));return A(h,Promise.all(b),4)}Yq(a);e=c.some(function(k){return 0==k.Bf});e||(f=Zq,$q(a,f.Zf),g=c.map(function(k){return k.Qc}),a.j.Ua(Math.min.apply(Math,ja(g))),a.i.updateDuration());B(h)})};
|
|
691
|
+
function Xq(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return K(function(y){if(1==y.g)return c=b.$f,d=new lb(c),a.l&&b.fg&&ob(d,new qb("_HLS_skip=YES")),A(y,Vq(a,d.toString()),2);e=y.h;f=Lq(a.va,e.data,e.uri);if(1!=f.type)throw new P(2,4,4017);g=Bq(f.g,"EXT-X-DEFINE");h=ar(a,g);k=b.stream;l=br(a,f,k.type,b.Rc,h);a.I.push(l);k.segmentIndex.lc(l,a.j.pb());l.length&&(m=Eq(f.g,"EXT-X-MEDIA-SEQUENCE"),p=b.Rc.get(m),k.segmentIndex.Hb(p));n=l[l.length-1];if(t=Dq(f.g,"EXT-X-ENDLIST"))b.Bf=!0,b.Qc=n.endTime;B(y)})}
|
|
693
692
|
q.onExpirationUpdated=function(){};
|
|
694
|
-
function
|
|
695
|
-
|
|
696
|
-
function
|
|
697
|
-
!0}}}function
|
|
698
|
-
function
|
|
699
|
-
p=
|
|
700
|
-
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 P(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?
|
|
701
|
-
0),a.j.Zc(!0));if(a.m!=
|
|
702
|
-
sg.createSegmentIndex(),0)})})),9);case 9:Vc=r(Oa);for(Db=Vc.next();!Db.done;Db=Vc.next())Kd=Db.value,a.I.push(Kd.segmentIndex.M);
|
|
703
|
-
function
|
|
704
|
-
function
|
|
705
|
-
function
|
|
706
|
-
p.next())t=n.value,t.stream.codecs=l;return y.return(e.filter(function(x){return x}))})}function
|
|
707
|
-
function
|
|
708
|
-
function
|
|
693
|
+
function cr(a){if(!a.T){for(var b=-1,c=new Map,d=r(a.h.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.M[0]||null))for(var g=r(e.Rc),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)if(f=a.P-c.get(d),e.M.splice(0,f),e=e.M[0]||null)e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
694
|
+
dr(d,e);a.T=!0}}}
|
|
695
|
+
function er(a){if(!a.T&&Infinity==a.$){for(var b=Infinity,c=r(a.h.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.M[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){a.$=b;c=r(a.h.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;if(null!=e){var f=e.M[0]||null;if(null==f.g)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.Kd,"Expect AV sync issues!");else for(dr(d,f.g-b-f.startTime),d=r(e),e=d.next();!e.done;e=d.next())e.value.Qe(b)}}a.T=
|
|
696
|
+
!0}}}function dr(a,b){a.Qc+=b;for(var c=r(a.Rc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.Rc.set(d,e+b)}}
|
|
697
|
+
function Wq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L,N,V,aa,ea,la,Ba,Ia,Ja,Na,Oa,Tc,Uc,uc,Jd,Db,Le,Vc,Kd;return K(function(Va){switch(Va.g){case 1:d=Lq(a.va,b,a.N);e=Bq(d.g,"EXT-X-DEFINE");fr(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,F=G.split(";")[0],H=F.split("/")[0],I=Ad(G),L=new Map,A(Va,gr(a,d,c,c,I,H,"",!0,"Media Playlist",null,L,null,!1,!1,F),8);k=Bq(d.g,"EXT-X-MEDIA");l=Bq(d.g,"EXT-X-STREAM-INF");m=Bq(d.g,"EXT-X-IMAGE-STREAM-INF");hr(a,l);
|
|
698
|
+
p=Bq(d.g,"EXT-X-SESSION-DATA");n=r(p);for(t=n.next();!t.done;t=n.next())if(y=t.value,x=W(y,"DATA-ID"),v=W(y,"URI"),w=W(y,"LANGUAGE"),C=W(y,"VALUE"),z=(new Map).set("id",x),v&&z.set("uri",Fq(a.N,v)),w&&z.set("language",w),C&&z.set("value",C),D=new O("sessiondata",z),a.i)a.i.onEvent(D);return A(Va,ir(a,k),4);case 4:return jr(a,k),A(Va,kr(a,l),5);case 5:return f=Va.h,A(Va,lr(a,k),6);case 6:return g=Va.h,A(Va,mr(a,m),7);case 7:h=Va.h;Va.D(3);break;case 8:N=Va.h,a.h.set(c,N),f.push({id:0,language:"und",
|
|
699
|
+
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 P(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?cr(a):er(a);V=Infinity;aa=r(a.h.values());for(ea=aa.next();!ea.done;ea=aa.next())la=ea.value,"text"!=la.stream.type&&(V=Math.min(V,la.Qc));a.m!=Uq?(a.j=new R(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.ba),a.j.Zc(!1)):(a.j=new R(null,
|
|
700
|
+
0),a.j.Zc(!0));if(a.m!=Uq)a.ma=a.H,Ba=Zq,a.m==Ba.df&&(Ia=a.j.Ed,isNaN(a.g.availabilityWindowOverride)||(Ia=a.g.availabilityWindowOverride),a.j.Me(Ia));else for(a.j.Ua(V),Ja=r(a.h.values()),ea=Ja.next();!ea.done;ea=Ja.next())Na=ea.value,Na.stream.segmentIndex.yb(0,V);a.I=[];Oa=[];Tc=r(f);for(Uc=Tc.next();!Uc.done;Uc=Tc.next())for(uc=Uc.value,Jd=r([uc.video,uc.audio]),Db=Jd.next();!Db.done;Db=Jd.next())(Le=Db.value)&&Oa.push(Le);return A(Va,Promise.all(Oa.map(function(sg){return K(function(tg){return A(tg,
|
|
701
|
+
sg.createSegmentIndex(),0)})})),9);case 9:Vc=r(Oa);for(Db=Vc.next();!Db.done;Db=Vc.next())Kd=Db.value,a.I.push(Kd.segmentIndex.M);Yq(a);a.j.me();a.J={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.J);B(Va)}})}function fr(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=W(d,"NAME");d=W(d,"VALUE");c&&d&&(a.A.has(c)||a.A.set(c,d))}}
|
|
702
|
+
function ar(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.A.get(e))&&c.set(e,d)}return c}
|
|
703
|
+
function hr(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"AUDIO");c=W(d,"VIDEO");var f=W(d,"SUBTITLES");d=nr(a,d);if(f){var g=Gb(Ib,d);a.B.set(f,g);dc(d,g)}e&&(f=Gb("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.B.set(e,f));c&&(e=Gb("video",d),e||(e=a.g.hls.defaultVideoCodec),a.B.set(c,e))}}
|
|
704
|
+
function lr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return K(function(y){if(1==y.g)return c=Cq(b,"SUBTITLES"),d=c.map(function(x){var v,w,C;return K(function(z){if(1==z.g){if(v=a.g.disableText)return z.return(null);E(z,2);return A(z,or(a,x),4)}if(2!=z.g)return w=z.h,z.return(w.stream);C=J(z);if(a.g.hls.ignoreTextStreamFailures)return z.return(null);throw C;})}),A(y,Promise.all(d),2);e=y.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=yq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(p=r(m),n=p.next();!n.done;n=
|
|
705
|
+
p.next())t=n.value,t.stream.codecs=l;return y.return(e.filter(function(x){return x}))})}function mr(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);E(l,2);return A(l,pr(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=J(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),A(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
|
|
706
|
+
function ir(a,b){var c;return K(function(d){b=b.filter(function(e){var f=W(e,"URI")||"";return"SUBTITLES"!=W(e,"TYPE")&&""!=f});c=b.map(function(e){return or(a,e)});return A(d,Promise.all(c),0)})}
|
|
707
|
+
function kr(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,p,n,t,y;return K(function(x){if(1==x.g)return h=W(g,"FRAME-RATE"),k=Number(W(g,"AVERAGE-BANDWIDTH"))||Number(yq(g,"BANDWIDTH")),l=W(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,t=W(g,"VIDEO-RANGE"),A(x,qr(a,g),2);y=x.h;for(var v=x.return,w=y.audio,C=y.video,z=r(C),D=z.next();!D.done;D=z.next())if(D=D.value.stream)D.width=Number(p)||void 0,D.height=Number(n)||void 0,
|
|
709
708
|
D.frameRate=Number(h)||void 0,D.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!C.length||z)C=[null];z=[];w=r(w);for(D=w.next();!D.done;D=w.next()){D=D.value;for(var G=r(C),F=G.next();!F.done;F=G.next()){var H=F.value;F=D?D.stream:null;var I=H?H.stream:null,L=D?D.stream.drmInfos:null,N=H?H.stream.drmInfos:null;H=(H?H.Kd:"")+" - "+(D?D.Kd:"");F&&I&&L.length&&N.length&&!(0<bh(L,N).length)||a.ua.has(H)||(F={id:a.Aa++,language:F?F.language:"und",primary:!!F&&F.primary||
|
|
710
709
|
!!I&&I.primary,audio:F,video:I,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(F),a.ua.add(H))}}return v.call(x,z)})}),A(f,Promise.all(c),2);d=f.h;e=d.reduce(zb,[]);e=e.filter(function(g){return null!=g});return f.return(e)})}
|
|
711
|
-
function
|
|
712
|
-
function
|
|
713
|
-
function
|
|
714
|
-
function
|
|
715
|
-
"YES"==t;return A(v,
|
|
716
|
-
function
|
|
717
|
-
if(p=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function
|
|
718
|
-
function
|
|
719
|
-
function
|
|
720
|
-
ea=
|
|
721
|
-
|
|
722
|
-
return Md.return({stream:
|
|
723
|
-
function
|
|
724
|
-
|
|
725
|
-
function
|
|
726
|
-
function
|
|
727
|
-
function
|
|
728
|
-
if(!a.l)return null}var v=[];if(a.l)for(var w={},C=0;C<d.h.length;w={Td:w.Td},C++){var z=d.h[C],D=0==C?c:v[v.length-1],G=0==C?e:D.endTime,F=Number(W(z,"DURATION"))||a.ea;if(F){F=G+F;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=W(z,"BYTERANGE-START"))?Number(H):0:(H=W(z,"BYTERANGE"),I=r(
|
|
729
|
-
f=e+Number(p.value.split(",")[0]):f=v[v.length-1].endTime;(a=
|
|
730
|
-
function
|
|
731
|
-
function
|
|
732
|
-
!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(t=x=
|
|
733
|
-
f=function(z){return function(){var D=n[z.$c];if(D){D!=z.
|
|
734
|
-
function
|
|
735
|
-
function
|
|
736
|
-
if(!x){if(b==f.ha)return w.return("text/vtt");v=p.mp4;return w.return(v)}return w.return(x.split(";")[0])})}function
|
|
737
|
-
function
|
|
738
|
-
var
|
|
739
|
-
ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},
|
|
740
|
-
"URI");b=
|
|
741
|
-
"EVENT",
|
|
742
|
-
function
|
|
743
|
-
break}return A(L,g(H.value),5);case 5:I=Date.now();if(100<I-t||H.done)e(I-t,p-n,v-p),n=p,t=I;H.done?G.close():(G.enqueue(H.value),F());B(L)}})}F()},new k({start:w}),A(D,l.arrayBuffer(),5);case 5:m=D.h;va(D,3);break;case 2:C=J(D);if(d.
|
|
744
|
-
function
|
|
745
|
-
function
|
|
710
|
+
function qr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){if(1==v.g)return c=Jb,d=nr(a,b),e=W(b,"AUDIO"),f=W(b,"VIDEO"),h=(g=e||f)&&a.C.has(g)?a.C.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=yq(b,"URI"),n=k.audio.find(function(w){return w&&w.Kd==p}),t=Gb(c.La,d),(y=Gb(c.Gb,d))&&!t?l=c.Gb:!h.length&&y&&t?(l=c.La,d=[[t,y].join()]):k.audio.length&&n?(l=c.Gb,m=!0):l=k.video.length&&!k.audio.length?c.Gb:c.La,m?v.D(2):A(v,rr(a,b,d,l),3);2!=v.g&&(x=v.h,k[x.stream.type]=[x]);sr(k);return v.return(k)})}
|
|
711
|
+
function nr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=W(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=zd(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function tr(a){a=W(a,"LANGUAGE")||"und";return Mb(a)}
|
|
712
|
+
function sr(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 jr(a,b){b=Cq(b,"CLOSED-CAPTIONS");b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=tr(d);var e=yq(d,"GROUP-ID");d=yq(d,"INSTREAM-ID");a.K.get(e)||a.K.set(e,new Map);a.K.get(e).set(d,c)}}
|
|
713
|
+
function or(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){if(1==v.g){c=yq(b,"GROUP-ID");d="";var w=yq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Ib);e=w;e!=Ib&&c&&a.B.has(c)&&(d=a.B.get(c));f=ur(yq(b,"URI"),a.A);if(a.h.has(f))return v.return(a.h.get(f));g=tr(b);h=W(b,"NAME");k=W(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=W(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=W(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;p=w;n=W(b,"CHARACTERISTICS");t=W(b,"FORCED");y=
|
|
714
|
+
"YES"==t;return A(v,vr(a,f,d,e,g,l,h,m,null,n,y,p),2)}x=v.h;a.C.has(c)?a.C.get(c).push(x):a.C.set(c,[x]);if(a.h.has(f))return v.return(a.h.get(f));a.h.set(f,x);return v.return(x)})}
|
|
715
|
+
function pr(a,b){var c,d,e,f,g,h,k,l,m,p;return K(function(n){if(1==n.g){c=ur(yq(b,"URI"),a.A);d=W(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=tr(b);f=W(b,"NAME");g=W(b,"CHARACTERISTICS");return A(n,vr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(a.h.has(c))return n.return(a.h.get(c));if(k=W(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*Number(m.split("x")[1]);
|
|
716
|
+
if(p=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function rr(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=ur(yq(b,"URI"),a.A);if(a.h.has(e))return k.return(a.h.get(e));var l=W(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=Fb(d,c);return A(k,vr(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(a.h.has(e))return k.return(a.h.get(e));a.h.set(e,h);return k.return(h)})}
|
|
717
|
+
function vr(a,b,c,d,e,f,g,h,k,l,m,p){var n,t,y;return K(function(x){if(1==x.g)return n=Fq(a.N,b),A(x,Vq(a,n),2);t=x.h;n=t.uri;y=Lq(a.va,t.data,n);return x.return(gr(a,y,b,n,c,d,e,f,g,h,k,l,m,p))})}
|
|
718
|
+
function gr(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){var x,v,w,C,z,D,G,F,H,I,L,N,V,aa,ea,la,Ba,Ia,Ja,Na,Oa,Tc,Uc,uc,Jd,Db,Le,Vc,Kd,Va,sg,tg,ip,jp;return K(function(Md){if(1==Md.g){if(1!=b.type)throw new P(2,4,4017);x=Bq(b.g,"EXT-X-DEFINE");v=ar(a,x);wr(a,b);return y?Md.D(2):A(Md,xr(a,f,e,b,v),3)}2!=Md.g&&(y=Md.h);w=[];if(b.segments)for(C=r(b.segments),z=C.next();!z.done;z=C.next())D=z.value,G=Bq(D.g,"EXT-X-KEY"),w.push.apply(w,ja(G));H=F=!1;I=[];L=new Set;N=r(w);for(V=N.next();!V.done;V=N.next())if(aa=V.value,
|
|
719
|
+
ea=yq(aa,"METHOD"),"NONE"!=ea)if(F=!0,"AES-128"==ea)H=!0;else if(la=yq(aa,"KEYFORMAT"),Ia=(Ba=yr[la])?Ba(aa,y):null){if(Ia.keyIds)for(Ja=r(Ia.keyIds),Na=Ja.next();!Na.done;Na=Ja.next())Oa=Na.value,L.add(Oa);I.push(Ia)}if(F&&!I.length&&!H)throw new P(2,4,4026);gj.includes(y)&&(e="");Tc=new Map;Uc=a.l;uc=br(a,b,f,Tc,v);Uc!=a.l&&wr(a,b);Jd=uc[uc.length-1].endTime;Db=new Dj(uc);Le=f==Ib?"subtitle":void 0;Vc=[];if(p)for(Kd=r(p.split(",")),Va=Kd.next();!Va.done;Va=Kd.next())sg=Va.value,Vc.push(sg);ip=(tg=
|
|
720
|
+
Dq(b.g,"EXT-X-SERVER-CONTROL"))?null!=tg.getAttribute("CAN-SKIP-UNTIL"):!1;jp={id:a.Aa++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Db,mimeType:y,codecs:e,kind:Le,encrypted:F,drmInfos:I,keyIds:L,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:Vc,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,closedCaptions:m,hdr:void 0,tilesLayout:void 0};
|
|
721
|
+
return Md.return({stream:jp,Kd:c,$f:d,Qc:Jd,Rc:Tc,fg:ip,Bf:!1})})}
|
|
722
|
+
function zr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new P(2,4,4042);var d=0,e=W(b,"IV","");if(e){var f=nd(e.substr(2));if(16!=f.byteLength)throw new P(2,4,4043);}else d=Eq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Fq(c.h,yq(b,"URI"));var g=rf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return K(function(p){if(1==p.g)return A(p,
|
|
723
|
+
Ar(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new P(2,4,4044);l={name:"AES-CBC"};m=h;return A(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;B(p)})}};return h}
|
|
724
|
+
function wr(a,b){var c=Dq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Dq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)$q(a,Uq);else{c?$q(a,Br):$q(a,Cr);d=Dq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Dq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ea=Number(yq(c,"PART-TARGET")),a.H=Math.min(a.ea,a.H),b=Dq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=b?Number(yq(b,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.ba=Math.max(d,a.ba)}}
|
|
725
|
+
function Dr(a,b,c,d){c=Dq(c,"EXT-X-MAP");if(!c)return null;var e=yq(c,"URI");d=ur(Fq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.aa.has(b)||(c=Er(d,c),a.aa.set(b,c));return a.aa.get(b)}function Er(a,b){var c=0,d=null;if(b=W(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new wi(function(){return[a]},c,d)}
|
|
726
|
+
function Fr(a,b,c,d,e,f,g,h,k){var l=d.g,m=ur(d.i,f),p=Dq(l,"EXTINF"),n=f=0,t=null;d.h.length&&!a.l&&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 y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var x=Dq(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(y=fg(x.value))}x=zi;Dq(l,"EXT-X-GAP")&&(x=2);if(!p){if(0==d.h.length)throw new P(2,4,4024,"EXTINF");
|
|
727
|
+
if(!a.l)return null}var v=[];if(a.l)for(var w={},C=0;C<d.h.length;w={Td:w.Td},C++){var z=d.h[C],D=0==C?c:v[v.length-1],G=0==C?e:D.endTime,F=Number(W(z,"DURATION"))||a.ea;if(F){F=G+F;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=W(z,"BYTERANGE-START"))?Number(H):0:(H=W(z,"BYTERANGE"),I=r(Gr(D,H)),H=I.next().value,I=I.next().value);if(D=W(z,"URI"))w.Td=Fq(g,D),D=zi,"YES"==W(z,"GAP")&&(D=2),v.push(new yi(G,F,function(L){return function(){return[L.Td]}}(w),H,I,b,0,0,Infinity,[],"",null,null,D))}}p?
|
|
728
|
+
f=e+Number(p.value.split(",")[0]):f=v[v.length-1].endTime;(a=Dq(l,"EXT-X-BYTERANGE"))?(t=r(Gr(c,a.value)),n=t.next().value,t=t.next().value):v.length&&(n=v[0].Va,t=v[v.length-1].Ca);c="";a=null;"image"==h&&(c="1x1",h=Dq(l,"EXT-X-TILES"))&&(c=yq(h,"LAYOUT"),(h=W(h,"DURATION"))&&(a=Number(h)));return new yi(e,f,function(){return m.length?[m]:[]},n,t,b,0,0,Infinity,v,c,a,y,x,k)}function Gr(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ca+1,d=c+b-1);return[c,d]}
|
|
729
|
+
function Yq(a){if(a.j){for(var b=r(a.I),c=b.next();!c.done;c=b.next())a.j.mc(c.value);a.I=[]}}
|
|
730
|
+
function br(a,b,c,d,e){var f=b.segments,g=void 0,h=Eq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Eq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Dq(b.g,"EXT-X-SKIP");l=l?Number(W(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;a.m!=Uq&&d.has(m)&&(p=d.get(m));for(var n=[],t=null,y=0;y<f.length;y++){var x=f[y],v=0==y?p:t.endTime;m=k+l+y;Dq(x.g,"EXT-X-DISCONTINUITY")&&h++;var w=r(x.g);for(var C=w.next();!C.done;C=w.next())C=C.value,"EXT-X-KEY"==C.name&&("AES-128"==yq(C,"METHOD")?g=zr(a,C,b):g=void 0);d.set(m,v);w=Dr(a,b.h,x.g,e);
|
|
731
|
+
!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(t=x=Fr(a,w,t,x,v,e,b.h,c,g))x.m=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.P&&m<a.P||n.push(x)}if(b=n.some(function(z){return null!=z.g}))for(c={},d=0;d<n.length;c={vc:c.vc,uc:c.uc,$c:c.$c,ub:c.ub,tc:c.tc},d++)if(c.ub=n[d],null==c.ub.g)for(c.uc=0,c.vc=d,e=function(z){return function(){var D=n[z.vc];if(D){if(null!=D.g)return D.g+z.uc;z.uc-=D.endTime-D.startTime;z.vc+=1}return null}}(c),c.tc=0,c.$c=d,
|
|
732
|
+
f=function(z){return function(){var D=n[z.$c];if(D){D!=z.ub&&(z.tc+=D.endTime-D.startTime);if(null!=D.g)return D.g+z.tc;--z.$c}return null}}(c);null==c.ub.g;)c.ub.g=f(),null==c.ub.g&&(c.ub.g=e());if(b)for(c=r(n),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.$;if(b&&Infinity!=a)for(b=r(n),d=b.next();!d.done;d=b.next())d.value.Qe(a);return n}
|
|
733
|
+
function ur(a,b){a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new P(2,4,4039,e);}}return a}
|
|
734
|
+
function xr(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,y,x,v;return K(function(w){if(1==w.g){f=Jb;g=xf;h=Math.trunc((d.segments.length-1)/2);k=ur(d.segments[h].i,e);l=new lb(k);m=l.Na.split(".").pop();p=Hr[b];if((n=p[m])||(n=Ir[m]))return w.return(n);if(b==f.ha){if("vtt"==c||"wvtt"==c)return w.return("text/vtt");if(c&&""!==c)return w.return("application/mp4")}if(b==f.Bc&&(!c||"jpeg"==c))return w.return("image/jpeg");t=rf([k],a.g.retryParameters);t.method="HEAD";return A(w,Ar(a,t,g),2)}y=w.h;x=y.headers["content-type"];
|
|
735
|
+
if(!x){if(b==f.ha)return w.return("text/vtt");v=p.mp4;return w.return(v)}return w.return(x.split(";")[0])})}function Vq(a,b){b=rf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return Ar(a,b,0)}function Tq(a){var b,c;K(function(d){if(1==d.g){if(!a.i)return d.return();E(d,2);return A(d,a.update(),4)}if(2!=d.g)return a.m!=Uq&&(b=a.ma,a.F.S(b)),va(d,0);c=J(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.F.S(.1);B(d)})}
|
|
736
|
+
function $q(a,b){a.m=b;a.j&&a.j.Zc(a.m==Uq);a.m!=Uq||a.F.stop()}function Ar(a,b,c){if(!a.G)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);mf(a.G,b);return b.promise}M("shaka.hls.HlsParser",Sq);
|
|
737
|
+
var Ir={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Hr={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:"text/vtt",
|
|
738
|
+
ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},yr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);return Eb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=yq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=yq(a,
|
|
739
|
+
"URI");b=Rq(b);b=Ec(b.data);b=Eb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=W(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=yq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=yq(a,"URI");a=Rq(a);a=Ec(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vf(a,b,new Set,0);return Eb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Uq="VOD",Cr=
|
|
740
|
+
"EVENT",Br="LIVE",Zq={Zf:Uq,Vh:Cr,df:Br};Sc("Tizen 3")||Sc("Tizen 2")||Xc()||(hh.m3u8=function(){return new Sq},fh["application/x-mpegurl"]=function(){return new Sq},fh["application/vnd.apple.mpegurl"]=function(){return new Sq});function Jr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,If:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=gd(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Kr(){}function Lr(a,b,c,d,e){var f=new Mr;Ff(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Nr,h={lf:!1,Tf:!1};a=Or(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 bf(a,function(){h.lf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.Tf=!0;g.abort()});k.S(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
741
|
+
function Or(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,C,z;return K(function(D){switch(D.g){case 1:return h=Pr,k=Qr,n=p=0,t=Date.now(),E(D,2),A(D,h(a,c),4);case 4:return l=D.h,f(Rr(l.headers)),y=l.clone().body.getReader(),v=(x=l.headers.get("Content-Length"))?parseInt(x,10):0,w=function(G){function F(){var H,I;return K(function(L){switch(L.g){case 1:return E(L,2),A(L,y.read(),4);case 4:H=L.h;va(L,3);break;case 2:return J(L),L.return();case 3:if(H.done){L.D(5);break}p+=H.value.byteLength;if(!g){L.D(5);
|
|
742
|
+
break}return A(L,g(H.value),5);case 5:I=Date.now();if(100<I-t||H.done)e(I-t,p-n,v-p),n=p,t=I;H.done?G.close():(G.enqueue(H.value),F());B(L)}})}F()},new k({start:w}),A(D,l.arrayBuffer(),5);case 5:m=D.h;va(D,3);break;case 2:C=J(D);if(d.lf)throw new P(1,1,7001,a,b);if(d.Tf)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,C,b);case 3:return z=Rr(l.headers),D.return(Jr(z,m,l.status,a,l.url,b))}})}function Rr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
743
|
+
function Sr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Kr);Kr.isSupported=Sr;Kr.parse=Lr;var Pr=window.fetch,Nr=window.AbortController,Qr=window.ReadableStream,Mr=window.Headers;Sr()&&(of("http",Lr,2,!0),of("https",Lr,2,!0),of("blob",Lr,2,!0));function Tr(){}
|
|
744
|
+
function Ur(a,b,c,d,e){var f=new Vr,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 P(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=Wr(f);e(t);p=!0}};f.onload=function(){var t=Wr(f),y=f.response;try{var x=Jr(t,y,f.status,a,f.responseURL,c);l(x)}catch(v){m(v)}};f.onerror=function(t){m(new P(1,1,1002,a,t,
|
|
746
745
|
c))};f.ontimeout=function(){m(new P(1,1,1003,a,c))};f.onprogress=function(t){var y=Date.now();if(100<y-g||t.lengthComputable&&t.loaded==t.total)d(y-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=y};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new bf(k,function(){f.abort();return Promise.resolve()})}
|
|
747
|
-
function
|
|
748
|
-
function
|
|
749
|
-
function
|
|
750
|
-
function
|
|
751
|
-
q.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
752
|
-
q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return A(d,
|
|
753
|
-
function
|
|
754
|
-
function
|
|
755
|
-
function
|
|
756
|
-
|
|
757
|
-
function
|
|
758
|
-
function
|
|
759
|
-
function
|
|
760
|
-
|
|
761
|
-
function
|
|
762
|
-
function
|
|
763
|
-
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}}
|
|
764
|
-
function
|
|
765
|
-
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
|
|
766
|
-
|
|
746
|
+
function Wr(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}M("shaka.net.HttpXHRPlugin",Tr);Tr.parse=Ur;var Vr=window.XMLHttpRequest;of("http",Ur,1,!0);of("https",Ur,1,!0);of("blob",Ur,1,!0);function Xr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Yr(a){return a.Ra().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Va+":"+a.Ca}function Zr(a,b){return Vj(a.g.Ra(),a.g.Va,a.g.Ca,b.streaming.retryParameters)};function $r(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function as(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}$r.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 bs(a){var b=this;this.A=a;this.j=new Map;this.i=new yf(function(){return cs(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new $r}bs.prototype.destroy=function(){return this.i.destroy()};function ds(a,b,c){a.m=b;a.l=c}function cs(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
747
|
+
function es(a,b,c,d,e,f){zf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return K(function(y){if(1==y.g)return A(y,fs(a,c),2);h=y.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=Ec(h),l=new Uf(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,t);a.g.close(d,h.byteLength);var x=a.g;a.m(0==x.i?0:x.j/x.i,a.g.h);return y.return(f(h))})});a.j.set(b,g)}function gs(a){return K(function(b){return 1==b.g?A(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
748
|
+
function fs(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=xf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),A(g,d.promise,2);f=g.h;dc(a.h,e);return g.return(f.data)})};function hs(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Lc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}hs.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}E(b,2);return A(b,a.g,4)}if(2!=b.g)return va(b,0);J(b);B(b)})};
|
|
749
|
+
function is(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return A(g,b(f.key,f.value,f),2)}f.continue();B(g)})}})}hs.prototype.store=function(){return this.h};hs.prototype.promise=function(){return this.g};function js(a){this.h=a;this.g=[]}js.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function ks(a,b){return ls(a,b,"readwrite")}function ls(a,b,c){c=a.h.transaction([b],c);var d=new hs(c,b);a.g.push(d);d.promise().then(function(){dc(a.g,d)},function(){dc(a.g,d)});return d};function ms(a,b,c){this.h=new js(a);this.i=b;this.g=c}q=ms.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ns(this.i)};q.removeSegments=function(a,b){return os(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return A(d,ps(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.pf(e)}))})};q.addManifests=function(){return ns(this.g)};
|
|
750
|
+
q.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function qs(a,b,c){a=ks(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=ks(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 os(this,this.g,a,b)};
|
|
751
|
+
q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return A(d,ps(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Ec(e)})))})};q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=ls(a.h,a.g,"readonly"),c=new Map,A(d,is(b,function(e,f){var g;return K(function(h){if(1==h.g)return A(h,a.Ec(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?A(d,b.promise(),3):d.return(c)})};q.pf=function(a){return a};q.Ec=function(a){return Promise.resolve(a)};
|
|
752
|
+
function ns(a){return Promise.reject(new P(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 K(function(m){if(1==m.g){d=ks(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={ed:g.ed},k=h.next())l=k.value,g.ed=e.add(l),g.ed.onsuccess=function(p){return function(){f.push(p.ed.result)}}(g);return A(m,d.promise(),2)}return m.return(f)})};
|
|
753
|
+
function os(a,b,c,d){a=ks(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={dd:e.dd},f=c.next())e.dd=f.value,b.delete(e.dd).onsuccess=function(g){return function(){return d(g.dd)}}(e);return a.promise()}
|
|
754
|
+
function ps(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=ls(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Ac:h.Ac,xc:h.xc},l=k.next())h.xc=l.value,h.Ac=e.get(h.xc),h.Ac.onsuccess=function(p){return function(){void 0==p.Ac.result&&g.push(p.xc);f[p.xc]=p.Ac.result}}(h);return A(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(p){return f[p]}))})};function rs(a){this.g=new js(a)}rs.prototype.destroy=function(){return this.g.destroy()};rs.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=ls(a.g,"session-ids","readonly"),c=[],A(d,is(b,function(e,f){c.push(f)}),2)):3!=d.g?A(d,b.promise(),3):d.return(c)})};rs.prototype.add=function(a){var b=ks(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()};
|
|
755
|
+
rs.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=ks(b.g,"session-ids"),A(d,is(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):A(d,c.promise(),0)})};function ss(){this.g=new Map}ss.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)};ss.prototype.init=function(){var a=this;ts.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
756
|
+
function us(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ta:d,Ba:f},Ba:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function vs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ta:d,Ba:f},e)})})}
|
|
757
|
+
function ws(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function xs(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ys(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
758
|
+
function zs(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=ts,d.forEach(function(f){(f=f())&&b.push(f)})),A(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):A(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function As(a,b){ts.set(a,b)}M("shaka.offline.StorageMuxer",ss);ss.unregister=function(a){ts.delete(a)};ss.register=As;ss.prototype.destroy=ss.prototype.destroy;var ts=new Map;function Bs(){ms.apply(this,arguments)}u(Bs,ms);Bs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=ks(c.h,c.g);e=d.store();f=new Lc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return A(g,Promise.all([d.promise(),f]),0)})};
|
|
759
|
+
Bs.prototype.Ec=function(a){var b,c,d,e,f,g;return K(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=Cs(a.periods[c],e),b.push(f);return A(h,Jp(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})})};
|
|
760
|
+
function Cs(a,b){Ds(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Es(e,a.startTime,b)})}
|
|
761
|
+
function Es(a,b,c){var d=a.initSegmentUri?Fs(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=Fs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
762
|
+
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}}Bs.prototype.pf=function(a){return{data:a.data}};function Fs(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 P(2,9,9004,"Could not parse uri "+a);}
|
|
763
|
+
function Ds(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++,
|
|
764
|
+
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 Gs(){ms.apply(this,arguments)}u(Gs,ms);
|
|
765
|
+
Gs.prototype.Ec=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(Hs(p,k.startTime,k.startTime+e));f=l;b.push(f)}return A(h,Jp(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
767
766
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
768
|
-
function
|
|
769
|
-
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function
|
|
770
|
-
q.init=function(){var a=this,b=new Lc,c=!1,d=new Q(function(){c=!0;b.reject(new P(2,9,9017))});d.S(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
|
|
771
|
-
new
|
|
767
|
+
function Hs(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,
|
|
768
|
+
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Is(){ms.apply(this,arguments)}u(Is,ms);q=Is.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 qs(this,a,b)};q.Ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Js(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Js.prototype;
|
|
769
|
+
q.init=function(){var a=this,b=new Lc,c=!1,d=new Q(function(){c=!0;b.reject(new P(2,9,9017))});d.S(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 Bs(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Gs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
770
|
+
new Gs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Is(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new rs(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 P(2,
|
|
772
771
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return A(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),B(b)}})};
|
|
773
772
|
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};
|
|
774
|
-
q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),A(b,
|
|
775
|
-
function
|
|
776
|
-
function
|
|
777
|
-
function
|
|
773
|
+
q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),A(b,Ks(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,A(b,a.init(),0)}})};
|
|
774
|
+
function Ks(){var a=new Lc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}As("idb",function(){return Sc("CrKey")||Rc()||!window.indexedDB?null:new Js});function Ls(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ls.prototype.Ta=function(){return this.i};Ls.prototype.Ba=function(){return this.h};Ls.prototype.key=function(){return this.l};Ls.prototype.toString=function(){return this.j};
|
|
775
|
+
function Ms(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 Ls(b,c,d,Number(a[4])):null};function Ns(a,b){this.h=a;this.g=b}
|
|
776
|
+
function Os(a,b){var c=new R(null,0);c.Ua(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ps(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ib}).map(function(l){return Qs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Qs(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=
|
|
778
777
|
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}}
|
|
779
|
-
function
|
|
780
|
-
b.next())for(e=e.value,g=
|
|
781
|
-
function
|
|
782
|
-
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function
|
|
783
|
-
function
|
|
784
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=
|
|
785
|
-
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new
|
|
786
|
-
fh["application/x-offline-manifest"]=function(){return new
|
|
787
|
-
function
|
|
788
|
-
function
|
|
778
|
+
function Ps(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=
|
|
779
|
+
b.next())for(e=e.value,g=Qs(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=Qs(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}
|
|
780
|
+
function Qs(a,b,c){var d=b.segments.map(function(e){return Rs(a,e)});c.mc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dj(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,
|
|
781
|
+
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Rs(a,b){var c=new Ls("segment",a.h,a.g,b.dataKey);return new yi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ss(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
782
|
+
function Ss(a,b){var c=new Ls("segment",a.h,a.g,b);return new wi(function(){return[c.toString()]},0,null)};function Ts(){this.g=null}q=Ts.prototype;q.configure=function(){};
|
|
783
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=Ms(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new ss;ua(m);return A(m,e.init(),4);case 4:return A(m,ws(e,d.Ta(),d.Ba()),5);case 5:return f=m.h,A(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ns(d.Ta(),d.Ba()),l=Os(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),A(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
784
|
+
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new ss,E(m,2,3),A(m,e.init(),5);case 5:return A(m,ws(e,d.Ta(),d.Ba()),6);case 6:return f=m.h,A(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 A(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),A(m,e.destroy(),10);case 10:xa(m,0);break;case 2:J(m),m.D(3)}})};
|
|
785
|
+
fh["application/x-offline-manifest"]=function(){return new Ts};function Us(){}function Vs(a){var b=Ms(a);b&&"manifest"==b.g?(a={uri:a,If:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=ef(a)):a=b&&"segment"==b.g?Ws(b.key(),b):cf(new P(2,1,9004,a));return a}
|
|
786
|
+
function Ws(a,b){var c=new ss;return ef(void 0).na(function(){return c.init()}).na(function(){return ws(c,b.Ta(),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()})}M("shaka.offline.OfflineScheme",Us);Us.plugin=Vs;of("offline",Vs);function Xs(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,y=r(m),x=y.next();!x.done;x=y.next())if(x=x.value,Ys(x.info,n)){x.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=Zs(a,b,g);return A(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)}})}
|
|
787
|
+
function Zs(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new qg({Pb:b,onError:function(){},Bd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(f,2),d.configure(a),A(f,Ag(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 J(f),A(f,d.destroy(),5);case 5:return f.return([]);case 3:return E(f,6),A(f,Lg(d),8);case 8:va(f,7);break;case 6:return J(f),A(f,d.destroy(),
|
|
789
788
|
9);case 9:return f.return([]);case 7:return e=[],A(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return E(h,2),A(h,Mg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);J(h);B(h)})})),10);case 10:return A(f,d.destroy(),11);case 11:return f.return(e)}})}
|
|
790
|
-
function
|
|
791
|
-
function
|
|
792
|
-
case 4:b.h=null,b.g=null,B(k)}})})}function
|
|
793
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
794
|
-
function
|
|
795
|
-
n,b,c,e,f),x=y.Xg,v=y.
|
|
796
|
-
function
|
|
797
|
-
return A(ea,
|
|
798
|
-
J(z),C=Object.values(l),A(z,g.removeSegments(C,function(){}),10);case 10:throw w;}})}function
|
|
799
|
-
function
|
|
800
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return A(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return x=J(w),A(w,
|
|
801
|
-
function
|
|
789
|
+
function Ys(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 $s(a,b,c){var d=b.presentationTimeline.getDuration();b=at(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function bt(a,b){var c=Os(new Ns(a.Ta(),a.Ba()),b),d=b.appMetadata||{};c=at(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}}
|
|
790
|
+
function at(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 ct(){this.g={}}function dt(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 et(a,b){a.g[b.id]=b.bandwidth||2048}function ft(a,b){a=a.g[b];null==a&&(a=0);return a};function gt(a){var b=this;if(a&&a.constructor!=T)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ic()):(this.h=yl(),this.g=new nf);this.i=[];this.j=[];var c=!a;this.l=new yf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return A(k,Promise.all(b.j.map(function(l){return cs(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 A(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return A(k,b.g.destroy(),4);
|
|
791
|
+
case 4:b.h=null,b.g=null,B(k)}})})}function ht(){if(Oc())a:{var a=r(ts.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=gt.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=sl(a,b));return Al(this.h,a)};q.getConfiguration=function(){var a=yl();Al(a,this.h,yl());return a};q.Ic=function(){return this.g};
|
|
792
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new bs(this.g);this.j.push(f);b=it(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return A(h,eh(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new bf(b,function(){return cs(f)});b.finally(function(){dc(d.j,f)});return jt(this,b)};
|
|
793
|
+
function it(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,y,x,v,w,C,z;return K(function(D){switch(D.g){case 1:return kt(),h=g=null,k=new ss,p=m=l=null,E(D,2,3),A(D,d(),5);case 5:return g=D.h,A(D,lt(a,b,g,e),6);case 6:n=D.h;mt(a);t=!n.presentationTimeline.U()&&!n.presentationTimeline.Mb();if(!t)throw new P(2,9,9005,b);return A(D,nt(a,n,function(G){p=p||G},e),7);case 7:h=D.h;mt(a);if(p)throw p;return A(D,ot(n,e),8);case 8:return A(D,k.init(),9);case 9:return mt(a),A(D,us(k),10);case 10:return l=D.h,mt(a),y=pt(h,
|
|
794
|
+
n,b,c,e,f),x=y.Xg,v=y.Re,A(D,l.Ba.addManifests([x]),11);case 11:w=D.h;mt(a);m=w[0];mt(a);if(p)throw p;return A(D,qt(a,v,m,x,f,e,l.Ba,n,h),12);case 12:return mt(a),C=new Ls("manifest",l.path.Ta,l.path.Ba,m),D.return(bt(C,x));case 3:return wa(D),A(D,k.destroy(),13);case 13:if(!g){D.D(14);break}return A(D,g.stop(),14);case 14:if(!h){D.D(16);break}return A(D,h.destroy(),16);case 16:xa(D,0);break;case 2:z=J(D);if(null==m){D.D(18);break}return A(D,rt(m),18);case 18:throw p||z;}})}
|
|
795
|
+
function qt(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,y,x,v,w,C;return K(function(z){switch(z.g){case 1:l={};m=0;p=function(D,G){var F,H,I,L,N,V,aa;return K(function(ea){if(1==ea.g){F={};H=r(D);for(I=H.next();!I.done;F={Fb:F.Fb},I=H.next())F.Fb=I.value,L=Zr(F.Fb,f),N=F.Fb.i,V=F.Fb.h,aa=function(la){return function(Ba){var Ia,Ja,Na;return K(function(Oa){if(1==Oa.g)return A(Oa,g.addSegments([{data:Ba}]),2);Ia=Oa.h;mt(a);Ja=la.Fb.g;Na=Yr(Ja);l[Na]=Ia[0];m+=Ba.byteLength;B(Oa)})}}(F),es(e,F.Fb.groupId,L,N,V,aa);
|
|
796
|
+
return A(ea,gs(e),2)}if(!G)return ea.D(0);mt(a);st(h,d,k,f);return A(ea,g.updateManifest(c,d),0)})};n=!1;E(z,2);if(!tt(h)||!n||ut(h)){z.D(4);break}return A(z,p(b.filter(function(D){return D.h}),!0),5);case 5:return mt(a),b=b.filter(function(D){return!D.h}),t=l,y=m,l={},m=0,A(z,vt(g,c,d,t,y,function(){return mt(a)}),6);case 6:mt(a);case 4:if(n){z.D(7);break}return A(z,p(b,!1),8);case 8:return mt(a),x=l,v=m,l={},m=0,A(z,vt(g,c,d,x,v,function(){return mt(a)}),9);case 9:mt(a);case 7:va(z,0);break;case 2:return w=
|
|
797
|
+
J(z),C=Object.values(l),A(z,g.removeSegments(C,function(){}),10);case 10:throw w;}})}function rt(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new ss,A(f,b.init(),2);case 2:return A(f,us(b),3);case 3:return c=f.h,d=new Ls("manifest",c.path.Ta,c.path.Ba,a),A(f,b.destroy(),4);case 4:return e=new gt,A(f,e.remove(d.toString()),0)}})}
|
|
798
|
+
function vt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,y,x,v;return K(function(w){switch(w.g){case 1:g=!1;E(w,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.value,y=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=y&&(t.dataKey=y,t.pendingSegmentRefId=void 0),y=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=y&&(t.initSegmentKey=y,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
|
|
799
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return A(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return x=J(w),A(w,rt(b),5);case 5:if(g){w.D(6);break}v=Object.values(d);return A(w,a.removeSegments(v,function(){}),6);case 6:throw x;}})}
|
|
800
|
+
function ot(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L,N,V,aa,ea,la;return K(function(Ba){switch(Ba.g){case 1:return c={width:Infinity,height:Infinity},Zd(a,b.restrictions,c),A(Ba,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));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=
|
|
802
801
|
n.value,d.push(qe(t));y=r(a.imageStreams);for(x=y.next();!x.done;x=y.next())v=x.value,d.push(re(v));return A(Ba,b.offline.trackSelectionCallback(d),3);case 3:w=Ba.h;C=a.presentationTimeline.getDuration();z=0;D=r(w);for(G=D.next();!G.done;G=D.next())F=G.value,H=F.bandwidth*C/8,z+=H;E(Ba,4);return A(Ba,b.offline.downloadSizeCallback(z),6);case 6:I=Ba.h;if(!I)throw new P(2,9,9014);va(Ba,5);break;case 4:L=J(Ba);if(L instanceof P)throw L;throw new P(2,9,9015);case 5:N=new Set;V=new Set;aa=new Set;ea=r(w);
|
|
803
|
-
for(G=ea.next();!G.done;G=ea.next())la=G.value,"variant"==la.type&&N.add(la.id),"text"==la.type&&V.add(la.id),"image"==la.type&&aa.add(la.id);a.variants=a.variants.filter(function(Ia){return N.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return V.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return aa.has(Ia.id)});
|
|
804
|
-
function
|
|
805
|
-
n&&p&&(n.initData=[]);return{Xg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hc(),streams:f,sessionIds:p?Rg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},
|
|
806
|
-
function
|
|
807
|
-
function
|
|
808
|
-
function
|
|
809
|
-
function
|
|
810
|
-
function
|
|
811
|
-
q.list=function(){return
|
|
812
|
-
function
|
|
813
|
-
|
|
814
|
-
function
|
|
815
|
-
function
|
|
816
|
-
function
|
|
817
|
-
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;
|
|
818
|
-
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function
|
|
819
|
-
function
|
|
820
|
-
function
|
|
821
|
-
function
|
|
822
|
-
function
|
|
823
|
-
|
|
824
|
-
var
|
|
825
|
-
|
|
826
|
-
function
|
|
827
|
-
function
|
|
828
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange"
|
|
829
|
-
function
|
|
830
|
-
function
|
|
802
|
+
for(G=ea.next();!G.done;G=ea.next())la=G.value,"variant"==la.type&&N.add(la.id),"text"==la.type&&V.add(la.id),"image"==la.type&&aa.add(la.id);a.variants=a.variants.filter(function(Ia){return N.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return V.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return aa.has(Ia.id)});wt(a);B(Ba)}})}
|
|
803
|
+
function pt(a,b,c,d,e,f){var g=$s(c,b,d),h=e.offline.progressCallback;ds(f,function(t,y){g.size=y;h(g,t)},function(t,y){k&&e.offline.usePersistentLicense&&l==y&&Ig(a,"cenc",t)});var k=tt(b)&&!ut(b),l=null;k&&(l=xt.get(a.g.keySystem));for(var m=new ct,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())et(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())dt(m,p.value);m=yt(f,m,b,e);f=m.streams;m=m.Re;n=a.g;p=e.offline.usePersistentLicense;
|
|
804
|
+
n&&p&&(n.initData=[]);return{Xg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hc(),streams:f,sessionIds:p?Rg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Re:m}}function tt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
805
|
+
function ut(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 st(a,b,c,d){b.expiration=c.Hc();c=Rg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(tt(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}q.remove=function(a){return zt(this,At(this,a))};
|
|
806
|
+
function At(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:kt();c=Ms(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new ss;ua(k);return A(k,e.init(),4);case 4:return A(k,ws(e,d.Ta(),d.Ba()),5);case 5:return f=k.h,A(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],A(k,Promise.all([Bt(a,h,e),Ct(f,d,h)]),2);case 2:return wa(k),A(k,e.destroy(),8);case 8:xa(k,0)}})}
|
|
807
|
+
function Dt(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 Bt(a,b,c){return K(function(d){return A(d,Et(a.g,a.h.drm,c,b),0)})}
|
|
808
|
+
function Ct(a,b,c){function d(){}var e=Ft(c);bt(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.lh=function(){return zt(this,Gt(this))};
|
|
809
|
+
function Gt(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return kt(),b=a.g,c=a.h.drm,d=new ss,e=!1,ua(p),A(p,d.init(),4);case 4:f=[],xs(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.D(2);break}k=h.value;return A(p,k.getAll(),8);case 8:return l=p.h,A(p,Xs(c,b,l),9);case 9:return m=p.h,A(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.D(5);break;case 2:return wa(p),A(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p.return(!e)}})}
|
|
810
|
+
q.list=function(){return zt(this,Ht())};function Ht(){var a,b,c;return K(function(d){switch(d.g){case 1:return kt(),a=[],b=new ss,ua(d),A(d,b.init(),4);case 4:return c=Promise.resolve(),vs(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return A(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=bt(new Ls("manifest",e.Ta,e.Ba,l),k);a.push(k)});B(h)})})}),A(d,c,2);case 2:return wa(d),A(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d.return(a)}})}
|
|
811
|
+
function lt(a,b,c,d){var e,f,g,h,k;return K(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),
|
|
812
|
+
mt(a),A(l,c.start(b,g),2);if(3!=l.g)return h=l.h,mt(a),k=It(h),A(l,Promise.all(gb(k,function(m){return m.createSegmentIndex()})),3);mt(a);if(e)throw e;return l.return(h)})}
|
|
813
|
+
function nt(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new qg({Pb:a.g,onError:c,Bd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),A(f,xg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return A(f,Lg(e),3);case 3:return A(f,Kg(e),4);case 4:return f.return(e)}})}
|
|
814
|
+
function yt(a,b,c,d){var e=new Map,f=It(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Jt(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()),Re:Array.from(e.values())}}
|
|
815
|
+
function Jt(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,
|
|
816
|
+
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;Kt(d,c.presentationTimeline.pb(),function(l){var m=Yr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=ft(b,d.id)*n;n=as(a.g,n);f.set(m,new Xr(l,n,k,!1))}l.i&&(p=Yr(l.i),f.has(p)||(n=.5*ft(b,d.id),n=as(a.g,n),f.set(p,new Xr(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
|
|
817
|
+
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Kt(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 mt(a){if(a.l.g)throw new P(2,9,7001);}function kt(){if(!ht())throw new P(2,9,9E3);}function zt(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c),A(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);dc(a.i,b);return xa(c,0)})}
|
|
818
|
+
function jt(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){dc(a.i,c)})}function Ft(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)}
|
|
819
|
+
function Et(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=ys(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Dt(d,!1),videoCapabilities:Dt(d,!0)}});return A(h,Xs(b,a,f),2)}return 3!=h.g?(g=h.h,A(h,e.remove(g),3)):A(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
820
|
+
function It(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}
|
|
821
|
+
function wt(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());}M("shaka.offline.Storage",gt);gt.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new ss,ua(b),A(b,zs(a),2)):5!=b.g?(wa(b),A(b,a.destroy(),5)):xa(b,0)})};gt.prototype.list=gt.prototype.list;
|
|
822
|
+
gt.prototype.removeEmeSessions=gt.prototype.lh;gt.prototype.remove=gt.prototype.remove;gt.prototype.store=gt.prototype.store;gt.prototype.getNetworkingEngine=gt.prototype.Ic;gt.prototype.getConfiguration=gt.prototype.getConfiguration;gt.prototype.configure=gt.prototype.configure;gt.prototype.destroy=gt.prototype.destroy;gt.support=ht;
|
|
823
|
+
var xt=(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");
|
|
824
|
+
hn.offline=ht;function Lt(){}function Mt(){for(var a=r(Nt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.eg()}catch(c){Ua("Error installing polyfill!",c)}}}function Ot(a,b){a={priority:b||0,eg:a};for(b=0;b<Nt.length;b++)if(Nt[b].priority<a.priority){Nt.splice(b,0,a);return}Nt.push(a)}M("shaka.polyfill",Lt);Lt.register=Ot;Lt.installAll=Mt;var Nt=[];function Pt(){this.g=new Qt}function Rt(){window.AbortController||(window.AbortController=Pt,window.AbortSignal=Qt)}Pt.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new O("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(Pt.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Lt.AbortController=Pt;Pt.install=Rt;
|
|
825
|
+
function Qt(){fb.call(this);this.h=!1;this.g=void 0;this.onabort=null}u(Qt,fb);fa.Object.defineProperties(Qt.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Ot(Rt);function St(){}function Tt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Ut(b.value)}function Ut(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)}})}Lt.Aria=St;St.install=Tt;Ot(Tt);function Vt(){}function Wt(){Xt()}Lt.EncryptionScheme=Vt;Vt.install=Wt;Ot(Wt,-2);function Yt(){}
|
|
826
|
+
function Zt(){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}}),
|
|
827
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",$t);document.addEventListener("webkitfullscreenerror",$t);document.addEventListener("mozfullscreenchange",$t);document.addEventListener("mozfullscreenerror",$t);document.addEventListener("MSFullscreenChange",$t);document.addEventListener("MSFullscreenError",$t)}}
|
|
828
|
+
function $t(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)}Lt.Fullscreen=Yt;Yt.install=Zt;Ot(Zt);function au(){}function bu(){var a=!0;if(Yc()||Sc("PlayStation 5")||Zc()||Sc("Web0S")||Wc()||Sc("CrKey")||Sc("PC=EOS")||Sc("Hisense")||Sc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),cu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=du)}
|
|
829
|
+
function du(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w;return K(function(C){switch(C.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return C.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Oc())return C.return(b);if(c){if(Sc("CrKey")){if(!window.cast)throw new P(2,8,8E3);if(cast.__platform__&&cast.__platform__.canDisplayType){var z=c.contentType;c.width&&c.height&&(z+="; width="+c.width+"; height="+c.height);c.framerate&&(z+="; framerate="+
|
|
831
830
|
c.framerate);"pq"===c.transferFunction&&(z+="; eotf=smpte2084");z=cast.__platform__.canDisplayType(z)}else z=MediaSource.isTypeSupported(c.contentType)}else z=MediaSource.isTypeSupported(c.contentType);e=z;if(!e)return C.return(b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return C.return(b)}else if("file"==a.type){if(c&&(h=c.contentType,k=Pc(h),!k)||d&&(l=d.contentType,m=Pc(l),!m))return C.return(b)}else return C.return(b);if(!a.keySystemConfiguration)return b.supported=!0,C.return(Promise.resolve(b));
|
|
832
831
|
p=a.keySystemConfiguration;n=[];t=[];p.audio&&(y={robustness:p.audio.robustness||"",contentType:a.audio.contentType},n.push(y));p.video&&(x={robustness:p.video.robustness||"",contentType:a.video.contentType},t.push(x));v={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};n.length&&(v.audioCapabilities=n);t.length&&(v.videoCapabilities=t);E(C,3);return A(C,navigator.requestMediaKeySystemAccess(p.keySystem,[v]),
|
|
833
|
-
5);case 5:w=C.h;va(C,4);break;case 3:J(C);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return C.return(b)}})}
|
|
834
|
-
function
|
|
835
|
-
function
|
|
836
|
-
function
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
function
|
|
832
|
+
5);case 5:w=C.h;va(C,4);break;case 3:J(C);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return C.return(b)}})}Lt.MediaCapabilities=au;au.install=bu;var cu=null;au.originalMcap=cu;Ot(bu,-1);function eu(){}function fu(){var a=$c();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?gu():a?12>=a?(hu(),iu()):hu():(Sc("Tizen 2")||Sc("Tizen 3")||Sc("Tizen 4"))&&ju());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ku()}
|
|
833
|
+
function hu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function iu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function ju(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=zd(b)[0]&&a(b)}}
|
|
834
|
+
function gu(){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)}}
|
|
835
|
+
function ku(){var a=MediaSource.isTypeSupported;Sc("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)})}Lt.MediaSource=eu;eu.install=fu;Ot(fu);function lu(){}function mu(){screen.orientation||void 0!=window.orientation&&nu()}function nu(){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 ou;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}Lt.Orientation=lu;
|
|
836
|
+
lu.install=mu;function ou(){fb.call(this);this.type="";this.angle=0}u(ou,fb);
|
|
837
|
+
ou.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)};
|
|
838
|
+
ou.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Ot(mu);function pu(){}function qu(a,b){try{var c=new ru(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function su(a){var b=this.mediaKeys;b&&b!=a&&tu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?tu(a,this):Promise.resolve()}function uu(a){a=Ec(a.initData);if(Hc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=ed(a.subarray(4),!0);a=hd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Fc(a);this.dispatchEvent(b)}
|
|
839
|
+
Lt.PatchedMediaKeysApple=pu;pu.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=su,window.MediaKeys=vu,window.MediaKeySystemAccess=ru,navigator.requestMediaKeySystemAccess=qu,window.shakaMediaKeysPolyfill=!0)};
|
|
840
|
+
function ru(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
842
841
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=r(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
843
|
-
|
|
844
|
-
function
|
|
845
|
-
q.generateRequest=function(a,b){var c=this;this.h=new Lc;try{var d=this.l.createSession("video/mp4",Ec(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.fc()?"license-request":"license-renewal").set("message",Fc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(
|
|
846
|
-
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
847
|
-
q.update=function(a){this.g=new Lc;try{this.i.update(Ec(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function
|
|
848
|
-
function
|
|
849
|
-
function
|
|
850
|
-
function
|
|
851
|
-
function
|
|
852
|
-
function
|
|
842
|
+
ru.prototype.createMediaKeys=function(){var a=new vu(this.keySystem);return Promise.resolve(a)};ru.prototype.getConfiguration=function(){return this.g};function vu(a){this.h=new WebKitMediaKeys(a);this.g=new Af}vu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new wu(this.h,a)};vu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
843
|
+
function tu(a,b){a.g.Sb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",uu);try{return nj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function wu(a){fb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new Af;this.sessionId="";this.expiration=NaN;this.closed=new Lc;this.keyStatuses=new xu}u(wu,fb);q=wu.prototype;
|
|
844
|
+
q.generateRequest=function(a,b){var c=this;this.h=new Lc;try{var d=this.l.createSession("video/mp4",Ec(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.fc()?"license-request":"license-renewal").set("message",Fc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(yu(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
|
|
845
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:yu(c,"output-not-allowed");break;default:yu(c,"internal-error")}});yu(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
846
|
+
q.update=function(a){this.g=new Lc;try{this.i.update(Ec(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function yu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}
|
|
847
|
+
function xu(){this.size=0;this.g=void 0}q=xu.prototype;q.fc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,ch.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ch.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function zu(){}function Au(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Bu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Cu,window.MediaKeys=Du,window.MediaKeySystemAccess=Eu,window.shakaMediaKeysPolyfill=!0)}function Bu(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
848
|
+
function Cu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Lt.PatchedMediaKeysNop=zu;zu.install=Au;function Du(){throw new TypeError("Illegal constructor.");}Du.prototype.createSession=function(){};Du.prototype.setServerCertificate=function(){};function Eu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Eu.prototype.getConfiguration=function(){};Eu.prototype.createMediaKeys=function(){};Ot(Au,-10);function Fu(){}
|
|
849
|
+
function Gu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Hu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Iu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ju;window.MediaKeys=Ku;window.MediaKeySystemAccess=Lu;window.shakaMediaKeysPolyfill=!0}}
|
|
850
|
+
function Mu(a){var b=Hu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Iu(a,b){try{var c=new Lu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ju(a){var b=this.mediaKeys;b&&b!=a&&Nu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Nu(a,this);return Promise.resolve()}Lt.PatchedMediaKeysWebkit=Fu;Fu.install=Gu;
|
|
851
|
+
function Lu(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),
|
|
853
852
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=r(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
854
|
-
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
855
|
-
function
|
|
856
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=
|
|
857
|
-
function
|
|
858
|
-
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?
|
|
859
|
-
function
|
|
860
|
-
function
|
|
861
|
-
function
|
|
862
|
-
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=
|
|
863
|
-
q.forEach=function(a){this.g&&a(this.g,ch.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ch.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var
|
|
864
|
-
function
|
|
865
|
-
function
|
|
866
|
-
function
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?$f(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new ic;var y=t.getAttribute("xml:id");if(y){n.id=y;var x=null;m&&(x=
|
|
870
|
-
null!=v&&(n.width=Number(v[1]),n.height=Number(v[2]),w||(null!=y&&(n.width=100*n.width/y),null!=x&&(n.height=100*n.height/x)),n.widthUnits=w||null!=y?zc:0,n.heightUnits=w||null!=x?zc:0);if(t=
|
|
871
|
-
2,2001,"<p> can only be inside <div> in TTML");m=r(Xf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Xf(p.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=
|
|
872
|
-
function
|
|
873
|
-
a=[];if(!x)for(var v=r(n.childNodes),w=v.next();!w.done;w=v.next())(w=
|
|
874
|
-
w=Math.min(w,b.segmentEnd);if(!C&&0<a.length)for(v=Infinity,w=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,v=Math.min(v,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new gc(v,w,""),e.lineBreak=!0,e;b="";x&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new gc(v,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=
|
|
875
|
-
z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=
|
|
876
|
-
function
|
|
877
|
-
f))a.backgroundColor=g;if(g=
|
|
878
|
-
"bold"==g&&(a.fontWeight=700);g=
|
|
879
|
-
f))d=d.split(" "),d[0].match(
|
|
880
|
-
function
|
|
881
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&dc(a.textDecoration,"overline")}}function
|
|
882
|
-
function
|
|
883
|
-
function
|
|
884
|
-
function
|
|
885
|
-
function
|
|
886
|
-
function
|
|
887
|
-
function
|
|
888
|
-
var
|
|
889
|
-
end:"end"},
|
|
890
|
-
M("shaka.text.Mp4TtmlParser",
|
|
891
|
-
|
|
892
|
-
e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new
|
|
893
|
-
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
f.startTime=k,f.endTime=l,f.payload=""):f=new gc(k,l,"")
|
|
897
|
-
function
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
"
|
|
901
|
-
function
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
function
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
function
|
|
853
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}Lu.prototype.createMediaKeys=function(){var a=new Ku(this.g);return Promise.resolve(a)};Lu.prototype.getConfiguration=function(){return this.h};function Ku(a){this.l=a;this.h=null;this.g=new Af;this.i=[];this.j=new Map}
|
|
854
|
+
function Nu(a,b){a.h=b;a.g.Sb();var c=Hu;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Fc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=Ou(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.fc()?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=Ou(a,d.sessionId))Pu(d,"usable"),
|
|
855
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=Ou(a,d.sessionId);e&&e.handleError(d)}))}Ku.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 Qu(b,this.l,a);this.i.push(a);return a};Ku.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
856
|
+
function Ou(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 Qu(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 Lc;this.keyStatuses=new Ru}u(Qu,fb);q=Qu.prototype;
|
|
857
|
+
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?Pu(this,"output-restricted"):1==b?Pu(this,"expired"):Pu(this,"internal-error"))};
|
|
858
|
+
function Su(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=Ec(hd("LOAD_SESSION|"+c));else{var e=hd("PERSISTENT|");d=pd(e,b)}else d=Ec(b)}catch(g){return Promise.reject(g)}a.h=new Lc;var f=Mu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
|
|
859
|
+
function Tu(a,b,c){if(a.g)a.g.then(function(){return Tu(a,b,c)}).catch(function(){return Tu(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=Ec(c),e=null;var f=Mu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
860
|
+
function Pu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return Su(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Su(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Lc;Tu(this,b,a);return b};
|
|
861
|
+
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=Mu("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 Ru(){this.size=0;this.g=void 0}q=Ru.prototype;q.fc=function(){return this.g};
|
|
862
|
+
q.forEach=function(a){this.g&&a(this.g,ch.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ch.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Hu="";Ot(Gu);function Uu(){}function Vu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Wu,Object.defineProperty(a,"disablePictureInPicture",{get:Xu,set:Yu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Zu,document.addEventListener("webkitpresentationmodechanged",$u,!0))}}
|
|
863
|
+
function $u(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)}
|
|
864
|
+
function Wu(){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 Zu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
865
|
+
function Xu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Yu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Lt.PiPWebkit=Uu;Uu.install=Vu;Ot(Vu);function av(){}function bv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=cv))}function cv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Lt.RandomUUID=av;av.install=bv;Ot(bv);function dv(){}function ev(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=fv)}function fv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Lt.StorageEstimate=dv;dv.install=ev;Ot(ev);function gv(){}function hv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:iv})}function iv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Lt.Symbol=gv;gv.install=hv;Ot(hv);function jv(){}function kv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Lt.VideoPlayPromise=jv;jv.install=kv;Ot(kv);function lv(){}function mv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Xc())&&(a.getVideoPlaybackQuality=nv)}}function nv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Lt.VideoPlaybackQuality=lv;lv.install=mv;Ot(mv);function ov(){}function pv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=qv;else if(6==b)a=rv;else{try{var c=!!qv(1,2,"")}catch(d){c=!1}c&&(a=qv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function qv(a,b,c){return new window.TextTrackCue(a,b,c)}function rv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Lt.VTTCue=ov;ov.install=pv;Ot(pv);function sv(){}sv.prototype.parseInit=function(){};sv.prototype.setSequenceMode=function(){};sv.prototype.parseMedia=function(a,b){var c=null,d=[];a=dd(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=tv.exec(e))){var f=uv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new gc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};M("shaka.text.LrcTextParser",sv);sv.prototype.parseMedia=sv.prototype.parseMedia;
|
|
866
|
+
sv.prototype.setSequenceMode=sv.prototype.setSequenceMode;sv.prototype.parseInit=sv.prototype.parseInit;var tv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,uv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Dd["application/x-subtitle-lrc"]=function(){return new sv};function vv(){}vv.prototype.parseInit=function(){};vv.prototype.setSequenceMode=function(){};
|
|
867
|
+
vv.prototype.parseMedia=function(a,b){var c=dd(a);a=[];if(""==c)return a;var d=ng(c,"tt");if(!d)throw new P(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=bg(d,wv,"frameRate"),f=bg(d,wv,"subFrameRate"),g=bg(d,wv,"frameRateMultiplier"),h=bg(d,wv,"tickRate"),k=bg(d,wv,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=bg(d,xv,"extent");if("default"!=l&&"preserve"!=l)throw new P(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new yv(e,f,
|
|
868
|
+
g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?$f(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new ic;var y=t.getAttribute("xml:id");if(y){n.id=y;var x=null;m&&(x=zv.exec(m)||Av.exec(m));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var v,w;if(v=Bv(t,g,"extent"))v=(w=zv.exec(v))||Av.exec(v),
|
|
869
|
+
null!=v&&(n.width=Number(v[1]),n.height=Number(v[2]),w||(null!=y&&(n.width=100*n.width/y),null!=x&&(n.height=100*n.height/x)),n.widthUnits=w||null!=y?zc:0,n.heightUnits=w||null!=x?zc:0);if(t=Bv(t,g,"origin"))v=(w=zv.exec(t))||Av.exec(t),null!=v&&(n.viewportAnchorX=Number(v[1]),n.viewportAnchorY=Number(v[2]),w||(null!=x&&(n.viewportAnchorY=100*n.viewportAnchorY/x),null!=y&&(n.viewportAnchorX=100*n.viewportAnchorX/y)),n.viewportAnchorUnits=w||null!=y?zc:0)}else n=null;n&&h.push(n)}if(Xf(c,"p").length)throw new P(2,
|
|
870
|
+
2,2001,"<p> can only be inside <div> in TTML");m=r(Xf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Xf(p.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Cv(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
871
|
+
function Cv(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var t=null,y=r(Dv),x=y.next();!x.done&&!(t=Ev(n,"backgroundImage",d,"#",x.value)[0]);x=y.next());y=m;if("p"==a.nodeName||t)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(n.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});
|
|
872
|
+
a=[];if(!x)for(var v=r(n.childNodes),w=v.next();!w.done;w=v.next())(w=Cv(w.value,b,c,d,e,f,g,h,k,n,m))&&a.push(w);d=null!=l;v=/\S/.test(n.textContent);var C=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(C||v||"br"==n.tagName||0!=a.length||d&&!h))return null;w=Fv(n,c);v=w.start;for(w=w.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)w=Gv(p,c,v,w),v=w.start,w=w.end,p=p.parentNode;null==v&&(v=0);v+=b.periodStart;w=null==w?Infinity:w+b.periodStart;v=Math.max(v,b.segmentStart);
|
|
873
|
+
w=Math.min(w,b.segmentEnd);if(!C&&0<a.length)for(v=Infinity,w=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,v=Math.min(v,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new gc(v,w,""),e.lineBreak=!0,e;b="";x&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new gc(v,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Ev(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==
|
|
874
|
+
z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=Ev(l,"region",f,"")[0]);Hv(b,n,g,t,e,y,0==a.length);return b}
|
|
875
|
+
function Hv(a,b,c,d,e,f,g){f=f||g;"rtl"==Iv(b,c,e,"direction",f)&&(a.direction="rtl");g=Iv(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=Iv(b,c,e,"textAlign",!0))?(a.positionAlign=Jv[g],a.lineAlign=Kv[g],a.textAlign=sc[g.toUpperCase()]):a.textAlign=kc;if(g=Iv(b,c,e,"displayAlign",!0))a.displayAlign=tc[g.toUpperCase()];if(g=Iv(b,c,e,"color",f))a.color=g;if(g=Iv(b,c,e,"backgroundColor",
|
|
876
|
+
f))a.backgroundColor=g;if(g=Iv(b,c,e,"border",f))a.border=g;if(g=Iv(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=g}(g=Iv(b,c,e,"fontWeight",f))&&
|
|
877
|
+
"bold"==g&&(a.fontWeight=700);g=Iv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Iv(b,c,e,"lineHeight",f))&&g.match(Lv)&&(a.lineHeight=g);(g=Iv(b,c,e,"fontSize",f))&&(g.match(Lv)||g.match(Mv))&&(a.fontSize=g);if(g=Iv(b,c,e,"fontStyle",f))a.fontStyle=yc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=Iv(b,c,e,"textOutline",
|
|
878
|
+
f))d=d.split(" "),d[0].match(Lv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Lv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Iv(b,c,e,"letterSpacing",f))&&d.match(Lv)&&(a.letterSpacing=d);(d=Iv(b,c,e,"linePadding",f))&&d.match(Lv)&&(a.linePadding=d);if(f=Iv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Bv(c,e,"textDecoration"))&&Nv(a,c);(b=Ov(b,e,"textDecoration"))&&Nv(a,b)}
|
|
879
|
+
function Nv(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&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")||
|
|
880
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&dc(a.textDecoration,"overline")}}function Iv(a,b,c,d,e){e=void 0===e?!0:e;return(a=Ov(a,c,d))?a:e?Bv(b,c,d):null}function Bv(a,b,c){if(!a)return null;var d=bg(a,xv,c);return d?d:Pv(a,b,c)}function Ov(a,b,c){var d=bg(a,xv,c);return d?d:Pv(a,b,c)}
|
|
881
|
+
function Pv(a,b,c){a=Ev(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ag(a[e],"urn:ebu:tt:style",c);f||(f=bg(a[e],xv,c));f||(f=Ov(a[e],b,c));f&&(d=f)}return d}
|
|
882
|
+
function Ev(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?ag(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 Gv(a,b,c,d){a=Fv(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}}
|
|
883
|
+
function Fv(a,b){var c=Qv(a.getAttribute("begin"),b),d=Qv(a.getAttribute("end"),b);a=Qv(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
884
|
+
function Qv(a,b){var c=null;if(Rv.test(a)){a=Rv.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(Sv.test(a))c=Tv(Sv,a);else if(Uv.test(a))c=Tv(Uv,a);else if(Vv.test(a))a=Vv.exec(a),c=Number(a[1])/b.frameRate;else if(Wv.test(a))a=Wv.exec(a),c=Number(a[1])/b.g;else if(Xv.test(a))c=Tv(Xv,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
885
|
+
function Tv(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}M("shaka.text.TtmlTextParser",vv);vv.prototype.parseMedia=vv.prototype.parseMedia;vv.prototype.setSequenceMode=vv.prototype.setSequenceMode;vv.prototype.parseInit=vv.prototype.parseInit;
|
|
886
|
+
function yv(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]))}
|
|
887
|
+
var zv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Mv=/^(\d{1,2}(?:\.\d+)?|100)%$/,Lv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Av=/^(\d+)px (\d+)px$/,Rv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Sv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Uv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Vv=/^(\d*(?:\.\d*)?)f$/,Wv=/^(\d*(?:\.\d*)?)t$/,Xv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Kv={left:nc,center:"center",right:"end",start:nc,
|
|
888
|
+
end:"end"},Jv={left:"line-left",center:"center",right:"line-right"},wv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],xv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Dv=["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 vv};function Yv(){this.g=new vv}Yv.prototype.parseInit=function(a){var b=!1;(new Lf).box("moov",Pf).box("trak",Pf).box("mdia",Pf).box("minf",Pf).box("stbl",Pf).X("stsd",Rf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};Yv.prototype.setSequenceMode=function(){};Yv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Lf).box("mdat",Sf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new P(2,2,2007);return e};
|
|
889
|
+
M("shaka.text.Mp4TtmlParser",Yv);Yv.prototype.parseMedia=Yv.prototype.parseMedia;Yv.prototype.setSequenceMode=Yv.prototype.setSequenceMode;Yv.prototype.parseInit=Yv.prototype.parseInit;Dd['application/mp4; codecs="stpp"']=function(){return new Yv};Dd['application/mp4; codecs="stpp.ttml"']=function(){return new Yv};Dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Yv};Dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Yv};function Zv(){this.g=!1}Zv.prototype.parseInit=function(){};Zv.prototype.setSequenceMode=function(a){this.g=a};
|
|
890
|
+
Zv.prototype.parseMedia=function(a,b){a=dd(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new P(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=$v(new Gq(d[1]));if(null==a)throw new P(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
|
|
891
|
+
e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Gq(d);var f=new ic;Jq(d);Hq(d);for(var g=Jq(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
|
|
892
|
+
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Hq(d);g=Jq(d)}b.push(f)}e=new Map;aw(e);d=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=r(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
|
|
893
|
+
(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new gc(0,0,""));for(var m=!1,p=0;p<k.length;p++){var n=/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(n){var t=n[2].trim().replace(";","");switch(n[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=t;break;case "color":m=!0;l.color=t;break;case "font-family":m=!0;l.fontFamily=t;break;case "font-size":m=!0;l.fontSize=t;break;case "font-weight":if(700<=parseInt(t,10)||"bold"==
|
|
894
|
+
t)m=!0,l.fontWeight=700;break;case "font-style":switch(t){case "normal":m=!0;l.fontStyle=qc;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(t);break;case "text-shadow":m=!0;l.textShadow=t;break;case "white-space":m=!0,l.wrapLine="noWrap"!=t}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));
|
|
895
|
+
g=new Gq(f[0]);k=$v(g);p=Iq(g,/[ \t]+--\x3e[ \t]+/g);l=$v(g);if(null==k||null==p||null==l)throw new P(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=bw(f.slice(1).join("\n").trim());e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.payload=""):f=new gc(k,l,"");cw(m,f,e);Hq(g);for(k=Jq(g);k;)dw(f,k,b),Hq(g),k=Jq(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
|
|
896
|
+
function aw(a){for(var b=r(Object.entries(wc)),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(xc));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)}
|
|
897
|
+
function cw(a,b,c){0===c.size&&aw(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+1:">"===a[e]&&0<f&&(f=
|
|
898
|
+
a.substr(f,e-f),f.match(ew)&&d.push(f),f=-1);d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):
|
|
899
|
+
">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=ng("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=r(e);for(e=a.next();!e.done;e=a.next())fw(e.value,b,d,c);b.nestedCues=d}else b.payload=a}
|
|
900
|
+
function gw(a,b){return a&&0<a.length?a:b}
|
|
901
|
+
function fw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=gw(h.backgroundColor,e.backgroundColor),e.color=gw(h.color,e.color),e.fontFamily=gw(h.fontFamily,e.fontFamily),e.fontSize=gw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
|
|
902
|
+
h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=$v(new Gq(g)))e.startTime=g}}if(dg(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=
|
|
903
|
+
r(a.childNodes),a=b.next();!a.done;a=b.next())fw(a.value,e,c,d)}
|
|
904
|
+
function dw(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=sc[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"==
|
|
905
|
+
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=hw(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=vc[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=vc[c[2].toUpperCase()])}function hw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
|
|
906
|
+
function $v(a){a=Iq(a,ew);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function bw(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}M("shaka.text.VttTextParser",Zv);Zv.prototype.parseMedia=Zv.prototype.parseMedia;
|
|
907
|
+
Zv.prototype.setSequenceMode=Zv.prototype.setSequenceMode;Zv.prototype.parseInit=Zv.prototype.parseInit;var ew=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Dd["text/vtt"]=function(){return new Zv};Dd['text/vtt; codecs="vtt"']=function(){return new Zv};Dd['text/vtt; codecs="wvtt"']=function(){return new Zv};function iw(){this.g=null}iw.prototype.parseInit=function(a){var b=this,c=!1;(new Lf).box("moov",Pf).box("trak",Pf).box("mdia",Pf).X("mdhd",function(d){d=ri(d.reader,d.version);b.g=d.timescale}).box("minf",Pf).box("stbl",Pf).X("stsd",Rf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};iw.prototype.setSequenceMode=function(){};
|
|
908
|
+
iw.prototype.parseMedia=function(a,b){if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Lf).box("moof",Pf).box("traf",Pf).X("tfdt",function(z){g=!0;c=qi(z.reader,z.version).gf}).X("tfhd",function(z){l=pi(z.reader,z.flags).tf}).X("trun",function(z){h=!0;d=si(z.reader,z.version,z.flags).Lf}).box("mdat",Sf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);a=c;for(var m=new If(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;var t=n.Be||l,y=n.Hd?
|
|
909
|
+
c+n.Hd:a;a=y+(t||0);var x=0;do{var v=m.R();x+=v;var w=m.R(),C=null;"vttc"==Tf(w)?8<v&&(C=m.Cb(v-8)):m.skip(v-8);t&&C&&(v=jw(C,b.periodStart+y/this.g,b.periodStart+a/this.g),f.push(v))}while(n.sampleSize&&x<n.sampleSize)}return f.filter(Bb)};function jw(a,b,c){var d,e,f;(new Lf).box("payl",Sf(function(g){d=dd(g)})).box("iden",Sf(function(g){e=dd(g)})).box("sttg",Sf(function(g){f=dd(g)})).parse(a);return d?kw(d,e,f,b,c):null}
|
|
910
|
+
function kw(a,b,c,d,e){d=new gc(d,e,"");cw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Gq(c),b=Jq(a);b;)dw(d,b,[]),Hq(a),b=Jq(a);return d}M("shaka.text.Mp4VttParser",iw);iw.prototype.parseMedia=iw.prototype.parseMedia;iw.prototype.setSequenceMode=iw.prototype.setSequenceMode;iw.prototype.parseInit=iw.prototype.parseInit;Dd['application/mp4; codecs="wvtt"']=function(){return new iw};function lw(){}lw.prototype.parseInit=function(){};lw.prototype.setSequenceMode=function(){};lw.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 Gq(c[0]),e=mw(d),f=Iq(d,/,/g);d=mw(d);if(null==e||null==f||null==d)throw new P(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};
|
|
911
|
+
function mw(a){a=Iq(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)}M("shaka.text.SbvTextParser",lw);lw.prototype.parseMedia=lw.prototype.parseMedia;lw.prototype.setSequenceMode=lw.prototype.setSequenceMode;lw.prototype.parseInit=lw.prototype.parseInit;Dd["text/x-subviewer"]=function(){return new lw};function nw(){this.g=new Zv}nw.prototype.parseInit=function(){};nw.prototype.setSequenceMode=function(){};nw.prototype.parseMedia=function(a,b){a=dd(a);a=ow(a);a=Ec(hd(a));return this.g.parseMedia(a,b)};function ow(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}M("shaka.text.SrtTextParser",nw);
|
|
912
|
+
nw.srt2webvtt=ow;nw.prototype.parseMedia=nw.prototype.parseMedia;nw.prototype.setSequenceMode=nw.prototype.setSequenceMode;nw.prototype.parseInit=nw.prototype.parseInit;Dd["text/srt"]=function(){return new nw};function pw(){}pw.prototype.parseInit=function(){};pw.prototype.setSequenceMode=function(){};
|
|
913
|
+
pw.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=qw.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=rw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(sw);else if("Style"==e){e=f.split(sw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
914
|
+
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Zd:e.Zd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=rw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(sw);else if("Dialogue"==f){g=g.split(sw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=tw(f.Start);var k=tw(f.End);g=new gc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Zd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Zd}}(e)))&&uw(g,f);d.push(g)}return d};
|
|
915
|
+
function uw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=vw(c))a.color=c;if(c=b.BackColour)if(c=vw(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";
|
|
913
916
|
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(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
914
|
-
function
|
|
915
|
-
var
|
|
917
|
+
function vw(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 tw(a){a=ww.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",pw);pw.prototype.parseMedia=pw.prototype.parseMedia;pw.prototype.setSequenceMode=pw.prototype.setSequenceMode;pw.prototype.parseInit=pw.prototype.parseInit;
|
|
918
|
+
var qw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,rw=/^\s*([^:]+):\s*(.*)/,sw=/\s*,\s*/,ww=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Dd["text/x-ssa"]=function(){return new pw};/*
|
|
916
919
|
@license
|
|
917
920
|
EME Encryption Scheme Polyfill
|
|
918
921
|
Copyright 2019 Google LLC
|
|
919
922
|
SPDX-License-Identifier: Apache-2.0
|
|
920
923
|
*/
|
|
921
|
-
function
|
|
922
|
-
function
|
|
924
|
+
function xw(){}var yw;function zw(){yw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(yw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Aw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
925
|
+
function Aw(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),A(e,yw.call(c,a,b),2);d=e.h;if(Bw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=yw,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Cw;return e.return(Cw.call(c,
|
|
923
926
|
a,b))})}
|
|
924
|
-
function
|
|
925
|
-
p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return A(t,
|
|
926
|
-
function
|
|
927
|
-
function
|
|
928
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
929
|
-
function
|
|
930
|
-
new
|
|
931
|
-
function
|
|
932
|
-
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}M("McEncryptionSchemePolyfill",
|
|
933
|
-
|
|
934
|
-
function
|
|
935
|
-
function
|
|
927
|
+
function Cw(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return K(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Dw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Ew(h.videoCapabilities,d),l=Ew(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw p=Error("Unsupported keySystem or supportedConfigurations."),
|
|
928
|
+
p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return A(t,yw.call(c,a,e),2)}n=t.h;return t.return(new Fw(n,d))})}function Ew(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",xw);xw.install=zw;function Gw(){}var Hw;
|
|
929
|
+
function Iw(){Hw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Hw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Jw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
930
|
+
function Jw(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),A(f,Hw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&Bw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Hw,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
931
|
+
navigator.mediaCapabilities.decodingInfo=Kw;if(d){f.D(3);break}e=c;return A(f,Lw(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(Kw.call(b,a))}})}
|
|
932
|
+
function Kw(a){var b=this,c,d,e,f,g,h,k,l;return K(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=Dw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):A(m,Hw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
933
|
+
new Fw(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return A(m,Lw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
934
|
+
function Lw(a){var b,c;return K(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 A(d,
|
|
935
|
+
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}M("McEncryptionSchemePolyfill",Gw);Gw.install=Iw;function Fw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
936
|
+
Fw.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};Fw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
937
|
+
function Dw(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 Bw(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}
|
|
938
|
+
function Mw(){}function Xt(){zw();Iw()}M("EncryptionSchemePolyfills",Mw);Mw.install=Xt;"undefined"!==typeof module&&module.exports&&(module.exports=Mw);/*
|
|
936
939
|
@license
|
|
937
940
|
Copyright 2013 Ali Al Dallal
|
|
938
941
|
|
|
@@ -956,7 +959,7 @@ function Kw(){}function Vt(){xw();Gw()}M("EncryptionSchemePolyfills",Kw);Kw.inst
|
|
|
956
959
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
957
960
|
SOFTWARE.
|
|
958
961
|
*/
|
|
959
|
-
for(var
|
|
962
|
+
for(var Nw={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)"},
|
|
960
963
|
"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",
|
|
961
964
|
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",
|
|
962
965
|
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",
|
|
@@ -977,55 +980,55 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
|
|
|
977
980
|
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",
|
|
978
981
|
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",
|
|
979
982
|
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",
|
|
980
|
-
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"}},
|
|
981
|
-
|
|
982
|
-
X.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};M("shaka.ui.Element",X);X.prototype.release=X.prototype.release;function
|
|
983
|
-
function
|
|
984
|
-
""))});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.za();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ka(.5))}u(
|
|
985
|
-
"ad-stopped",function(){c.h.textContent="";Y(c.g,!1)});this.ad&&
|
|
986
|
-
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()
|
|
987
|
-
M("shaka.ui.PlayButton",
|
|
988
|
-
!1)});this.eventManager.o(window,"click",function(){Y(c.g,!1)});
|
|
989
|
-
|
|
990
|
-
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,
|
|
991
|
-
"mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(
|
|
992
|
-
q.setValue=function(a){this.g||(this.bar.value=a)};function
|
|
993
|
-
|
|
994
|
-
"locale-changed",function(){return
|
|
995
|
-
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);
|
|
996
|
-
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.Ka(),g=f.end-f.start;this.setRange(f.start,f.end);
|
|
983
|
+
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"}},Ow=r(Object.keys(Nw)),Pw=Ow.next();!Pw.done;Pw=
|
|
984
|
+
Ow.next()){var Qw=Pw.value;Nw[Qw.toLowerCase()]=Nw[Qw]};function X(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Af;this.localization=this.controls.Aa;this.player=this.controls.dc();this.video=this.controls.Bb();this.adManager=this.player.nd();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})}
|
|
985
|
+
X.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};M("shaka.ui.Element",X);X.prototype.release=X.prototype.release;function Rw(a){return Sw(a,"shaka-back-to-overflow-button")}function Sw(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function Tw(a){a&&(a=Sw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function Uw(){var a=S("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function Y(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
986
|
+
function Vw(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function Ww(a,b){X.call(this,a,b);var c=this;this.i=S("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=S("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Q(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=Vw(e-d,!1)+" / "+Vw(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=
|
|
987
|
+
""))});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.za();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ka(.5))}u(Ww,X);Ww.prototype.release=function(){this.g.stop();this.g=null;X.prototype.release.call(this)};M("shaka.ui.AdCounter",Ww);function Xw(a,b){X.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");Y(this.g,!1);this.parent.appendChild(this.g);this.h=S("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&Yw(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&Yw(c)});this.eventManager.o(this.adManager,"ad-started",function(){Yw(c)});this.eventManager.o(this.adManager,
|
|
988
|
+
"ad-stopped",function(){c.h.textContent="";Y(c.g,!1)});this.ad&&Yw(this)}u(Xw,X);function Yw(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));Y(a.g,!0)}}M("shaka.ui.AdPosition",Xw);function Zw(a,b){X.call(this,a,b);var c=this;this.button=Mk();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();
|
|
989
|
+
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()?$w(c.controls):ax(c.controls)});this.ad&&(this.g(),this.h())}u(Zw,X);Zw.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};Zw.prototype.g=function(){};Zw.prototype.h=function(){};
|
|
990
|
+
M("shaka.ui.PlayButton",Zw);function bx(a,b){Zw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}u(bx,Zw);bx.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};bx.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};M("shaka.ui.BigPlayButton",bx);function cx(a,b){X.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=S("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";Y(c.g,!0)}else Y(c.g,
|
|
991
|
+
!1)});this.eventManager.o(window,"click",function(){Y(c.g,!1)});dx(this)}u(cx,X);cx.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=[];X.prototype.release.call(this)};function ex(a,b){fx.set(a,b)}function dx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=fx.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}M("shaka.ui.ContextMenu",cx);
|
|
992
|
+
cx.registerElement=ex;var fx=new Map;function gx(a,b,c,d){X.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ja(c));this.g=!1;this.bar=document.createElement("input");this.l=new Q(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ja(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);
|
|
993
|
+
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,hx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(hx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,hx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
|
|
994
|
+
"mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(gx,X);q=gx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.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.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
|
|
995
|
+
q.setValue=function(a){this.g||(this.bar.value=a)};function hx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}M("shaka.ui.RangeElement",gx);gx.prototype.setValue=gx.prototype.setValue;gx.prototype.getValue=gx.prototype.getValue;gx.prototype.changeTo=gx.prototype.changeTo;gx.prototype.onChangeEnd=gx.prototype.onChangeEnd;
|
|
996
|
+
gx.prototype.onChange=gx.prototype.onChange;gx.prototype.onChangeStart=gx.prototype.onChangeStart;gx.prototype.setRange=gx.prototype.setRange;function ix(a,b){gx.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=S("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 Q(function(){c.video.currentTime=c.getValue()});this.A=new Q(function(){jx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return kx(c)});this.eventManager.o(this.localization,
|
|
997
|
+
"locale-changed",function(){return kx(c)});this.eventManager.o(this.adManager,"ad-started",function(){lx(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){lx(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;mx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];mx(c)});this.setValue(this.video.currentTime);this.update();kx(this);this.ad&&Y(this.container,!1)}u(ix,gx);q=ix.prototype;
|
|
998
|
+
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);gx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Le(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.za();this.controls.Le(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
999
|
+
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.Ka(),g=f.end-f.start;this.setRange(f.start,f.end);lx(this)?(Y(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?
|
|
997
1000
|
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()+")")):Y(this.container,!1)};
|
|
998
|
-
function
|
|
999
|
-
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
|
|
1000
|
-
|
|
1001
|
-
!1)});this.Oa=new Q(function(){e.Nb()&&
|
|
1002
|
-
q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return A(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.Oa&&(a.Oa.stop(),a.Oa=null);
|
|
1003
|
-
null;case 6:a.F=null,a.B=null,a.A=null,a.Aa=null,a.ma.clear(),fb.prototype.release.call(a),B(b)}})};function
|
|
1004
|
-
q.configure=function(a){this.i=a;this.C.
|
|
1005
|
-
this.g.appendChild(this.hb);
|
|
1006
|
-
c)}};q.
|
|
1007
|
-
q.vg=function(){return this.g};q.Kg=function(){return this.hb};q.rg=function(){return this.P};q.sg=function(){return this.i};q.Vg=function(){return this.$};q.
|
|
1001
|
+
function jx(a){if(a.i.length){for(var b=a.player.Ka(),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 "+
|
|
1002
|
+
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 mx(a){jx(a);var b=a.player.Ka();b=b.end-b.start;a.player.U()&&5<b&&a.A.ka(1)}function lx(a){var b=a.player.Ka();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function kx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}M("shaka.ui.SeekBar",ix);function nx(){}
|
|
1003
|
+
nx.prototype.create=function(a,b){return new ix(a,b)};ix.Factory=nx;function Z(a,b,c,d){fb.call(this);var e=this;this.T=!0;this.i=d;this.C=new Zn(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.ab=!0;this.A=this.C.Bb();this.B=c;this.F=this.C.dc();this.ua=a;this.j=b;this.Za=this.F.nd();this.l=this.m=null;this.$=!1;this.G=[];this.xb=[];this.ib=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.ib=!1;ox(e)});this.ea=new Q(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())Y(g.value,
|
|
1004
|
+
!1)});this.Oa=new Q(function(){e.Nb()&&px(e)});this.J=null;this.H=[];this.Aa=qx();this.h=new Af;this.configure(this.i);rx(this);this.ma=new Set;sx(this);this.Oa.ka(.125);this.h.o(this.Aa,"locale-changed",function(f){e.Za.setLocale(f.locales[0])})}u(Z,fb);q=Z.prototype;
|
|
1005
|
+
q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return A(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.Oa&&(a.Oa.stop(),a.Oa=null);tx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return A(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.ua){b.D(6);break}return A(b,a.ua.destroy(),7);case 7:a.ua=
|
|
1006
|
+
null;case 6:a.F=null,a.B=null,a.A=null,a.Aa=null,a.ma.clear(),fb.prototype.release.call(a),B(b)}})};function tx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function ux(a,b){vx.set(a,b)}q.dg=function(a){this.ab=a;sx(this)};q.Wg=function(){ox(this)};
|
|
1007
|
+
q.configure=function(a){this.i=a;this.C.nf(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.gb&&(this.gb=null);this.$a&&(this.$a=null);this.g?(Nk(this.g),tx(this)):(wx(this),xx(this));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");yx(this);this.i.addBigPlayButton&&zx(this);this.i.customContextMenu&&(this.$a=new cx(this.Z,this),this.H.push(this.$a));this.ba||Ax(this);this.hb=S("div");this.hb.classList.add("shaka-server-side-ad-container");
|
|
1008
|
+
this.g.appendChild(this.hb);Bx(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ja(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Cx(this);this.xb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));ox(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",
|
|
1009
|
+
c)}};q.He=function(a){(this.T=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");ox(this)};q.Of=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.He(!1)};q.getAd=function(){return this.m};q.pg=function(){return this.C};q.Cg=function(){return this.Aa};q.Qg=function(){return this.j};q.Bb=function(){return this.A};q.Bg=function(){return this.B};q.dc=function(){return this.F};q.Ag=function(){return this.ua};
|
|
1010
|
+
q.vg=function(){return this.g};q.Kg=function(){return this.hb};q.rg=function(){return this.P};q.sg=function(){return this.i};q.Vg=function(){return this.$};q.Le=function(a){this.$=a};q.Tg=function(){return this.ab};q.yf=function(){return this.l?this.l.getValue():this.A.currentTime};q.Pf=function(a){this.J=a};q.hd=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.hc=function(){this.I.za()};
|
|
1008
1011
|
q.sd=function(){return document.fullscreenEnabled||this.B.webkitSupportsFullscreen?!0:!1};q.jc=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.B;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
1009
|
-
function
|
|
1010
|
-
2);case 4:va(d,0);break;case 2:c=J(d),a.dispatchEvent(new O("error",(new Map).set("detail",c))),B(d)}})}function
|
|
1011
|
-
q.Rf=function(){Y(this.K,!0);Y(this.P,!0);this.g.setAttribute("ad-active","true")};q.
|
|
1012
|
-
function
|
|
1013
|
-
function
|
|
1014
|
-
function
|
|
1012
|
+
function Dx(a){var b,c;return K(function(d){switch(d.g){case 1:E(d,2);if(!document.fullscreenEnabled){b=a.B;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();d.D(4);break}if(!document.pictureInPictureElement){d.D(5);break}return A(d,document.exitPictureInPicture(),5);case 5:return A(d,a.j.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(4);break}E(d,9);return A(d,screen.orientation.lock("landscape"),11);case 11:va(d,4,2);break;case 9:J(d,
|
|
1013
|
+
2);case 4:va(d,0);break;case 2:c=J(d),a.dispatchEvent(new O("error",(new Map).set("detail",c))),B(d)}})}function Ex(a){var b;return K(function(c){if(!document.fullscreenEnabled)return b=a.B,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.D(0);screen.orientation&&screen.orientation.unlock();return A(c,document.exitFullscreen(),0)})}q.Se=function(){var a=this;return K(function(b){return a.jc()?A(b,Ex(a),0):A(b,Dx(a),0)})};
|
|
1014
|
+
q.Rf=function(){Y(this.K,!0);Y(this.P,!0);this.g.setAttribute("ad-active","true")};q.Cf=function(){Y(this.K,!1);Y(this.P,!1);this.g.removeAttribute("ad-active")};function ax(a){a.T&&a.A.duration&&(a.F.kf(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function $w(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
|
|
1015
|
+
function wx(a){a.g=S("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():(Fx(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){Gx(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&a.sd()&&a.Se()})}
|
|
1016
|
+
function zx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.gb=new bx(b,a);a.H.push(a.gb)}function yx(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Hx(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();Y(a.K,b);a.N.appendChild(a.K);b=new Xw(a.K,a);a.H.push(b);b=new Ww(a.K,a);a.H.push(b)}
|
|
1017
|
+
function Ax(a){a.ba=S("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=S("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");
|
|
1015
1018
|
b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
|
|
1016
|
-
function
|
|
1017
|
-
(c=
|
|
1018
|
-
function
|
|
1019
|
-
a.h.o(a.C,"caststatuschanged",function(){
|
|
1020
|
-
|
|
1021
|
-
function
|
|
1022
|
-
function
|
|
1023
|
-
function
|
|
1024
|
-
function
|
|
1025
|
-
function
|
|
1026
|
-
function
|
|
1027
|
-
function
|
|
1028
|
-
function
|
|
1019
|
+
function Bx(a){a.N=S("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.hc()});Hx(a);a.Z=S("div");a.Z.classList.add("shaka-controls-button-panel");a.Z.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.Z.classList.add("shaka-tooltips-on");a.N.appendChild(a.Z);for(var b=r(a.i.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,vx.get(c)?
|
|
1020
|
+
(c=vx.get(c).create(a.Z,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function Cx(a){if(a.i.addSeekBar)a.l=Ix.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 xx(a){a.P=S("div");a.P.classList.add("shaka-client-side-ad-container");Y(a.P,!1);a.h.o(a.P,"click",function(){Gx(a)});a.j.appendChild(a.P)}
|
|
1021
|
+
function rx(a){a.h.o(a.F,"buffering",function(){a.T&&Y(a.ba,a.F.Pc())});a.T&&Y(a.ba,a.F.Pc());a.h.o(window,"keydown",function(b){Jx(a,b)});a.h.o(window,"click",function(){return a.hc()});a.h.o(a,"submenuopen",function(){a.hc()});a.h.o(a.A,"play",function(){ox(a)});a.h.o(a.A,"pause",function(){ox(a)});a.h.o(a.j,"mousemove",function(b){Fx(a,b)});a.h.o(a.j,"touchmove",function(b){Fx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Fx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.za()});
|
|
1022
|
+
a.h.o(a.C,"caststatuschanged",function(){sx(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)&&Fx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(c=a.i.keyboardSeekDistance,b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),Kx(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),Kx(a,a.l.getValue()+c));break;case "Home":a.l&&
|
|
1023
|
+
Kx(a,a.F.Ka().start);break;case "End":a.l&&Kx(a,a.F.Ka().end);break;case " ":e&&Lx(a)}});a.h.o(a.j,"keyup",function(b){a.ma.delete(b.key)});a.h.o(a.Za,"ad-started",function(b){a.m=b.ad;a.Rf()});a.h.o(a.Za,"ad-stopped",function(){a.m=null;a.Cf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return K(function(b){return A(b,Mx(a),0)})})}
|
|
1024
|
+
function Mx(a){return K(function(b){return a.A&&0!=a.A.readyState&&!a.C.qa()&&a.i.enableFullscreenOnRotation&&a.sd()?screen.orientation.type.includes("landscape")&&!a.jc()?A(b,Dx(a),0):screen.orientation.type.includes("portrait")&&a.jc()?A(b,Ex(a),0):b.D(0):b.return()})}
|
|
1025
|
+
function Fx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),ox(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.ib=!0,a.I.stop(),a.Nb()||(px(a),ox(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.S(3))}function Nx(a){return window.matchMedia("hover: hover").matches?a.xb.some(function(b){return b.matches(":hover")}):!1}
|
|
1026
|
+
function ox(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.ib||d||Nx(a)?(px(a),a.g.setAttribute("shown","true"),a.ea.stop()):a.ea.S(a.i.fadeDelay)}function Gx(a){a.T&&(a.hd()?a.I.za():a.i.singleClickForPlayAndPause&&Lx(a))}function Lx(a){a.m&&a.m.isLinear()?$w(a):ax(a)}
|
|
1027
|
+
function sx(a){var b=a.C.qa();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Nb=function(){return this.T?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function Kx(a,b){a.l.changeTo(b);a.Nb()&&px(a)}
|
|
1028
|
+
function px(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 O("timeandseekrangeupdated"))}
|
|
1029
|
+
function Jx(a,b){a.ma.add(b.key);var c=a.hd();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),ox(a),a.h.o(window,"mousedown",function(){a.h.sc(window,"mousedown")}));"Escape"==b.key&&a.I.za();c&&a.ma.has("Tab")&&Ox(a,b)}
|
|
1030
|
+
function Ox(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())}}}
|
|
1031
|
+
function qx(){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..."],
|
|
1029
1032
|
["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"],
|
|
1030
1033
|
["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"],
|
|
1031
1034
|
["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"],
|
|
@@ -1083,77 +1086,77 @@ a.ia("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1083
1086
|
["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]"],
|
|
1084
1087
|
["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"],
|
|
1085
1088
|
["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"],
|
|
1086
|
-
["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.
|
|
1087
|
-
Z.prototype.toggleFullScreen=Z.prototype.
|
|
1089
|
+
["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.mf(navigator.languages||[]);return a}M("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.Nb;Z.prototype.hideAdUI=Z.prototype.Cf;Z.prototype.showAdUI=Z.prototype.Rf;
|
|
1090
|
+
Z.prototype.toggleFullScreen=Z.prototype.Se;Z.prototype.isFullScreenEnabled=Z.prototype.jc;Z.prototype.isFullScreenSupported=Z.prototype.sd;Z.prototype.hideSettingsMenus=Z.prototype.hc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.hd;Z.prototype.setLastTouchEventTime=Z.prototype.Pf;Z.prototype.getDisplayTime=Z.prototype.yf;Z.prototype.isCastAllowed=Z.prototype.Tg;Z.prototype.setSeeking=Z.prototype.Le;Z.prototype.isSeeking=Z.prototype.Vg;Z.prototype.getConfig=Z.prototype.sg;
|
|
1088
1091
|
Z.prototype.getClientSideAdContainer=Z.prototype.rg;Z.prototype.getServerSideAdContainer=Z.prototype.Kg;Z.prototype.getControlsContainer=Z.prototype.vg;Z.prototype.getLocalPlayer=Z.prototype.Ag;Z.prototype.getPlayer=Z.prototype.dc;Z.prototype.getLocalVideo=Z.prototype.Bg;Z.prototype.getVideo=Z.prototype.Bb;Z.prototype.getVideoContainer=Z.prototype.Qg;Z.prototype.getLocalization=Z.prototype.Cg;Z.prototype.getCastProxy=Z.prototype.pg;Z.prototype.getAd=Z.prototype.getAd;
|
|
1089
|
-
Z.prototype.setEnabledNativeControls=Z.prototype.Of;Z.prototype.setEnabledShakaControls=Z.prototype.
|
|
1090
|
-
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);
|
|
1091
|
-
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){
|
|
1092
|
-
function
|
|
1093
|
-
M("shaka.ui.OverflowMenu",
|
|
1094
|
-
this.i=S("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1095
|
-
c.player.
|
|
1096
|
-
|
|
1097
|
-
q.getConfiguration=function(){var a=
|
|
1098
|
-
function
|
|
1092
|
+
Z.prototype.setEnabledNativeControls=Z.prototype.Of;Z.prototype.setEnabledShakaControls=Z.prototype.He;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Wg;Z.prototype.allowCast=Z.prototype.dg;Z.registerSeekBar=function(a){Ix=a};Z.registerElement=ux;Z.prototype.destroy=Z.prototype.destroy;var vx=new Map,Ix=new nx;function Px(a,b){X.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=Mk();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=S("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");
|
|
1093
|
+
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);Qx(this);this.eventManager.o(this.localization,"locale-updated",function(){Rx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Rx(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&Y(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Y(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){Y(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Pf(Date.now());
|
|
1094
|
+
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){Sx(c)});Rx(this);this.ad&&this.ad.isLinear()&&Y(this.g,!1)}u(Px,X);Px.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=[];X.prototype.release.call(this)};function Tx(a,b){Ux.set(a,b)}
|
|
1095
|
+
function Qx(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,Ux.get(c)?(c=Ux.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function Sx(a){if(a.controls.hd())a.controls.hc();else{Y(a.h,!0);ox(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 Rx(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1096
|
+
M("shaka.ui.OverflowMenu",Px);Px.registerElement=Tx;function Vx(){}Vx.prototype.create=function(a,b){return new Px(a,b)};ux("overflow_menu",new Vx);var Ux=new Map;function Wx(a,b){X.call(this,a,b);var c=this;this.g=Mk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=S("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=S("span");a.appendChild(this.j);
|
|
1097
|
+
this.i=S("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);Xx(this);Yx(this);this.eventManager.o(this.localization,"locale-updated",function(){Xx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Xx(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});a=this.controls.Bb();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1098
|
+
c.player.zf()==Jm;Y(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){Yx(c)})}u(Wx,X);function Yx(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Xx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}M("shaka.ui.AirPlayButton",Wx);function Zx(){}Zx.prototype.create=function(a,b){return new Wx(a,b)};Tx("airplay",new Zx);
|
|
1099
|
+
ux("airplay",new Zx);function $x(a,b,c){this.i=a;this.h=ay(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.ie()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.Oe(b);b.ui=this;c.ui=this}q=$x.prototype;q.destroy=function(){var a=this;return K(function(b){if(1==b.g)return a.g?A(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?A(b,a.i.destroy(),4):b.D(4);a.i=null;B(b)})};q.ie=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Yc()&&1<navigator.maxTouchPoints};
|
|
1100
|
+
q.getConfiguration=function(){var a=ay(this);rl(a,this.h,ay(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=sl(a,b));rl(this.h,a,ay(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};q.ug=function(){return this.g};q.xh=function(a){this.g.He(a)};
|
|
1101
|
+
function ay(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",
|
|
1099
1102
|
"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)"},
|
|
1100
|
-
trackLabelFormat
|
|
1101
|
-
function
|
|
1102
|
-
case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;p=r(b);for(d=p.next();!d.done;d=p.next())if(n=d.value,n.parentElement==l){m=n;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));E(t,7);return A(t,
|
|
1103
|
-
function
|
|
1104
|
-
function
|
|
1105
|
-
d.g.Of(!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){p.D(0);break}m=l.value;E(p,5);return A(p,d.g.dc().load(m.getAttribute("src")),7);case 7:p.D(0);break;case 5:J(p);case 3:l=k.next(),p.D(2)}})}M("shaka.ui.Overlay"
|
|
1106
|
-
|
|
1107
|
-
p.Xa.forced,y=f.resolve(Zb.Yf),x=k(p.Xa),v=h(n,x);if(!m.has(v)){m.add(v);var w=
|
|
1108
|
-
break;case 3:p.Xa.label?C.textContent=p.Xa.label:(Ua("Track #"+p.Xa.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&v==l&&(w.appendChild(
|
|
1109
|
-
function
|
|
1110
|
-
function
|
|
1111
|
-
function
|
|
1112
|
-
S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function
|
|
1113
|
-
function(){
|
|
1114
|
-
function
|
|
1115
|
-
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1116
|
-
function
|
|
1117
|
-
function
|
|
1118
|
-
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.
|
|
1119
|
-
c.controls.
|
|
1120
|
-
M("shaka.ui.FullscreenButton",
|
|
1121
|
-
a.appendChild(this.l);this.g.appendChild(a);
|
|
1122
|
-
function
|
|
1123
|
-
this.eventManager.o(this.video,"volumechange",function(){
|
|
1124
|
-
function
|
|
1125
|
-
S("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);
|
|
1103
|
+
trackLabelFormat:by,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.ie()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
|
|
1104
|
+
function cy(){var a,b,c,d,e,f,g,h,k,l,m,p,n;return K(function(t){switch(t.g){case 1:Mt();if(!Zl())return dy("shaka-ui-load-failed",ey),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),fy(f,e));t.D(2);break}h=r(a);k=h.next();
|
|
1105
|
+
case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;p=r(b);for(d=p.next();!d.done;d=p.next())if(n=d.value,n.parentElement==l){m=n;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));E(t,7);return A(t,fy(l,m),9);case 9:va(t,5);break;case 7:return J(t),dy("shaka-ui-load-failed",gy),t.return();case 5:k=h.next();t.D(4);break;case 2:dy("shaka-ui-loaded"),B(t)}})}
|
|
1106
|
+
function dy(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
1107
|
+
function fy(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:c=new T(b);d=new $x(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&&
|
|
1108
|
+
d.g.Of(!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){p.D(0);break}m=l.value;E(p,5);return A(p,d.g.dc().load(m.getAttribute("src")),7);case 7:p.D(0);break;case 5:J(p);case 3:l=k.next(),p.D(2)}})}M("shaka.ui.Overlay",$x);$x.prototype.setEnabled=$x.prototype.xh;$x.prototype.getControls=$x.prototype.ug;$x.prototype.configure=$x.prototype.configure;
|
|
1109
|
+
$x.prototype.getConfiguration=$x.prototype.getConfiguration;$x.prototype.isMobile=$x.prototype.ie;$x.prototype.destroy=$x.prototype.destroy;var by=0;$x.TrackLabelFormat={LANGUAGE:by,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var ey=0,gy=1;$x.FailReasonCode={NO_BROWSER_SUPPORT:ey,PLAYER_FAILED_TO_LOAD:gy};"complete"==document.readyState?K(function(a){if(1==a.g)return A(a,Promise.resolve(),2);cy();B(a)}):window.addEventListener("load",cy);function hy(a,b,c,d,e,f,g){function h(z,D){return z+": "+D}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=Rw(b);Nk(b);b.appendChild(m);m=new Map;for(var p=r(a),n=p.next();!n.done;n=p.next())n=n.value,m.has(n.language)||m.set(n.language,new Set),m.get(n.language).add(k(n));m=new Set;l=l?h(l.language,k(l)):"";p={};a=r(a);for(n=a.next();!n.done;p={Xa:p.Xa},n=a.next()){p.Xa=n.value;n=p.Xa.language;var t=
|
|
1110
|
+
p.Xa.forced,y=f.resolve(Zb.Yf),x=k(p.Xa),v=h(n,x);if(!m.has(v)){m.add(v);var w=Mk();w.addEventListener("click",function(z){return function(){c(z.Xa)}}(p));var C=S("span");w.appendChild(C);C.textContent=iy(n,f);switch(g){case by:t&&(C.textContent+=" ("+y+")");break;case 1:x?C.textContent=x:(Ua("Track #"+p.Xa.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");t&&(C.textContent+=" ("+y+")");break;case 2:x&&(C.textContent+=": "+x);t&&(C.textContent+=" ("+y+")");
|
|
1111
|
+
break;case 3:p.Xa.label?C.textContent=p.Xa.label:(Ua("Track #"+p.Xa.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&v==l&&(w.appendChild(Uw()),C.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=C.textContent);b.appendChild(w)}}}
|
|
1112
|
+
function iy(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 Nw?Nw[a].s:c in Nw?Nw[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function jy(a,b,c){X.call(this,a,b);var d=this;ky(this,c);ly(this);my(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),Y(d.menu,!0),Tw(d.menu)):Y(d.menu,!1)})}u(jy,X);
|
|
1113
|
+
function ky(a,b){a.button=Mk();a.button.classList.add("shaka-overflow-button");a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=S("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=S("span");b.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
|
|
1114
|
+
function ly(a){a.menu=S("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=Mk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.hc()});var b=S("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1115
|
+
S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function my(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")}Y(a.parent,!0);ib(a.parent.childNodes,b)&&jb(a.parent.childNodes,b)[0].focus();ox(a.controls)}))}M("shaka.ui.SettingsMenu",jy);function ny(a,b){jy.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(){oy(c)});this.eventManager.o(this.localization,"locale-changed",function(){oy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Sa().length;Y(c.button,d);py(c)});this.eventManager.o(this.player,"variantchanged",
|
|
1116
|
+
function(){py(c)});oy(this);py(this)}u(ny,jy);function py(a){var b=a.player.Sa();hy(b,a.menu,function(c){a.player.Id(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);Tw(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
|
|
1117
|
+
function oy(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")}M("shaka.ui.AudioLanguageSelection",ny);function qy(){}qy.prototype.create=function(a,b){return new ny(a,b)};Tx("language",new qy);ux("language",new qy);function ry(a,b){X.call(this,a,b);var c=this;this.h=this.controls.C;this.g=Mk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=S("span");a.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
|
|
1118
|
+
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);sy(this);ty(this);this.eventManager.o(this.localization,"locale-updated",function(){sy(c)});this.eventManager.o(this.localization,"locale-changed",function(){sy(c)});this.eventManager.o(this.g,"click",function(){uy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){ty(c)})}u(ry,X);
|
|
1119
|
+
function uy(a){var b;K(function(c){if(1==c.g){if(a.h.qa())return a.h.Sf(),c.D(0);E(c,3);a.g.disabled=!0;return A(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=J(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));B(c)})}function ty(a){var b=a.h.jf()&&a.controls.ab,c=a.h.qa();Y(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");vy(a)}
|
|
1120
|
+
function vy(a){a.j.textContent=a.h.qa()?a.h.Gd():a.localization.resolve("OFF")}function sy(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");vy(a)}M("shaka.ui.CastButton",ry);function wy(){}wy.prototype.create=function(a,b){return new ry(a,b)};Tx("cast",new wy);ux("cast",new wy);function xy(a,b){X.call(this,a,b);var c=this;this.g=Mk();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);yy(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){yy(c)});this.eventManager.o(this.localization,"locale-changed",function(){yy(c)});
|
|
1121
|
+
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.Ue(d);c.g.setAttribute("shaka-status",d+"x")}})}u(xy,X);function yy(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}M("shaka.ui.FastForwardButton",xy);function zy(){}zy.prototype.create=function(a,b){return new xy(a,b)};ux("fast_forward",new zy);function Ay(a,b){X.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Mk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");By(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);Cy(this);this.eventManager.o(this.localization,"locale-updated",function(){Cy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Cy(c)});this.eventManager.o(this.g,"click",function(){return K(function(d){return A(d,
|
|
1122
|
+
c.controls.Se(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.jc()?"fullscreen_exit":"fullscreen";Cy(c)});this.eventManager.o(this.h,"loadedmetadata",function(){By(c)});this.eventManager.o(this.h,"loadeddata",function(){By(c)})}u(Ay,X);function By(a){a.controls.sd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function Cy(a){a.g.ariaLabel=a.localization.resolve(a.controls.jc()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1123
|
+
M("shaka.ui.FullscreenButton",Ay);function Dy(){}Dy.prototype.create=function(a,b){return new Ay(a,b)};ux("fullscreen",new Dy);function Ey(a,b){X.call(this,a,b);var c=this;this.g=Mk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
|
|
1124
|
+
a.appendChild(this.l);this.g.appendChild(a);Fy(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Fy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Fy(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ka(1)});this.m=this.video.loop;this.h=new Q(function(){c.m!=c.video.loop&&(Fy(c),c.m=c.video.loop)});this.h.ka(1)}u(Ey,X);Ey.prototype.release=function(){this.h.stop();this.h=null;X.prototype.release.call(this)};
|
|
1125
|
+
function Fy(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")}M("shaka.ui.LoopButton",Ey);function Gy(){}Gy.prototype.create=function(a,b){return new Ey(a,b)};Tx("loop",new Gy);ux("loop",new Gy);ex("loop",new Gy);function Hy(a,b){X.call(this,a,b);var c=this;this.g=Mk();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);Iy(this);Jy(this);this.eventManager.o(this.localization,"locale-updated",function(){Iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iy(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});
|
|
1126
|
+
this.eventManager.o(this.video,"volumechange",function(){Iy(c);Jy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Iy(c);Jy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Iy(c);Jy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Iy(c);Jy(c)})}u(Hy,X);function Iy(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
1127
|
+
function Jy(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}M("shaka.ui.MuteButton",Hy);function Ky(){}Ky.prototype.create=function(a,b){return new Hy(a,b)};ux("mute",new Ky);function Ly(a,b){X.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Mk();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
|
|
1128
|
+
S("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);My(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||Y(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){My(c)});this.eventManager.o(this.localization,"locale-changed",function(){My(c)});this.eventManager.o(this.g,"click",function(){Ny(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
|
|
1126
1129
|
"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(d){d.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!1):
|
|
1127
|
-
document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){
|
|
1128
|
-
function
|
|
1129
|
-
function
|
|
1130
|
-
"x",d]}));
|
|
1131
|
-
function
|
|
1132
|
-
"x")}function
|
|
1133
|
-
!1):(
|
|
1134
|
-
"abrstatuschanged",function(){
|
|
1135
|
-
function
|
|
1136
|
-
for(var e={},f=r(b),g=f.next();!g.done;e={Zb:e.Zb},g=f.next()){e.Zb=g.value;g=
|
|
1137
|
-
a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=
|
|
1138
|
-
a.currentSelection.textContent);a.menu.appendChild(e);
|
|
1139
|
-
function
|
|
1140
|
-
|
|
1141
|
-
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.
|
|
1142
|
-
d:(c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){
|
|
1143
|
-
"click",function(){c.ad.skip()});this.ad&&
|
|
1144
|
-
M("shaka.ui.SmallPlayButton",
|
|
1130
|
+
document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){Oy(c)})}u(Ly,X);function Ny(a){var b;K(function(c){if(1==c.g)return E(c,2),document.pictureInPictureElement?A(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),A(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=J(c);a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));B(c)})}
|
|
1131
|
+
function My(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")}
|
|
1132
|
+
function Oy(a){K(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return Y(a.g,!1),b.D(0);if(!a.player||!a.player.ic())return Y(a.g,!0),b.D(0);Y(a.g,!1);return document.pictureInPictureElement?A(b,document.exitPictureInPicture(),0):b.D(0)})}M("shaka.ui.PipButton",Ly);function Py(){}Py.prototype.create=function(a,b){return new Ly(a,b)};Tx("picture_in_picture",new Py);ux("picture_in_picture",new Py);ex("picture_in_picture",new Py);function Qy(a,b){jy.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(){Ry(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ry(c)});this.eventManager.o(this.player,"ratechange",function(){Sy(c,c.player.zb())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
|
|
1133
|
+
"x",d]}));Ry(this);Ty(this);Sy(this,this.player.zb())}u(Qy,jy);function Ry(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")}
|
|
1134
|
+
function Sy(a,b){var c=Sw(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(Uw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
1135
|
+
"x")}function Ty(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={yc:b.yc},d=c.next()){b.yc=d.value;d=Mk();var e=S("span");e.textContent=b.yc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.yc);a.video.defaultPlaybackRate=a.g.get(f.yc)}}(b));a.menu.appendChild(d)}Tw(a.menu)}M("shaka.ui.PlaybackRateSelection",Qy);function Uy(){}Uy.prototype.create=function(a,b){return new Qy(a,b)};Tx("playback_rate",new Uy);ux("playback_rate",new Uy);function Vy(a,b){X.call(this,a,b);var c=this;this.g=Mk();this.g.classList.add("shaka-current-time");Wy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Ka().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.yf(),f=c.video.duration,g=c.player.Ka(),h=g.end-g.start;c.player.U()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Wy(c,"- "+Vw(e,f)),c.g.disabled=
|
|
1136
|
+
!1):(Wy(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=Vw(e,d),f&&(e+=" / "+Vw(f,d)),Wy(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"))})}u(Vy,X);function Wy(a,b){b!=a.g.textContent&&(a.g.textContent=b)}M("shaka.ui.PresentationTimeTracker",Vy);function Xy(){}Xy.prototype.create=function(a,b){return new Vy(a,b)};ux("time_and_duration",new Xy);function Yy(a,b){jy.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(){Zy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Zy(c)});this.eventManager.o(this.player,"variantchanged",function(){$y(c)});this.eventManager.o(this.player,"trackschanged",function(){$y(c)});this.eventManager.o(this.player,
|
|
1137
|
+
"abrstatuschanged",function(){$y(c)});$y(this)}u(Yy,jy);
|
|
1138
|
+
function $y(a){var b=a.player.Sa(),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.ic()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ic()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=Rw(a.menu);Nk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;
|
|
1139
|
+
for(var e={},f=r(b),g=f.next();!g.done;e={Zb:e.Zb},g=f.next()){e.Zb=g.value;g=Mk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Zb;a.player.configure({abr:{enabled:!1}});a.player.Fe(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=a.player.ic()?Math.round(e.Zb.bandwidth/1E3)+" kbits/s":e.Zb.height+"p";g.appendChild(h);d||e.Zb!=c||(g.ariaSelected="true",g.appendChild(Uw()),h.classList.add("shaka-chosen-item"),
|
|
1140
|
+
a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Mk();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});$y(a)});a.g=S("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(Uw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",
|
|
1141
|
+
a.currentSelection.textContent);a.menu.appendChild(e);Tw(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"));Zy(a)}
|
|
1142
|
+
function Zy(a){var b=a.player.ic()?"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"))}M("shaka.ui.ResolutionSelection",Yy);function az(){}
|
|
1143
|
+
az.prototype.create=function(a,b){return new Yy(a,b)};Tx("quality",new az);ux("quality",new az);function bz(a,b){X.call(this,a,b);var c=this;this.g=Mk();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);cz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){cz(c)});this.eventManager.o(this.localization,"locale-changed",function(){cz(c)});
|
|
1144
|
+
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.Ue(d);c.g.setAttribute("shaka-status",d+"x")}})}u(bz,X);function cz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}M("shaka.ui.RewindButton",bz);function dz(){}dz.prototype.create=function(a,b){return new bz(a,b)};ux("rewind",new dz);function ez(a,b){X.call(this,a,b);var c=this;this.j=S("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=S("div");this.h.classList.add("shaka-skip-ad-counter");Y(this.h,!1);this.j.appendChild(this.h);this.g=Mk();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;Y(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);fz(this);this.i=new Q(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1145
|
+
d:(c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){fz(c)});this.eventManager.o(this.localization,"locale-changed",function(){fz(c)});this.eventManager.o(this.adManager,"ad-started",function(){gz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;Y(c.g,!1);Y(c.h,!1)});this.eventManager.o(this.g,
|
|
1146
|
+
"click",function(){c.ad.skip()});this.ad&&gz(this)}u(ez,X);ez.prototype.release=function(){this.i.stop();this.i=null;X.prototype.release.call(this)};function fz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function gz(a){a.ad.isSkippable()&&(Y(a.g,!0),Y(a.h,!0),a.h.textContent="",a.i.za(),a.i.ka(.5))}M("shaka.ui.SkipAdButton",ez);function hz(a,b){Zw.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()}u(hz,Zw);hz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};hz.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)}};
|
|
1147
|
+
M("shaka.ui.SmallPlayButton",hz);function iz(){}iz.prototype.create=function(a,b){return new hz(a,b)};ux("play_pause",new iz);function jz(a,b){X.call(this,a,b);a=S("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}u(jz,X);M("shaka.ui.Spacer",jz);function kz(){}kz.prototype.create=function(a,b){return new jz(a,b)};ux("spacer",new kz);function lz(a,b){function c(k){return Vw(h.h[k],!1)+" (m)"}function d(k){return Math.round(h.h[k]/1E3)+" (kbits/s)"}function e(k){return h.h[k].toFixed(2)+" (s)"}function f(k){return h.h[k]+" (frames)"}function g(k){return h.h[k]+" (px)"}X.call(this,a,b);var h=this;this.i=Mk();this.i.classList.add("shaka-statistics-button");this.j=S("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=S("label");a.classList.add("shaka-overflow-button-label");
|
|
1145
1148
|
this.A=S("span");a.appendChild(this.A);this.m=S("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.g=S("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();
|
|
1146
1149
|
this.B={};this.C={width:g,height:g,completionPercent:function(k){return h.h[k]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f,stallsDetected:function(k){return h.h[k]+" (stalls)"},gapsJumped:function(k){return h.h[k]+" (gaps)"}};this.l=new Q(function(){h.h=h.player.getStats();for(var k=r(h.F),l=k.next();!l.done;l=
|
|
1147
|
-
k.next())l=l.value,h.B[l].textContent=h.C[l](l)});
|
|
1148
|
-
function
|
|
1149
|
-
function
|
|
1150
|
-
|
|
1151
|
-
"texttrackvisibility",function(){
|
|
1152
|
-
function
|
|
1153
|
-
function
|
|
1154
|
-
a.currentSelection.textContent);
|
|
1155
|
-
function
|
|
1156
|
-
this.eventManager.o(this.localization,"locale-changed",function(){return
|
|
1157
|
-
function
|
|
1150
|
+
k.next())l=l.value,h.B[l].textContent=h.C[l](l)});mz(this);nz(this);this.eventManager.o(this.localization,"locale-updated",function(){mz(h)});this.eventManager.o(this.localization,"locale-changed",function(){mz(h)});this.eventManager.o(this.i,"click",function(){Y(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ka(.1),Y(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),Y(h.g,!1));mz(h)})}u(lz,X);
|
|
1151
|
+
function mz(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")}
|
|
1152
|
+
function nz(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=S("div"),h=S("label");h.textContent=c+":";g.appendChild(h);h=S("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)}lz.prototype.release=function(){this.l.stop();this.l=null;X.prototype.release.call(this)};M("shaka.ui.StatisticsButton",lz);function oz(){}
|
|
1153
|
+
oz.prototype.create=function(a,b){return new lz(a,b)};Tx("statistics",new oz);ex("statistics",new oz);function pz(a,b){jy.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";qz(this);this.eventManager.o(this.localization,"locale-updated",function(){rz(c);sz(c)});this.eventManager.o(this.localization,"locale-changed",function(){rz(c);sz(c)});this.eventManager.o(this.player,
|
|
1154
|
+
"texttrackvisibility",function(){tz(c);sz(c)});this.eventManager.o(this.player,"textchanged",function(){sz(c)});this.eventManager.o(this.player,"trackschanged",function(){uz(c)});tz(this);rz(this);sz(this);uz(this)}u(pz,jy);function qz(a){var b=Mk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(Uw());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1155
|
+
function tz(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 O("captionselectionupdated"))}
|
|
1156
|
+
function sz(a){var b=a.player.Ab();hy(b,a.menu,function(c){return vz(a,c)},a.player.Ob(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=Mk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Ne(!1);sz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ob()||(b.ariaSelected="true",b.appendChild(Uw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
|
|
1157
|
+
a.currentSelection.textContent);Tw(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function vz(a,b){return K(function(c){a.player.Ee(b);return A(c,a.player.Ne(!0),0)})}function rz(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")}
|
|
1158
|
+
function uz(a){var b=0<a.player.Ab().length;Y(a.button,b);sz(a)}M("shaka.ui.TextSelection",pz);function wz(){}wz.prototype.create=function(a,b){return new pz(a,b)};Tx("captions",new wz);ux("captions",new wz);function xz(a,b){gx.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 yz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return zz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return zz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return yz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Az(c)});
|
|
1159
|
+
this.eventManager.o(this.localization,"locale-changed",function(){return Az(c)});yz(this);Az(this);if(this.ad)this.onChange()}u(xz,gx);xz.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 yz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Bz(a)}function zz(a){var b=a.ad.getVolume();a.setValue(b);Bz(a)}
|
|
1160
|
+
function Bz(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 Az(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}M("shaka.ui.VolumeBar",xz);function Cz(){}Cz.prototype.create=function(a,b){return new xz(a,b)};ux("volume",new Cz);}).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})();
|
|
1158
1161
|
|
|
1159
1162
|
//# sourceMappingURL=shaka-player.ui.map
|