shaka-player 3.3.15 → 3.3.16
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/CHANGELOG.md +11 -0
- package/dist/locales.js +31 -31
- package/dist/shaka-player.compiled.debug.js +66 -64
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +194 -194
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +80 -78
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +196 -195
- package/dist/shaka-player.ui.map +3 -3
- package/lib/player.js +7 -1
- package/lib/text/ui_text_displayer.js +24 -4
- package/lib/text/web_vtt_generator.js +21 -9
- package/lib/util/dom_utils.js +3 -1
- package/lib/util/stream_utils.js +6 -0
- package/lib/util/timer.js +17 -0
- package/package.json +1 -1
- package/test/player_integration.js +27 -0
- package/test/player_unit.js +4 -2
- package/test/text/ui_text_displayer_unit.js +70 -0
package/dist/shaka-player.ui.js
CHANGED
|
@@ -26,16 +26,16 @@ fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.A=!
|
|
|
26
26
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.G(g):this.m(g)}};
|
|
27
27
|
b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.m=function(g){this.B(1,g)};b.prototype.B=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.C()};b.prototype.I=function(){var g=this;e(function(){if(g.F()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
|
|
28
28
|
function(){if(this.A)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
29
|
-
b.prototype.J=function(g){var h=this.j();g
|
|
30
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value)
|
|
29
|
+
b.prototype.J=function(g){var h=this.j();g.$c(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,t){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.$c(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.$c=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
30
|
+
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).$c(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).$c(n(p.length-1),m),k=h.next();
|
|
31
31
|
while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
32
32
|
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ga(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
33
33
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!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)&&
|
|
34
34
|
Ga(k,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});
|
|
35
|
-
fa("Map",function(a){function b(){var h={};return h.qb=h.next=h.head=h}function c(h,k){var l=h.g;return ha(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(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,
|
|
36
|
-
list:m,index:-1,
|
|
37
|
-
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.
|
|
38
|
-
h.
|
|
35
|
+
fa("Map",function(a){function b(){var h={};return h.qb=h.next=h.head=h}function c(h,k){var l=h.g;return ha(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(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,za:p}}return{id:l,
|
|
36
|
+
list:m,index:-1,za:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
|
|
37
|
+
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.za?l.za.value=k:(l.za={next:this.g,qb:this.g.qb,head:this.g,key:h,value:k},l.list.push(l.za),this.g.qb.next=l.za,this.g.qb=l.za,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.za&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.za.qb.next=h.za.next,h.za.next.qb=h.za.qb,
|
|
38
|
+
h.za.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).za};e.prototype.get=function(h){return(h=d(this,h).za)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
|
|
39
39
|
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});function 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}fa("Array.prototype.keys",function(a){return a?a:function(){return Ha(this,function(b){return b})}});
|
|
40
40
|
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
41
41
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
|
|
@@ -53,7 +53,7 @@ fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(
|
|
|
53
53
|
SPDX-License-Identifier: Apache-2.0
|
|
54
54
|
*/
|
|
55
55
|
function O(a,b){if(b)if(b instanceof Map)for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
56
|
-
function Oa(a){var b=new O(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}O.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};O.prototype.stopImmediatePropagation=function(){this.g=!0};O.prototype.stopPropagation=function(){};N("shaka.util.FakeEvent",O);function Pa(){}function Ra(){}function Sa(){}function Ta(a){var b=Fa.apply(1,arguments);Ua.has(a)||(Ua.add(a),Sa.apply(Pa,ia(b)))}function Va(){}function Wa(){}function Xa(){}function Ya(){}var Ua=new Set;if(window.console&&window.console.log.bind){var Za={},$a=(Za[1]=console.error.bind(console),Za[2]=console.warn.bind(console),Za[3]=console.info.bind(console),Za[4]=console.log.bind(console),Za[5]=console.debug.bind(console),Za[6]=console.debug.bind(console),Za);Sa=$a[2];Ra=$a[1]};function ab(){this.g={}}q=ab.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function bb(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function cb(){this.va=new ab;this.
|
|
56
|
+
function Oa(a){var b=new O(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}O.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};O.prototype.stopImmediatePropagation=function(){this.g=!0};O.prototype.stopPropagation=function(){};N("shaka.util.FakeEvent",O);function Pa(){}function Ra(){}function Sa(){}function Ta(a){var b=Fa.apply(1,arguments);Ua.has(a)||(Ua.add(a),Sa.apply(Pa,ia(b)))}function Va(){}function Wa(){}function Xa(){}function Ya(){}var Ua=new Set;if(window.console&&window.console.log.bind){var Za={},$a=(Za[1]=console.error.bind(console),Za[2]=console.warn.bind(console),Za[3]=console.info.bind(console),Za[4]=console.log.bind(console),Za[5]=console.debug.bind(console),Za[6]=console.debug.bind(console),Za);Sa=$a[2];Ra=$a[1]};function ab(){this.g={}}q=ab.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function bb(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function cb(){this.va=new ab;this.md=this}cb.prototype.addEventListener=function(a,b){this.va&&this.va.push(a,b)};cb.prototype.removeEventListener=function(a,b){this.va&&this.va.remove(a,b)};cb.prototype.dispatchEvent=function(a){if(!this.va)return!0;var b=this.va.get(a.type)||[],c=this.va.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.md;a.currentTarget=this.md;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
57
57
|
cb.prototype.release=function(){this.va=null};function db(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function eb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function fb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function hb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c};/*
|
|
58
58
|
@license
|
|
59
59
|
Copyright 2008 The Closure Library Authors
|
|
@@ -64,13 +64,13 @@ var ib=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
64
64
|
Copyright 2006 The Closure Library Authors
|
|
65
65
|
SPDX-License-Identifier: Apache-2.0
|
|
66
66
|
*/
|
|
67
|
-
function jb(a){var b;a instanceof jb?(kb(this,a.Wa),this.Ub=a.Ub,this
|
|
68
|
-
q.toString=function(){var a=[],b=this.Wa;b&&a.push(qb(b,rb,!0),":");if(b=this
|
|
69
|
-
q.resolve=function(a){var b=this.clone();"data"===b.Wa&&(b=new jb);var c=!!a.Wa;c?kb(b,a.Wa):c=!!a.Ub;c?b.Ub=a.Ub:c=!!a
|
|
67
|
+
function jb(a){var b;a instanceof jb?(kb(this,a.Wa),this.Ub=a.Ub,this.$a=a.$a,lb(this,a.kc),this.Oa=a.Oa,nb(this,a.g.clone()),this.Ib=a.Ib):a&&(b=String(a).match(ib))?(kb(this,b[1]||"",!0),this.Ub=ob(b[2]||""),this.$a=ob(b[3]||"",!0),lb(this,b[4]),this.Oa=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Ib=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Wa="";q.Ub="";q.$a="";q.kc=null;q.Oa="";q.Ib="";
|
|
68
|
+
q.toString=function(){var a=[],b=this.Wa;b&&a.push(qb(b,rb,!0),":");if(b=this.$a){a.push("//");var c=this.Ub;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.kc;null!=b&&a.push(":",String(b))}if(b=this.Oa)this.$a&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ib)&&a.push("#",qb(b,ub));return a.join("")};
|
|
69
|
+
q.resolve=function(a){var b=this.clone();"data"===b.Wa&&(b=new jb);var c=!!a.Wa;c?kb(b,a.Wa):c=!!a.Ub;c?b.Ub=a.Ub:c=!!a.$a;c?b.$a=a.$a:c=null!=a.kc;var d=a.Oa;if(c)lb(b,a.kc);else if(c=!!a.Oa){if("/"!=d.charAt(0))if(this.$a&&!this.Oa)d="/"+d;else{var e=b.Oa.lastIndexOf("/");-1!=e&&(d=b.Oa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
70
70
|
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Oa=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Ib;c&&(b.Ib=a.Ib);return b};q.clone=function(){return new jb(this)};function kb(a,b,c){a.Wa=c?ob(b,!0):b;a.Wa&&(a.Wa=a.Wa.replace(/:$/,""))}function lb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.kc=b}else a.kc=null}function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
|
|
71
71
|
function ob(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function qb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,wb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function wb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var rb=/[#\/\?@]/g,tb=/[#\?:]/g,sb=/[#\?]/g,vb=/[#\?@]/g,ub=/#/g;function pb(a){this.g=a||null}
|
|
72
|
-
function xb(a){if(!a.Fa&&(a.Fa={},a.
|
|
73
|
-
q.set=function(a,b){xb(this);this.g=null;this.Fa.hasOwnProperty(a)?this.Fa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Fa)return"";var a=[],b;for(b in this.Fa)for(var c=encodeURIComponent(b),d=this.Fa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new pb;a.g=this.g;if(this.Fa){var b={},c;for(c in this.Fa)b[c]=this.Fa[c].concat();a.Fa=b;a.
|
|
72
|
+
function xb(a){if(!a.Fa&&(a.Fa={},a.cd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=pb.prototype;q.Fa=null;q.cd=null;q.add=function(a,b){xb(this);this.g=null;var c=this.Fa.hasOwnProperty(a)&&this.Fa[a];c||(this.Fa[a]=c=[]);c.push(b);this.cd++;return this};
|
|
73
|
+
q.set=function(a,b){xb(this);this.g=null;this.Fa.hasOwnProperty(a)?this.Fa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Fa)return"";var a=[],b;for(b in this.Fa)for(var c=encodeURIComponent(b),d=this.Fa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new pb;a.g=this.g;if(this.Fa){var b={},c;for(c in this.Fa)b[c]=this.Fa[c].concat();a.Fa=b;a.cd=this.cd}return a};function P(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",P);P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
74
74
|
P.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
|
|
75
75
|
TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,
|
|
76
76
|
WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,
|
|
@@ -80,7 +80,7 @@ FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESP
|
|
|
80
80
|
CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,
|
|
81
81
|
INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function yb(a,b){this.g=a;this.h=b}yb.prototype.toString=function(){return"v"+this.g+"."+this.h};function zb(a,b){var c=new yb(4,0),d=Ab,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Bb(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Cb(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ab=null;function Db(a,b){return a.concat(b)}function Eb(){}function Fb(a){return null!=a}function Gb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(zb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){zb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Hb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new jb(d)});return a.map(function(d){return new jb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Db,[]).map(function(d){return d.toString()})}function Ib(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
82
82
|
function Jb(a,b){if(1==b.length)return b[0];var c=Kb(a,b);if(null!=c)return c;throw new P(2,4,4025,b);}function Kb(a,b){for(var c=r(Lb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Mb?"":null}
|
|
83
|
-
var Mb="text",Nb={
|
|
83
|
+
var Mb="text",Nb={hb:"video",Gb:"audio",oa:Mb,xc:"image",rh:"application"},Lb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ob(){}function Pb(a,b){a=Qb(a);b=Qb(b);return a.split("-")[0]==b.split("-")[0]}function Rb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Sb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Qb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Tb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ub(a,b){var c=Vb(a),d=Vb(b);return a!=c&&b!=d&&c==d}
|
|
84
84
|
function Wb(a,b){a=Qb(a);b=Qb(b);return b==a?4:Rb(b,a)?3:Sb(b,a)?2:Rb(a,b)?1:0}function Vb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Tb.get(a)||a}function Xb(a){return a.language?Qb(a.language):a.audio&&a.audio.language?Qb(a.audio.language):a.video&&a.video.language?Qb(a.video.language):"und"}
|
|
85
85
|
function Yb(a,b){for(var c=Qb(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Qb(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Rb(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Sb(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Rb(c,f))return f;return null}N("shaka.util.LanguageUtils",Ob);Ob.findClosestLocale=Yb;Ob.getLocaleForVariant=Xb;
|
|
86
86
|
Ob.getLocaleForText=function(a){return Qb(a.language||"und")};Ob.getBase=Vb;Ob.relatedness=Wb;Ob.areSiblings=Ub;Ob.normalize=Qb;Ob.isSiblingOf=Sb;Ob.isParentOf=Rb;Ob.areLanguageCompatible=Pb;Ob.areLocaleCompatible=function(a,b){a=Qb(a);b=Qb(b);return a==b};
|
|
@@ -93,17 +93,17 @@ var Tb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
93
93
|
q.Ue=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Qb(c.value));$b(this);a=hb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new O("unknown-locales",(new Map).set("locales",a)));a=hb(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))};
|
|
94
94
|
q.ea=function(a,b,c){a=Qb(a);void 0===c&&(c=ac);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=ac||d.set(f,e)});this.h.set(a,d);$b(this);this.dispatchEvent(new O("locale-updated"));return this};q.ah=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""};
|
|
95
95
|
function $b(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(Vb(f.Yb));h=hb(b.keys(),function(l){return function(m){return Ub(m,l.Yb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Vb(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);
|
|
96
|
-
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,
|
|
97
|
-
Zb.prototype.resolveDictionary=Zb.prototype.ah;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Ue;Zb.prototype.release=Zb.prototype.release;var ac=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:ac};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={
|
|
98
|
-
|
|
96
|
+
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,bc(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 bc(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)}N("shaka.ui.Localization",Zb);Zb.prototype.resolve=Zb.prototype.resolve;
|
|
97
|
+
Zb.prototype.resolveDictionary=Zb.prototype.ah;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Ue;Zb.prototype.release=Zb.prototype.release;var ac=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:ac};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={oi:"SEEK",ii:"PLAY",pi:"SKIP_AD",Vh:"MULTIPLE_LANGUAGES",$h:"OFF",Eh:"ENTER_LOOP_MODE",mi:"REWIND",Ph:"LANGUAGE",Ji:"VOLUME",Ih:"EXIT_LOOP_MODE",Nh:"FULL_SCREEN",Kf:"SUBTITLE_FORCED",Hi:"UNRECOGNIZED_LANGUAGE",Fi:"UNDETERMINED_LANGUAGE",ph:"AD_TIME",ri:"SKIP_TO_LIVE",gi:"PICTURE_IN_PICTURE",Wh:"MUTE",qh:"AIRPLAY",oh:"AD_DURATION",Qh:"LOOP",yh:"CAST",Zh:"NOT_APPLICABLE",Gi:"UNMUTE",ki:"REPLAY",sh:"AUTO_QUALITY",ti:"STATISTICS",li:"RESOLUTION",Fh:"ENTER_PICTURE_IN_PICTURE",Mh:"FAST_FORWARD",
|
|
98
|
+
Qe:"LIVE",ji:"PLAYBACK_RATE",AD_PROGRESS:"AD_PROGRESS",Uh:"MORE_SETTINGS",xh:"CAPTIONS",Jh:"EXIT_PICTURE_IN_PICTURE",BACK:"BACK",ei:"PAUSE",Hh:"EXIT_FULL_SCREEN",ai:"ON"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.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)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Gd:d.Gd},e=a.next()){d.Gd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Gd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
99
99
|
function kc(a,b,c){c||(c=hc);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 lc(a,b,c){this.startTime=a;this.direction=mc;this.endTime=b;this.payload=c;this.region=new nc;this.position=null;this.positionAlign=oc;this.size=0;this.textAlign=pc;this.writingMode=qc;this.lineInterpretation=rc;this.line=null;this.lineHeight="";this.lineAlign=sc;this.displayAlign=tc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=uc;this.fontStyle=vc;this.linePadding=this.letterSpacing=this.fontFamily=
|
|
100
100
|
"";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}lc.prototype.clone=function(){var a=new lc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
101
101
|
function wc(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(!kc(a.nestedCues,b.nestedCues,wc))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(!kc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",lc);var oc="auto";
|
|
102
102
|
lc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:oc};var pc="center",xc={LEFT:"left",RIGHT:"right",CENTER:pc,START:"start",END:"end"};lc.textAlign=xc;var tc="after",yc={BEFORE:"before",CENTER:"center",AFTER:tc};lc.displayAlign=yc;var mc="ltr";lc.direction={HORIZONTAL_LEFT_TO_RIGHT:mc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var qc="horizontal-tb";lc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:qc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var rc=0;
|
|
103
103
|
lc.lineInterpretation={LINE_NUMBER:rc,PERCENTAGE:1};var sc="start",zc={CENTER:"center",START:sc,END:"end"};lc.lineAlign=zc;var Ac={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};lc.defaultTextColor=Ac;var Bc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};lc.defaultTextBackgroundColor=Bc;var uc=400;lc.fontWeight={NORMAL:uc,BOLD:700};
|
|
104
104
|
var vc="normal",Cc={NORMAL:vc,ITALIC:"italic",OBLIQUE:"oblique"};lc.fontStyle=Cc;lc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function nc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Dc;this.scroll=Ec}N("shaka.text.CueRegion",nc);var Dc=1;nc.units={PX:0,PERCENTAGE:Dc,LINES:2};var Ec="";nc.scrollMode={NONE:Ec,UP:"up"};function Fc(){}function Gc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Hc(a)==Hc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Ic(a),d=Ic(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Hc(a){return a instanceof ArrayBuffer?a:a.buffer}function Jc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
105
|
-
function Ic(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,Uint8Array)}function Lc(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,DataView)}function Kc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Hc(a),b,Math.min(b+Math.max(c,0),e)-b)}N("shaka.util.BufferUtils",Fc);Fc.toDataView=Lc;Fc.toUint8=Ic;Fc.toArrayBuffer=Jc;Fc.equal=Gc;function Mc(){}N("shaka.dependencies",Mc);Mc.has=function(a){return Nc.has(a)};Mc.add=function(a,b){if(!Oc[a])throw Error(a+" is not supported");Nc.set(a,function(){return b})};var Oc={muxjs:"muxjs"};Mc.Allowed=Oc;var Nc=new Map([["muxjs",function(){return window.muxjs}]]);function Pc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Pc.prototype.resolve=function(){};Pc.prototype.reject=function(){};function Qc(a){this.h=a;this.g=void 0}Qc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Rc(a){this.h=a;this.g=null}Rc.prototype.R=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Rc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.
|
|
106
|
-
Q.prototype.tickNow=Q.prototype.
|
|
105
|
+
function Ic(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,Uint8Array)}function Lc(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,DataView)}function Kc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Hc(a),b,Math.min(b+Math.max(c,0),e)-b)}N("shaka.util.BufferUtils",Fc);Fc.toDataView=Lc;Fc.toUint8=Ic;Fc.toArrayBuffer=Jc;Fc.equal=Gc;function Mc(){}N("shaka.dependencies",Mc);Mc.has=function(a){return Nc.has(a)};Mc.add=function(a,b){if(!Oc[a])throw Error(a+" is not supported");Nc.set(a,function(){return b})};var Oc={muxjs:"muxjs"};Mc.Allowed=Oc;var Nc=new Map([["muxjs",function(){return window.muxjs}]]);function Pc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Pc.prototype.resolve=function(){};Pc.prototype.reject=function(){};function Qc(a){this.h=a;this.g=void 0}Qc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Rc(a){this.h=a;this.g=null}Rc.prototype.R=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Rc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.Ba=function(){this.stop();this.h();return this};Q.prototype.R=function(a){var b=this;this.stop();this.g=(new Rc(function(){b.h()})).R(a);return this};Q.prototype.ha=function(a){var b=this;this.stop();this.g=(new Rc(function(){b.g.R(a);b.h()})).R(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};N("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.ha;Q.prototype.tickAfter=Q.prototype.R;
|
|
106
|
+
Q.prototype.tickNow=Q.prototype.Ba;function Tc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Uc(a){return""!=Vc().canPlayType(a)}function Wc(){return Xc("Xbox One")}function Yc(){return Xc("Tizen")}function Zc(){return Xc("Web0S")}function $c(){return Xc("CrKey")}function ad(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Yc()&&!Xc("PC=EOS")&&!Xc("VirginMedia")&&!bd()&&!Xc("AFT")}function bd(){return Xc("PlayStation 4")}
|
|
107
107
|
function cd(){if(!ad())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Xc(a){return(navigator.userAgent||"").includes(a)}function Vc(){if(dd)return dd;ed||(ed=new Q(function(){dd=null}));(dd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(dd=document.createElement("video"));ed.R(1);return dd}var ed=null,dd=null;function fd(){}
|
|
108
108
|
function gd(a){if(!a)return"";a=Ic(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!bd())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ra('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
109
109
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
@@ -129,8 +129,8 @@ function Sd(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Ud
|
|
|
129
129
|
function Yd(a){var b="",c=Infinity;bb(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Td(a){var b="";a.video&&(b=Ad(a.video.codecs));var c="";a.audio&&(c=Ad(a.audio.codecs));return b+"-"+c}function Zd(a,b,c){a.variants=a.variants.filter(function(d){return $d(d,b,c)})}
|
|
130
130
|
function $d(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
|
|
131
131
|
function ae(a,b){return M(function(c){if(1==c.g)return A(c,be(b,0<b.offlineSessionIds.length),2);ce(a,b);de(b);ee(b);D(c)})}
|
|
132
|
-
function be(a,b){return M(function(c){if(1==c.g)return A(c,fe(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=ge(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Jb("video",g);f=ge(f);g=Jb("audio",g);g=he(g);
|
|
133
|
-
if(Wc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Wa(ie(d)),!1;(e=d.decodingInfos.some(function(
|
|
132
|
+
function be(a,b){return M(function(c){if(1==c.g)return A(c,fe(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=ge(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Jb("video",g);f=ge(f);g=Jb("audio",g);g=he(g);var h=zd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;f=[f,g].join()}g=zd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(g))return!1;e.codecs=f}if(f=d.audio){g=he(f.codecs);h=zd(f.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;
|
|
133
|
+
f.codecs=g}if(Wc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Wa(ie(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||Wa(ie(d));return e});D(c)})}
|
|
134
134
|
function fe(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var w;return M(function(C){if(1==C.g)return E(C,2),A(C,e.decodingInfo(x),4);if(2!=C.g)return w=C.h,y.decodingInfos.push(w),va(C,0);I(C);JSON.stringify(x);D(C)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=je(l,b,c),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,f.push(g(l,t));return A(v,Promise.all(f),
|
|
135
135
|
0)})}
|
|
136
136
|
function je(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Jb("video",g);f=ge(f);g=Jb("audio",g);g=zd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ge(f);f=zd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
@@ -177,7 +177,7 @@ bf.defaultRetryParameters=function(){return Pe()};bf.prototype.clearAllResponseF
|
|
|
177
177
|
bf.NumBytesRemainingClass=gf;function hf(a,b,c){Re.call(this,a,b);this.h=c}u(hf,Re);bf.PendingRequest=hf;var mf=1;bf.RequestType={MANIFEST:0,SEGMENT:mf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var df=3;bf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:df};var ef={};function nf(a){this.g=!1;this.h=new Pc;this.i=a}nf.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 of(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function pf(){this.g=new ab}q=pf.prototype;q.release=function(){this.rb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new qf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.pc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.pc=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.pc(),this.g.remove(b,e))}};
|
|
178
178
|
q.rb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.pc();this.g.g={}}};N("shaka.util.EventManager",pf);pf.prototype.removeAll=pf.prototype.rb;pf.prototype.unlisten=pf.prototype.pc;pf.prototype.listenOnce=pf.prototype.Ga;pf.prototype.listen=pf.prototype.o;pf.prototype.release=pf.prototype.release;function qf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=rf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
179
179
|
qf.prototype.pc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function rf(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 sf(a)?b:b.capture||!1}
|
|
180
|
-
function sf(a){var b=tf;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}tf=b}return b||!1}var tf=void 0;function uf(){}function vf(a){a=jd(a);return(new jb(a))
|
|
180
|
+
function sf(a){var b=tf;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}tf=b}return b||!1}var tf=void 0;function uf(){}function vf(a){a=jd(a);return(new jb(a)).$a}function wf(a,b,c){function d(h){Lc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ic(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=ld(b,!0):e=b;a=jd(a);a=ld(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}N("shaka.util.FairPlayUtils",uf);uf.initDataTransform=wf;uf.defaultGetContentId=vf;function xf(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 yf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function zf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function Af(a,b){var c=Bf(a,b);return 1!=c.length?null:c[0]}function Cf(a,b,c){a=Df(a,b,c);return 1!=a.length?null:a[0]}function Bf(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function Ef(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
181
181
|
function Df(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Ff(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Gf(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Hf(a){return Array.from(a.childNodes).every(If)?a.textContent.trim():null}
|
|
182
182
|
function If(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Jf(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Kf(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
|
|
183
183
|
function Lf(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}
|
|
@@ -191,9 +191,9 @@ fe(b,a.K,a.X),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Z=!0,x["ret
|
|
|
191
191
|
q.yc=function(a){var b=this,c,d;return M(function(e){if(1==e.g){if(!b.B)return b.A.Ga(a,"encrypted",function(){b.m(new P(2,6,6010))}),e["return"]();b.l=a;b.A.Ga(b.l,"play",function(){for(var f=r(b.J),g=f.next();!g.done;g=f.next())ig(b,g.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.A.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Zf(b)});c=b.l.setMediaKeys(b.B);c=c["catch"](function(f){return Promise.reject(new P(2,6,6003,f.message))});return A(e,
|
|
192
192
|
c,2)}of(b.j);jg(b);b.g.initData.length||b.F.length||(d=function(f){return mg(b,f.initDataType,Ic(f.initData))},b.A.o(b.l,"encrypted",d));D(e)})};
|
|
193
193
|
function ng(a){var b,c,d,e,f;return M(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=ff([a.g.serverCertificateUri],a.h.retryParameters);E(g,3);c=a.G.Qb.request(5,b);return A(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ic(d.data);va(g,4);break;case 3:throw e=I(g),new P(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
|
|
194
|
-
E(g,6);return A(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=I(g),new P(2,6,6004,f.message);}})}function og(a,b){var c,d,e;return M(function(f){if(1==f.g)return A(f,pg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.
|
|
194
|
+
E(g,6);return A(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=I(g),new P(2,6,6004,f.message);}})}function og(a,b){var c,d,e;return M(function(f){if(1==f.g)return A(f,pg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.eb=new Pc,d.push(e.eb);d.push(c.remove());return A(f,Promise.all(d),3)}a.i["delete"](c);D(f)})}
|
|
195
195
|
function jg(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,mg(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())pg(a,d.value);b.length||a.F.length||a.C.resolve();return a.C}function mg(a,b,c){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Gc(c,e.value.initData)&&!Xc("Tizen 2"))return;qg(a,b,c,a.g.sessionType)}function rg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
|
|
196
|
-
function sg(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}q.Dc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.
|
|
196
|
+
function sg(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}q.Dc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.fd=function(){return yf(this.$)};
|
|
197
197
|
function dg(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=tg(a,c,d);x.D(2);break}return A(x,ug(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new P(2,6,6001);of(a.j);E(x,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.H.add(t.contentType.toLowerCase());if(c.length){var w=
|
|
198
198
|
f.keySystem;var C=d.get(f.keySystem);var z=[],B=[],F=[],G=[],H=new Set;vg(C,z,F,B,G,H);var J=a.K?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||J,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};C=r(C);for(z=C.next();!z.done;z=
|
|
199
199
|
C.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);C=w}else C=f.keySystem,w=b.get(f.keySystem),z=[],B=[],F=[],G=[],H=new Set,vg(w.drmInfos,z,F,B,G,H),C={keySystem:C,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
|
|
@@ -204,14 +204,14 @@ function ug(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,x;return M(function(w){switch(w
|
|
|
204
204
|
w.h,w["return"](c);case 6:I(w);case 7:of(a.j);case 3:h=g.next();w.D(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){w.D(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();w.D(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(C){return!!C.licenseServerUri});if(x!=p){w.D(13);break}E(w,15);return A(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:I(w);case 16:of(a.j);case 13:h=t.next();w.D(12);break;case 11:return w["return"](c)}})}
|
|
205
205
|
function eg(a){a=xf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=qd(f),h=qd(e);g={kty:"oct",kid:od(g,!1),k:od(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ic(kd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
206
206
|
serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
207
|
-
function pg(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:try{c=a.B.createSession("persistent-license")}catch(k){return d=new P(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.A.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(k):ig(a,k)});a.A.o(c,"keystatuseschange",function(k){return wg(a,k)});e={initData:null,loaded:!1,ie:Infinity,
|
|
207
|
+
function pg(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:try{c=a.B.createSession("persistent-license")}catch(k){return d=new P(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.A.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(k):ig(a,k)});a.A.o(c,"keystatuseschange",function(k){return wg(a,k)});e={initData:null,loaded:!1,ie:Infinity,eb:null,type:"persistent-license"};a.i.set(c,e);E(h,2);return A(h,c.load(b),4);case 4:f=h.h;of(a.j);
|
|
208
208
|
if(!f)return a.i["delete"](c),a.m(new P(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;xg(a)&&a.C.resolve();return h["return"](c);case 2:g=I(h),of(a.j,g),a.i["delete"](c),a.m(new P(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
|
|
209
|
-
function qg(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.m(new P(2,6,6005,f.message));return}a.A.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(f):ig(a,f)});a.A.o(e,"keystatuseschange",function(f){return wg(a,f)});a.i.set(e,{initData:c,loaded:!1,ie:Infinity,
|
|
209
|
+
function qg(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.m(new P(2,6,6005,f.message));return}a.A.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(f):ig(a,f)});a.A.o(e,"keystatuseschange",function(f){return wg(a,f)});a.i.set(e,{initData:c,loaded:!1,ie: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&&od(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
|
|
210
210
|
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))}})}function yg(a,b,c){"skd"==b&&(b=c.serverCertificate,c=vf(a),a=wf(a,c,b));return a}
|
|
211
211
|
function ig(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;M(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&od(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=ff([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,rg(a.g.keySystem)&&zg(g),h=Date.now(),E(x,2),l=a.G.Qb.request(2,g),A(x,
|
|
212
|
-
l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=I(x),n=new P(2,6,6007,m),a.m(n),d&&d.
|
|
212
|
+
l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=I(x),n=new P(2,6,6007,m),a.m(n),d&&d.eb&&d.eb.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&od(k.data);E(x,5);return A(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return p=I(x),t=new P(2,6,6008,p.message),a.m(t),d&&d.eb&&d.eb.reject(t),x["return"]();case 6:if(a.j.g)return x["return"]();v=new O("drmsessionupdate");a.G.onEvent(v);d&&(d.eb&&d.eb.resolve(),y=new Q(function(){d.loaded=
|
|
213
213
|
!0;xg(a)&&a.C.resolve()}),y.R(Ag));D(x)}})}function zg(a){var b=hd(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=Sf(b,"PlayReadyKeyMessage");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=pd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
214
|
-
function wg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(rg(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||bd())){k=Lc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=rd(h).slice(0,32);a.ba.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.
|
|
214
|
+
function wg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(rg(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||bd())){k=Lc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=rd(h).slice(0,32);a.ba.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.eb&&(a.i["delete"](c),
|
|
215
215
|
c.close()["catch"](function(){}));xg(a)&&(a.C.resolve(),a.S.R(Bg))}function Wf(a){var b=a.ba,c=a.$;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new P(2,6,6014));a.G.rd(yf(c))}
|
|
216
216
|
function Cg(){var a,b,c,d,e,f,g,h;return M(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
|
|
217
217
|
c],f=new Map,g=function(l){var m,n,p;return M(function(t){switch(t.g){case 1:return E(t,2),A(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Xc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),A(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:I(t),f.set(l,null),D(t)}})},h=a.map(function(l){return g(l)}),A(k,Promise.all(h),2)):k["return"](yf(f))})}
|
|
@@ -221,14 +221,14 @@ function Fg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a)
|
|
|
221
221
|
e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
|
|
222
222
|
initData:f.Ua,keyIds:g});break}}return c}function gg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Xf(a){a.i.forEach(function(b,c){var d=b.ie,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ie=e)})}function xg(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
|
|
223
223
|
function fg(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
|
|
224
|
-
function vg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ja:g.Ja},h=a.next()){g.Ja=h.value;b.includes(g.Ja.licenseServerUri)||b.push(g.Ja.licenseServerUri);d.includes(g.Ja.serverCertificateUri)||d.push(g.Ja.serverCertificateUri);g.Ja.serverCertificate&&(c.some(function(m){return function(n){return Gc(n,m.Ja.serverCertificate)}}(g))||c.push(g.Ja.serverCertificate));if(g.Ja.initData){h={};for(var k=r(g.Ja.initData),l=k.next();!l.done;h={
|
|
225
|
-
m.
|
|
224
|
+
function vg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ja:g.Ja},h=a.next()){g.Ja=h.value;b.includes(g.Ja.licenseServerUri)||b.push(g.Ja.licenseServerUri);d.includes(g.Ja.serverCertificateUri)||d.push(g.Ja.serverCertificateUri);g.Ja.serverCertificate&&(c.some(function(m){return function(n){return Gc(n,m.Ja.serverCertificate)}}(g))||c.push(g.Ja.serverCertificate));if(g.Ja.initData){h={};for(var k=r(g.Ja.initData),l=k.next();!l.done;h={Tc:h.Tc},l=k.next())h.Tc=l.value,e.some(function(m){return function(n){var p=
|
|
225
|
+
m.Tc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Gc(n.initData,p.initData)}}(h))||e.push(h.Tc)}if(g.Ja.keyIds)for(h=r(g.Ja.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
226
226
|
function hg(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
|
|
227
227
|
(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var Eg=1,Ag=5,Bg=.5,Gg=new Qc(function(){return Jc(new Uint8Array([0]))});function Hg(){}function Ig(a,b,c,d){var e,f,g,h;return M(function(k){if(1==k.g){if(d&&(e=Jg[d.toLowerCase()]))return k["return"](e);if(f=Kg(a))if(g=Lg[f])return k["return"](g);return d?k.D(2):A(k,Mg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Jg[d]))return k["return"](h);throw new P(2,4,4E3,a);})}
|
|
228
228
|
function Mg(a,b,c){var d,e,f;return M(function(g){if(1==g.g)return d=ff([a],c),d.method="HEAD",A(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function Kg(a){a=(new jb(a)).Oa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}N("shaka.media.ManifestParser",Hg);Hg.unregisterParserByMime=function(a){delete Jg[a]};Hg.registerParserByMime=function(a,b){Jg[a]=b};
|
|
229
229
|
Hg.registerParserByExtension=function(a,b){Lg[a]=b};var Jg={},Lg={};function Ng(a,b){this.U=Lc(a);this.h=b==Og;this.g=0}q=Ng.prototype;q.Ea=function(){return this.g<this.U.byteLength};q.ia=function(){return this.g};q.kg=function(){return this.U.byteLength};q.ka=function(){try{var a=this.U.getUint8(this.g);this.g+=1;return a}catch(b){throw Pg();}};q.lc=function(){try{var a=this.U.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Pg();}};q.P=function(){try{var a=this.U.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Pg();}};
|
|
230
230
|
q.vf=function(){try{var a=this.U.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Pg();}};q.mc=function(){try{if(this.h){var a=this.U.getUint32(this.g,!0);var b=this.U.getUint32(this.g+4,!0)}else b=this.U.getUint32(this.g,!1),a=this.U.getUint32(this.g+4,!1)}catch(c){throw Pg();}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.U.byteLength)throw Pg();var b=Ic(this.U,this.g,a);this.g+=a;return b};
|
|
231
|
-
q.skip=function(a){if(this.g+a>this.U.byteLength)throw Pg();this.g+=a};q.xf=function(a){if(this.g<a)throw Pg();this.g-=a};q.seek=function(a){if(0>a||a>this.U.byteLength)throw Pg();this.g=a};q.
|
|
231
|
+
q.skip=function(a){if(this.g+a>this.U.byteLength)throw Pg();this.g+=a};q.xf=function(a){if(this.g<a)throw Pg();this.g-=a};q.seek=function(a){if(0>a||a>this.U.byteLength)throw Pg();this.g=a};q.Mc=function(){for(var a=this.g;this.Ea()&&0!=this.U.getUint8(this.g);)this.g+=1;a=Ic(this.U,a,this.g-a);this.g+=1;return gd(a)};function Pg(){return new P(2,3,3E3)}N("shaka.util.DataViewReader",Ng);Ng.prototype.readTerminatedString=Ng.prototype.Mc;Ng.prototype.seek=Ng.prototype.seek;Ng.prototype.rewind=Ng.prototype.xf;
|
|
232
232
|
Ng.prototype.skip=Ng.prototype.skip;Ng.prototype.readBytes=Ng.prototype.Cb;Ng.prototype.readUint64=Ng.prototype.mc;Ng.prototype.readInt32=Ng.prototype.vf;Ng.prototype.readUint32=Ng.prototype.P;Ng.prototype.readUint16=Ng.prototype.lc;Ng.prototype.readUint8=Ng.prototype.ka;Ng.prototype.getLength=Ng.prototype.kg;Ng.prototype.getPosition=Ng.prototype.ia;Ng.prototype.hasMoreData=Ng.prototype.Ea;var Og=1;Ng.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Og};function Qg(){this.i=[];this.h=[];this.g=!1}q=Qg.prototype;q.box=function(a,b){var c=Rg(a);this.i[c]=Sg;this.h[c]=b;return this};q.V=function(a,b){var c=Rg(a);this.i[c]=Tg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Ng(a,0);for(this.g=!1;a.Ea()&&!this.g;)this.td(0,a,b,c)};
|
|
233
233
|
q.td=function(a,b,c,d){var e=b.ia();if(d&&e+8>b.U.byteLength)this.g=!0;else{var f=b.P(),g=b.P(),h=!1;switch(f){case 0:f=b.U.byteLength-e;break;case 1:if(d&&b.ia()+8>b.U.byteLength){this.g=!0;return}f=b.mc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Tg){if(d&&b.ia()+4>b.U.byteLength){this.g=!0;return}m=b.P();l=m>>>24;m&=16777215}g=e+f;c&&g>b.U.byteLength&&(g=b.U.byteLength);d&&g>b.U.byteLength?this.g=!0:(d=g-b.ia(),b=0<d?b.Cb(d):new Uint8Array(0),b=new Ng(b,0),k({parser:this,partialOkay:c||
|
|
234
234
|
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ia(),b.U.byteLength-b.ia()))}};function Ug(a){for(var b=Vg(a);a.reader.Ea()&&!a.parser.g;)a.parser.td(a.start+b,a.reader,a.partialOkay)}function Wg(a){for(var b=Vg(a),c=a.reader.P(),d=0;d<c&&(a.parser.td(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Xg(a){return function(b){a(b.reader.Cb(b.reader.U.byteLength-b.reader.ia()))}}
|
|
@@ -271,93 +271,94 @@ function si(a){var b,c,d,e,f,g,h,k;return M(function(l){if(1==l.g){b=[];for(c in
|
|
|
271
271
|
q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g)return d=Nb,A(m,c.G,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ia:e.Ia},g=f.next())e.Ia=g.value,h=a.get(e.Ia),k=yd(h.mimeType,h.codecs),e.Ia==d.oa?ui(c,k):(!b&&MediaSource.isTypeSupported(k)||!ud(k,e.Ia)||(c.B[e.Ia]=new td,k=wd(e.Ia,k)),l=c.m.addSourceBuffer(k),c.A.o(l,"error",function(n){return function(){c.i[n.Ia][0].p.reject(new P(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.A.o(l,"updateend",function(n){return function(){return vi(c,n.Ia)}}(e)),
|
|
272
272
|
c.h[e.Ia]=l,c.J[e.Ia]=k,c.i[e.Ia]=[],c.I[e.Ia]=!!h.drmInfos.length);D(m)})};function ui(a,b){a.g||(a.g=new Dd(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Gb(Fd[b]))}function wi(a){return a.m?"ended"==a.m.readyState:!0}function xi(a,b){if(b==Mb)var c=a.g.g;else c=yi(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function zi(a,b){return b==Mb?a.g.h:li(yi(a,b))}
|
|
273
273
|
function Ai(a,b,c){if(b==Mb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=yi(a,b);return ni(a,c)}q.zb=function(){var a={total:oi(this.j.buffered),audio:oi(yi(this,"audio")),video:oi(yi(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 yi(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
274
|
-
function Bi(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.oa)return A(v,Hd(a.g,c,d,e),0);if(a.B[b])return A(v,xd(a.B[b],c),10);if(f)return a.g||ui(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=ki(a.C,c),h.length&&(k=a.h[g.
|
|
275
|
-
m,e));l.captions&&l.captions.length&&(n=a.h[g.
|
|
274
|
+
function Bi(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.oa)return A(v,Hd(a.g,c,d,e),0);if(a.B[b])return A(v,xd(a.B[b],c),10);if(f)return a.g||ui(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=ki(a.C,c),h.length&&(k=a.h[g.hb].timestampOffset,Md(a.g,h,d,e,k))),c=Ci(a,c,d,b),A(v,Di(a,b,function(){a.h[b].appendBuffer(c)}),0);c=Ci(a,c,d,b);return A(v,Di(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||ui(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.K(l.metadata,
|
|
275
|
+
m,e));l.captions&&l.captions.length&&(n=a.h[g.hb].timestampOffset,p=Kd(l.captions),Md(a.g,p,d,e,n));t=l.data;t=Ci(a,t,d,b);return A(v,Di(a,b,function(){a.h[b].appendBuffer(t)}),0)})}function Ei(a,b){var c=zi(a,"video")||0;Jd(a.g,b,c)}function Fi(a){a.g&&Jd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return M(function(f){e=Nb;return a==e.oa?A(f,d.g.remove(b,c),0):A(f,Di(d,a,function(){c<=b?vi(d,a):d.h[a].remove(b,c)}),0)})};
|
|
276
276
|
function Gi(a,b){var c;return M(function(d){c=Nb;return b==c.oa?a.g?A(d,a.g.remove(0,Infinity),0):d["return"]():A(d,Di(a,b,function(){var e=a.m.duration;0>=e?vi(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return M(function(d){c=Nb;return a==c.oa?d["return"]():A(d,Di(b,a,function(){b.j.currentTime-=.001;vi(b,a)}),0)})};
|
|
277
277
|
function Hi(a,b,c,d,e){var f;return M(function(g){f=Nb;return b==f.oa?(a.g.C=c,Id(a.g,d,e),g["return"]()):A(g,Promise.all([Di(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;vi(a,b)}),Di(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;vi(a,b)}),Di(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;vi(a,b)})]),0)})}
|
|
278
|
-
q.endOfStream=function(a){var b=this;return M(function(c){return A(c,Ii(b,function(){wi(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.
|
|
278
|
+
q.endOfStream=function(a){var b=this;return M(function(c){return A(c,Ii(b,function(){wi(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.cb=function(a){var b=this;return M(function(c){return A(c,Ii(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function vi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ji(a,b))}function Di(a,b,c){of(a.F);c={start:c,p:new Pc};a.i[b].push(c);1==a.i[b].length&&Ki(a,b);return c.p}
|
|
279
279
|
function Ii(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:of(a.F);c=[];d={};for(e in a.h)d.uc=new Pc,f={start:function(l){return function(){return l.uc.resolve()}}(d),p:d.uc},a.i[e].push(f),c.push(d.uc),1==a.i[e].length&&f.start(),d={uc:d.uc};E(k,2);return A(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=I(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)Ji(a,h)}D(k)}})}function Ji(a,b){a.i[b].shift();Ki(a,b)}
|
|
280
|
-
function Ki(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)),Ji(a,b)}}function Ci(a,b,c,d){var e=a.I[d];null==c&&e&&(Yc()||Wc())&&"mp4"==a.J[d].split(";")[0].split("/")[1]&&(b=Zg(b));return b}var ti=window.URL.createObjectURL;function Li(a,b,c,d){this.Ka=a;this.Ha=b;this.
|
|
281
|
-
function Ni(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.Ha=d;this.
|
|
282
|
-
q.Bg=function(){return this.i};N("shaka.media.SegmentReference",Ni);Ni.prototype.getTileDuration=Ni.prototype.Bg;Ni.prototype.getTilesLayout=Ni.prototype.Cg;Ni.prototype.getEndByte=Ni.prototype.Cc;Ni.prototype.getStartByte=Ni.prototype.Gc;Ni.prototype.getEndTime=Ni.prototype.ig;Ni.prototype.getStartTime=Ni.prototype.getStartTime;Ni.prototype.getUris=Ni.prototype.Ka;function R(a,b,c){this.l=a;this.ud=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.qg=function(){return this.g};q.
|
|
280
|
+
function Ki(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)),Ji(a,b)}}function Ci(a,b,c,d){var e=a.I[d];null==c&&e&&(Yc()||Wc())&&"mp4"==a.J[d].split(";")[0].split("/")[1]&&(b=Zg(b));return b}var ti=window.URL.createObjectURL;function Li(a,b,c,d){this.Ka=a;this.Ha=b;this.ya=c;this.be=void 0===d?null:d}Li.prototype.Gc=function(){return this.Ha};Li.prototype.Cc=function(){return this.ya};function Mi(a,b){return a&&b?a.Gc()==b.Gc()&&a.Cc()==b.Cc()&&kc(a.Ka(),b.Ka()):a==b}N("shaka.media.InitSegmentReference",Li);Li.prototype.getEndByte=Li.prototype.Cc;Li.prototype.getStartByte=Li.prototype.Gc;
|
|
281
|
+
function Ni(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.Ha=d;this.ya=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=Ni.prototype;q.Ka=function(){return this.j()};q.getStartTime=function(){return this.startTime};q.ig=function(){return this.endTime};q.Gc=function(){return this.Ha};q.Cc=function(){return this.ya};q.Cg=function(){return this.tilesLayout};
|
|
282
|
+
q.Bg=function(){return this.i};N("shaka.media.SegmentReference",Ni);Ni.prototype.getTileDuration=Ni.prototype.Bg;Ni.prototype.getTilesLayout=Ni.prototype.Cg;Ni.prototype.getEndByte=Ni.prototype.Cc;Ni.prototype.getStartByte=Ni.prototype.Gc;Ni.prototype.getEndTime=Ni.prototype.ig;Ni.prototype.getStartTime=Ni.prototype.getStartTime;Ni.prototype.getUris=Ni.prototype.Ka;function R(a,b,c){this.l=a;this.ud=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.qg=function(){return this.g};q.cb=function(a){this.i=a};q.vg=function(){return this.l};q.Bf=function(a){this.A=a};q.Qc=function(a){this.B=a};q.Be=function(a){this.m=a};q.hh=function(a){this.ud=a};q.hg=function(){return this.ud};
|
|
283
283
|
q.ic=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.ge(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.ae=function(){this.H=!0};q.ge=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.fe=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)};
|
|
284
284
|
q.T=function(){return Infinity==this.i&&!this.B};q.Nb=function(){return Infinity!=this.i&&!this.B};q.ob=function(){return Math.max(this.C,this.Kb()-this.m)};q.Ef=function(a){this.C=a};q.Kb=function(){return this.T()||this.Nb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Fc=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Kb()-this.m+a,this.mb()))};q.cc=function(){return this.Fc(0)};
|
|
285
285
|
q.mb=function(){return Math.max(0,this.Kb()-(this.T()||this.Nb()?this.ud:0))};q.If=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.Af=function(a){this.G=a};N("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.Af;R.prototype.usingPresentationStartTime=R.prototype.If;R.prototype.getSeekRangeEnd=R.prototype.mb;R.prototype.getSeekRangeStart=R.prototype.cc;R.prototype.getSafeSeekRangeStart=R.prototype.Fc;R.prototype.getSegmentAvailabilityEnd=R.prototype.Kb;
|
|
286
286
|
R.prototype.setUserSeekStart=R.prototype.Ef;R.prototype.getSegmentAvailabilityStart=R.prototype.ob;R.prototype.isInProgress=R.prototype.Nb;R.prototype.isLive=R.prototype.T;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.fe;R.prototype.notifyMinSegmentStartTime=R.prototype.ge;R.prototype.lockStartTime=R.prototype.ae;R.prototype.notifySegments=R.prototype.ic;R.prototype.getDelay=R.prototype.hg;R.prototype.setDelay=R.prototype.hh;
|
|
287
|
-
R.prototype.setSegmentAvailabilityDuration=R.prototype.Be;R.prototype.setStatic=R.prototype.
|
|
287
|
+
R.prototype.setSegmentAvailabilityDuration=R.prototype.Be;R.prototype.setStatic=R.prototype.Qc;R.prototype.setClockOffset=R.prototype.Bf;R.prototype.getPresentationStartTime=R.prototype.vg;R.prototype.setDuration=R.prototype.cb;R.prototype.getMaxSegmentDuration=R.prototype.qg;R.prototype.getDuration=R.prototype.getDuration;function Oi(a,b){this.j=a;this.m=Pi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}Oi.prototype.release=function(){this.j=null;this.i=function(){}};function Qi(a,b){a.i=b}function Ri(a){this.g=a}function Pi(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(oi(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 Si(a,b,c,d,e){var f=this;this.g=a;this.F=b;this.l=c;this.C=e;this.i=new pf;this.B=!1;this.G=a.readyState;this.j=!1;this.h=d;this.A=!1;this.i.o(a,"waiting",function(){return Ti(f)});this.m=(new Q(function(){Ti(f)})).ha(.25)}Si.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.C=null};Si.prototype.je=function(){this.A=!0;Ti(this)};
|
|
288
288
|
function Ti(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.B)return}else a.B=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.G&&(a.j=!1,a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Pi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=pi(b,g,a.l.gapDetectionThreshold);if(!(null==
|
|
289
289
|
c||0==c&&!a.A||(d=b.start(c),d>=a.F.mb()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new O("largegap",g),g.cancelable=!0,a.C(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Ui(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Vi.value().get(b),c.Ga(a,b,d))}var Vi=new Qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Wi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new pf;this.i=new Xi(a);Ui(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Yi(d,d.j)})}Wi.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 Zi(a){return a.m?a.g.currentTime:a.j}function $i(a,b){0<a.g.readyState?dj(a.i,b):Ui(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Yi(a,a.j)})}
|
|
290
290
|
function Yi(a,b){.001>Math.abs(a.g.currentTime-b)?ej(a):(a.h.Ga(a.g,"seeking",function(){ej(a)}),dj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function ej(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Xi(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--)})}Xi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
291
|
-
function dj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ha(.1)};function fj(a){this.g=a;this.j=!1;this.h=null;this.i=new pf}q=fj.prototype;q.Sd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.Ga(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Ui(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.Td=function(a){this.h=this.j?this.h:a};q.
|
|
291
|
+
function dj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ha(.1)};function fj(a){this.g=a;this.j=!1;this.h=null;this.i=new pf}q=fj.prototype;q.Sd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.Ga(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Ui(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.Td=function(a){this.h=this.j?this.h:a};q.Xc=function(){return(this.j?this.g.currentTime:this.h)||0};q.tf=function(){};
|
|
292
292
|
function gj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.C=b.minBufferTime||0;this.l=c;this.B=e;this.A=null;this.j=new Si(a,b.presentationTimeline,c,hj(a,c),f);this.h=new Wi(a,function(){a:{var h=g.j;h.B=!0;h.A=!1;h.j=!1;var k=Zi(g.h);h=ij(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.A||g.A<k-1)){g.A=k;$i(g.h,h);h=void 0;break a}g.B();h=void 0}return h},jj(this,d));this.m=new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Zi(g.h),k=g.g.cc(),l=g.g.mb();3>l-k&&(k=l-
|
|
293
|
-
3);h<k&&(h=ij(g,h),g.i.currentTime=h)}})}q=gj.prototype;q.Sd=function(){this.m.ha(.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.B=function(){}};q.Td=function(a){$i(this.h,a)};q.
|
|
293
|
+
3);h<k&&(h=ij(g,h),g.i.currentTime=h)}})}q=gj.prototype;q.Sd=function(){this.m.ha(.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.B=function(){}};q.Td=function(a){$i(this.h,a)};q.Xc=function(){var a=Zi(this.h);return 0<this.i.readyState&&!this.i.paused?kj(this,a):a};
|
|
294
294
|
function jj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.cc():a.g.mb():0>b&&(b=a.g.mb()+b);return lj(a,kj(a,b))}q.tf=function(){this.j.je()};function lj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function ij(a,b){var c=Math.max(a.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.cc(),f=a.g.mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Fc(c),k=a.g.Fc(d);c=a.g.Fc(c+d);return b>=g?lj(a,b):b>f?f:b<e?mi(a.i.buffered,k)?k:c:b>=h||mi(a.i.buffered,b)?b:c}
|
|
295
295
|
function kj(a,b){var c=a.g.cc();if(b<c)return c;c=a.g.mb();return b>c?c:b}function hj(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Oi(new Ri(a),b.stallThreshold);Qi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function mj(a){this.O=a;this.g=null;this.h=0;this.i=!1}q=mj.prototype;q.destroy=function(){zb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.O=[],this.g&&this.g.stop(),this.g=null)};q.Lg=function(){this.i=!0};
|
|
296
296
|
q.find=function(a){for(var b=this.O.length-1,c=b;0<=c;--c){var d=this.O[c],e=c<b?this.O[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.O.length&&a<this.O[0].startTime?this.h:null};q.get=function(a){if(0==this.O.length)return null;a-=this.h;return 0>a||a>=this.O.length?null:this.O[a]};q.offset=function(a){if(!this.i)for(var b=r(this.O),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
|
|
297
297
|
q.fc=function(a){!this.i&&a.length&&(this.O=this.O.filter(function(b){return b.startTime<a[0].startTime}),this.O.push.apply(this.O,ia(a)))};q.hc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.O.length||d.endTime>c.O[0].startTime)});this.fc(a);this.Hb(b)};q.Hb=function(a){if(!this.i){var b=this.O.length;this.O=this.O.filter(function(c){return c.endTime>a});this.h+=b-this.O.length}};
|
|
298
|
-
q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.O.length;)if(this.O[this.O.length-1].startTime>=b)this.O.pop();else break;for(;this.O.length;)if(this.O[0].endTime<=a)this.O.shift(),c||this.h++;else break;0!=this.O.length&&(a=this.O[this.O.length-1],this.O[this.O.length-1]=new Ni(a.startTime,b,a.j,a.Ha,a.
|
|
298
|
+
q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.O.length;)if(this.O[this.O.length-1].startTime>=b)this.O.pop();else break;for(;this.O.length;)if(this.O[0].endTime<=a)this.O.shift(),c||this.h++;else break;0!=this.O.length&&(a=this.O[this.O.length-1],this.O[this.O.length-1]=new Ni(a.startTime,b,a.j,a.Ha,a.ya,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
|
|
299
299
|
q.yd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.O.push.apply(c.O,ia(d)):(c.g.stop(),c.g=null)}),this.g.ha(a))};mj.prototype[Symbol.iterator]=function(){return this.Jb(0)};mj.prototype.Jb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new nj(this,b,d)};
|
|
300
300
|
function oj(a,b,c){return new mj([new Ni(a,a+b,function(){return c},0,null,null,a,a,a+b)])}N("shaka.media.SegmentIndex",mj);mj.forSingleSegment=oj;mj.prototype.getIteratorForTime=mj.prototype.Jb;mj.prototype.updateEvery=mj.prototype.yd;mj.prototype.fit=mj.prototype.yb;mj.prototype.evict=mj.prototype.Hb;mj.prototype.mergeAndEvict=mj.prototype.hc;mj.prototype.merge=mj.prototype.fc;mj.prototype.offset=mj.prototype.offset;mj.prototype.get=mj.prototype.get;mj.prototype.find=mj.prototype.find;
|
|
301
301
|
mj.prototype.markImmutable=mj.prototype.Lg;mj.prototype.release=mj.prototype.release;mj.prototype.destroy=mj.prototype.destroy;function nj(a,b,c){this.i=a;this.h=b;this.g=c}nj.prototype.seek=function(a){zb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.Jb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
|
|
302
302
|
nj.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.Ka().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};nj.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.Ka().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",nj);nj.prototype.next=nj.prototype.next;nj.prototype.current=nj.prototype.current;
|
|
303
303
|
nj.prototype.seek=nj.prototype.seek;function pj(){mj.call(this,[]);this.j=[]}u(pj,mj);q=pj.prototype;q.clone=function(){var a=new pj;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.O.length}return null};
|
|
304
304
|
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.O.length}return null};q.offset=function(){};q.fc=function(){};q.Hb=function(){};q.hc=function(){};q.yb=function(){};q.yd=function(){};N("shaka.media.MetaSegmentIndex",pj);pj.prototype.updateEvery=pj.prototype.yd;pj.prototype.fit=pj.prototype.yb;pj.prototype.mergeAndEvict=pj.prototype.hc;pj.prototype.evict=pj.prototype.Hb;pj.prototype.merge=pj.prototype.fc;
|
|
305
|
-
pj.prototype.offset=pj.prototype.offset;pj.prototype.get=pj.prototype.get;pj.prototype.find=pj.prototype.find;pj.prototype.release=pj.prototype.release;function qj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.
|
|
306
|
-
uj.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.
|
|
307
|
-
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.Xe=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function xj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.
|
|
305
|
+
pj.prototype.offset=pj.prototype.offset;pj.prototype.get=pj.prototype.get;pj.prototype.find=pj.prototype.find;pj.prototype.release=pj.prototype.release;function qj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.hd();this.h=new Q(function(){b.g.rf(.25*b.i)})}qj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};qj.prototype.set=function(a){this.i=a;rj(this)};qj.prototype.ed=function(){return this.g.ed()};function rj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.hd()!=b&&a.g.ze(b);return}catch(c){}a.h.ha(.25);0!=a.g.hd()&&a.g.ze(0)};function sj(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){tj(b,!1)})).ha(.25)}sj.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 tj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function uj(a){cb.call(this);this.g=new Map;this.h=a}u(uj,cb);uj.prototype.release=function(){this.g.clear();cb.prototype.release.call(this)};function vj(a,b){var c=a.g.get(b);c||(c={Lc:[],Xe:null,contentType:b},a.g.set(b,c));return c}function wj(a,b,c){var d=vj(a,b.contentType);xj(a,d);a={be:b,position:c};d=d.Lc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
306
|
+
uj.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.Lc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.be;break a}}d=null}if(e=d)e=c.Xe,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);
|
|
307
|
+
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.Xe=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function xj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Lc;b.Lc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Lc=[]};function yj(a){cb.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))})).ha(2)}u(yj,cb);yj.prototype.release=function(){this.g.clear();this.h.stop();cb.prototype.release.call(this)};function zj(a){cb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Wb:null,Vb:Aj,Mb:function(c,d){return Bj(b,"enter",c,d)}},{Wb:Cj,Vb:Aj,Mb:function(c,d){return Bj(b,"enter",c,d)}},{Wb:Dj,Vb:Aj,Mb:function(c,d){return Bj(b,"enter",c,d)}},{Wb:Aj,Vb:Cj,Mb:function(c,d){return Bj(b,"exit",c,d)}},{Wb:Aj,Vb:Dj,Mb:function(c,d){return Bj(b,"exit",c,d)}},{Wb:Cj,Vb:Dj,Mb:function(c,d){return Bj(b,"skip",c,d)}},{Wb:Dj,Vb:Cj,Mb:function(c,d){return Bj(b,"skip",c,d)}}];this.h=new pf;this.h.o(this.i,"regionremove",
|
|
308
308
|
function(c){b.g["delete"](c.region)})}u(zj,cb);zj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cb.prototype.release.call(this)};zj.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?Cj:a>d.endTime?Dj:Aj;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.Mb(d,b)}};
|
|
309
309
|
function Bj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Cj=1,Aj=2,Dj=3;function Ej(a,b,c,d,e){a=ff(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Fj(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=1;this.A=this.l=null;this.j=new Map;this.F=!1;this.G=null;this.B=!1;this.i=new nf(function(){return Gj(c)})}Fj.prototype.destroy=function(){return this.i.destroy()};function Gj(a){var b,c,d,e;return M(function(f){if(1==f.g){b=[];c=r(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,Hj(e),b.push(Ij(e));return A(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.h=null;D(f)})}
|
|
310
310
|
Fj.prototype.configure=function(a){this.h=a;this.G=new Oe({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)};Fj.prototype.start=function(){var a=this;return M(function(b){if(1==b.g)return A(b,Jj(a),2);of(a.i);a.F=!0;D(b)})};
|
|
311
311
|
function Kj(a,b){var c,d,e,f,g,h;M(function(k){switch(k.g){case 1:return c=Nb,E(k,2),A(k,Gi(a.g.W,c.oa),4);case 4:va(k,3);break;case 2:if(d=I(k),a.g)a.g.onError(d);case 3:e=yd(b.mimeType,b.codecs);ui(a.g.W,e);f=a.g.W.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=Lj(b),a.j.set(c.oa,h),Mj(a,h,0);D(k)}})}function Nj(a){var b=a.j.get(Mb);b&&(Hj(b),Ij(b)["catch"](function(){}),a.j["delete"](Mb));a.A=null}
|
|
312
312
|
function Oj(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Tb&&(Pj(a,e,!1,0,!1),c.Tb=d)}else if(d=c.Tb)c.Tb=null,Pj(a,d,!0,0,!1)}}function Qj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&Pj(a,b.video,c,d,e),b.audio&&Pj(a,b.audio,c,d,e))}function Rj(a,b){a.A=b;a.F&&Pj(a,b,!0,0,!1)}
|
|
313
|
-
function Pj(a,b,c,d,e){var f=a.j.get(b.type);f||b.type!=Mb?f&&(f.Tb&&(b.trickModeVideo?(f.Tb=b,b=b.trickModeVideo):f.Tb=null),f.stream!=b||e)&&(b.type==Mb&&ui(a.g.W,yd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ua=null,c&&(f.zc?f.Cd=!0:f.La?(f.Eb=!0,f
|
|
314
|
-
function Tj(a,b){var c,d;return M(function(e){if(1==e.g){if(!b.Na)return e["return"]();c=b.stream;d=b.Na;return c.segmentIndex?e.D(2):A(e,c.createSegmentIndex(),2)}if(b.Na!=d||b.stream!=c)return e["return"]();var f=a.g.
|
|
315
|
-
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Na.h.g>h?!0:!1):f=!1;f&&b.Na.abort();D(e)})}function Uj(a,b){b.zc||b.Eb||(b.La?(b.Eb=!0,b
|
|
316
|
-
function Jj(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;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.
|
|
317
|
-
(m=Lj(l),a.j.set(k,m),Mj(a,m,0));D(n)})}function Lj(a){return{stream:a,type:a.type,ua:null,Sa:null,ld:null,$d:null,Zd:null,Yd:null,Tb:null,endOfStream:!1,La:!1,
|
|
318
|
-
function Vj(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:of(a.i);if(b.La||null==b.
|
|
319
|
-
I(h),A(h,Xj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.j.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return A(h,a.g.W.endOfStream(),10);case 10:of(a.i),g=a.g.W.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.
|
|
320
|
-
function Wj(a,b){if(Yj(b))return Ei(a.g.W,b.stream.originalId||""),null;b.type==Mb&&Fi(a.g.W);var c=a.g.
|
|
313
|
+
function Pj(a,b,c,d,e){var f=a.j.get(b.type);f||b.type!=Mb?f&&(f.Tb&&(b.trickModeVideo?(f.Tb=b,b=b.trickModeVideo):f.Tb=null),f.stream!=b||e)&&(b.type==Mb&&ui(a.g.W,yd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ua=null,c&&(f.zc?f.Cd=!0:f.La?(f.Eb=!0,f.bd=d,f.Cd=!0):(Hj(f),Sj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Tj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):Kj(a,b)}
|
|
314
|
+
function Tj(a,b){var c,d;return M(function(e){if(1==e.g){if(!b.Na)return e["return"]();c=b.stream;d=b.Na;return c.segmentIndex?e.D(2):A(e,c.createSegmentIndex(),2)}if(b.Na!=d||b.stream!=c)return e["return"]();var f=a.g.gd();var g=zi(a.g.W,b.type),h=b.stream.segmentIndex.find(b.Sa?b.Sa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ya?k.ya-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.ya?k.ya-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
|
|
315
|
+
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Na.h.g>h?!0:!1):f=!1;f&&b.Na.abort();D(e)})}function Uj(a,b){b.zc||b.Eb||(b.La?(b.Eb=!0,b.bd=0):null==xi(a.g.W,b.type)?null==b.fb&&Mj(a,b,0):(Hj(b),Sj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
|
|
316
|
+
function Jj(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;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.hb,a.l.video),d.add(a.l.video));a.A&&(c.set(b.oa,a.A),d.add(a.A));e=a.g.W;f=a.h.forceTransmuxTS;return A(n,e.init(c,f),2)}of(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.W.cb(p):a.g.W.cb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||
|
|
317
|
+
(m=Lj(l),a.j.set(k,m),Mj(a,m,0));D(n)})}function Lj(a){return{stream:a,type:a.type,ua:null,Sa:null,ld:null,$d:null,Zd:null,Yd:null,Tb:null,endOfStream:!1,La:!1,fb:null,Eb:!1,bd:0,Cd:!1,zc:!1,me:!1,Ic:!1,Na:null}}
|
|
318
|
+
function Vj(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:of(a.i);if(b.La||null==b.fb||b.zc)return h["return"]();b.fb=null;if(!b.Eb){h.D(2);break}return A(h,Sj(a,b,b.Cd,b.bd),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.La||b.fb||Mj(a,b,0),h["return"]();case 4:E(h,6);d=Wj(a,b);null!=d&&(Mj(a,b,d),b.Ic=!1);va(h,7);break;case 6:return e=
|
|
319
|
+
I(h),A(h,Xj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.j.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return A(h,a.g.W.endOfStream(),10);case 10:of(a.i),g=a.g.W.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.cb(g),D(h)}})}
|
|
320
|
+
function Wj(a,b){if(Yj(b))return Ei(a.g.W,b.stream.originalId||""),null;b.type==Mb&&Fi(a.g.W);var c=a.g.gd(),d=b.Sa?b.Sa.endTime:c,e=Ai(a.g.W,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=zi(a.g.W,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.j.get(Mb))&&Yj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Zj(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;
|
|
321
321
|
f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,Yj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Sa?h.Sa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;ak(a,b,c,e)["catch"](function(){});return null}
|
|
322
322
|
function Zj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Sa||d)return b.ua=b.stream.segmentIndex.Jb(b.Sa?b.Sa.endTime:d),b.ua&&b.ua.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.Jb(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.Jb(c),e=b.ua&&b.ua.next().value);return e}
|
|
323
323
|
function ak(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y,x,w,C;return M(function(z){switch(z.g){case 1:return e=Nb,f=b.stream,g=b.ua,b.La=!0,E(z,2),A(z,bk(a,b,d),4);case 4:of(a.i);if(a.B)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),t=p=!1,v=function(B){var F,G,H;return M(function(J){if(p)return J["return"]();t=!0;of(a.i);if(a.B)return J["return"]();n=ck(n,B);F=!1;G=0;(new Qg).box("mdat",function(K){G=
|
|
324
324
|
K.size+K.start;F=!0}).parse(n,!1,!0);if(!F)return J.D(0);H=n.subarray(0,G);n=n.subarray(G);return A(J,dk(a,b,c,f,d,H),0)})},A(z,ek(a,b,d,v),9);l=ek(a,b,d);return A(z,l,7);case 7:return m=z.h,of(a.i),a.B?z["return"]():b.Eb?(b.La=!1,Mj(a,b,0),z["return"]()):A(z,dk(a,b,c,f,d,m),6);case 9:y=z.h;if(t){z.D(6);break}p=!0;of(a.i);return a.B?z["return"]():b.Eb?(b.La=!1,Mj(a,b,0),z["return"]()):A(z,dk(a,b,c,f,d,y),6);case 6:of(a.i);if(a.B)return z["return"]();b.Sa=d;g.next();b.La=!1;b.me=!1;x=a.g.W.zb();w=
|
|
325
|
-
x[b.type];Xa(JSON.stringify(w));b.Eb||a.g.je();Mj(a,b,0);va(z,0);break;case 2:C=I(z);of(a.i,C);if(a.B)return z["return"]();b.La=!1;if(7001==C.code)b.La=!1,Hj(b),Mj(a,b,0),z.D(0);else if(b.type==e.oa&&a.h.ignoreTextStreamFailures)a.j["delete"](e.oa),z.D(0);else if(3017==C.code)fk(a,b,C),z.D(0);else return b.
|
|
326
|
-
function fk(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.me})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.
|
|
325
|
+
x[b.type];Xa(JSON.stringify(w));b.Eb||a.g.je();Mj(a,b,0);va(z,0);break;case 2:C=I(z);of(a.i,C);if(a.B)return z["return"]();b.La=!1;if(7001==C.code)b.La=!1,Hj(b),Mj(a,b,0),z.D(0);else if(b.type==e.oa&&a.h.ignoreTextStreamFailures)a.j["delete"](e.oa),z.D(0);else if(3017==C.code)fk(a,b,C),z.D(0);else return b.Ic=!0,C.severity=2,A(z,Xj(a,C),0)}})}function ck(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
326
|
+
function fk(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.me})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Ic=!0;a.B=!0;a.g.onError(c);return}b.me=!0}Mj(a,b,4)}
|
|
327
327
|
function bk(a,b,c){var d,e,f,g,h,k,l;return M(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.$d||e!=b.Zd||f!=b.Yd)h=function(){var n;return M(function(p){if(1==p.g)return E(p,2),b.Zd=e,b.Yd=f,b.$d=g,A(p,Hi(a.g.W,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=I(p);b.Zd=null;b.Yd=null;b.$d=null;throw n;})},d.push(h());!Mi(c.g,b.ld)&&(b.ld=c.g)&&(k=ek(a,b,c.g),l=function(){var n,p,t;return M(function(v){switch(v.g){case 1:return E(v,2),A(v,k,4);
|
|
328
328
|
case 4:return n=v.h,of(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,A(v,Bi(a.g.W,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw t=I(v),b.ld=null,t;}})},a.g.Pg(c.startTime,c.g),d.push(l()));return A(m,Promise.all(d),0)})}
|
|
329
|
-
function dk(a,b,c,d,e,f){var g;return M(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new Qg).V("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.
|
|
330
|
-
m=k.reader.
|
|
329
|
+
function dk(a,b,c,d,e,f){var g;return M(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new Qg).V("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Mc();var n=k.reader.Mc();var p=k.reader.P();var t=k.reader.P();var v=k.reader.P();var y=k.reader.P();var x=e.startTime+t/p}else p=k.reader.P(),x=k.reader.mc()/p+e.timestampOffset,t=x-e.startTime,v=k.reader.P(),y=k.reader.P(),
|
|
330
|
+
m=k.reader.Mc(),n=k.reader.Mc();k=k.reader.Cb(k.reader.U.byteLength-k.reader.ia());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Qg():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:y,messageData:k}),l=new O(gk,l),a.g.onEvent(l))}).parse(f),A(h,hk(a,b,c),2);if(3!=h.g)return of(a.i),A(h,Bi(a.g.W,b.type,f,e.startTime,e.endTime,g),3);of(a.i);D(h)})}
|
|
331
331
|
function hk(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=xi(a.g.W,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():A(h,a.g.W.remove(b.type,e,e+g),2)}of(a.i);D(h)})}function Yj(a){return a&&a.type==Mb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
332
|
-
function ek(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=mf,f=Ej(c.Ka(),c.Ha,c.
|
|
333
|
-
function Sj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Eb=!1,b.Cd=!1,b
|
|
334
|
-
function Mj(a,b,c){var d=b.type;if(d!=Mb||a.j.has(d))b.
|
|
335
|
-
function nk(a,b){var c={jc:function(){},qd:function(){},Sb:function(){},onError:function(){},sd:function(){},Ni:function(){}};a.m.push({create:b,
|
|
336
|
-
function kk(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Lb)var c=!1;else{a.g&&(a.g.
|
|
337
|
-
function ok(a){var b,c;return M(function(d){switch(d.g){case 1:return a.i=a.j.sg(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.Xf(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.
|
|
332
|
+
function ek(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=mf,f=Ej(c.Ka(),c.Ha,c.ya,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Li,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Qb.request(e,f),b.Na=h,A(l,h.promise,2);k=l.h;b.Na=null;return l["return"](k.data)})}
|
|
333
|
+
function Sj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Eb=!1,b.Cd=!1,b.bd=0,b.zc=!0,b.Sa=null,b.ld=null,b.ua=null,d?(e=a.g.gd(),f=a.g.W.getDuration(),A(g,a.g.W.remove(b.type,e+d,f),3)):A(g,Gi(a.g.W,b.type),4);if(3!=g.g)return of(a.i),c?A(g,a.g.W.flush(b.type),3):g.D(3);of(a.i);b.zc=!1;b.endOfStream=!1;b.La||b.fb||Mj(a,b,0);D(g)})}
|
|
334
|
+
function Mj(a,b,c){var d=b.type;if(d!=Mb||a.j.has(d))b.fb=(new Rc(function(){var e;return M(function(f){if(1==f.g)return E(f,2),A(f,Vj(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);D(f)})})).R(c)}function Hj(a){null!=a.fb&&(a.fb.stop(),a.fb=null)}function Ij(a){return M(function(b){return a.Na?A(b,a.Na.abort(),0):b.D(0)})}function Xj(a,b){return M(function(c){if(1==c.g)return A(c,Qe(a.G),2);of(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);D(c)})};function ik(a,b){var c=jk(),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 kk(d)});this.B=new nf(function(){return lk(d)})}ik.prototype.destroy=function(){return this.B.destroy()};function lk(a){var b,c,d;return M(function(e){if(1==e.g)return a.h&&a.h.abort(),mk(a),A(e,a.C,2);a.g&&a.g.bb.Sb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.bb.Sb();a.g=null;a.m=[];a.j=null;D(e)})}
|
|
335
|
+
function nk(a,b){var c={jc:function(){},qd:function(){},Sb:function(){},onError:function(){},sd:function(){},Ni:function(){}};a.m.push({create:b,bb:c});a.h&&a.h.abort();mk(a);return c}
|
|
336
|
+
function kk(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Lb)var c=!1;else{a.g&&(a.g.bb.Sb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.bb.jc(),a.g={node:d.node,payload:d.payload,Lb:d.Lb,bb:c.bb}):c.bb.sd();c=!0}c?c=Promise.resolve():a.g?c=ok(a):(a.j.Og(a.i),a.A=new Pc,c=a.A);b=A(b,c,1)}return b})}
|
|
337
|
+
function ok(a){var b,c;return M(function(d){switch(d.g){case 1:return a.i=a.j.sg(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.Xf(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.bb.qd(),a.g=null);va(d,0);break;case 2:b=I(d);if(7001==b.code)a.g.bb.Sb();else a.g.bb.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,D(d)}})}function mk(a){a.A&&(a.A.resolve(),a.A=null)};function pk(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=pk.prototype;q.remove=function(a,b){if(!this.g)return!1;qk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
338
338
|
q.append=function(a){function b(h,k){for(var l=r(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},"");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak||h.spacer?(h.spacer&&zb("shaka.extern.Cue",
|
|
339
339
|
"Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(c).join(""):l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=r(d);for(var g=d.next();!g.done;f={Xb:f.Xb},g=d.next())f.Xb=g.value,a.some(function(h){return function(k){return k.startTime==h.Xb.startTime&&k.endTime==h.Xb.endTime&&k.text==h.Xb.payload?!0:!1}}(f))||(g=rk(f.Xb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
|
|
340
340
|
k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-e.indexOf(k)});a=r(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};q.destroy=function(){this.g&&(qk(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"};
|
|
341
341
|
function rk(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}
|
|
342
|
-
function qk(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}N("shaka.text.SimpleTextDisplayer",pk);pk.prototype.setTextVisibility=pk.prototype.setTextVisibility;pk.prototype.isTextVisible=pk.prototype.isTextVisible;pk.prototype.destroy=pk.prototype.destroy;pk.prototype.append=pk.prototype.append;pk.prototype.remove=pk.prototype.remove;function sk(){}function S(a){return document.createElement(a)}function tk(){
|
|
343
|
-
!0)}),this.l.observe(this.g));this.A=new Map}q=vk.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={
|
|
342
|
+
function qk(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}N("shaka.text.SimpleTextDisplayer",pk);pk.prototype.setTextVisibility=pk.prototype.setTextVisibility;pk.prototype.isTextVisible=pk.prototype.isTextVisible;pk.prototype.destroy=pk.prototype.destroy;pk.prototype.append=pk.prototype.append;pk.prototype.remove=pk.prototype.remove;function sk(){}function S(a){return document.createElement(a)}function tk(){var a=document.createElement("button");a.setAttribute("type","button");return a}function uk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}N("shaka.util.Dom",sk);sk.removeAllChildren=uk;function vk(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(){wk(c)})).ha(.25);this.h=new Map;this.B=new pf;this.B.o(document,"fullscreenchange",function(){wk(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){wk(c,
|
|
343
|
+
!0)}),this.l.observe(this.g));this.A=new Map}q=vk.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Rc:c.Rc},d=a.next())c.Rc=d.value,b.some(function(e){return function(f){return wc(f,e.Rc)}}(c))||this.i.push(c.Rc);wk(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)};
|
|
344
344
|
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});wk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};function xk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
345
|
-
function yk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Jf:null;l&&(g.push(l.Vd),l.
|
|
346
|
-
t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.
|
|
347
|
-
function zk(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&zb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&Ak(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,
|
|
348
|
-
g;
|
|
345
|
+
function yk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Jf:null;l&&(g.push(l.Vd),l.Nc&&g.push(l.Nc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l?xk(a,n)||(f=!0):(zk(a,k,e),l=a.h.get(k),n=l.Jf,f=!0));0<k.nestedCues.length&&n&&yk(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,t){return p.startTime!=
|
|
346
|
+
t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Nc?(c.appendChild(d.Nc),d.Nc.appendChild(d.Vd)):c.appendChild(d.Vd)}}function wk(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=r(a.A.values()),e=d.next();!e.done;e=d.next())uk(e.value);uk(a.g);a.h.clear();a.A.clear()}if(a.j){d=new Map;e=r(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));yk(a,a.i,a.g,c,[])}}}
|
|
347
|
+
function zk(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&zb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&Ak(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==Dc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Dc?"%":"px"),a.A.has(e))c=a.A.get(e);else{var g=S("span"),h=c.heightUnits==Dc?"%":"px",k=c.widthUnits==Dc?
|
|
348
|
+
"%":"px",l=c.viewportAnchorUnits==Dc?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(e,g);c=g}e=f;d&&(e=S("span"),e.classList.add("shaka-text-wrapper"),
|
|
349
|
+
e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Vd:f,Jf:e,Nc:c})}
|
|
349
350
|
function Ak(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=Bk(c.linePadding,c,a.m);f.paddingRight=Bk(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
|
|
350
351
|
"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=Ck(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?"flex-start":"center"==
|
|
351
352
|
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=Bk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==qc?(f.width="100%",c.lineAlign==sc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sc?f.left=c.line+"%":"end"==c.lineAlign&&
|
|
352
353
|
(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==sc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==qc?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||
|
|
353
354
|
(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==qc?f.width=c.size+"%":f.height=c.size+"%")}function Bk(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 Ck(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}
|
|
354
|
-
N("shaka.text.UITextDisplayer",vk);vk.prototype.setTextVisibility=vk.prototype.setTextVisibility;vk.prototype.isTextVisible=vk.prototype.isTextVisible;vk.prototype.remove=vk.prototype.remove;vk.prototype.destroy=vk.prototype.destroy;vk.prototype.append=vk.prototype.append;function Dk(a,b){function c(
|
|
355
|
-
""
|
|
356
|
-
break;case "right":
|
|
355
|
+
N("shaka.text.UITextDisplayer",vk);vk.prototype.setTextVisibility=vk.prototype.setTextVisibility;vk.prototype.isTextVisible=vk.prototype.isTextVisible;vk.prototype.remove=vk.prototype.remove;vk.prototype.destroy=vk.prototype.destroy;vk.prototype.append=vk.prototype.append;function Dk(a,b){function c(k,l){for(var m=r(k),n=m.next();!n.done;n=m.next())if(n=n.value,n.isContainer)c(n.nestedCues,l);else{var p=n.clone();p.nestedCues=[];p.payload=e(n);l.push(p)}return l}function d(k){for(var l=k,m=r(b),n=m.next();!n.done;n=m.next())n=n.value,n.end&&n.start<k&&(l+=n.end-n.start);k=Math.floor(l/3600);m=Math.floor(l/60%60);n=Math.floor(l%60);l=Math.floor(1E3*l%1E3);return(10>k?"0":"")+k+":"+(10>m?"0":"")+m+":"+(10>n?"0":"")+n+"."+(100>l?10>l?"00":"0":"")+l}function e(k){var l=
|
|
356
|
+
[],m=700<=k.fontWeight,n="italic"==k.fontStyle,p=k.textDecoration.includes("underline");m&&l.push("b");n&&l.push("i");p&&l.push("u");m=l.reduce(function(t,v){return t+"<"+v+">"},"");l=l.reduceRight(function(t,v){return t+"</"+v+">"},"");return k.lineBreak||k.spacer?(k.spacer&&zb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):k.nestedCues.length?k.nestedCues.map(e).join(""):m+k.payload+l}var f=c(a,[]),g="WEBVTT\n\n";f=r(f);for(var h=f.next();!h.done;h=f.next())h=h.value,g+=d(h.startTime)+
|
|
357
|
+
" --\x3e "+d(h.endTime)+function(k){var l=[];switch(k.textAlign){case "left":l.push("align:left");break;case "right":l.push("align:right");break;case pc:l.push("align:middle");break;case "start":l.push("align:start");break;case "end":l.push("align:end")}switch(k.writingMode){case "vertical-lr":l.push("vertical:lr");break;case "vertical-rl":l.push("vertical:rl")}return l.length?" "+l.join(" "):""}(h)+"\n",g+=h.payload+"\n\n";return g}N("shaka.text.WebVttGenerator",function(){});function Ek(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function Fk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?Gk:Hk};d.ot=Ik(c);var e=d.ot===Jk||d.ot===Kk||d.ot===Lk||d.ot===Mk;e&&(d.bl=Nk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==Mk&&(d.tb=Ok(a,d.ot)/1E3);Pk(a,b,d)}}catch(f){Ta("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
|
|
357
358
|
function Qk(a,b,c){try{if(!a.g.enabled)return b;var d=Rk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Lk;break a;case "application/x-mpegurl":e=Sk;break a}e=void 0}d.ot=e;d.su=!0;var f=Tk(d);return Uk(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Vk(a,b){try{if(!a.g.enabled)return b;var c=Rk(a);c.ot=Wk;c.su=!0;var d=Tk(c);return Uk(b,d)}catch(e){return Ta("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
|
|
358
359
|
function Rk(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}}function Pk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Rk(a));c.pr=a.h.Ab();var e=c.ot===Jk||c.ot===Lk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Xk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Tk(c);f&&(b.uris=b.uris.map(function(g){return Uk(g,f)}))}}}
|
|
359
360
|
function Ik(a){var b=a.type;if(a.init)return Yk;if("video"==b)return a.codecs.includes(",")?Lk:Jk;if("audio"==b)return Kk;if("text"==b)return"application/mp4"===a.mimeType?Mk:Wk}function Nk(a,b){var c=a.h.zb()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
|
|
360
|
-
function Ok(a,b){var c=a.h
|
|
361
|
+
function Ok(a,b){var c=a.h.ab();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case Jk:return d.videoBandwidth||NaN;case Kk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
|
|
361
362
|
function Tk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
362
363
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Xk(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=Tk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
363
364
|
function Uk(a,b){if(!b||a.includes("offline:"))return a;var c=new jb(a);c.g.set("CMCD",b);return c.toString()}var Sk="m",Kk="a",Jk="v",Lk="av",Yk="i",Wk="c",Mk="tt",Hk="v",Gk="l";N("shaka.util.CmcdManager.StreamingFormat",{Ah:"d",Oh:"h",si:"s",bi:"o"});function Zk(){}
|
|
@@ -373,72 +374,72 @@ maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:In
|
|
|
373
374
|
function fl(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return $k(a,b,c||dl(),d,"")}
|
|
374
375
|
function el(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Yb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Qb(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
|
|
375
376
|
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Mb&&"image"!=g.type||c.push(g);return c}N("shaka.util.PlayerConfiguration",cl);cl.mergeConfigObjects=fl;function gl(){this.g=null;this.h=[]}function hl(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 il(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
|
|
376
|
-
function jl(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 kl(){this.i=this.h=null;this.g=[]}function ll(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 ml(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new gl;this.h=new kl};function T(a,b){cb.call(this);var c=this;this.l=nl;this.
|
|
377
|
-
this.
|
|
378
|
-
function(e,f){return Ve(rl(c,e,f))});d.set(this.S,function(e){e.M&&(c.
|
|
379
|
-
d.set(this.
|
|
377
|
+
function jl(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 kl(){this.i=this.h=null;this.g=[]}function ll(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 ml(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new gl;this.h=new kl};function T(a,b){cb.call(this);var c=this;this.l=nl;this.jd=this.g=null;this.ba=!1;this.nd=new pf;this.gb=new pf;this.A=new pf;this.ke=this.C=this.ib=this.i=this.pd=this.J=this.j=this.ma=this.X=this.na=this.K=this.kd=this.I=this.Ya=this.F=this.N=this.m=this.H=null;this.Ne=1E9;this.h=ol(this);this.Me={width:Infinity,height:Infinity};this.B=null;this.Ca=new Ge(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Pa=this.h.preferredTextLanguage;this.Bc=this.h.preferredTextRole;
|
|
378
|
+
this.wb=this.h.preferForcedSubs;this.jb=[];this.Hc=null;b&&b(this);this.H=pl(this);this.H.xe(this.h.streaming.forceHTTPS);this.G=null;ql&&(this.G=Gb(ql));this.nd.o(window,"online",function(){c.oe()});this.S={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Oe={name:"manifest-parser"};this.Je={name:"manifest"};this.Xa={name:"media-source"};this.le={name:"drm-engine"};this.$={name:"load"};this.Pe={name:"src-equals-drm-engine"};this.Za={name:"src-equals"};var d=new Map;d.set(this.Z,
|
|
379
|
+
function(e,f){return Ve(rl(c,e,f))});d.set(this.S,function(e){e.M&&(c.gb.rb(),e.M=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return Ve(e)});d.set(this.aa,function(e){return Ve(sl(c,e))});d.set(this.Xa,function(e){e=tl(c,e);return Ve(e)});d.set(this.Oe,function(e,f){var g=ul(c,e,f);return Ve(g)});d.set(this.Je,function(e){return vl(c,e)});d.set(this.le,function(e){e=wl(c,e);return Ve(e)});d.set(this.$,function(e,f){return Ve(xl(c,e,f))});d.set(this.Pe,function(e,f){var g=yl(c,e,f);return Ve(g)});
|
|
380
|
+
d.set(this.Za,function(e,f){return zl(c,e,f)});this.wa=new ik(this.S,{sg:function(e,f,g,h){var k=null;e==c.S&&(k=g==c.S?c.S:c.Z);e==c.Z&&(k=g==c.S||f.M!=h.M?c.S:g==c.Z?c.Z:g==c.Xa||g==c.$?c.Xa:g==c.Za?c.Pe:null);e==c.Xa&&(k=g==c.$&&f.M==h.M?c.Oe:c.aa);e==c.Oe&&(k=Al(c.$,c.Je,c.aa,g,f,h));e==c.Je&&(k=Al(c.$,c.le,c.aa,g,f,h));e==c.le&&(k=Al(c.$,c.$,c.aa,g,f,h));e==c.Pe&&(k=g==c.Za&&f.M==h.M?c.Za:c.aa);if(e==c.$||e==c.Za)k=c.aa;e==c.aa&&(k=h.M&&f.M==h.M?c.Z:c.S);return k},Xf:function(e,f,g){c.dispatchEvent(Bl(Cl,
|
|
380
381
|
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return M(function(f){return 1==f.g?A(f,sl(c,e),2):f["return"](e.M?c.Z:c.S)})},Og:function(e){c.dispatchEvent(Bl(Dl,(new Map).set("state",e.name)))}});a&&this.yc(a,!0)}u(T,cb);function Bl(a,b){return new O(a,b)}q=T.prototype;
|
|
381
|
-
q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==El)return c["return"]();a.l=El;b=nk(a.
|
|
382
|
+
q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==El)return c["return"]();a.l=El;b=nk(a.wa,function(){return{node:a.S,payload:jk(),Lb:!1}});return A(c,new Promise(function(d){b.jc=function(){};b.qd=function(){d()};b.Sb=function(){d()};b.onError=function(){d()};b.sd=function(){d()}}),2);case 2:return A(c,a.wa.destroy(),3);case 3:a.nd&&(a.nd.release(),a.nd=null);a.gb&&(a.gb.release(),a.gb=null);a.A&&(a.A.release(),a.A=null);a.ke=null;a.C=null;a.h=null;a.B=null;a.jd=null;
|
|
382
383
|
a.X=null;if(!a.H){c.D(4);break}return A(c,a.H.destroy(),5);case 5:a.H=null;case 4:cb.prototype.release.call(a),D(c)}})};
|
|
383
384
|
function Fl(){window.Promise||Sa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Xc("Trident/"))return!1;var a=cd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Tc()?!0:Uc("application/x-mpegurl")}
|
|
384
|
-
q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==El)return Promise.reject(Gl());var c=jk();c.M=a;Tc()||(b=!1);var d=b?this.
|
|
385
|
-
q.Ke=function(a){var b=this;a=void 0===a?!0:a;if(this.l==El)return Promise.reject(Gl());Tc()||(a=!1);var c=jk(),d=nk(this.
|
|
386
|
-
q.load=function(a,b,c){var d=this;this.
|
|
387
|
-
g.onError=function(l){return k(l)}})};function Jl(a,b){if(!Tc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Kg(d),c=Ml[c]);if(c){if(""==(b.M||Vc()).canPlayType(c))return!1;if(!Tc()||!(c in Jg||Kg(d)in Lg)||a.h.streaming.preferNativeHls)return!0;if(ad())return a.h.streaming.useNativeHlsOnSafari}return!1}function rl(a,b,c){null==b.M&&(b.M=c.M,a.
|
|
388
|
-
function sl(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=El&&(a.l=nl),c=a.
|
|
389
|
-
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.N){n.D(9);break}return A(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.M||!b.M.src){n.D(11);break}return A(n,new Promise(function(p){return(new Q(p)).R(.1)}),12);case 12:for(b.M.removeAttribute("src"),b.M.load();b.M.lastChild;)b.M.removeChild(b.M.firstChild);case 11:if(!a.m){n.D(13);break}return A(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.
|
|
390
|
-
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.B=new ml;a.pe=null;Ql(a);D(n)}})}
|
|
385
|
+
q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==El)return Promise.reject(Gl());var c=jk();c.M=a;Tc()||(b=!1);var d=b?this.Xa:this.Z,e=nk(this.wa,function(){return{node:d,payload:c,Lb:!1}});e.jc=function(){};return Hl(e)};q.detach=function(){var a=this;if(this.l==El)return Promise.reject(Gl());var b=nk(this.wa,function(){return{node:a.S,payload:jk(),Lb:!1}});b.jc=function(){};return Hl(b)};
|
|
386
|
+
q.Ke=function(a){var b=this;a=void 0===a?!0:a;if(this.l==El)return Promise.reject(Gl());Tc()||(a=!1);var c=jk(),d=nk(this.wa,function(e){var f=e.M&&a?b.Xa:e.M?b.Z:b.S;c.M=e.M;return{node:f,payload:c,Lb:!1}});d.jc=function(){};return Hl(d)};q.nh=function(a){this.Hc=a};
|
|
387
|
+
q.load=function(a,b,c){var d=this;this.Hc=null;if(this.l==El)return Promise.reject(Gl());this.dispatchEvent(Bl(Il));var e=jk();e.uri=a;e.Ee=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Jl(this,e)?this.Za:this.$,g=nk(this.wa,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Lb:!0}});this.B=new ml;this.X=Kl(this);g.jc=function(){};return new Promise(function(h,k){g.sd=function(){return k(new P(2,7,7002))};g.qd=function(){h();d.dispatchEvent(Bl(Ll))};g.Sb=function(){return k(Gl())};
|
|
388
|
+
g.onError=function(l){return k(l)}})};function Jl(a,b){if(!Tc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Kg(d),c=Ml[c]);if(c){if(""==(b.M||Vc()).canPlayType(c))return!1;if(!Tc()||!(c in Jg||Kg(d)in Lg)||a.h.streaming.preferNativeHls)return!0;if(ad())return a.h.streaming.useNativeHlsOnSafari}return!1}function rl(a,b,c){null==b.M&&(b.M=c.M,a.gb.o(b.M,"error",function(){var d=Nl(a);d&&Ol(a,d)}));a.g=b.M;return Promise.resolve()}
|
|
389
|
+
function sl(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=El&&(a.l=nl),c=a.jb.map(function(p){return p()}),a.jb=[],A(n,Promise.all(c),2);case 2:a.dispatchEvent(Bl(Pl));b.mimeType=null;b.startTime=null;b.uri=null;a.na&&(a.na.release(),a.na=null);b.M&&a.A.rb();a.Ya&&(a.Ya.release(),a.Ya=null);a.kd&&(a.kd.stop(),a.kd=null);if(!a.J){n.D(3);break}return A(n,a.J.stop(),4);case 4:a.J=null,a.pd=null;case 3:if(!a.C){n.D(5);break}return A(n,a.C.stop(),5);case 5:if(!a.j){n.D(7);
|
|
390
|
+
break}return A(n,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.N){n.D(9);break}return A(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.M||!b.M.src){n.D(11);break}return A(n,new Promise(function(p){return(new Q(p)).R(.1)}),12);case 12:for(b.M.removeAttribute("src"),b.M.load();b.M.lastChild;)b.M.removeChild(b.M.firstChild);case 11:if(!a.m){n.D(13);break}return A(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.ib=
|
|
391
|
+
null;a.K=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.B=new ml;a.pe=null;Ql(a);D(n)}})}
|
|
391
392
|
function tl(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=new ji,d=a.h.textDisplayFactory,e=Gb(d),a.pe=d,f=Rl(b.M,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())Sl(a,n,p,"ID3",v.value);if(a.G)a.G.onHlsTimedMetadata(m,n)}}),A(g,f.G,2);a.N=f;D(g)})}
|
|
392
|
-
function ul(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.
|
|
393
|
-
function vl(a,b){var c=b.uri,d=a.H;a.
|
|
393
|
+
function ul(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.ib=d,f=a,A(h,Ig(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.pd=h.h;a.J=Gb(a.pd);g=Ye(a.h.manifest);c.M&&"AUDIO"===c.M.nodeName&&(g.disableVideo=!0);a.J.configure(g);D(h)})}
|
|
394
|
+
function vl(a,b){var c=b.uri,d=a.H;a.na=new yj(function(){return a.Ma()});a.na.addEventListener("regionadd",function(g){g=g.region;Tl(a,Ul,g);if(a.G)a.G.onDashTimedMetadata(g)});a.ma=null;a.h.streaming.observeQualityChanges&&(a.ma=new uj(function(){return a.zb()}),a.ma.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
|
|
394
395
|
mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Bl(Vl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.X;try{k.g.enabled&&(k.A=h.format,Pk(k,g,{ot:Sk,su:!k.i}))}catch(l){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Fk(a.X,g,h)},filter:function(g){return Wl(a,g)},makeTextStreamsForClosedCaptions:function(g){return Xl(a,g)},
|
|
395
|
-
onTimelineRegionAdded:function(g){var h=a.
|
|
396
|
+
onTimelineRegionAdded:function(g){var h=a.na;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new O("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Ol(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
|
|
396
397
|
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Re(function(){var g,h,k,l;return M(function(m){if(1==m.g)return g=a,A(m,a.J.start(c,e),2);g.i=m.h;h=Bl(Yl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);Zl(a.i);k=Date.now()/1E3;l=k-f;a.B.H=l;D(m)})}(),function(){return a.J.stop()})}
|
|
397
398
|
function wl(a,b){var c,d;return M(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=$l(a,{Qb:a.H,onError:function(f){Ol(a,f)},rd:function(f){am(a,f)},onExpirationUpdated:function(f,g){bm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==cm&&d&&(d=!1,a.B.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),A(e,bg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?A(e,a.m.yc(b.M),3):A(e,Wl(a,a.i),0)})}
|
|
398
|
-
function xl(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.
|
|
399
|
-
(a.ke=h,a.C=Gb(h),"function"!=typeof a.C.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.C.playbackRateChanged=function(){}),a.C.configure(a.h.abr));a.
|
|
400
|
-
w?!1:w,void 0===C?0:C)});a.F=hm(a,b.startTime);a.
|
|
401
|
-
om(a)?a.C.chooseVariant():null;gm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n=a.F.
|
|
399
|
+
function xl(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Hc&&(b.startTime=a.Hc,a.Hc=null);d=b.M;e=b.uri;a.ib=e;a.I=new qj({hd:function(){return d.playbackRate},ed:function(){return d.defaultPlaybackRate},ze:function(x){d.playbackRate=x},rf:function(x){d.currentTime+=x}});f=function(){return dm(a)};g=function(){return em(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.ke==h||
|
|
400
|
+
(a.ke=h,a.C=Gb(h),"function"!=typeof a.C.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.C.playbackRateChanged=function(){}),a.C.configure(a.h.abr));a.Ca=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Pa=a.h.preferredTextLanguage;a.Bc=a.h.preferredTextRole;a.wb=a.h.preferForcedSubs;fm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(x,w,C){a.j&&x!=a.j.l&&gm(a,x,!0,void 0===
|
|
401
|
+
w?!1:w,void 0===C?0:C)});a.F=hm(a,b.startTime);a.Ya=im(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);jm(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=km(a);a.j.configure(a.h.streaming);a.l=lm;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":mm(a,x)}});a.dispatchEvent(Bl(nm));l=null;if(m=a.ab().find(function(x){return x.active})){y.D(2);break}l=
|
|
402
|
+
om(a)?a.C.chooseVariant():null;gm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n=a.F.Xc();return A(y,pm(l,n),4);case 4:p=y.h,a.F.Td(p);case 3:qm(a,null,le(l));case 2:return a.F.Sd(),t=a.pb().find(function(x){return x.active}),t||((v=ve(a.i.textStreams,a.Pa,a.Bc,a.wb)[0]||null)&&ll(a.B.h,v,!0),l&&(v?(l.audio&&rm(a,l.audio,v)&&(a.ba=!0),a.ba&&a.N.l.setTextVisibility(!0),sm(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Pb())&&Rj(a.j,v)),A(y,a.j.start(),5);case 5:a.h.abr.enabled&&
|
|
402
403
|
(a.C.enable(),tm(a)),ce(a.j?a.j.l:null,a.i),um(a.i),vm(a),om(a),a.i.variants.some(function(x){return x.primary}),a.A.Ga(d,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Ee}),D(y)}})}
|
|
403
404
|
function yl(a,b,c){var d,e,f,g,h,k,l;return M(function(m){return 1==m.g?(d=Nb,e=Date.now()/1E3,f=!0,a.m=$l(a,{Qb:a.H,onError:function(n){Ol(a,n)},rd:function(n){am(a,n)},onExpirationUpdated:function(n,p){bm(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==cm&&f&&(f=!1,a.B.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Kg(g),k=Ml[h],"application/x-mpegurl"==k&&ad()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
|
|
404
|
-
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.
|
|
405
|
+
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.hb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.X=!0,A(m,bg(a.m,[l],[]),2)):A(m,a.m.yc(b.M),
|
|
405
406
|
0)})}
|
|
406
|
-
function zl(a,b,c){function d(){return dm(a)}b.uri=c.uri;b.startTime=c.startTime;a.
|
|
407
|
+
function zl(a,b,c){function d(){return dm(a)}b.uri=c.uri;b.startTime=c.startTime;a.ib=b.uri;var e=b.M;a.F=new fj(e);var f=!1;a.jb.push(function(){f=!0});null!=b.startTime&&a.F.Td(b.startTime);a.I=new qj({hd:function(){return e.playbackRate},ed:function(){return e.defaultPlaybackRate},ze:function(k){e.playbackRate=k},rf:function(k){e.currentTime+=k}});jm(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return em(a)});"none"!=e.preload&&
|
|
407
408
|
a.A.Ga(e,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Ee});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return vm(a)}),a.A.o(e.audioTracks,"removetrack",function(){return vm(a)}),a.A.o(e.audioTracks,"change",function(){return vm(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":wm(a,k);break;case "chapters":mm(a,k);break;default:vm(a)}}),a.A.o(e.textTracks,"removetrack",function(){return vm(a)}),a.A.o(e.textTracks,
|
|
408
409
|
"change",function(){return vm(a)}));var g=Kg(b.uri);e.src=Qk(a.X,b.uri,Ml[g]);(Yc()||Zc())&&e.load();a.l=xm;a.dispatchEvent(Bl(nm));var h=new Pc;Ui(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){a.F.Sd();h.resolve()});Ui(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return M(function(l){if(1==l.g)return ym(a),k=zm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):A(l,new Promise(function(m){a.A.Ga(e.textTracks,"change",m);(new Q(m)).R(1)}),2);if(f)return l["return"]();Am(a);D(l)})});
|
|
409
410
|
e.error?h.reject(Nl(a)):"none"==e.preload&&(Sa('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.A.Ga(e,"error",function(){h.reject(Nl(a))});return new Re(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
|
|
410
411
|
function ym(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.xd(b);var c=a.h.preferredVariantRole;""!=c&&a.xd(b,c)}}function Am(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.re(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.re(b,d,c)}}
|
|
411
|
-
function wm(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.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,Sl(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=Bm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).
|
|
412
|
-
function Sl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Bl(Cm,b))}function mm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).
|
|
412
|
+
function wm(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.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,Sl(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=Bm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ba().R(.5);a.jb.push(function(){c.stop()})}}
|
|
413
|
+
function Sl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Bl(Cm,b))}function mm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).Ba().R(.5);a.jb.push(function(){c.stop()})}}function Zl(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 $l(a,b){return new Vf(b,a.h.drm.updateExpirationTime)}
|
|
413
414
|
function pl(a){return new bf(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(Bl(Dm,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Bl(Em,b))})}
|
|
414
|
-
function hm(a,b){return new gj(a.g,a.i,a.h.streaming,b,function(){a.
|
|
415
|
-
g.next())Vh(h.value)}}a.K&&Fm(a)},function(c){return a.dispatchEvent(c)})}function im(a){var b=new zj(a.
|
|
415
|
+
function hm(a,b){return new gj(a.g,a.i,a.h.streaming,b,function(){a.Ya&&tj(a.Ya,!0);if(a.j){var c=a.j;if(c.g)for(var d=c.g.gd(),e=c.h.smallGapLimit,f=r(c.j.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.j.get(g);h.ua=null;var k=c.g.W;g==Mb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=yi(k,g),k=mi(k,d,e));if(!k&&((null!=zi(c.g.W,g)||h.La)&&Uj(c,h),h.Na&&(h.Na.abort(),h.Na=null),g===Mb))for(g=c.g.W.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,$h(g),g=r(g.j.values()),h=g.next();!h.done;h=
|
|
416
|
+
g.next())Vh(h.value)}}a.K&&Fm(a)},function(c){return a.dispatchEvent(c)})}function im(a){var b=new zj(a.na);b.addEventListener("enter",function(d){Tl(a,Gm,d.region)});b.addEventListener("exit",function(d){Tl(a,Hm,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Tl(a,Gm,e),Tl(a,Hm,e))});var c=new sj(a.g);c.g.add(b);a.ma&&c.g.add(a.ma);return c}function jm(a,b){a.K=new Ke;a.K.g=Me;Ne(a.K,b,Math.min(.5,b/2));Ql(a);a.kd=(new Q(function(){Fm(a)})).ha(.25)}
|
|
416
417
|
function Fm(a){switch(a.l){case xm:if(a.g.ended)var b=!0;else{var c=li(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case lm:a:if(a.g.ended||wi(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Kb();var d=li(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ni(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Le:Me;c.g=d;b!=d&&Ql(a)}function Rl(a,b,c,d){return new qi(a,b,c,d)}
|
|
417
|
-
function Kl(a){return new Ek({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0}
|
|
418
|
-
function km(a){return new Fj(a.i,{
|
|
418
|
+
function Kl(a){return new Ek({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},ab:function(){return a.ab()},Ab:function(){return a.Ab()},T:function(){return a.T()}},a.h.cmcd)}
|
|
419
|
+
function km(a){return new Fj(a.i,{gd:function(){return a.F.Xc()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Fk(a.X,b,c)},W:a.N,Qb:a.H,onError:function(b){return Ol(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Qg:function(){a.J&&a.J.update&&a.J.update()},je:function(){a.F&&a.F.tf();Fm(a)},Pg:function(b,c){var d=c.be;d&&a.ma&&wj(a.ma,d,b)}})}
|
|
419
420
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=al(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
|
|
420
421
|
0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=fl(this.h,a,ol(this));Im(this);return c};
|
|
421
422
|
function Im(a){if(a.J){var b=Ye(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{Jm(a,a.i)}catch(f){Ol(a,f)}a.C&&om(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Km(a)}a.H&&a.H.xe(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.pe!=b)){var c=Gb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.pe=b;a.j&&(b=a.j,(c=b.j.get(Mb))&&
|
|
422
423
|
Pj(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),tm(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ne(a.K,b,Math.min(.5,b/2)));a.i&&fm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=ol(this);fl(a,this.h,ol(this));return a};
|
|
423
|
-
q.$f=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.Ma().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.$g=function(){for(var a in this.h)delete this.h[a];fl(this.h,ol(this),ol(this));Im(this)};q.gf=function(){return this.l};q.rg=function(){return this.g};q.Ec=function(){return this.H};q.Wd=function(){return this.
|
|
424
|
-
q.
|
|
425
|
-
q.Ma=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.cc(),end:a.mb()}}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.Eg=function(){this.T()&&(this.g.currentTime=this.Ma().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Dc=function(){return this.m?this.m.Dc():Infinity};q.
|
|
426
|
-
q.
|
|
427
|
-
q
|
|
424
|
+
q.$f=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.Ma().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.$g=function(){for(var a in this.h)delete this.h[a];fl(this.h,ol(this),ol(this));Im(this)};q.gf=function(){return this.l};q.rg=function(){return this.g};q.Ec=function(){return this.H};q.Wd=function(){return this.ib};
|
|
425
|
+
q.dd=function(){return this.G?this.G:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Nb=function(){return this.i?this.i.presentationTimeline.Nb():!1};q.mf=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};
|
|
426
|
+
q.Ma=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.cc(),end:a.mb()}}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.Eg=function(){this.T()&&(this.g.currentTime=this.Ma().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Dc=function(){return this.m?this.m.Dc():Infinity};q.fd=function(){return this.m?this.m.fd():{}};
|
|
427
|
+
q.Kc=function(){return this.K?this.K.g==Me:!1};q.Ab=function(){return this.g?this.I?this.I.i:1:0};q.Ie=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==lm&&(this.C.playbackRateChanged(a),Oj(this.j,1<Math.abs(a))))};q.Se=function(){var a=this.I.ed();this.l==xm&&this.I.set(a);this.l==lm&&(this.I.set(a),this.C.playbackRateChanged(a),Oj(this.j,!1))};
|
|
428
|
+
q.ab=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,te(e)){var f=le(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 se(g)}):[]};
|
|
428
429
|
q.pb=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=me(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?zm(this).map(function(f){return qe(f)}):[]};q.jg=function(){return this.i?this.i.imageStreams.map(function(a){return ne(a)}):[]};
|
|
429
430
|
q.Ag=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B;return M(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.D(3):A(F,d.createSegmentIndex(),3):F["return"](null):F.D(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;
|
|
430
431
|
v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;z=C=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,C=B%m*p,z=Math.floor(B/m)*t);return F["return"]({imageHeight:l,imageWidth:k,height:t,positionX:C,positionY:z,startTime:w,duration:x,uris:f.Ka(),width:p})}return F["return"](null)})};
|
|
431
|
-
q.se=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&&(ll(this.B.h,b,!1),Rj(this.j,b),Lm(this),this.
|
|
432
|
-
q.ue=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&&Sa("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&&te(d)&&(gm(this,d,!1,b,c),this.
|
|
433
|
-
oe(c)==a.id){Mm(this,c);break}};q.Zf=function(){return Nm(this
|
|
434
|
-
q.xd=function(a,b){if(this.i&&this.F){this.
|
|
432
|
+
q.se=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&&(ll(this.B.h,b,!1),Rj(this.j,b),Lm(this),this.Pa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,oe(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";Lm(this)}};
|
|
433
|
+
q.ue=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&&Sa("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&&te(d)&&(gm(this,d,!1,b,c),this.Ca=new Fe(d),om(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,
|
|
434
|
+
oe(c)==a.id){Mm(this,c);break}};q.Zf=function(){return Nm(this.ab())};q.zg=function(){return Nm(this.pb())};q.Yf=function(){return Array.from(Om(this.ab()))};q.yg=function(){return Array.from(Om(this.pb()))};
|
|
435
|
+
q.xd=function(a,b){if(this.i&&this.F){this.Ca=new Ge(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Ca.create(this.i.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=le(f),this.ue(c,!0)):Km(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Qb(a);f=d=null;e=
|
|
435
436
|
r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=se(g);Qb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Mm(this,f):d&&Mm(this,d)}};
|
|
436
|
-
q.re=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.
|
|
437
|
-
q.bh=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.
|
|
437
|
+
q.re=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Pa=a,this.Bc=b||"",this.wb=c,(a=ve(this.i.textStreams,this.Pa,this.Bc,this.wb)[0]||null)&&a!=this.j.A&&(ll(this.B.h,a,!1),this.h.streaming.alwaysStreamText||this.Pb()))Rj(this.j,a),Lm(this)}else{var d=Qb(a);(a=this.pb().find(function(e){return Qb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.se(a)}};
|
|
438
|
+
q.bh=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.Ca=new Ge(b.language,"",0,a),Km(this))}};q.Pb=function(){var a=this.ba;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?zm(this).some(function(b){return"showing"==b.mode}):a};q.df=function(){return this.g&&this.g.src&&this.g.textTracks?Pm(this).map(function(a){return qe(a)}):[]};
|
|
438
439
|
q.cg=function(a){var b=Qb(a),c=Pm(this).filter(function(h){return Qb(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};
|
|
439
440
|
function zm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Bm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Pm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
440
|
-
q.Ce=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==lm)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ve(this.i.textStreams,this.
|
|
441
|
-
q.ug=function(){if(!this.T())return null;var a=this.
|
|
441
|
+
q.Ce=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==lm)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ve(this.i.textStreams,this.Pa,this.Bc,this.wb),0<a.length&&(Rj(this.j,a[0]),Lm(this))):Nj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}sm(this)}};
|
|
442
|
+
q.ug=function(){if(!this.T())return null;var a=this.wa.l,b=0;if(this.F)b=this.F.Xc();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};
|
|
442
443
|
q.hf=function(){if(!this.T())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.zb=function(){if(this.l==lm)return this.N.zb();var a={total:[],audio:[],video:[],text:[]};this.l==xm&&(a.total=oi(this.g.buffered));return a};
|
|
443
444
|
q.getStats=function(){if(this.l!=lm&&this.l!=xm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames: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:[]};dm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?
|
|
444
445
|
b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.B;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.K=d;this.B.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.B.B=c;if(this.l==lm){if(c=this.j.l)this.B.F=(this.I?this.I.i:1)*c.bandwidth;c&&c.video&&(b=this.B,d=c.video.height||NaN,b.A=c.video.width||NaN,b.l=d);this.T()&&(c=this.hf().valueOf()+1E3*this.Ma().end,this.B.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
|
|
@@ -454,43 +455,43 @@ q.Nf=function(a,b,c){var d=this,e,f,g,h;return M(function(k){switch(k.g){case 1:
|
|
|
454
455
|
case 5:throw new P(1,2,2012);}})};function Rm(a,b){var c,d;return M(function(e){switch(e.g){case 1:c=Kg(b);if(d=Qm[c])return e["return"](d);E(e,2);return A(e,Mg(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:I(e);case 3:if(d)return e["return"](d);throw new P(1,2,2011,c);}})}
|
|
455
456
|
function Sm(a,b,c,d,e,f,g){var h,k,l,m;return M(function(n){if(1==n.g)return"text/vtt"!=e||g.length?A(n,Tm(a,b,a.H,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=Um(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ti(l),e="text/vtt");m=document.createElement("track");m.src=Vk(a.X,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
|
|
456
457
|
function Tm(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){e=mf;f=ff([b],d);f.method="GET";var k=a.X;try{k.g.enabled&&Pk(k,f,{ot:Wk,su:!0})}catch(l){Ta("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)})}function Um(a,b,c,d){var e=Fd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ic(b),b=c.parseMedia(b,a),Dk(b,d);throw new P(2,2,2014,c);}
|
|
457
|
-
q.ye=function(a,b){this.Me.width=a;this.Me.height=b};q.oe=function(a){if(this.l==lm){var b=this.j;a=void 0===a?.1:a;if(b.i.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.
|
|
458
|
-
q.og=function(){Sa("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.pg=function(){return this.
|
|
459
|
-
function ol(a){var b=dl();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.oe(d))}};b.textDisplayFactory=function(){return a.
|
|
458
|
+
q.ye=function(a,b){this.Me.width=a;this.Me.height=b};q.oe=function(a){if(this.l==lm){var b=this.j;a=void 0===a?.1:a;if(b.i.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Ic||d.La||d.fb||(d.Ic=!1,Mj(b,d,a));b=!0}}else b=!1;return b};
|
|
459
|
+
q.og=function(){Sa("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.pg=function(){return this.pd};
|
|
460
|
+
function ol(a){var b=dl();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.oe(d))}};b.textDisplayFactory=function(){return a.jd?new vk(a.g,a.jd):new pk(a.g)};return b}q.De=function(a){this.jd=a};
|
|
460
461
|
function Xl(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new pj;h={id:a.Ne++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
461
462
|
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Mb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function Wl(a,b){return M(function(c){if(1==c.g)return A(c,Vm(a,b),2);Jm(a,b);D(c)})}
|
|
462
463
|
function Vm(a,b){var c;return M(function(d){if(1==d.g)return c=a.j?a.j.l:null,A(d,ae(c,b),2);um(b);D(d)})}
|
|
463
464
|
function Jm(a,b){if(a.l!=El){for(var c=a.h.restrictions,d=a.Me,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=$d(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&vm(a);if((c=a.m?a.m.g:null)&&a.m.B)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=
|
|
464
465
|
f.next())g=g.value,mg(a.m,g.initDataType,g.initData);Wm(a,b)}}
|
|
465
466
|
function pm(a,b){var c,d,e,f,g;return M(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return M(function(t){if(1==t.g)return k?A(t,k.createSegmentIndex(),2):t["return"](null);n=(m=k.segmentIndex.Jb(l))?m.next().value:null;if(!n)return t["return"](null);p=n.startTime;return t["return"](p)})},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)})}
|
|
466
|
-
function Ql(a){var b=a.
|
|
467
|
-
function om(a){try{Wm(a,a.i)}catch(c){return Ol(a,c),!1}var b=a.i.variants.filter(function(c){return te(c)});b=a.
|
|
467
|
+
function Ql(a){var b=a.Kc();if(a.B&&a.K&&a.F){var c=a.I;c.j=b;rj(c);a.X&&(c=a.X,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);dm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Bl(Xm,b))}function em(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=Bl(Ym),a.dispatchEvent(b))}function dm(a){if(a.B&&a.K){var b=a.B.g;a.K.g==Me?hl(b,"buffering"):a.g.paused?hl(b,"paused"):a.g.ended?hl(b,"ended"):hl(b,"playing")}}
|
|
468
|
+
function om(a){try{Wm(a,a.i)}catch(c){return Ol(a,c),!1}var b=a.i.variants.filter(function(c){return te(c)});b=a.Ca.create(b);a.C.setVariants(Array.from(b.values()));return!0}function Km(a){var b;(b=om(a)?a.C.chooseVariant():null)&&gm(a,b,!0,!0,0)}
|
|
468
469
|
function gm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Qj(a.j,b,d,e,!0);else{var g=a.B.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Qj(a.j,b,d,e);d=null;f&&(d=le(f));b=le(b);c?qm(a,d,b):Zm(a,d,b)}}function Mm(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=se(c);var d=se(b);Zm(a,c,d)}
|
|
469
470
|
function rm(a,b,c){a=Qb(a.h.preferredTextLanguage);b=Qb(b.language);c=Qb(c.language);return Pb(c,a)&&!Pb(b,c)}function qm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Bl($m,b);an(a,b)}function vm(a){var b=Bl(bn);an(a,b)}function Zm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Bl(cn,b);an(a,b)}function Lm(a){var b=Bl(dn);an(a,b)}function sm(a){var b=Bl(en);an(a,b)}function tm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);an(a,Bl(fn,b))}
|
|
470
471
|
function Ol(a,b){if(a.l!=El){var c=Bl(gn,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Tl(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(Bl(b,c))}
|
|
471
472
|
function Nl(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)}
|
|
472
473
|
function am(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!hn.includes(l)}h!=f.allowedByKeySystem&&
|
|
473
|
-
(e=!0)}}}if(!e||om(a))(d=a.j.l)&&!d.allowedByKeySystem&&Km(a),e&&vm(a)}}function bm(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=Bl(jn);a.dispatchEvent(b)}function fm(a,b,c){0<b&&(a.T()||a.Ef(b));b=a.getDuration();c<b&&(a.T()||a.
|
|
474
|
-
function Wm(a,b){var c=a.m?a.m.
|
|
474
|
+
(e=!0)}}}if(!e||om(a))(d=a.j.l)&&!d.allowedByKeySystem&&Km(a),e&&vm(a)}}function bm(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=Bl(jn);a.dispatchEvent(b)}function fm(a,b,c){0<b&&(a.T()||a.Ef(b));b=a.getDuration();c<b&&(a.T()||a.cb(c))}
|
|
475
|
+
function Wm(a,b){var c=a.m?a.m.fd():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?hn.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
|
|
475
476
|
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new P(2,4,4012,c);}function um(a){if(!a.variants.some(te))throw new P(2,4,4032);}function an(a,b){M(function(c){if(1==c.g)return A(c,Promise.resolve(),2);a.l!=El&&a.dispatchEvent(b);D(c)})}function Om(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(Qb(c.language)):b.add("und");return b}
|
|
476
477
|
function Nm(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=Qb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=r(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
|
|
477
478
|
h.push({language:l,role:n,label:p})}});return h}function Gl(){return new P(2,7,7E3)}function Al(a,b,c,d,e,f){return d==a&&e.M==f.M&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function jk(){return{M:null,mimeType:null,startTime:null,Ee:NaN,uri:null}}function Hl(a){return new Promise(function(b,c){a.Sb=function(){return c(Gl())};a.qd=function(){return b()};a.onError=function(d){return c(d)};a.sd=function(){return c(Gl())}})}N("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.De;
|
|
478
479
|
T.prototype.getManifestParserFactory=T.prototype.pg;T.prototype.getManifest=T.prototype.og;T.prototype.retryStreaming=T.prototype.oe;T.prototype.setMaxHardwareResolution=T.prototype.ye;T.prototype.addChaptersTrack=T.prototype.Nf;T.prototype.addTextTrackAsync=T.prototype.Of;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.zb;T.prototype.getPresentationStartTimeAsDate=T.prototype.hf;
|
|
479
480
|
T.prototype.getPlayheadTimeAsDate=T.prototype.ug;T.prototype.setTextTrackVisibility=T.prototype.Ce;T.prototype.getChapters=T.prototype.cg;T.prototype.getChaptersTracks=T.prototype.df;T.prototype.isTextTrackVisible=T.prototype.Pb;T.prototype.selectVariantsByLabel=T.prototype.bh;T.prototype.selectTextLanguage=T.prototype.re;T.prototype.selectAudioLanguage=T.prototype.xd;T.prototype.getTextLanguages=T.prototype.yg;T.prototype.getAudioLanguages=T.prototype.Yf;T.prototype.getTextLanguagesAndRoles=T.prototype.zg;
|
|
480
|
-
T.prototype.getAudioLanguagesAndRoles=T.prototype.Zf;T.prototype.selectVariantTrack=T.prototype.ue;T.prototype.selectTextTrack=T.prototype.se;T.prototype.getThumbnails=T.prototype.Ag;T.prototype.getImageTracks=T.prototype.jg;T.prototype.getTextTracks=T.prototype.pb;T.prototype.getVariantTracks=T.prototype
|
|
481
|
-
T.prototype.getExpiration=T.prototype.Dc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Eg;T.prototype.seekRange=T.prototype.Ma;T.prototype.isAudioOnly=T.prototype.mf;T.prototype.isInProgress=T.prototype.Nb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.
|
|
481
|
+
T.prototype.getAudioLanguagesAndRoles=T.prototype.Zf;T.prototype.selectVariantTrack=T.prototype.ue;T.prototype.selectTextTrack=T.prototype.se;T.prototype.getThumbnails=T.prototype.Ag;T.prototype.getImageTracks=T.prototype.jg;T.prototype.getTextTracks=T.prototype.pb;T.prototype.getVariantTracks=T.prototype.ab;T.prototype.cancelTrickPlay=T.prototype.Se;T.prototype.trickPlay=T.prototype.Ie;T.prototype.getPlaybackRate=T.prototype.Ab;T.prototype.isBuffering=T.prototype.Kc;T.prototype.getKeyStatuses=T.prototype.fd;
|
|
482
|
+
T.prototype.getExpiration=T.prototype.Dc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Eg;T.prototype.seekRange=T.prototype.Ma;T.prototype.isAudioOnly=T.prototype.mf;T.prototype.isInProgress=T.prototype.Nb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.dd;T.prototype.getAssetUri=T.prototype.Wd;T.prototype.getNetworkingEngine=T.prototype.Ec;T.prototype.getMediaElement=T.prototype.rg;
|
|
482
483
|
T.prototype.getLoadMode=T.prototype.gf;T.prototype.resetConfiguration=T.prototype.$g;T.prototype.getBufferFullness=T.prototype.$f;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.nh;T.prototype.unload=T.prototype.Ke;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.yc;
|
|
483
484
|
T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h){if(1==h.g)return b={},a?A(h,Cg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Tc()){for(var l in Jg)k[l]=!0;for(var m in Lg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Tc()?!!Jg[n]:Uc(n);for(var p in l)k[p]=
|
|
484
485
|
Tc()?!!Lg[p]:Uc(l[p]);c=k;k={};p=r('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(","));
|
|
485
486
|
for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Tc()?Ed(l)?!0:MediaSource.isTypeSupported(l)||ud(l):Uc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=kn;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=Fl;T.setAdManagerFactory=function(a){ql=a};T.registerSupportPlugin=function(a,b){kn[a]=b};T.prototype.destroy=T.prototype.destroy;
|
|
486
487
|
var fn="abrstatuschanged",$m="adaptation",Xm="buffering",Em="downloadfailed",Dm="downloadheadersreceived",cm="drmsessionupdate",gk="emsg",gn="error",jn="expirationupdated",Ll="loaded",Il="loading",Yl="manifestparsed",Vl="mediaqualitychanged",Cm="metadata",Cl="onstatechange",Dl="onstateidle",Ym="ratechange",nm="streaming",dn="textchanged",en="texttrackvisibility",Ul="timelineregionadded",Gm="timelineregionenter",Hm="timelineregionexit",bn="trackschanged",Pl="unloading",cn="variantchanged",ln={uh:fn,
|
|
487
|
-
vh:$m,wh:Xm,Bh:Em,Ch:Dm,Dh:cm,Kh:gk,Error:gn,Lh:jn,Rh:"largegap",Sh:Ll,Th:Il,Xh:Yl,Yh:Vl,Metadata:Cm,ci:Cl,di:Dl,ni:Ym,wi:"sessiondata",xi:nm,zi:dn,Ai:en,Bi:Ul,Ci:Gm,Di:Hm,Ei:bn,Ii:Pl,Ki:cn},El=0,nl=1,lm=2,xm=3;T.LoadMode={DESTROYED:El,NOT_LOADED:nl,MEDIA_SOURCE:lm,SRC_EQUALS:xm};T.version="v3.3.
|
|
488
|
+
vh:$m,wh:Xm,Bh:Em,Ch:Dm,Dh:cm,Kh:gk,Error:gn,Lh:jn,Rh:"largegap",Sh:Ll,Th:Il,Xh:Yl,Yh:Vl,Metadata:Cm,ci:Cl,di:Dl,ni:Ym,wi:"sessiondata",xi:nm,zi:dn,Ai:en,Bi:Ul,Ci:Gm,Di:Hm,Ei:bn,Ii:Pl,Ki:cn},El=0,nl=1,lm=2,xm=3;T.LoadMode={DESTROYED:El,NOT_LOADED:nl,MEDIA_SOURCE:lm,SRC_EQUALS:xm};T.version="v3.3.16";var mn=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(mn[0]),Number(mn[1])));
|
|
488
489
|
var hn=["output-restricted","internal-error"],kn={},ql=null,Ml={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"},Qm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
489
490
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function nn(){this.h=[];this.j=this.i=this.g=0};function on(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new pf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=on.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};
|
|
490
491
|
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()};
|
|
491
492
|
q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?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()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};
|
|
492
493
|
N("shaka.ads.ClientSideAd",on);on.prototype.release=on.prototype.release;on.prototype.getPositionInSequence=on.prototype.getPositionInSequence;on.prototype.getSequenceLength=on.prototype.getSequenceLength;on.prototype.setMuted=on.prototype.setMuted;on.prototype.resize=on.prototype.resize;on.prototype.isLinear=on.prototype.isLinear;on.prototype.isMuted=on.prototype.isMuted;on.prototype.setVolume=on.prototype.setVolume;on.prototype.getVolume=on.prototype.getVolume;on.prototype.play=on.prototype.play;
|
|
493
|
-
on.prototype.pause=on.prototype.pause;on.prototype.skip=on.prototype.skip;on.prototype.canSkipNow=on.prototype.canSkipNow;on.prototype.getTimeUntilSkippable=on.prototype.getTimeUntilSkippable;on.prototype.isSkippable=on.prototype.isSkippable;on.prototype.isPaused=on.prototype.isPaused;on.prototype.getRemainingTime=on.prototype.getRemainingTime;on.prototype.getMinSuggestedDuration=on.prototype.getMinSuggestedDuration;on.prototype.getDuration=on.prototype.getDuration;function pn(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 pf;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("v3.3.
|
|
494
|
+
on.prototype.pause=on.prototype.pause;on.prototype.skip=on.prototype.skip;on.prototype.canSkipNow=on.prototype.canSkipNow;on.prototype.getTimeUntilSkippable=on.prototype.getTimeUntilSkippable;on.prototype.isSkippable=on.prototype.isSkippable;on.prototype.isPaused=on.prototype.isPaused;on.prototype.getRemainingTime=on.prototype.getRemainingTime;on.prototype.getMinSuggestedDuration=on.prototype.getMinSuggestedDuration;on.prototype.getDuration=on.prototype.getDuration;function pn(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 pf;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("v3.3.16");this.g=null;this.h.Ga(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){qn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
494
495
|
function(f){rn(e,f)});this.i.onended=function(){e.m.contentComplete()}}pn.prototype.stop=function(){this.g&&this.g.stop();this.A&&uk(this.A)};pn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function rn(a,b){b.getError();sn(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
495
496
|
function qn(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){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",d)))}tn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
496
497
|
a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?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,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.i.addEventListener("play",function(){a.g.start()},{once:!0})}catch(f){sn(a,null)}}
|
|
@@ -511,8 +512,8 @@ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}wn.prototyp
|
|
|
511
512
|
function xn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function U(){cb.call(this);this.g=this.i=null;this.h=new nn;this.j=navigator.language}u(U,cb);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 pn(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)})};
|
|
512
513
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.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 nn};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)};
|
|
513
514
|
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 wn(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)})};
|
|
514
|
-
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)&&Sa('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="v3.3.
|
|
515
|
-
(c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('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="v3.3.
|
|
515
|
+
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)&&Sa('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="v3.3.16";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
516
|
+
(c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('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="v3.3.16";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
|
|
516
517
|
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)};N("shaka.ads.AdManager",U);
|
|
517
518
|
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;
|
|
518
519
|
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";
|
|
@@ -525,26 +526,26 @@ var Bn="ended play playing pause pausing ratechange seeked seeking timeupdate vo
|
|
|
525
526
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Gn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Hn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},In=[["getConfiguration","configure"]],Jn=[["isTextTrackVisible","setTextTrackVisibility"]],Kn="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
526
527
|
Ln=["attach","detach","load","unload"];function Mn(a,b,c,d,e,f){var g=this;this.I=a;this.j=new Q(b);this.S=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return Nn(g)};this.G=function(h,k){var l=zn(k);switch(l.type){case "event":var m=l.targetName;l=Oa(l.event);g.B(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.C&&(g.S(),g.C=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new P(l.severity,l.category,l.code);
|
|
527
528
|
for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;On.add(this)}q=Mn.prototype;q.destroy=function(){On["delete"](this);Pn(this);Qn&&Rn(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.ra=function(){return this.h};q.vd=function(){return this.N};
|
|
528
|
-
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.
|
|
529
|
+
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Ba();var a=new chrome.cast.SessionRequest(this.I);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(On),d=c.next();!d.done;d=c.next())Sn(d.value,b)},function(b){for(var c=r(On),d=c.next();!d.done;d=c.next())d=d.value,Tn="available"==b,d.j.Ba()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Tn&&this.j.R(Un);(a=Qn)&&a.status!=chrome.cast.SessionStatus.STOPPED?Sn(this,
|
|
529
530
|
a):Qn=null}else window.__onGCastApiAvailable!==Vn&&(Wn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Vn)};q.ve=function(a){this.A=a;this.h&&Xn(this,{type:"appData",appData:this.A})};q.cast=function(a){var b=this;return M(function(c){if(!b.m)throw new P(1,8,8E3);if(!Tn)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Pc;chrome.cast.requestSession(function(d){return Yn(b,a,d)},function(d){return Zn(b,d)});return A(c,b.l,0)})};
|
|
530
531
|
function $n(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Yn(a,b,c)},function(c){return Zn(a,c)})}}q.$b=function(){if(this.h){Pn(this);if(Qn){Rn(this);try{Qn.stop(function(){},function(){})}catch(a){}Qn=null}Nn(this)}};
|
|
531
532
|
q.get=function(a,b){var c=this;if("video"==a){if(En.includes(b))return function(){return c.wf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))}}else if("player"==a){if(Hn[b]&&!this.get("player","isLive")())return function(){};if(Kn.includes(b))return function(){return c.wf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(Ln.includes(b))return function(){return c.Xg.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(Fn[b]||Gn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
532
533
|
q.set=function(a,b,c){this.g[a][b]=c;Xn(this,{type:"set",targetName:a,property:b,value:c})};function Yn(a,b,c){Qn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Nn(a);Xn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function Zn(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))}
|
|
533
534
|
q.wf=function(a,b){Xn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.Xg=function(a,b){var c=Fa.apply(2,arguments),d=new Pc,e=this.J.toString();this.J++;this.i[e]=d;try{Xn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Sn(a,b){var c=a.K();a.l=new Pc;a.C=!0;Yn(a,c,b)}function Rn(a){var b=Qn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
534
|
-
function Nn(a){var b=Qn?"connected"==Qn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Pn(a)}a.h=b;a.N=b?Qn.receiver.friendlyName:"";a.j.
|
|
535
|
+
function Nn(a){var b=Qn?"connected"==Qn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Pn(a)}a.h=b;a.N=b?Qn.receiver.friendlyName:"";a.j.Ba()}function Pn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function Xn(a,b){var c=yn(b),d=Qn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new P(2,8,8005,e),d=new O("error",(new Map).set("detail",c)),a.B("player",d),a.$b(),c;}}var Un=.02,Tn=!1,Qn=null,Wn=null,On=new Set;
|
|
535
536
|
function Vn(a){Wn?window.__onGCastApiAvailable=Wn:delete window.__onGCastApiAvailable;Wn=null;if(a)for(var b=r(On),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function ao(a,b,c){cb.call(this);var d=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.F=c;this.C=new Map;this.g=new Mn(c,function(){return bo(d)},function(){return co(d)},function(e,f){return eo(d,e,f)},function(){return fo(d)},function(){return go(d)});ho(this)}u(ao,cb);q=ao.prototype;
|
|
536
537
|
q.destroy=function(a){a&&this.g.$b();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;cb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.bc=function(){return this.B};q.Re=function(){return this.g.m&&Tn};q.ra=function(){return this.g.ra()};q.vd=function(){return this.g.vd()};
|
|
537
538
|
q.cast=function(){var a=this,b;return M(function(c){return 1==c.g?(b=go(a),A(c,a.g.cast(b),2)):a.h?A(c,a.h.Ke(),0):c["return"]()})};q.ve=function(a){this.g.ve(a)};q.Gf=function(){$n(this.g)};q.$b=function(){this.g.$b()};
|
|
538
539
|
q.Ve=function(a){var b=this;return M(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.$b();return A(c,b.g.destroy(),2)}b.g=null;b.g=new Mn(a,function(){return bo(b)},function(){return co(b)},function(d,e){return eo(b,d,e)},function(){return fo(b)},function(){return go(b)});b.g.init();D(c)})};
|
|
539
540
|
function ho(a){a.g.init();a.m=new pf;for(var b=r(Bn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.ra()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in ln)a.m.o(a.h,ln[d],function(f){a.g.ra()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.qc=e,Object.defineProperty(a.l,b.qc,{configurable:!1,enumerable:!0,get:function(f){return function(){return io(a,f.qc)}}(b),set:function(f){return function(g){var h=f.qc;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={qc:b.qc};a.B={};jo(a,
|
|
540
|
-
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return ko(a,f)}})});lo(a);a.j=new cb;a.j.
|
|
541
|
+
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return ko(a,f)}})});lo(a);a.j=new cb;a.j.md=a.l;a.A=new cb;a.A.md=a.B}function lo(a){var b=new Map;jo(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
|
|
541
542
|
function jo(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
|
|
542
543
|
function go(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Wd(),startTime:null};a.i.pause();for(var c=r(Dn),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(In);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(Jn);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 bo(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
|
|
543
544
|
function co(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
544
545
|
function fo(a){for(var b=r(In),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(Dn);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(Dn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(Jn);for(k=
|
|
545
546
|
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(gn,h);a.h.dispatchEvent(h)})}
|
|
546
547
|
function io(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.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
|
|
547
|
-
function ko(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Ec()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.
|
|
548
|
+
function ko(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Ec()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.dd()};
|
|
548
549
|
if("setVideoContainer"==b)return function(c){return a.h.De(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&(Fn[b]||Gn[b])||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
549
550
|
function eo(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}N("shaka.cast.CastProxy",ao);ao.prototype.changeReceiverId=ao.prototype.Ve;ao.prototype.forceDisconnect=ao.prototype.$b;ao.prototype.suggestDisconnect=ao.prototype.Gf;ao.prototype.setAppData=ao.prototype.ve;ao.prototype.cast=ao.prototype.cast;ao.prototype.receiverName=ao.prototype.vd;ao.prototype.isCasting=ao.prototype.ra;ao.prototype.canCast=ao.prototype.Re;ao.prototype.getPlayer=ao.prototype.bc;
|
|
550
551
|
ao.prototype.getVideo=ao.prototype.Bb;ao.prototype.destroy=ao.prototype.destroy;function mo(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new pf;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(){no(e)});oo(this)}u(mo,cb);q=mo.prototype;q.isConnected=function(){return this.H};q.Hg=function(){return this.A};q.fh=function(a){this.i=a};q.Uf=function(){this.i=null};
|
|
@@ -562,9 +563,9 @@ function so(a,b){var c=zn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0
|
|
|
562
563
|
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return Bo(a,h,g,null)},function(k){return Bo(a,h,g,k)})}}
|
|
563
564
|
function ro(a,b){var c=zn(b.data);switch(c.type){case "PLAY":a.g.play();xo(a);break;case "PAUSE":a.g.pause();xo(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),xo(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),xo(a));break;case "STOP":a.h.Ke().then(function(){a.h&&xo(a)});break;case "GET_STATUS":Ao(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
|
|
564
565
|
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||xo(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.G(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&Ao(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");qo(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:qo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
|
|
565
|
-
function Bo(a,b,c,d){a.h&&qo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function qo(a,b,c,d){a.H&&(a=yn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function xo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?Co:a.h.
|
|
566
|
+
function Bo(a,b,c,d){a.h&&qo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function qo(a,b,c,d){a.H&&(a=yn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function xo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?Co:a.h.Kc()?Do:a.g.paused?Eo:Fo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);qo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
|
|
566
567
|
N("shaka.cast.CastReceiver",mo);mo.prototype.destroy=mo.prototype.destroy;mo.prototype.setContentArtist=mo.prototype.dh;mo.prototype.setContentImage=mo.prototype.eh;mo.prototype.setContentTitle=mo.prototype.gh;mo.prototype.clearContentMetadata=mo.prototype.Uf;mo.prototype.setContentMetadata=mo.prototype.fh;mo.prototype.isIdle=mo.prototype.Hg;mo.prototype.isConnected=mo.prototype.isConnected;var zo=.5,vo=5,Co="IDLE",Fo="PLAYING",Do="BUFFERING",Eo="PAUSED";function Go(a){var b=this;this.g=[];this.h=[];this.data=[];(new Qg).box("moov",Ug).V("pssh",function(c){if(!(1<c.version)){var d=Ic(c.reader.U,-12,c.size);b.data.push(d);b.g.push(rd(c.reader.Cb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=rd(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
|
|
567
|
-
function Ho(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Lc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Io(a){if(!a)return a;var b=new Go(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={
|
|
568
|
+
function Ho(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Lc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Io(a){if(!a)return a;var b=new Go(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Sc:c.Sc},d=b.next())c.Sc=d.value,a.some(function(e){return function(f){return Gc(f,e.Sc)}}(c))||a.push(c.Sc);return sd.apply(md,ia(a))};function Jo(a,b,c){var d=Ko(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.zf?(e=h.init||e,!1):!0}),f.length&&(a=Lo(e,f,c),0==a.length&&(a=[Ib("",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(Ib(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
|
|
568
569
|
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Ye:g,Li:e,drmInfos:a,cf:!0}}function Mo(a,b,c,d){var e=Jo(a,c,d);if(b.cf){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.cf=!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.Ye||b.Ye}
|
|
569
570
|
function No(a){var b=0,c=Lc(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=Ic(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
570
571
|
function Oo(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 Po(a){a=Cf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=pd(a.textContent);a=No(a).filter(function(b){return b.type===Qo})[0];if(!a)return"";a=hd(a.value,!0);return(a=Sf(a,"WRMHEADER"))?Oo(a):""}
|
|
@@ -574,8 +575,8 @@ function So(a){var b=a.getAttribute("schemeIdUri"),c=Ff(a,"urn:mpeg:cenc:2013","
|
|
|
574
575
|
var Qo=1,Ro=(new Map).set("com.widevine.alpha",function(a){return(a=Cf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Po).set("com.microsoft.playready.recommendation",Po).set("com.microsoft.playready.software",Po).set("com.microsoft.playready.hardware",Po);function To(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=
|
|
575
576
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
576
577
|
function Uo(a,b){var c=Vo(a,b,"timescale"),d=1;c&&(d=Of(c)||1);var e=Vo(a,b,"duration");c=Of(e||"");"image"==a.L.contentType&&(c=Qf(e||""));c&&(c/=d);var f=Vo(a,b,"startNumber");e=Number(Vo(a,b,"presentationTimeOffset"))||0;var g=Pf(f||"");if(null==f||null==g)g=1;var h=Wo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Y.duration||Infinity;h=Bf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],t=h[n+1],v=Jf(p,"t",Pf),y=Jf(p,"d",Pf);p=Jf(p,"r",Nf);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
|
|
577
|
-
p||0;if(0>p)if(t){t=Jf(t,"t",Pf);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+y,l.push({start:v/f,end:m/f,lh:v}),v=m}f=l}return{timescale:d,
|
|
578
|
-
function Wo(a,b,c){return[b(a.L),b(a.
|
|
578
|
+
p||0;if(0>p)if(t){t=Jf(t,"t",Pf);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+y,l.push({start:v/f,end:m/f,lh:v}),v=m}f=l}return{timescale:d,Aa:c,nc:g,sb:e/d||0,Le:e,timeline:f}}function Vo(a,b,c){return[b(a.L),b(a.xa),b(a.sa)].filter(Fb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
579
|
+
function Wo(a,b,c){return[b(a.L),b(a.xa),b(a.sa)].filter(Fb).map(function(d){return Af(d,c)}).reduce(function(d,e){return d||e})}
|
|
579
580
|
function Xo(a,b,c,d,e,f){for(var g=Ff(a,"http://www.w3.org/1999/xlink","href"),h=Ff(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 Se(new P(2,4,4028));if("onLoad"!=h)return Se(new P(2,4,4027));var m=Hb([d],[g]);return e.request(0,ff(m,b)).qa(function(n){n=Uf(n.data,a.tagName);if(!n)return Se(new P(2,4,4001,g));
|
|
580
581
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Yo(a,b,c,m[0],e,f+1)})}
|
|
581
582
|
function Yo(a,b,c,d,e,f){f=void 0===f?0:f;if(Ff(a,"http://www.w3.org/1999/xlink","href")){var g=Xo(a,b,c,d,e,f);c&&(g=g.qa(void 0,function(){return Yo(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"==Ff(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Yo(k,b,c,d,e,f)));return We(g).qa(function(){return a})};function Zo(a,b,c,d,e,f,g){var h,k=(new Qg).V("sidx",function(l){h=$o(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
|
|
@@ -585,27 +586,27 @@ d)}function cp(a){var b=a.g.ia(),c=a.g.ka();if(0==c)throw new P(2,3,3002);c=8-Ma
|
|
|
585
586
|
function fp(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 gp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ap(a.g);for(var n=null,p=null;a.Ea();){var t=bp(a);if(187==t.id){var v=hp(t);v&&(t=c*v.mh,v=b+v.Wg,null!=n&&m.push(new Ni(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new Ni(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
586
587
|
function hp(a){var b=new ap(a.g);a=bp(b);if(179!=a.id)throw new P(2,3,3013);a=fp(a);b=bp(b);if(183!=b.id)throw new P(2,3,3012);b=new ap(b.g);for(var c=0;b.Ea();){var d=bp(b);if(241==d.id){c=fp(d);break}}return{mh:a,Wg:c}};function ip(a,b){var c=Wo(a,b,"Initialization");if(!c)return null;var d=a.L.Qa,e=c.getAttribute("sourceURL");e&&(d=Hb(a.L.Qa,[e]));e=0;var f=null;if(c=Jf(c,"range",Mf))e=c.start,f=c.end;return new Li(function(){return d},e,f,jp(a))}
|
|
587
588
|
function kp(a,b){var c=Number(Vo(a,lp,"presentationTimeOffset"))||0,d=Vo(a,lp,"timescale"),e=1;d&&(e=Of(d)||1);var f=c/e||0,g=ip(a,lp);mp(a,g);var h=Ze(a);return{ac:function(){var k=Wo(h,lp,"RepresentationIndex"),l=h.L.Qa;k&&(k=k.getAttribute("sourceURL"))&&(l=Hb(h.L.Qa,[k]));k=np(h);return op(h,b,g,l,k.start,k.end,f)}}}
|
|
588
|
-
function op(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,x,w,C,z,B,F;return M(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.xb||!a.Y.pf,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ka(),c.Ha,c.
|
|
589
|
+
function op(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,x,w,C,z,B,F;return M(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.xb||!a.Y.pf,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ka(),c.Ha,c.ya):null],p=null,A(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;C=null;z=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var H=Zo(x,e,d,c,z,B,F);else{H=new ap(w);if(440786851!=bp(H).id)throw new P(2,3,3008);var J=bp(H);if(408125543!=J.id)throw new P(2,3,3009);H=J.g.byteOffset;
|
|
589
590
|
J=new ap(J.g);for(var K=null;J.Ea();){var L=bp(J);if(357149030==L.id){K=L;break}}if(!K)throw new P(2,3,3010);K=new ap(K.g);L=1E6;for(J=null;K.Ea();){var W=bp(K);if(2807729==W.id)L=fp(W);else if(17545==W.id)if(4==W.g.byteLength)J=W.g.getFloat32(0);else if(8==W.g.byteLength)J=W.g.getFloat64(0);else throw new P(2,3,3003);}if(null==J)throw new P(2,3,3011);K=L/1E9;J*=K;L=bp(new ap(x));if(475249515!=L.id)throw new P(2,3,3007);H=gp(L,H,K,J,d,c,z,B,F)}C=H;h.ic(C);t=new mj(C);k&&t.yb(B,F,!0);return G["return"](t)})}
|
|
590
|
-
function lp(a){return a.
|
|
591
|
-
function jp(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.od,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function qp(a,b){var c=ip(a,rp),d=sp(a);if(!d.
|
|
592
|
-
Infinity,c);f&&(f.segmentIndex=e);return{ac:function(){e&&0!=e.O.length||e.fc(g);return Promise.resolve(e)}}}function rp(a){return a.Db}function sp(a){var b=Cp(a);a=Uo(a,rp);var c=a.nc;0==c&&(c=1);var d=0;a.
|
|
593
|
-
function Bp(a,b,c,d,e){var f=d.ec.length;d.timeline&&d.timeline.length!=d.ec.length&&(f=Math.min(d.timeline.length,d.ec.length));for(var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Id:m.Id},n++){var p=d.ec[n];m.Id=Hb(c,[p.Ng]);var t=void 0;t=null!=d.
|
|
594
|
-
function Cp(a){return[a.L.Db,a.
|
|
595
|
-
Infinity,p=Infinity!=n;l?(p&&(new mj(m)).yb(c,n,!0),l.hc(m,a.presentationTimeline.ob())):l=new mj(m);a.presentationTimeline.ic(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{ac:function(){l&&0!=l.O.length||l.fc(m);return Promise.resolve(l)}}}function Jp(a){return a.
|
|
596
|
-
function Gp(a){var b=a.
|
|
597
|
-
function Hp(a,b,c,d,e){function f(K){var L=(K-t)*p,W=L+b.sb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new Ni(Z,ka,function(){var ja=To(y,w,K,x,W*v);return Hb(C,[ja])},0,null,d,z,l,h());Z.l=L;return Z}function g(){var K=[Math.max(k.ob(),l),Math.min(k.Kb(),h())].map(function(L){return L-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(L){return L+t})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,n=a.Y.duration,p=b.
|
|
591
|
+
function lp(a){return a.Oc}function np(a){var b=Wo(a,lp,"RepresentationIndex");a=Vo(a,lp,"indexRange");a=Mf(a||"");b&&(a=Jf(b,"range",Mf,a));return a}function mp(a,b){pp(a,b);if(!np(a))throw new P(2,4,4002);}function pp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Mb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
|
|
592
|
+
function jp(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.od,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function qp(a,b){var c=ip(a,rp),d=sp(a);if(!d.Aa&&!d.timeline&&1<d.ec.length)throw new P(2,4,4002);if(!d.Aa&&!a.Y.duration&&!d.timeline&&1==d.ec.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.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=Bp(a.Y.start,a.Y.duration,a.L.Qa,d,c);c=!e;e?e.hc(g,a.presentationTimeline.ob()):e=new mj(g);a.presentationTimeline.ic(g);a.xb&&a.Y.pf||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
|
|
593
|
+
Infinity,c);f&&(f.segmentIndex=e);return{ac:function(){e&&0!=e.O.length||e.fc(g);return Promise.resolve(e)}}}function rp(a){return a.Db}function sp(a){var b=Cp(a);a=Uo(a,rp);var c=a.nc;0==c&&(c=1);var d=0;a.Aa?d=a.Aa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Aa:a.Aa,startTime:d,nc:c,sb:a.sb,timeline:a.timeline,ec:b}}
|
|
594
|
+
function Bp(a,b,c,d,e){var f=d.ec.length;d.timeline&&d.timeline.length!=d.ec.length&&(f=Math.min(d.timeline.length,d.ec.length));for(var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Id:m.Id},n++){var p=d.ec[n];m.Id=Hb(c,[p.Ng]);var t=void 0;t=null!=d.Aa?l+d.Aa:d.timeline?d.timeline[n].end:l+b;k.push(new Ni(a+l,a+t,function(v){return function(){return v.Id}}(m),p.start,p.end,e,g,a,h));l=t}return k}
|
|
595
|
+
function Cp(a){return[a.L.Db,a.xa.Db,a.sa.Db].filter(Fb).map(function(b){return Bf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.lf&&(a.lf=!0);var c=b.getAttribute("media");b=Jf(b,"mediaRange",Mf,{start:0,end:null});return{Ng:c,start:b.start,end:b.end}})};function Dp(a,b,c,d,e,f){var g=Ep(a),h=Fp(a);Gp(h);var k=Ze(a);if(h.Jc)return pp(a,g),{ac:function(){var t=To(h.Jc,k.L.id,null,k.bandwidth||null,null);t=Hb(k.L.Qa,[t]);return op(k,b,g,t,0,null,h.sb)}};if(h.Aa)return d||"image"===a.xa.contentType||(a.presentationTimeline.fe(h.Aa),a.presentationTimeline.ge(a.Y.start)),{ac:function(){return Hp(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Ip(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:
|
|
596
|
+
Infinity,p=Infinity!=n;l?(p&&(new mj(m)).yb(c,n,!0),l.hc(m,a.presentationTimeline.ob())):l=new mj(m);a.presentationTimeline.ic(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{ac:function(){l&&0!=l.O.length||l.fc(m);return Promise.resolve(l)}}}function Jp(a){return a.Pc}function Fp(a){var b=Uo(a,Jp),c=Vo(a,Jp,"media");a=Vo(a,Jp,"index");return{Aa:b.Aa,timescale:b.timescale,nc:b.nc,sb:b.sb,Le:b.Le,timeline:b.timeline,ee:c,Jc:a}}
|
|
597
|
+
function Gp(a){var b=a.Jc?1:0;b+=a.timeline?1:0;b+=a.Aa?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Jc&&(a.timeline=null),a.Aa=null);if(!a.Jc&&!a.ee)throw new P(2,4,4002);}
|
|
598
|
+
function Hp(a,b,c,d,e){function f(K){var L=(K-t)*p,W=L+b.sb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new Ni(Z,ka,function(){var ja=To(y,w,K,x,W*v);return Hb(C,[ja])},0,null,d,z,l,h());Z.l=L;return Z}function g(){var K=[Math.max(k.ob(),l),Math.min(k.Kb(),h())].map(function(L){return L-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(L){return L+t})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,n=a.Y.duration,p=b.Aa,t=b.nc,v=b.timescale,
|
|
598
599
|
y=b.ee,x=a.bandwidth||null,w=a.L.id,C=a.L.Qa,z=l-b.sb,B=g();a=a.xb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var G=f(F);c.push(G)}var H=new mj(c);c=k.Kb()<h();F=k.T();if(c||F){var J=Math.max(a,B+1);H.yd(p,function(){var K=k.ob();H.Hb(K);var L=r(g());L.next();L=L.next().value;for(var W=[];J<=L;){var Z=f(J);W.push(Z);J++}return K>h()&&!W.length?null:W})}return Promise.resolve(H)}
|
|
599
600
|
function Ip(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={Hd:h.Hd,Ld:h.Ld,Od:h.Od,Ed:h.Ed,Qd:h.Qd,Fd:h.Fd},k++){var l=b.timeline[k],m=l.start,n=l.lh;l=l.end;h.Od=k+b.nc;h.Qd=n+b.Le;h.Ld=a.L.id;h.Ed=a.bandwidth||null;h.Hd=b.ee;h.Fd=a.L.Qa;g.push(new Ni(d+m,d+l,function(p){return function(){var t=To(p.Hd,p.Ld,p.Od,p.Ed||null,p.Qd);return Hb(p.Fd,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
600
601
|
function Ep(a){var b=Vo(a,Jp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Qa;return new Li(function(){var f=To(b,c,null,d,null);return Hb(e,[f])},0,null,jp(a))};function Kp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Kp.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=[]};
|
|
601
|
-
function Lp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia;return M(function(Ma){switch(Ma.g){case 1:d=Nb;Mp(b);Np(b);Op(b);Pp(b);if(!c&&1==b.length){e=b[0];a.g=e.
|
|
602
|
+
function Lp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia;return M(function(Ma){switch(Ma.g){case 1:d=Nb;Mp(b);Np(b);Op(b);Pp(b);if(!c&&1==b.length){e=b[0];a.g=e.Zc;a.h=e.Bd;a.j=e.textStreams;a.i=e.imageStreams;Ma.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 Ma["return"]();k=b.map(function(Da){return Da.Zc});l=b.map(function(Da){return Da.Bd});m=b.map(function(Da){return Da.textStreams});n=b.map(function(Da){return Da.imageStreams});
|
|
602
603
|
p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Qp(d.oa));y=r(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(Qp(d.xc));return A(Ma,Rp(a.g,k,f,Sp,Tp),3);case 3:return A(Ma,Rp(a.h,l,f,Sp,Tp),4);case 4:return A(Ma,Rp(a.j,m,f,Sp,Tp),5);case 5:return A(Ma,Rp(a.i,n,f,Sp,Tp),2);case 2:C=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),L=K.next();!L.done;L=K.next())for(W=L.value,Z=r(a.h),ka=Z.next();!ka.done;ka=Z.next())ja=ka.value,ea=Fg(W.drmInfos,ja.drmInfos),W.drmInfos.length&&ja.drmInfos.length&&
|
|
603
|
-
!ea.length||(Ia=C++,z.push({id:Ia,language:W.language,primary:W.primary,audio:W,video:ja,bandwidth:(W.bandwidth||0)+(ja.bandwidth||0),drmInfos:ea,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),F=r(B),G=F.next();!G.done;G=F.next())H=G.value,J=C++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.
|
|
604
|
-
a.l=z;D(Ma)}})}function Mp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.
|
|
604
|
+
!ea.length||(Ia=C++,z.push({id:Ia,language:W.language,primary:W.primary,audio:W,video:ja,bandwidth:(W.bandwidth||0)+(ja.bandwidth||0),drmInfos:ea,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),F=r(B),G=F.next();!G.done;G=F.next())H=G.value,J=C++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.hb?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
605
|
+
a.l=z;D(Ma)}})}function Mp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Zc),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&&jc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Zc=c}}
|
|
605
606
|
function Op(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.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&&jc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
606
607
|
function Np(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Bd),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&&jc(e.roles,h.roles)&&zf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Bd=c}}
|
|
607
608
|
function Pp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.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}}
|
|
608
|
-
function Up(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Gb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.
|
|
609
|
+
function Up(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Gb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.hb})});e=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.oa})});f=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.xc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
|
|
609
610
|
h.value,k.push(Vp(b.oa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Vp(b.xc));return A(Z,Rp([],c,0,Wp,Xp),2);case 2:return p=Z.h,A(Z,Rp([],d,0,Wp,Xp),3);case 3:return t=Z.h,A(Z,Rp([],e,0,Wp,Xp),4);case 4:return v=Z.h,A(Z,Rp([],f,0,Wp,Xp),5);case 5:y=Z.h;x=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(H=G.value,J=r(t),K=J.next();!K.done;K=J.next())L=K.value,W=x++,L.variantIds.push(W),H.variantIds.push(W);else for(w=t.concat(p),C=r(w),z=C.next();!z.done;z=C.next())B=
|
|
610
611
|
z.value,B.variantIds=[x++];return Z["return"](t.concat(p).concat(v).concat(y))}})}
|
|
611
612
|
function Rp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K;return M(function(L){switch(L.g){case 1:f=Nb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){L.D(4);break}m=l.value;return A(L,Yp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new P(2,4,4037);l=k.next();L.D(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,y=r(v),x=y.next();!x.done;x=y.next())w=x.value,(C=Zp(w,b,d,e,g))&&a.push(C);z=r(g);for(t=z.next();!t.done;t=
|
|
@@ -631,31 +632,31 @@ q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next
|
|
|
631
632
|
function qq(a){var b,c,d,e,f,g,h;return M(function(k){if(1==k.g)return b=ff(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),af(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,sq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
|
|
632
633
|
function sq(a,b,c){var d,e,f,g,h;return M(function(k){if(1==k.g){d=Uf(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](tq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Yo(d,a.g.retryParameters,f,c,a.h.networkingEngine);af(a.A,g);return A(k,g.promise,2)}h=k.h;return k["return"](tq(a,h,c))})}
|
|
633
634
|
function tq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da;return M(function(Qa){switch(Qa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Bf(b,"Location").map(Hf).filter(Fb);0<f.length&&(g=Hb(e,f),e=a.m=g);h=Bf(b,"BaseURL");k=h.map(Hf);l=Hb(e,k);m=0;h&&h.length&&(m=Jf(h[0],"availabilityTimeOffset",Qf)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Jf(b,"minBufferTime",Lf)||0);a.H=Jf(b,"minimumUpdatePeriod",Lf,-1);t=Jf(b,"availabilityStartTime",Kf);v=Jf(b,
|
|
634
|
-
"timeShiftBufferDepth",Lf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Jf(b,"suggestedPresentationDelay",Lf));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=Jf(b,"maxSegmentDuration",Lf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,F=r(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.Hb(B.ob());else J=a.g.defaultPresentationDelay||1.5*p,K=null!=x?x:J,B=new R(t,K,a.g.dash.autoCorrectDrift);B.
|
|
635
|
-
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Be(v);W=b.getAttribute("profiles")||"";Z={xb:"static"!=z,presentationTimeline:B,sa:null,Y:null,
|
|
635
|
+
"timeShiftBufferDepth",Lf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Jf(b,"suggestedPresentationDelay",Lf));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=Jf(b,"maxSegmentDuration",Lf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,F=r(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.Hb(B.ob());else J=a.g.defaultPresentationDelay||1.5*p,K=null!=x?x:J,B=new R(t,K,a.g.dash.autoCorrectDrift);B.Qc("static"==z);(L=B.T())&&
|
|
636
|
+
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Be(v);W=b.getAttribute("profiles")||"";Z={xb:"static"!=z,presentationTimeline:B,sa:null,Y:null,xa:null,L:null,bandwidth:0,lf:!1,Zb:m,profiles:W.split(",")};ka=uq(a,Z,l,b);ja=ka.duration;ea=ka.periods;"static"!=z&&ka.$e||B.cb(ja||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?B.Af(a.C):a.C&&Sa("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.");
|
|
636
637
|
B.fe(C||1);return A(Qa,Lp(a.j,ea,Z.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Qa.D(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.If()){Qa.D(4);break}Ma=Bf(b,"UTCTiming");return A(Qa,vq(a,l,Ma),5);case 5:Da=Qa.h;if(!a.h)return Qa["return"]();B.Bf(Da);case 4:B.ae();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),D(Qa)}})}
|
|
637
638
|
function uq(a,b,c,d){var e=Jf(d,"mediaPresentationDuration",Lf),f=[],g=0;d=Bf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Jf(k,"start",Lf,g),n=k.id,p=Jf(k,"duration",Lf),t=null;if(l){var v=Jf(l,"start",Lf);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=wq(a,b,c,{start:m,duration:t,node:k,pf:null==t||!l});f.push(g);b.sa.id&&t&&(a.N[b.sa.id]=t);if(null==t){g=
|
|
638
639
|
null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,$e:!1}:{periods:f,duration:g,$e:!0}}
|
|
639
640
|
function wq(a,b,c,d){b.sa=xq(d.node,null,c);b.Y=d;b.sa.Zb=b.Zb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=Bf(d.node,"EventStream");c=b.presentationTimeline.ob();e=r(e);for(var f=e.next();!f.done;f=e.next())yq(a,d.start,d.duration,f.value,c);c=Bf(d.node,"AdaptationSet").map(function(m){return zq(a,b,m)}).filter(Fb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Zg);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);
|
|
640
|
-
}d=c.filter(function(m){return!m.He});c=c.filter(function(m){return m.He});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.He.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={
|
|
641
|
-
[]:Aq(d,Mb);c=a.g.disableThumbnails?[]:Aq(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,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.sa.id,
|
|
641
|
+
}d=c.filter(function(m){return!m.He});c=c.filter(function(m){return m.He});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.He.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={Wc:h.Wc},l=k.next())h.Wc=l.value,h.Wc.trickModeVideo=e.streams.find(function(m){return function(n){return Ad(m.Wc.codecs)==Ad(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Aq(d,"audio");g=a.g.disableVideo?[]:Aq(d,"video");f=a.g.disableText?
|
|
642
|
+
[]:Aq(d,Mb);c=a.g.disableThumbnails?[]:Aq(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,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.sa.id,Zc:d,Bd:e,textStreams:g,imageStreams:f}}
|
|
642
643
|
function Aq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
643
|
-
function zq(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.
|
|
644
|
+
function zq(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.xa=xq(c,b.sa,null);var e=!1,f=Bf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Fb),h=void 0,k=b.xa.contentType==Mb;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=
|
|
644
645
|
l}}var n;m=Bf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Bf(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
|
|
645
646
|
10)));m=Bf(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var y=r(t),x=y.next();!x.done;x=y.next()){var w=x.value,C=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],C=w[1]||"und"):(x="CC"+p,2==t.length?p+=2:p++,C=w);v.set(x,Qb(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
|
|
646
647
|
1,null!=t)for(t=r(t.split(";")),x=t.next();!x.done;x=t.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,Qb(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Bf(c,"ContentProtection");var z=Jo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Qb(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=Bf(c,"Label"))&&l.length&&
|
|
647
|
-
(l=l[0],l.textContent&&(F=l.textContent));l=Bf(c,"Representation");c=l.map(function(G){if(G=Bq(a,b,z,h,B,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.
|
|
648
|
-
m.value,p=r(z.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.
|
|
649
|
-
function Bq(a,b,c,d,e,f,g,h,k,l){b.L=xq(l,b.
|
|
648
|
+
(l=l[0],l.textContent&&(F=l.textContent));l=Bf(c,"Representation");c=l.map(function(G){if(G=Bq(a,b,z,h,B,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.xa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.xa.contentType||"application"==b.xa.contentType)for(b.xa.contentType=Cq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.xa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
649
|
+
m.value,p=r(z.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.xa.id||"__fake__"+a.I++,contentType:b.xa.contentType,language:B,Mi:e,streams:c,drmInfos:z.drmInfos,He:f,Zg:k}}
|
|
650
|
+
function Bq(a,b,c,d,e,f,g,h,k,l){b.L=xq(l,b.xa,null);a.C=Math.min(a.C,b.L.Zb);if(!Dq(b.L))return null;var m=b.Y.start;b.bandwidth=Jf(l,"bandwidth",Of)||0;var n=b.L.contentType,p=n==Mb||"application"==n;n="image"==n;try{var t=function(H,J,K){return Eq(a,H,J,K)};if(b.L.Oc)var v=kp(b,t);else if(b.L.Db)v=qp(b,a.l);else if(b.L.Pc)v=Dp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Qa,x=b.Y.duration||0;v={ac:function(){return Promise.resolve(oj(m,x,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
|
|
650
651
|
throw H;}t=Bf(l,"ContentProtection");t=Mo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Bf(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;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Bf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
651
652
|
(z=l.getAttribute("value")),!z))return null;var B;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"))&&(B="PQ");var F=b.L.id?b.sa.id+","+b.L.id:"",G={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,J,K;return M(function(L){if(1==L.g){J=(H=F&&b.xb&&a.l[F])?a.l[F]:G;if(J.segmentIndex)return L.D(0);K=J;return A(L,v.ac(),3)}K.segmentIndex=L.h;D(L)})},closeSegmentIndex:function(){G.segmentIndex&&
|
|
652
|
-
(G.segmentIndex.release(),G.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.
|
|
653
|
+
(G.segmentIndex.release(),G.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.xa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.od,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,
|
|
653
654
|
hdr:B,tilesLayout:z,matchedStreams:[]};F&&b.xb&&!a.l[F]&&(a.l[F]=G);return G}function pq(a){var b,c;M(function(d){switch(d.g){case 1:return b=0,E(d,2),A(d,qq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=I(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();rq(a,b);D(d)}})}function rq(a,b){0>a.H||a.G.R(Math.max(3,a.H-b,fc(a.J)))}
|
|
654
655
|
function xq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,od:null,audioSamplingRate:null,Zb:0};c=c||b.Qa;var d=Bf(a,"BaseURL"),e=d.map(Hf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Jf(a,"frameRate",Rf)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Bf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
|
|
655
|
-
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Bf(a,"AudioChannelConfiguration");m=Fq(m)||b.od;p=Jf(a,"audioSamplingRate",Pf)||b.audioSamplingRate;f||(f=Cq(g,h));var t=Af(a,"SegmentBase"),v=Af(a,"SegmentTemplate"),y=t?Jf(t,"availabilityTimeOffset",Qf)||0:0,x=v?Jf(v,"availabilityTimeOffset",Qf)||0:0;d=d&&d.length?Jf(d[0],"availabilityTimeOffset",Qf)||0:0;d=b.Zb+d+y+x;return{Qa:Hb(c,e),
|
|
656
|
+
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Bf(a,"AudioChannelConfiguration");m=Fq(m)||b.od;p=Jf(a,"audioSamplingRate",Pf)||b.audioSamplingRate;f||(f=Cq(g,h));var t=Af(a,"SegmentBase"),v=Af(a,"SegmentTemplate"),y=t?Jf(t,"availabilityTimeOffset",Qf)||0:0,x=v?Jf(v,"availabilityTimeOffset",Qf)||0:0;d=d&&d.length?Jf(d[0],"availabilityTimeOffset",Qf)||0:0;d=b.Zb+d+y+x;return{Qa:Hb(c,e),Oc:t||b.Oc,Db:Af(a,"SegmentList")||b.Db,Pc:v||b.Pc,width:Jf(a,"width",Pf)||b.width,height:Jf(a,
|
|
656
657
|
"height",Pf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),od:m,audioSamplingRate:p,Zb:d}}
|
|
657
658
|
function Fq(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=
|
|
658
|
-
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 Dq(a){var b=a.
|
|
659
|
+
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 Dq(a){var b=a.Oc?1:0;b+=a.Db?1:0;b+=a.Pc?1:0;if(0==b)return a.contentType==Mb||"application"==a.contentType?!0:!1;1!=b&&(a.Oc&&(a.Db=null),a.Pc=null);return!0}
|
|
659
660
|
function Gq(a,b,c,d){var e,f,g,h,k,l;return M(function(m){if(1==m.g)return e=Hb(b,[c]),f=ff(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),af(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=gd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
|
|
660
661
|
function vq(a,b,c){var d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.D(4);break}h=g.value;E(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.D(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.D(8);
|
|
661
662
|
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.D(9);break;case 7:return A(n,Gq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return A(n,Gq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
|
|
@@ -667,15 +668,15 @@ function Wq(a,b,c){b=gd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
|
|
|
667
668
|
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=Xq(a,m),Yq.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"==Jq(m,"TYPE")?k.push(m):"MAP"==Jq(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Hb([d],[m.trim()])[0],h&&g.push(h),e.push(new Lq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Lq("",g,k)));return new Hq(c,b,f,
|
|
668
669
|
e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Mq("URI",k)),e=!0)}}return new Hq(c,b,f)}function Xq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new P(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Rq(f);var h;(h=Tq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Tq(f,k);)d.push(new Mq(h[1],h[2]||h[3])),Sq(f)}return new Iq(c,e,d,g)}
|
|
669
670
|
var Yq="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(" "),Zq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function $q(){}function ar(a){try{var b=br(a);return Ue({uri:a,uf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Se(c)}}function br(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=pd(a):e=kd(a);return{data:e,contentType:c}}
|
|
670
|
-
N("shaka.net.DataUriPlugin",$q);$q.parse=ar;cf("data",ar);function cr(){var a=this;this.g=this.i=null;this.
|
|
671
|
+
N("shaka.net.DataUriPlugin",$q);$q.parse=ar;cf("data",ar);function cr(){var a=this;this.g=this.i=null;this.wa=1;this.A=new Map;this.C=new Map;this.na=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Vq;this.ma=0;this.F=new Q(function(){dr(a)});this.m=er;this.G=null;this.aa=0;this.I=Infinity;this.Z=this.ba=0;this.H=new $e;this.X=[];this.K=new Map;this.Ca=!1;this.B=new Map;this.S=null;this.va=new Map;this.J=new Map;this.l=!1}q=cr.prototype;q.configure=function(a){this.g=a};
|
|
671
672
|
q.start=function(a,b){var c=this,d,e;return M(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,fr(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,A(f,gr(c,d.data),3);e=c.ma;0<e&&c.F.R(e);return f["return"](c.G)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.i=null;this.na.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
|
|
672
673
|
q.update=function(){var a=this,b,c,d;return M(function(e){if(1==e.g){if(a.m==er)return e["return"]();b=[];a.S=null;c=Array.from(a.h.values());return c.length?A(e,hr(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push(hr(a,c[d]));return A(e,Promise.all(b),0)})};
|
|
673
674
|
function hr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return c=ir,d=b.Mf,e=new jb(d),a.l&&b.Rf&&nb(e,new pb("_HLS_skip=YES")),A(y,fr(a,e.toString()),2);if(3!=y.g){f=y.h;g=Wq(a.$,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=Nq(g.g,"EXT-X-DEFINE");k=jr(a,h);l=b.stream;return A(y,kr(a,b.zd,g,l.type,l.mimeType,b.ce,k,b.Wf,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.hc(m,a.j.ob());m.length&&(n=Qq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.ce.get(n),l.segmentIndex.Hb(p));t=m[m.length-
|
|
674
|
-
1];if(v=Pq(g.g,"EXT-X-ENDLIST"))lr(a,c.Lf),a.j.
|
|
675
|
-
function gr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,
|
|
675
|
+
1];if(v=Pq(g.g,"EXT-X-ENDLIST"))lr(a,c.Lf),a.j.cb(t.endTime);D(y)})}q.onExpirationUpdated=function(){};
|
|
676
|
+
function gr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,cc,Gd;return M(function(gb){switch(gb.g){case 1:c=Wq(a.$,b,a.N);if(0!=c.type)throw new P(2,4,4022);d=Nq(c.g,"EXT-X-DEFINE");mr(a,d);e=Nq(c.g,"EXT-X-MEDIA");f=Nq(c.g,"EXT-X-STREAM-INF");g=Nq(c.g,"EXT-X-IMAGE-STREAM-INF");nr(a,f);h=Nq(c.g,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Jq(m,"DATA-ID"),p=Jq(m,"URI"),t=Jq(m,"LANGUAGE"),v=Jq(m,"VALUE"),y=(new Map).set("id",n),p&&
|
|
676
677
|
y.set("uri",Hb([a.N],[p])[0]),t&&y.set("language",t),v&&y.set("value",v),x=new O("sessiondata",y),a.i)a.i.onEvent(x);return A(gb,or(a,e),2);case 2:return pr(a,e),A(gb,qr(a,f),3);case 3:return w=gb.h,A(gb,rr(a,e),4);case 4:return C=gb.h,A(gb,sr(a,g),5);case 5:z=gb.h;if(!a.i)throw new P(2,7,7001);if(a.Ca&&0==w.length)throw new P(2,4,4034);F=B=Infinity;G=r(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,B=Math.min(B,J.qf),"text"!=J.stream.type&&(F=Math.min(F,J.Mg-J.qf));a.m!=er?(a.j=new R(0,
|
|
677
|
-
a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.aa),a.j.
|
|
678
|
-
Da=Ma.next();!Da.done;Da=Ma.next())(Qa=Da.value)&&ka.push(Qa);return A(gb,Promise.all(ka.map(function(kg){return M(function(Sc){return A(Sc,kg.createSegmentIndex(),0)})})),6);case 6:
|
|
678
|
+
a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.aa),a.j.Qc(!1)):(a.j=new R(null,0),a.j.Qc(!0));if(a.m!=er)a.ma=a.I,K=ir,a.m==K.Qe&&(L=a.j.ud,isNaN(a.g.availabilityWindowOverride)||(L=a.g.availabilityWindowOverride),a.j.Be(L));else for(a.j.cb(F),a.j.offset(-B),W=r(a.h.values()),H=W.next();!H.done;H=W.next())Z=H.value,Z.stream.segmentIndex.offset(-B),Z.stream.segmentIndex.yb(0,F);a.X=[];ka=[];ja=r(w);for(ea=ja.next();!ea.done;ea=ja.next())for(Ia=ea.value,Ma=r([Ia.video,Ia.audio]),
|
|
679
|
+
Da=Ma.next();!Da.done;Da=Ma.next())(Qa=Da.value)&&ka.push(Qa);return A(gb,Promise.all(ka.map(function(kg){return M(function(Sc){return A(Sc,kg.createSegmentIndex(),0)})})),6);case 6:cc=r(ka);for(Da=cc.next();!Da.done;Da=cc.next())Gd=Da.value,a.X.push(Gd.segmentIndex.O);tr(a);a.j.ae();a.G={presentationTimeline:a.j,variants:w,textStreams:C,imageStreams:z,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.G);D(gb)}})}
|
|
679
680
|
function mr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Jq(e,"NAME");e=Jq(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}function jr(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Jq(f,"NAME");var g=Jq(f,"VALUE");f=Jq(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}
|
|
680
681
|
function nr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Jq(e,"AUDIO");d=Jq(e,"VIDEO");var g=Jq(e,"SUBTITLES");e=ur(a,e);if(g){var h=Kb(Mb,e);a.B.set(g,h);ic(e,h)}f&&(g=Kb("audio",e),g||(g=a.g.hls.defaultAudioCodec),a.B.set(f,g));d&&(f=Kb("video",e),f||(f=a.g.hls.defaultVideoCodec),a.B.set(d,f))}}
|
|
681
682
|
function rr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return c=Oq(b,"SUBTITLES"),d=c.map(function(y){var x,w,C;return M(function(z){if(1==z.g){if(x=a.g.disableText)return z["return"](null);E(z,2);return A(z,vr(a,y),4)}if(2!=z.g)return w=z.h,z["return"](w.stream);C=I(z);if(a.g.hls.ignoreTextStreamFailures)return z["return"](null);throw C;})}),A(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Kq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(n=
|
|
@@ -683,9 +684,9 @@ r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"
|
|
|
683
684
|
function sr(a,b){var c,d;return M(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return M(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);E(l,2);return A(l,wr(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=I(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}))})}
|
|
684
685
|
function or(a,b){var c;return M(function(d){if(1==d.g)return b=b.filter(function(e){var f=Jq(e,"URI")||"";return"SUBTITLES"!=Jq(e,"TYPE")&&""!=f}),b.length?A(d,vr(a,b[0]),2):d.D(2);c=b.slice(1).map(function(e){return vr(a,e)});return A(d,Promise.all(c),0)})}
|
|
685
686
|
function qr(a,b){var c,d,e;return M(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return h=Jq(g,"FRAME-RATE"),k=Number(Jq(g,"AVERAGE-BANDWIDTH"))||Number(Kq(g,"BANDWIDTH")),l=Jq(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Jq(g,"VIDEO-RANGE"),A(y,xr(a,g,k),2);if(v=y.h){for(var x=y["return"],w=v.audio,C=v.video,z=r(C),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
|
|
686
|
-
void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!C.length||z)C=[null];z=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var F=r(C),G=F.next();!G.done;G=F.next()){var H=G.value;G=B?B.stream:null;var J=H?H.stream:null,K=B?B.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.zd:"")+" - "+(B?B.zd:"");G&&J&&K.length&&L.length&&!(0<Fg(K,L).length)||a.na.has(H)||(G={id:a.
|
|
687
|
+
void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!C.length||z)C=[null];z=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var F=r(C),G=F.next();!G.done;G=F.next()){var H=G.value;G=B?B.stream:null;var J=H?H.stream:null,K=B?B.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.zd:"")+" - "+(B?B.zd:"");G&&J&&K.length&&L.length&&!(0<Fg(K,L).length)||a.na.has(H)||(G={id:a.wa++,language:G?G.language:"und",primary:!!G&&G.primary||
|
|
687
688
|
!!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(G),a.na.add(H))}}y=x.call(y,z)}else y=y["return"]([]);return y})}),A(f,Promise.all(c),2);d=f.h;e=d.reduce(Db,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
|
|
688
|
-
function xr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x;return M(function(w){if(1==w.g)return d=Nb,e=ur(a,b),f=Jq(b,"AUDIO"),g=Jq(b,"VIDEO"),k=(h=f||g)&&a.C.has(h)?a.C.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=Kq(b,"URI"),t=l.audio.find(function(C){return C&&C.zd==p}),v=Kb(d.
|
|
689
|
+
function xr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x;return M(function(w){if(1==w.g)return d=Nb,e=ur(a,b),f=Jq(b,"AUDIO"),g=Jq(b,"VIDEO"),k=(h=f||g)&&a.C.has(h)?a.C.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=Kq(b,"URI"),t=l.audio.find(function(C){return C&&C.zd==p}),v=Kb(d.hb,e),(y=Kb(d.Gb,e))&&!v?m=d.Gb:!k.length&&y&&v?(m=d.hb,e=[[v,y].join()]):l.audio.length&&t?(m=d.Gb,n=!0):m=l.video.length&&!l.audio.length?d.Gb:d.hb,n?w.D(2):A(w,yr(a,b,e,m,c),3);2!=w.g&&(x=w.h);if(x)l[x.stream.type]=[x];else if(null===
|
|
689
690
|
x)return w["return"](null);zr(l);return w["return"](l)})}function ur(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Jq(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Bd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Ar(a){a=Jq(a,"LANGUAGE")||"und";return Qb(a)}
|
|
690
691
|
function zr(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 pr(a,b){var c=Oq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Ar(e);var f=Kq(e,"GROUP-ID");e=Kq(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
|
|
691
692
|
function vr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(x){if(1==x.g){c=Kq(b,"GROUP-ID");d="";var w=Kq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Mb);e=w;e!=Mb&&c&&a.B.has(c)&&(d=a.B.get(c));f=Br(Kq(b,"URI"),a.A);if(a.h.has(f))return x["return"](a.h.get(f));g=Ar(b);h=Jq(b,"NAME");k=Jq(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Jq(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Jq(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=Jq(b,"CHARACTERISTICS");t=Jq(b,"FORCED");
|
|
@@ -693,19 +694,19 @@ v="YES"==t;return A(x,Cr(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.C.has(c)?a.C.get
|
|
|
693
694
|
function wr(a,b){var c,d,e,f,g,h,k,l,m,n;return M(function(p){if(1==p.g){c=Br(Kq(b,"URI"),a.A);d=Jq(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Ar(b);f=Jq(b,"NAME");g=Jq(b,"CHARACTERISTICS");return A(p,Cr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Jq(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=
|
|
694
695
|
Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Jq(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
|
|
695
696
|
function yr(a,b,c,d,e){var f,g,h,k;return M(function(l){if(1==l.g){f=Br(Kq(b,"URI"),a.A);if(a.h.has(f))return l["return"](a.h.get(f));var m=Jq(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.K.get(m):null;h=Jb(d,c);return A(l,Cr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
|
|
696
|
-
function Cr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,
|
|
697
|
-
W=Kq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ca=!0,mb["return"](null);Z=Kq(L,"KEYFORMAT");if(ja=(ka=Dr[Z])?ka(L):null){if(ja.keyIds)for(ea=r(ja.keyIds),Ia=ea.next();!Ia.done;Ia=ea.next())Ma=Ia.value,H.add(Ma);G.push(ja)}}if(F&&!G.length)throw new P(2,4,4026);Da=Nq(y.g,"EXT-X-DEFINE");Qa=jr(a,Da);Er(a,y);return A(mb,Fr(a,d,c,y,Qa),3);case 3:return
|
|
698
|
-
I(mb);if(4035==aj.code)return Sa("Skipping unsupported HLS stream",
|
|
697
|
+
function Cr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,cc,Gd,gb,kg,Sc,aj,tp,up,vp,wp,bj,cj,lg,xp,yp,zp,Ap;return M(function(mb){switch(mb.g){case 1:return t=Hb([a.N],[b])[0],A(mb,fr(a,t),2);case 2:v=mb.h;t=v.uri;y=Wq(a.$,v.data,t);if(1!=y.type)throw new P(2,4,4017);x=[];if(y.segments)for(w=r(y.segments),C=w.next();!C.done;C=w.next())z=C.value,B=Nq(z.g,"EXT-X-KEY"),x.push.apply(x,ia(B));F=!1;G=[];H=new Set;J=r(x);for(K=J.next();!K.done;K=J.next())if(L=K.value,
|
|
698
|
+
W=Kq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ca=!0,mb["return"](null);Z=Kq(L,"KEYFORMAT");if(ja=(ka=Dr[Z])?ka(L):null){if(ja.keyIds)for(ea=r(ja.keyIds),Ia=ea.next();!Ia.done;Ia=ea.next())Ma=Ia.value,H.add(Ma);G.push(ja)}}if(F&&!G.length)throw new P(2,4,4026);Da=Nq(y.g,"EXT-X-DEFINE");Qa=jr(a,Da);Er(a,y);return A(mb,Fr(a,d,c,y,Qa),3);case 3:return cc=mb.h,Gr.includes(cc)&&(c=""),Gd=new Map,gb=new Map,kg=a.l,E(mb,4),A(mb,kr(a,b,y,d,cc,Gd,Qa,gb,c,p),6);case 6:Sc=mb.h;va(mb,5);break;case 4:aj=
|
|
699
|
+
I(mb);if(4035==aj.code)return Sa("Skipping unsupported HLS stream",cc,b),mb["return"](null);throw aj;case 5:kg!=a.l&&Er(a,y);tp=Sc[0].startTime;up=Sc[Sc.length-1].endTime;vp=new mj(Sc);wp=d==Mb?"subtitle":void 0;bj=[];if(l)for(cj=r(l.split(",")),lg=cj.next();!lg.done;lg=cj.next())xp=lg.value,bj.push(xp);zp=(yp=Pq(y.g,"EXT-X-SERVER-CONTROL"))?null!=yp.getAttribute("CAN-SKIP-UNTIL"):!1;Ap={id:a.wa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:vp,mimeType:cc,codecs:c,
|
|
699
700
|
kind:wp,encrypted:F,drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:bj,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return mb["return"]({stream:Ap,zd:b,Mf:t,qf:tp,Mg:up,ce:Gd,Wf:gb,Rf:zp})}})}
|
|
700
701
|
function Er(a,b){var c=Pq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Pq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)lr(a,er);else{c?lr(a,Hr):lr(a,Ir);d=Pq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Pq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Kq(c,"PART-TARGET")),a.I=Math.min(a.ba,a.I),c=Pq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Kq(c,"PART-HOLD-BACK")):0):a.I=Math.min(d,a.I);a.aa=Math.max(d,a.aa)}}
|
|
701
702
|
function Jr(a,b,c,d){c=Pq(c,"EXT-X-MAP");if(!c)return null;var e=Kq(c,"URI");d=Br(Hb([b],[e])[0],d);b=[d,Jq(c,"BYTERANGE","")].join("-");a.va.has(b)||(c=Kr(d,c),a.va.set(b,c));return a.va.get(b)}function Kr(a,b){var c=0,d=null,e=Jq(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Li(function(){return[a]},c,d)}
|
|
702
703
|
function Lr(a,b,c,d,e,f,g,h,k){var l=d.g,m=Br(d.h,g),n=Pq(l,"EXTINF"),p=g=0,t=null;if(!n){if(0==d.i.length)throw new P(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},x=0;x<d.i.length;y={Jd:y.Jd},x++){var w=d.i[x],C=0==x?c:v[v.length-1],z=0==x?e:C.endTime,B=Number(Jq(w,"DURATION"))||a.ba;if(B){B=z+B;var F=0,G=null;"EXT-X-PRELOAD-HINT"==w.name?F=(C=Jq(w,"BYTERANGE-START"))?Number(C):0:(F=Jq(w,"BYTERANGE"),C=r(Mr(C,F)),F=C.next().value,G=C.next().value);if(w=Jq(w,"URI"))y.Jd=Hb([h],
|
|
703
|
-
[w])[0],v.push(new Ni(z,B,function(H){return function(){return[H.Jd]}}(y),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Pq(l,"EXT-X-BYTERANGE"))?(t=r(Mr(c,a.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Ha,t=v[v.length-1].
|
|
704
|
-
function Mr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.
|
|
704
|
+
[w])[0],v.push(new Ni(z,B,function(H){return function(){return[H.Jd]}}(y),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Pq(l,"EXT-X-BYTERANGE"))?(t=r(Mr(c,a.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Ha,t=v[v.length-1].ya);c="";a=null;"image"==k&&(c="1x1",k=Pq(l,"EXT-X-TILES"))&&(c=Kq(k,"LAYOUT"),(k=Jq(k,"DURATION"))&&(a=Number(k)));return new Ni(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,a)}
|
|
705
|
+
function Mr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ya+1,d=c+d-1);return[c,d]}function tr(a){if(a.j){for(var b=r(a.X),c=b.next();!c.done;c=b.next())a.j.ic(c.value);a.X=[]}}
|
|
705
706
|
function kr(a,b,c,d,e,f,g,h,k,l){var m,n,p,t,v,y,x,w,C,z,B,F,G,H,J,K,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:m=c.segments;p=Qq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(t=Pq(c.g,"EXT-X-SKIP"))?Number(Jq(t,"SKIPPED-SEGMENTS")):0;y=p+v;if(a.m!=er&&f.has(y)){x=f.get(y);ea.D(2);break}if(null!=a.S){ea.D(3);break}n=Jr(a,c.h,m[0].g,g);w=a;return A(ea,Nr(a,b,n,e,y,!1,m[0],g,d,k,l),4);case 4:w.S=ea.h;case 3:x=a.S;case 2:C=m[0].h;C.split("/").pop();z=Qq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(z)||
|
|
706
707
|
h.set(z,y),v))for(B=h;B.has(z+1)&&B.get(z+1)<y;)z++;F=a.J.get(z)||0;G=[];H=0;case 5:if(!(H<m.length)){ea.D(7);break}J=m[H];K=G[G.length-1];L=0==H?x:K.endTime;y=p+v+H;f.set(y,L);n=Jr(a,c.h,J.g,g);W=Pq(J.g,"EXT-X-DISCONTINUITY");if(!W){ea.D(8);break}z++;h.set(z,y);return A(ea,Or(a,z,b,n,e,y,J,g,L,d,k,l),9);case 9:F=ea.h;case 8:!a.l&&(Z=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ka=Pq(J.g,"EXTINF");a.l||ka?(ja=Lr(a,n,K,J,L,F,g,c.h,d))&&G.push(ja):a.l||Sa("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.");
|
|
707
708
|
H++;ea.D(5);break;case 7:return ea["return"](G)}})}function Or(a,b,c,d,e,f,g,h,k,l,m,n){var p,t;return M(function(v){if(1==v.g)return p=0,a.J.has(b)?(p=a.J.get(b),v.D(2)):A(v,Nr(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(t=v.h,p=k-t,a.J.set(b,p));return v["return"](p)})}
|
|
708
|
-
function Pr(a,b,c,d,e,f){var g,h,k,l,m,n;return M(function(p){switch(p.g){case 1:g=mf;h=Ej(b.Ka(),b.Ha,b.
|
|
709
|
+
function Pr(a,b,c,d,e,f){var g,h,k,l,m,n;return M(function(p){switch(p.g){case 1:g=mf;h=Ej(b.Ka(),b.Ha,b.ya,a.g.retryParameters);a.i.modifySegmentRequest(h,{type:c,init:b instanceof Li,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.g.hls.useFullSegmentsForStartTime)return p["return"](Qr(a,h,g));k=Ej(b.Ka(),b.Ha,b.Ha+2048-1,a.g.retryParameters);a.i.modifySegmentRequest(k,{type:c,init:b instanceof Li,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});E(p,2);return A(p,
|
|
709
710
|
Qr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=I(p);if(7001==m.code)throw m;Sa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",k.uris[0]);return A(p,Qr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
|
|
710
711
|
function Nr(a,b,c,d,e,f,g,h,k,l,m){var n,p,t,v,y,x,w,C;return M(function(z){switch(z.g){case 1:n=Lr(a,c,null,g,0,0,h,"",k);if(a.G&&!f&&(p=a.h.get(b),t=p.ce.get(e),void 0!=t))return z["return"](t);d=d.toLowerCase();if(Gr.includes(d))throw Sa("Raw formats are not yet supported. Skipping "+d),new P(1,4,4035);if("video/webm"==d)throw Sa("WebM in HLS is not yet supported. Skipping."),new P(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){z.D(2);break}v=[Pr(a,n,k,d,l,m)];c&&v.push(Pr(a,c,k,d,l,m));return A(z,
|
|
711
712
|
Promise.all(v),3);case 3:return y=z.h,x=y[0],w=y[1]||y[0],z["return"](Rr(b,x.uri,x.data,w.data));case 2:if("video/mp2t"!=d){z.D(4);break}return A(z,Pr(a,n,k,d,l,m),5);case 5:return C=z.h,z["return"](Sr(b,C.uri,C.data));case 4:throw new P(2,4,4030,b);}})}
|
|
@@ -713,7 +714,7 @@ function Rr(a,b,c,d){var e=0;(new Qg).box("moov",Ug).box("trak",Ug).box("mdia",U
|
|
|
713
714
|
function Sr(a,b,c){function d(){f.seek(g+188);h=f.ka();71!=h&&(f.seek(g+192),h=f.ka());71!=h&&(f.seek(g+204),h=f.ka());71!=h&&e();f.xf(1)}function e(){throw new P(2,4,4030,a,b);}var f=new Ng(c,0),g=0,h=0;for(c=Math.min(f.U.byteLength-188,940);;){g=f.ia();h=f.ka();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.lc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ka()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ka(),f.skip(k)),1!=f.P()>>8)d();else{f.skip(3);c=f.ka()>>6;0!=c&&1!=c||e();0==f.ka()&&e();c=f.ka();k=
|
|
714
715
|
f.lc();var l=f.lc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Br(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new P(2,4,4039,f);}}return c}
|
|
715
716
|
function Fr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y;return M(function(x){if(1==x.g){f=Nb;g=mf;h=Br(d.segments[0].h,e);k=new jb(h);l=k.Oa.split(".").pop();m=Tr[b];if(n=m[l])return x["return"](n);if(b==f.oa)return c&&"vtt"!=c&&"wvtt"!=c?x["return"]("application/mp4"):x["return"]("text/vtt");if(b==f.xc&&(!c||"jpeg"==c))return x["return"]("image/jpeg");p=ff([h],a.g.retryParameters);p.method="HEAD";return A(x,Qr(a,p,g),2)}t=x.h;v=t.headers["content-type"];return v?x["return"](v.split(";")[0]):(y=m.mp4,x["return"](y))})}
|
|
716
|
-
function fr(a,b){var c=ff([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Qr(a,c,0)}function dr(a){var b,c;M(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 b=a.ma,a.F.R(b),va(d,0);c=I(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.F.R(.1);D(d)})}function lr(a,b){a.m=b;a.j&&a.j.
|
|
717
|
+
function fr(a,b){var c=ff([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Qr(a,c,0)}function dr(a){var b,c;M(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 b=a.ma,a.F.R(b),va(d,0);c=I(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.F.R(.1);D(d)})}function lr(a,b){a.m=b;a.j&&a.j.Qc(a.m==er);a.m!=er||a.F.stop()}
|
|
717
718
|
function Qr(a,b,c){if(!a.H)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);af(a.H,b);return b.promise}N("shaka.hls.HlsParser",cr);
|
|
718
719
|
var Gr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Tr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},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",
|
|
719
720
|
vtt:"text/vtt",webvtt:"txt/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Dr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Kq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Kq(a,"URI");b=br(b);b=Ic(b.data);b=Ib("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Jq(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
|
|
@@ -723,14 +724,14 @@ break}return A(K,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,n-p,
|
|
|
723
724
|
function cs(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",Vr);Vr.isSupported=cs;Vr.parse=Wr;var $r=window.fetch,Yr=window.AbortController,as=window.ReadableStream,Xr=window.Headers;cs()&&(cf("http",Wr,2,!0),cf("https",Wr,2,!0),cf("blob",Wr,2,!0));function ds(){}
|
|
724
725
|
function es(a,b,c,d,e){var f=new fs,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 n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=gs(f);e(t);n=!0}};f.onload=function(){var t=gs(f),v=f.response;try{var y=Ur(t,v,f.status,a,f.responseURL,c);l(y)}catch(x){m(x)}};f.onerror=function(t){m(new P(1,1,1002,a,t,
|
|
725
726
|
c))};f.ontimeout=function(){m(new P(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Re(k,function(){f.abort();return Promise.resolve()})}
|
|
726
|
-
function gs(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}N("shaka.net.HttpXHRPlugin",ds);ds.parse=es;var fs=window.XMLHttpRequest;cf("http",es,1,!0);cf("https",es,1,!0);cf("blob",es,1,!0);function hs(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function is(a){return a.Ka().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ha+":"+a.
|
|
727
|
+
function gs(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}N("shaka.net.HttpXHRPlugin",ds);ds.parse=es;var fs=window.XMLHttpRequest;cf("http",es,1,!0);cf("https",es,1,!0);cf("blob",es,1,!0);function hs(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function is(a){return a.Ka().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ha+":"+a.ya}function js(a,b){return Ej(a.g.Ka(),a.g.Ha,a.g.ya,b.streaming.retryParameters)};function ks(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function ls(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}ks.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 ms(a){var b=this;this.A=a;this.j=new Map;this.i=new nf(function(){return ns(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new ks}ms.prototype.destroy=function(){return this.i.destroy()};function os(a,b,c){a.m=b;a.l=c}function ns(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
727
728
|
function ps(a,b,c,d,e,f){of(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return A(v,qs(a,c),2);h=v.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=Ic(h),l=new Go(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.l(p,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function rs(a){return M(function(b){return 1==b.g?A(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
|
|
728
729
|
function qs(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=mf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),A(g,d.promise,2);f=g.h;ic(a.h,e);return g["return"](f.data)})};function ss(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Pc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ss.prototype.abort=function(){var a=this;return M(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);I(b);D(b)})};
|
|
729
730
|
function ts(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return M(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"]();D(g)})}})}ss.prototype.store=function(){return this.h};ss.prototype.promise=function(){return this.g};function us(a){this.h=a;this.g=[]}us.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function vs(a,b){return ws(a,b,"readwrite")}function ws(a,b,c){c=a.h.transaction([b],c);var d=new ss(c,b);a.g.push(d);d.promise().then(function(){ic(a.g,d)},function(){ic(a.g,d)});return d};function xs(a,b,c){this.h=new us(a);this.i=b;this.g=c}q=xs.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ys(this.i)};q.removeSegments=function(a,b){return zs(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return M(function(d){if(1==d.g)return A(d,As(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.We(e)}))})};q.addManifests=function(){return ys(this.g)};
|
|
730
731
|
q.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function Bs(a,b,c){a=vs(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=vs(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 zs(this,this.g,a,b)};
|
|
731
732
|
q.getManifests=function(a){var b=this,c;return M(function(d){if(1==d.g)return A(d,As(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Ac(e)})))})};q.getAllManifests=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=ws(a.h,a.g,"readonly"),c=new Map,A(d,ts(b,function(e,f){var g;return M(function(h){if(1==h.g)return A(h,a.Ac(f),2);g=h.h;c.set(e,g);D(h)})}),2)):3!=d.g?A(d,b.promise(),3):d["return"](c)})};q.We=function(a){return a};q.Ac=function(a){return Promise.resolve(a)};
|
|
732
|
-
function ys(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 M(function(m){if(1==m.g){d=vs(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={
|
|
733
|
-
function zs(a,b,c,d){a=vs(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={
|
|
733
|
+
function ys(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 M(function(m){if(1==m.g){d=vs(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Vc:g.Vc},k=h.next())l=k.value,g.Vc=e.add(l),g.Vc.onsuccess=function(n){return function(){f.push(n.Vc.result)}}(g);return A(m,d.promise(),2)}return m["return"](f)})};
|
|
734
|
+
function zs(a,b,c,d){a=vs(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Uc:e.Uc},f=c.next())e.Uc=f.value,b["delete"](e.Uc).onsuccess=function(g){return function(){return d(g.Uc)}}(e);return a.promise()}
|
|
734
735
|
function As(a,b,c){var d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=ws(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={vc:h.vc,rc:h.rc},l=k.next())h.rc=l.value,h.vc=e.get(h.rc),h.vc.onsuccess=function(n){return function(){void 0==n.vc.result&&g.push(n.rc);f[n.rc]=n.vc.result}}(h);return 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(n){return f[n]}))})};function Cs(a){this.g=new us(a)}Cs.prototype.destroy=function(){return this.g.destroy()};Cs.prototype.getAll=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=ws(a.g,"session-ids","readonly"),c=[],A(d,ts(b,function(e,f){c.push(f)}),2)):3!=d.g?A(d,b.promise(),3):d["return"](c)})};Cs.prototype.add=function(a){var b=vs(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()};
|
|
735
736
|
Cs.prototype.remove=function(a){var b=this,c;return M(function(d){return 1==d.g?(c=vs(b.g,"session-ids"),A(d,ts(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):A(d,c.promise(),0)})};function Ds(){this.g=new Map}Ds.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)};Ds.prototype.init=function(){var a=this;Es.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
736
737
|
function Fs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ta:d,Da:f},Da:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function Gs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ta:d,Da:f},e)})})}
|
|
@@ -753,7 +754,7 @@ q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2
|
|
|
753
754
|
q.erase=function(){var a=this;return M(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,Vs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,A(b,a.init(),0)}})};
|
|
754
755
|
function Vs(){var a=new Pc,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}Ls("idb",function(){return $c()||Wc()||!window.indexedDB?null:new Us});function Ws(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ws.prototype.Ta=function(){return this.i};Ws.prototype.Da=function(){return this.h};Ws.prototype.key=function(){return this.l};Ws.prototype.toString=function(){return this.j};
|
|
755
756
|
function Xs(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 Ws(b,c,d,Number(a[4])):null};function Ys(a,b){this.h=a;this.g=b}
|
|
756
|
-
function Zs(a,b){var c=new R(null,0);c.
|
|
757
|
+
function Zs(a,b){var c=new R(null,0);c.cb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=$s(a,d,e,c);e=b.streams.filter(function(l){return l.type==Mb}).map(function(l){return at(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return at(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=
|
|
757
758
|
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}}
|
|
758
759
|
function $s(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:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
|
|
759
760
|
e.value,g=at(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=at(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}
|
|
@@ -964,10 +965,10 @@ sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s
|
|
|
964
965
|
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",
|
|
965
966
|
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",
|
|
966
967
|
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"}},jx=r(Object.keys(ix)),kx=jx.next();!kx.done;kx=
|
|
967
|
-
jx.next()){var lx=kx.value;ix[lx.toLowerCase()]=ix[lx]};function V(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new pf;this.localization=this.controls.Ca;this.player=this.controls.bc();this.video=this.controls.Bb();this.adManager=this.player.
|
|
968
|
+
jx.next()){var lx=kx.value;ix[lx.toLowerCase()]=ix[lx]};function V(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new pf;this.localization=this.controls.Ca;this.player=this.controls.bc();this.video=this.controls.Bb();this.adManager=this.player.dd();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})}
|
|
968
969
|
V.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};N("shaka.ui.Element",V);V.prototype.release=V.prototype.release;function mx(a){return nx(a,"shaka-back-to-overflow-button")}function nx(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function ox(a){a&&(a=nx(a,"shaka-chosen-item"))&&a.parentElement.focus()}function px(){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 X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
969
970
|
function qx(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function rx(a,b){V.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=qx(e-d,!1)+" / "+qx(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=
|
|
970
|
-
""))});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.
|
|
971
|
+
""))});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.Ba();c.g.ha(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Ba(),this.g.ha(.5))}u(rx,V);rx.prototype.release=function(){this.g.stop();this.g=null;V.prototype.release.call(this)};N("shaka.ui.AdCounter",rx);function sx(a,b){V.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");X(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&&tx(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&tx(c)});this.eventManager.o(this.adManager,"ad-started",function(){tx(c)});this.eventManager.o(this.adManager,
|
|
971
972
|
"ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&tx(this)}u(sx,V);function tx(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}N("shaka.ui.AdPosition",sx);function ux(a,b){V.call(this,a,b);var c=this;this.button=tk();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();
|
|
972
973
|
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()?vx(c.controls):wx(c.controls)});this.ad&&(this.g(),this.h())}u(ux,V);ux.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};ux.prototype.g=function(){};ux.prototype.h=function(){};
|
|
973
974
|
N("shaka.ui.PlayButton",ux);function xx(a,b){ux.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}u(xx,ux);xx.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};xx.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};N("shaka.ui.BigPlayButton",xx);function yx(a,b){V.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";X(c.g,!0)}else X(c.g,
|
|
@@ -978,37 +979,37 @@ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown"
|
|
|
978
979
|
q.setValue=function(a){this.g||(this.bar.value=a)};function Dx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}N("shaka.ui.RangeElement",Cx);Cx.prototype.setValue=Cx.prototype.setValue;Cx.prototype.getValue=Cx.prototype.getValue;Cx.prototype.changeTo=Cx.prototype.changeTo;Cx.prototype.onChangeEnd=Cx.prototype.onChangeEnd;Cx.prototype.onChange=Cx.prototype.onChange;
|
|
979
980
|
Cx.prototype.onChangeStart=Cx.prototype.onChangeStart;Cx.prototype.setRange=Cx.prototype.setRange;function Ex(a,b){Cx.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(){Fx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Gx(c)});this.eventManager.o(this.localization,
|
|
980
981
|
"locale-changed",function(){return Gx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Hx(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Hx(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Ix(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Ix(c)});this.setValue(this.video.currentTime);this.update();Gx(this);this.ad&&X(this.container,!1)}u(Ex,Cx);q=Ex.prototype;
|
|
981
|
-
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);Cx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Ae(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.R(.125))};q.onChangeEnd=function(){this.h.
|
|
982
|
+
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);Cx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Ae(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.R(.125))};q.onChangeEnd=function(){this.h.Ba();this.controls.Ae(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
982
983
|
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.Ma(),g=f.end-f.start;this.setRange(f.start,f.end);Hx(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
|
|
983
984
|
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):X(this.container,!1)};
|
|
984
985
|
function Fx(a){if(a.i.length){for(var b=a.player.Ma(),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 "+
|
|
985
986
|
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 Ix(a){Fx(a);var b=a.player.Ma();b=b.end-b.start;a.player.T()&&5<b&&a.A.ha(1)}function Hx(a){var b=a.player.Ma();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Gx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}N("shaka.ui.SeekBar",Ex);function Jx(){}
|
|
986
|
-
Jx.prototype.create=function(a,b){return new Ex(a,b)};Ex.Factory=Jx;function Y(a,b,c,d){cb.call(this);var e=this;this.X=!0;this.i=d;this.B=new ao(c,a,this.i.castReceiverAppId);this.
|
|
987
|
+
Jx.prototype.create=function(a,b){return new Ex(a,b)};Ex.Factory=Jx;function Y(a,b,c,d){cb.call(this);var e=this;this.X=!0;this.i=d;this.B=new ao(c,a,this.i.castReceiverAppId);this.Za=!0;this.A=this.B.Bb();this.C=c;this.F=this.B.bc();this.wa=a;this.j=b;this.Xa=this.F.dd();this.m=this.l=null;this.$=!1;this.G=[];this.wb=[];this.jb=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.jb=!1;Kx(e)});this.ma=new Q(function(){e.g.removeAttribute("shown");e.I.R(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Pa=new Q(function(){e.Ob()&&
|
|
987
988
|
Lx(e)});this.J=null;this.H=[];this.Ca=Mx();this.h=new pf;this.configure(this.i);Nx(this);this.na=new Set;Ox(this);this.Pa.ha(.125);this.h.o(this.Ca,"locale-changed",function(f){e.Xa.setLocale(f.locales[0])})}u(Y,cb);q=Y.prototype;
|
|
988
|
-
q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.C){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.ma&&(a.ma.stop(),a.ma=null);a.I&&(a.I.stop(),a.I=null);a.Pa&&(a.Pa.stop(),a.Pa=null);Px(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.B){b.D(4);break}return A(b,a.B.destroy(),5);case 5:a.B=null;case 4:if(!a.
|
|
989
|
-
null;case 6:a.F=null,a.C=null,a.A=null,a.Ca=null,a.na.clear(),cb.prototype.release.call(a),D(b)}})};function Px(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Qx(a,b){Rx.set(a,b)}q.Pf=function(a){this.
|
|
990
|
-
q.configure=function(a){this.i=a;this.B.Ve(a.castReceiverAppId);this.m&&(this.m=null);this.
|
|
989
|
+
q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.C){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.ma&&(a.ma.stop(),a.ma=null);a.I&&(a.I.stop(),a.I=null);a.Pa&&(a.Pa.stop(),a.Pa=null);Px(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.B){b.D(4);break}return A(b,a.B.destroy(),5);case 5:a.B=null;case 4:if(!a.wa){b.D(6);break}return A(b,a.wa.destroy(),7);case 7:a.wa=
|
|
990
|
+
null;case 6:a.F=null,a.C=null,a.A=null,a.Ca=null,a.na.clear(),cb.prototype.release.call(a),D(b)}})};function Px(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Qx(a,b){Rx.set(a,b)}q.Pf=function(a){this.Za=a;Ox(this)};q.Jg=function(){Kx(this)};
|
|
991
|
+
q.configure=function(a){this.i=a;this.B.Ve(a.castReceiverAppId);this.m&&(this.m=null);this.gb&&(this.gb=null);this.Ya&&(this.Ya=null);this.g?(uk(this.g),Px(this)):(Sx(this),Tx(this));this.j.classList.add("shaka-video-container");this.C.classList.add("shaka-video");Ux(this);this.i.addBigPlayButton&&Vx(this);this.i.customContextMenu&&(this.Ya=new yx(this.Z,this),this.H.push(this.Ya));this.ba||Wx(this);this.ib=S("div");this.ib.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.ib);
|
|
991
992
|
Xx(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Yx(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Kx(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",c)}};
|
|
992
|
-
q.we=function(a){(this.X=a)?(this.j.setAttribute("shaka-controls","true"),this.C.tabIndex=-1,this.C.controls=!1):this.j.removeAttribute("shaka-controls");Kx(this)};q.Cf=function(a){this.C.controls=a;this.C.tabIndex=a?0:-1;a&&this.we(!1)};q.getAd=function(){return this.l};q.ag=function(){return this.B};q.ng=function(){return this.Ca};q.Dg=function(){return this.j};q.Bb=function(){return this.A};q.mg=function(){return this.C};q.bc=function(){return this.F};q.lg=function(){return this.
|
|
993
|
-
q.wg=function(){return this.ib};q.dg=function(){return this.S};q.eg=function(){return this.i};q.Ig=function(){return this.$};q.Ae=function(a){this.$=a};q.Gg=function(){return this.
|
|
993
|
+
q.we=function(a){(this.X=a)?(this.j.setAttribute("shaka-controls","true"),this.C.tabIndex=-1,this.C.controls=!1):this.j.removeAttribute("shaka-controls");Kx(this)};q.Cf=function(a){this.C.controls=a;this.C.tabIndex=a?0:-1;a&&this.we(!1)};q.getAd=function(){return this.l};q.ag=function(){return this.B};q.ng=function(){return this.Ca};q.Dg=function(){return this.j};q.Bb=function(){return this.A};q.mg=function(){return this.C};q.bc=function(){return this.F};q.lg=function(){return this.wa};q.gg=function(){return this.g};
|
|
994
|
+
q.wg=function(){return this.ib};q.dg=function(){return this.S};q.eg=function(){return this.i};q.Ig=function(){return this.$};q.Ae=function(a){this.$=a};q.Gg=function(){return this.Za};q.ef=function(){return this.m?this.m.getValue():this.A.currentTime};q.Df=function(a){this.J=a};q.Yc=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.dc=function(){this.I.Ba()};
|
|
994
995
|
q.Ge=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),A(c,document.exitFullscreen(),0);E(c,4);if(!document.pictureInPictureElement){c.D(6);break}return A(c,document.exitPictureInPicture(),6);case 6:return A(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){c.D(9);break}E(c,10);return A(c,screen.orientation.lock("landscape"),12);case 12:va(c,
|
|
995
996
|
9,4);break;case 10:I(c,4);case 9:va(c,0);break;case 4:b=I(c),a.dispatchEvent(new O("error",(new Map).set("detail",b))),c.D(0)}})};q.Ff=function(){X(this.K,!0);X(this.S,!0);this.g.setAttribute("ad-active","true")};q.jf=function(){X(this.K,!1);X(this.S,!1);this.g.removeAttribute("ad-active")};function wx(a){a.X&&a.A.duration&&(a.F.Se(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function vx(a){a.l&&a.l.isPaused()?a.l.play():a.l&&a.l.pause()}
|
|
996
997
|
function Sx(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.Ob()?a.J=Date.now():(Zx(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){$x(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&document.fullscreenEnabled&&a.Ge()})}
|
|
997
|
-
function Vx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.
|
|
998
|
+
function Vx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.gb=new xx(b,a);a.H.push(a.gb)}function Ux(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function ay(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new sx(a.K,a);a.H.push(b);b=new rx(a.K,a);a.H.push(b)}
|
|
998
999
|
function Wx(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");
|
|
999
1000
|
b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
|
|
1000
1001
|
function Xx(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(e){e.target.closest(".shaka-overflow-button")||a.dc()});ay(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={},c=r(a.i.controlPanelElements),d=c.next();!d.done;b={sc:b.sc},d=c.next())d=
|
|
1001
1002
|
d.value,Rx.get(d)?(d=Rx.get(d).create(a.Z,a),"function"!=typeof d.release&&(zb("shaka.extern.IUIElement","Please update UI elements to have a release() method."),b.sc=d,b.sc.release=function(e){return function(){e.sc.destroy&&e.sc.destroy()}}(b)),a.H.push(d)):Sa("Unrecognized control panel element requested:",d)}function Yx(a){if(a.i.addSeekBar)a.m=by.create(a.N,a),a.H.push(a.m);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
|
|
1002
1003
|
function Tx(a){a.S=S("div");a.S.classList.add("shaka-client-side-ad-container");X(a.S,!1);a.h.o(a.S,"click",function(){$x(a)});a.j.appendChild(a.S)}
|
|
1003
|
-
function Nx(a){a.h.o(a.F,"buffering",function(){a.X&&X(a.ba,a.F.
|
|
1004
|
+
function Nx(a){a.h.o(a.F,"buffering",function(){a.X&&X(a.ba,a.F.Kc())});a.X&&X(a.ba,a.F.Kc());a.h.o(window,"keydown",function(b){cy(a,b)});a.h.o(window,"click",function(){return a.dc()});a.h.o(a,"submenuopen",function(){a.dc()});a.h.o(a.A,"play",function(){Kx(a)});a.h.o(a.A,"pause",function(){Kx(a)});a.h.o(a.j,"mousemove",function(b){Zx(a,b)});a.h.o(a.j,"touchmove",function(b){Zx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Zx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.Ba()});
|
|
1004
1005
|
a.h.o(a.B,"caststatuschanged",function(){Ox(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)&&Zx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),dy(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),dy(a,a.m.getValue()+5));break;case "Home":a.m&&dy(a,a.F.Ma().start);break;
|
|
1005
1006
|
case "End":a.m&&dy(a,a.F.Ma().end);break;case " ":e&&ey(a)}});a.h.o(a.j,"keyup",function(b){a.na["delete"](b.key)});a.h.o(a.Xa,"ad-started",function(b){a.l=b.ad;a.Ff()});a.h.o(a.Xa,"ad-stopped",function(){a.l=null;a.jf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return M(function(b){return A(b,fy(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.C.offsetWidth,a.C.offsetHeight)})}
|
|
1006
1007
|
function fy(a){return M(function(b){return a.A&&0!=a.A.readyState&&!a.B.ra()&&a.i.enableFullscreenOnRotation&&document.fullscreenEnabled?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?A(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?A(b,document.exitFullscreen(),0):b.D(0):b["return"]()})}
|
|
1007
1008
|
function Zx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Kx(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.jb=!0,a.I.stop(),a.Ob()||(Lx(a),Kx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.R(3))}function gy(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
|
|
1008
|
-
function Kx(a){var b=a.l?a.l.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.jb||d||gy(a)?(Lx(a),a.g.setAttribute("shown","true"),a.ma.stop()):a.ma.R(a.i.fadeDelay)}function $x(a){a.X&&(a.
|
|
1009
|
+
function Kx(a){var b=a.l?a.l.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.jb||d||gy(a)?(Lx(a),a.g.setAttribute("shown","true"),a.ma.stop()):a.ma.R(a.i.fadeDelay)}function $x(a){a.X&&(a.Yc()?a.I.Ba():a.i.singleClickForPlayAndPause&&ey(a))}function ey(a){a.l&&a.l.isLinear()?vx(a):wx(a)}
|
|
1009
1010
|
function Ox(a){var b=a.B.ra();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Ob=function(){return this.X?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function dy(a,b){a.m.changeTo(b);a.Ob()&&Lx(a)}
|
|
1010
1011
|
function Lx(a){if(a.m)if(a.m.setValue(a.A.currentTime),a.m.update(),a.m.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"))}
|
|
1011
|
-
function cy(a,b){a.na.add(b.key);var c=a.
|
|
1012
|
+
function cy(a,b){a.na.add(b.key);var c=a.Yc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Kx(a),a.h.o(window,"mousedown",function(){a.h.pc(window,"mousedown")}));"Escape"==b.key&&a.I.Ba();c&&a.na.has("Tab")&&hy(a,b)}
|
|
1012
1013
|
function hy(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.na.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
1013
1014
|
function Mx(){var a=new Zb("en");a.ea("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..."],
|
|
1014
1015
|
["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"],
|
|
@@ -1069,12 +1070,12 @@ a.ea("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1069
1070
|
["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"],
|
|
1070
1071
|
["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"],
|
|
1071
1072
|
["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.Ue(navigator.languages||[]);return a}N("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Ob;Y.prototype.hideAdUI=Y.prototype.jf;Y.prototype.showAdUI=Y.prototype.Ff;
|
|
1072
|
-
Y.prototype.toggleFullScreen=Y.prototype.Ge;Y.prototype.hideSettingsMenus=Y.prototype.dc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.
|
|
1073
|
+
Y.prototype.toggleFullScreen=Y.prototype.Ge;Y.prototype.hideSettingsMenus=Y.prototype.dc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Yc;Y.prototype.setLastTouchEventTime=Y.prototype.Df;Y.prototype.getDisplayTime=Y.prototype.ef;Y.prototype.isCastAllowed=Y.prototype.Gg;Y.prototype.setSeeking=Y.prototype.Ae;Y.prototype.isSeeking=Y.prototype.Ig;Y.prototype.getConfig=Y.prototype.eg;Y.prototype.getClientSideAdContainer=Y.prototype.dg;Y.prototype.getServerSideAdContainer=Y.prototype.wg;
|
|
1073
1074
|
Y.prototype.getControlsContainer=Y.prototype.gg;Y.prototype.getLocalPlayer=Y.prototype.lg;Y.prototype.getPlayer=Y.prototype.bc;Y.prototype.getLocalVideo=Y.prototype.mg;Y.prototype.getVideo=Y.prototype.Bb;Y.prototype.getVideoContainer=Y.prototype.Dg;Y.prototype.getLocalization=Y.prototype.ng;Y.prototype.getCastProxy=Y.prototype.ag;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.Cf;Y.prototype.setEnabledShakaControls=Y.prototype.we;Y.prototype.configure=Y.prototype.configure;
|
|
1074
1075
|
Y.prototype.loadComplete=Y.prototype.Jg;Y.prototype.allowCast=Y.prototype.Pf;Y.registerSeekBar=function(a){by=a};Y.registerElement=Qx;Y.prototype.destroy=Y.prototype.destroy;var Rx=new Map,by=new Jx;function iy(a,b){V.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=tk();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");
|
|
1075
1076
|
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);jy(this);this.eventManager.o(this.localization,"locale-updated",function(){ky(c)});this.eventManager.o(this.localization,"locale-changed",function(){ky(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&X(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Df(Date.now());
|
|
1076
1077
|
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){ly(c)});ky(this);this.ad&&this.ad.isLinear()&&X(this.g,!1)}u(iy,V);iy.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=[];V.prototype.release.call(this)};function my(a,b){ny.set(a,b)}
|
|
1077
|
-
function jy(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,ny.get(c)?(c=ny.get(c),a.i.push(c.create(a.h,a.controls))):Sa("Unrecognized overflow menu element requested:",c)}function ly(a){if(a.controls.
|
|
1078
|
+
function jy(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,ny.get(c)?(c=ny.get(c),a.i.push(c.create(a.h,a.controls))):Sa("Unrecognized overflow menu element requested:",c)}function ly(a){if(a.controls.Yc())a.controls.dc();else{X(a.h,!0);Kx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};fb(a.h.childNodes,b)&&hb(a.h.childNodes,b)[0].focus()}}function ky(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1078
1079
|
N("shaka.ui.OverflowMenu",iy);iy.registerElement=my;function oy(){}oy.prototype.create=function(a,b){return new iy(a,b)};Qx("overflow_menu",new oy);var ny=new Map;function py(a,b){V.call(this,a,b);var c=this;this.g=tk();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");var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");d.appendChild(this.j);
|
|
1079
1080
|
this.i=S("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);qy(this);ry(this);this.eventManager.o(this.localization,"locale-updated",function(){qy(c)});this.eventManager.o(this.localization,"locale-changed",function(){qy(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});d=this.controls.Bb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=
|
|
1080
1081
|
c.player.gf()==xm;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){ry(c)})}u(py,V);function ry(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function qy(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}N("shaka.ui.AirPlayButton",py);function sy(){}sy.prototype.create=function(a,b){return new py(a,b)};my("airplay",new sy);
|
|
@@ -1094,15 +1095,15 @@ break;case 3:n.Va.label?C.textContent=n.Va.label:(Sa("Track #"+n.Va.id+" does no
|
|
|
1094
1095
|
function Cy(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=Vb(a);return a in ix?ix[a].s:c in ix?ix[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function Dy(a,b,c){V.call(this,a,b);var d=this;Ey(this,c);Fy(this);Gy(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),X(d.menu,!0),ox(d.menu)):X(d.menu,!1)})}u(Dy,V);
|
|
1095
1096
|
function Ey(a,b){a.button=tk();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);var c=S("label");c.classList.add("shaka-overflow-button-label");c.classList.add("shaka-overflow-menu-only");a.nameSpan=S("span");c.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
|
|
1096
1097
|
function Fy(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=tk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.dc()});var b=S("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1097
|
-
S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Gy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}X(a.parent,!0);fb(a.parent.childNodes,b)&&hb(a.parent.childNodes,b)[0].focus();Kx(a.controls)}))}N("shaka.ui.SettingsMenu",Dy);function Hy(a,b){Dy.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(){Iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player
|
|
1098
|
-
function(){Jy(c)});Iy(this);Jy(this)}u(Hy,Dy);function Jy(a){var b=a.player
|
|
1098
|
+
S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Gy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}X(a.parent,!0);fb(a.parent.childNodes,b)&&hb(a.parent.childNodes,b)[0].focus();Kx(a.controls)}))}N("shaka.ui.SettingsMenu",Dy);function Hy(a,b){Dy.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(){Iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.ab().length;X(c.button,d);Jy(c)});this.eventManager.o(this.player,"variantchanged",
|
|
1099
|
+
function(){Jy(c)});Iy(this);Jy(this)}u(Hy,Dy);function Jy(a){var b=a.player.ab();By(b,a.menu,function(c){a.player.xd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);ox(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
|
|
1099
1100
|
function Iy(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")}N("shaka.ui.AudioLanguageSelection",Hy);function Ky(){}Ky.prototype.create=function(a,b){return new Hy(a,b)};my("language",new Ky);Qx("language",new Ky);function Ly(a,b){V.call(this,a,b);var c=this;this.h=this.controls.B;this.g=tk();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);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
|
|
1100
1101
|
d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);My(this);Ny(this);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(){Oy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Ny(c)})}u(Ly,V);
|
|
1101
|
-
function Oy(a){var b;M(function(c){if(1==c.g){if(a.h.ra())return a.h.Gf(),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=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));D(c)})}function Ny(a){var b=a.h.Re()&&a.controls.
|
|
1102
|
+
function Oy(a){var b;M(function(c){if(1==c.g){if(a.h.ra())return a.h.Gf(),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=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));D(c)})}function Ny(a){var b=a.h.Re()&&a.controls.Za,c=a.h.ra();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Py(a)}
|
|
1102
1103
|
function Py(a){a.j.textContent=a.h.ra()?a.h.vd():a.localization.resolve("OFF")}function My(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Py(a)}N("shaka.ui.CastButton",Ly);function Qy(){}Qy.prototype.create=function(a,b){return new Ly(a,b)};my("cast",new Qy);Qx("cast",new Qy);function Ry(a,b){V.call(this,a,b);var c=this;this.g=tk();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);Sy(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){Sy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Sy(c)});
|
|
1103
1104
|
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Ie(d);c.g.setAttribute("shaka-status",d+"x")}})}u(Ry,V);function Sy(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}N("shaka.ui.FastForwardButton",Ry);function Ty(){}Ty.prototype.create=function(a,b){return new Ry(a,b)};Qx("fast_forward",new Ty);function Uy(a,b){V.call(this,a,b);var c=this;this.g=tk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Vy(this);this.eventManager.o(this.localization,"locale-updated",function(){Vy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Vy(c)});this.eventManager.o(this.g,
|
|
1104
1105
|
"click",function(){return M(function(d){return A(d,c.controls.Ge(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Vy(c)})}u(Uy,V);function Vy(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}N("shaka.ui.FullscreenButton",Uy);function Wy(){}Wy.prototype.create=function(a,b){return new Uy(a,b)};Qx("fullscreen",new Wy);function Xy(a,b){V.call(this,a,b);var c=this;this.g=tk();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);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
|
|
1105
|
-
d.appendChild(this.l);this.g.appendChild(d);Yy(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Yy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Yy(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.
|
|
1106
|
+
d.appendChild(this.l);this.g.appendChild(d);Yy(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Yy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Yy(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Ba();c.h.ha(1)});this.m=this.video.loop;this.h=new Q(function(){c.m!=c.video.loop&&(Yy(c),c.m=c.video.loop)});this.h.ha(1)}u(Xy,V);Xy.prototype.release=function(){this.h.stop();this.h=null;V.prototype.release.call(this)};
|
|
1106
1107
|
function Yy(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")}N("shaka.ui.LoopButton",Xy);function Zy(){}Zy.prototype.create=function(a,b){return new Xy(a,b)};my("loop",new Zy);Qx("loop",new Zy);Ax("loop",new Zy);function $y(a,b){V.call(this,a,b);var c=this;this.g=tk();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);az(this);bz(this);this.eventManager.o(this.localization,"locale-updated",function(){az(c)});this.eventManager.o(this.localization,"locale-changed",function(){az(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});
|
|
1107
1108
|
this.eventManager.o(this.video,"volumechange",function(){az(c);bz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){az(c);bz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){az(c);bz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;az(c);bz(c)})}u($y,V);function az(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
1108
1109
|
function bz(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}N("shaka.ui.MuteButton",$y);function cz(){}cz.prototype.create=function(a,b){return new $y(a,b)};Qx("mute",new cz);function dz(a,b){V.call(this,a,b);var c=this;this.l=this.controls.C;this.g=tk();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);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);
|
|
@@ -1116,14 +1117,14 @@ function kz(a,b){var c=nx(a.menu,"material-icons-round shaka-chosen-item");if(c)
|
|
|
1116
1117
|
"x")}function lz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={tc:b.tc},d=c.next()){b.tc=d.value;d=tk();var e=S("span");e.textContent=b.tc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.tc);a.video.defaultPlaybackRate=a.g.get(f.tc)}}(b));a.menu.appendChild(d)}ox(a.menu)}N("shaka.ui.PlaybackRateSelection",iz);function mz(){}mz.prototype.create=function(a,b){return new iz(a,b)};my("playback_rate",new mz);Qx("playback_rate",new mz);function nz(a,b){V.call(this,a,b);var c=this;this.g=tk();this.g.classList.add("shaka-current-time");oz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.Ma().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.ef(),f=c.video.duration,g=c.player.Ma(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(oz(c,"- "+qx(e,f)),c.g.disabled=
|
|
1117
1118
|
!1):(oz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=qx(e,d),f&&(e+=" / "+qx(f,d)),oz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}u(nz,V);function oz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}N("shaka.ui.PresentationTimeTracker",nz);function pz(){}pz.prototype.create=function(a,b){return new nz(a,b)};Qx("time_and_duration",new pz);function qz(a,b){Dy.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(){rz(c)});this.eventManager.o(this.localization,"locale-changed",function(){rz(c)});this.eventManager.o(this.player,"variantchanged",function(){sz(c)});this.eventManager.o(this.player,"trackschanged",function(){sz(c)});this.eventManager.o(this.player,
|
|
1118
1119
|
"abrstatuschanged",function(){sz(c)});sz(this);rz(this)}u(qz,Dy);
|
|
1119
|
-
function sz(a){var b=a.player
|
|
1120
|
+
function sz(a){var b=a.player.ab();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=mx(a.menu);uk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
|
|
1120
1121
|
{wc:e.wc},g=f.next()){e.wc=g.value;g=tk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.wc;a.player.configure({abr:{enabled:!1}});a.player.ue(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=e.wc.height+"p";g.appendChild(h);d||e.wc!=c||(g.ariaSelected="true",g.appendChild(px()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=tk();e.classList.add("shaka-enable-abr-button");
|
|
1121
1122
|
a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});sz(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(px()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);ox(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"))}}
|
|
1122
1123
|
function rz(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}N("shaka.ui.ResolutionSelection",qz);function tz(){}
|
|
1123
1124
|
tz.prototype.create=function(a,b){return new qz(a,b)};my("quality",new tz);Qx("quality",new tz);function uz(a,b){V.call(this,a,b);var c=this;this.g=tk();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);vz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){vz(c)});this.eventManager.o(this.localization,"locale-changed",function(){vz(c)});
|
|
1124
1125
|
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Ie(d);c.g.setAttribute("shaka-status",d+"x")}})}u(uz,V);function vz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}N("shaka.ui.RewindButton",uz);function wz(){}wz.prototype.create=function(a,b){return new uz(a,b)};Qx("rewind",new wz);function xz(a,b){V.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");X(this.h,!1);this.j.appendChild(this.h);this.g=tk();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);yz(this);this.i=new Q(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1125
1126
|
d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){yz(c)});this.eventManager.o(this.localization,"locale-changed",function(){yz(c)});this.eventManager.o(this.adManager,"ad-started",function(){zz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
|
|
1126
|
-
"click",function(){c.ad.skip()});this.ad&&zz(this)}u(xz,V);xz.prototype.release=function(){this.i.stop();this.i=null;V.prototype.release.call(this)};function yz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function zz(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.
|
|
1127
|
+
"click",function(){c.ad.skip()});this.ad&&zz(this)}u(xz,V);xz.prototype.release=function(){this.i.stop();this.i=null;V.prototype.release.call(this)};function yz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function zz(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.Ba(),a.i.ha(.5))}N("shaka.ui.SkipAdButton",xz);function Az(a,b){ux.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(Az,ux);Az.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};Az.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)}};
|
|
1127
1128
|
N("shaka.ui.SmallPlayButton",Az);function Bz(){}Bz.prototype.create=function(a,b){return new Az(a,b)};Qx("play_pause",new Bz);function Cz(a,b){V.call(this,a,b);var c=S("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}u(Cz,V);N("shaka.ui.Spacer",Cz);function Dz(){}Dz.prototype.create=function(a,b){return new Cz(a,b)};Qx("spacer",new Dz);function Ez(a,b){function c(l){return qx(h.h[l],!1)+" (m)"}function d(l){return Math.round(h.h[l]/1E3)+" (kbits/s)"}function e(l){return h.h[l].toFixed(2)+" (s)"}function f(l){return h.h[l]+" (frames)"}function g(l){return h.h[l]+" (px)"}V.call(this,a,b);var h=this;this.i=tk();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);var k=S("label");k.classList.add("shaka-overflow-button-label");
|
|
1128
1129
|
this.A=S("span");k.appendChild(this.A);this.m=S("span");this.m.classList.add("shaka-current-selection-span");k.appendChild(this.m);this.i.appendChild(k);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();
|
|
1129
1130
|
this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f};this.l=new Q(function(){h.h=h.player.getStats();for(var l=r(h.F),m=l.next();!m.done;m=l.next())m=m.value,h.B[m].textContent=h.C[m](m)});Fz(this);Gz(this);this.eventManager.o(this.localization,
|