shaka-player 4.2.8 → 4.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-and-test.yaml +4 -4
- package/.github/workflows/demo-version-index.yaml +6 -0
- package/.github/workflows/selenium-lab-tests.yaml +55 -16
- package/.github/workflows/update-screenshots.yaml +142 -0
- package/CHANGELOG.md +23 -0
- package/demo/common/asset.js +15 -0
- package/demo/common/assets.js +4 -2
- package/demo/common/message_ids.js +1 -0
- package/demo/custom.js +19 -0
- package/demo/locales/en.json +1 -0
- package/demo/locales/source.json +4 -0
- package/demo/main.js +14 -0
- package/dist/demo.compiled.debug.js +29 -27
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +29 -27
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +1 -1
- package/dist/locales.js +31 -31
- package/dist/receiver.compiled.debug.js +21 -21
- package/dist/receiver.compiled.debug.map +2 -2
- package/dist/receiver.compiled.js +21 -21
- package/dist/receiver.compiled.map +2 -2
- package/dist/shaka-player.compiled.d.ts +7 -0
- package/dist/shaka-player.compiled.debug.d.ts +7 -0
- package/dist/shaka-player.compiled.debug.js +34 -32
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +167 -167
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.d.ts +7 -0
- package/dist/shaka-player.ui.debug.d.ts +7 -0
- package/dist/shaka-player.ui.debug.js +36 -34
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +264 -263
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/errors.md +94 -0
- package/docs/tutorials/fairplay.md +2 -2
- package/docs/tutorials/index.json +2 -0
- package/docs/tutorials/widevine-service-certs.md +45 -0
- package/externs/ima.js +9 -0
- package/lib/ads/client_side_ad_manager.js +6 -3
- package/lib/hls/hls_parser.js +2 -0
- package/lib/media/drm_engine.js +4 -2
- package/lib/media/transmuxer.js +13 -7
- package/lib/media/video_wrapper.js +3 -3
- package/lib/offline/indexeddb/storage_mechanism.js +1 -1
- package/lib/player.js +3 -1
- package/lib/polyfill/media_capabilities.js +2 -8
- package/lib/polyfill/mediasource.js +24 -2
- package/lib/text/ui_text_displayer.js +1 -0
- package/lib/text/vtt_text_parser.js +4 -5
- package/lib/util/mime_utils.js +1 -1
- package/lib/util/stream_utils.js +26 -14
- package/package.json +1 -1
- package/test/polyfill/media_capabilities_unit.js +20 -22
- package/test/text/vtt_text_parser_unit.js +26 -2
- package/test/text/web_vtt_layout_integration.js +0 -3
|
@@ -15,7 +15,7 @@ ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
|
|
|
15
15
|
ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
16
|
function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
|
|
18
|
-
function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.
|
|
18
|
+
function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.hh=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
|
|
19
19
|
function sa(a,b){a.i={xe:b,Fe:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function A(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.xe;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
|
|
20
20
|
function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Fe?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function za(a,b){ra(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ba(a)}
|
|
21
21
|
function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Fe)throw b.xe;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
@@ -31,10 +31,10 @@ while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProp
|
|
|
31
31
|
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ja(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
32
32
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(p){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ja(k,
|
|
33
33
|
g)&&Ja(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ja(k,g)&&Ja(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
34
|
-
ea("Map",function(a){function b(){var h={};return h.Sa=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.Sa;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&&Ja(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,
|
|
35
|
-
list:m,index:-1,
|
|
36
|
-
"t"!=m.value[1]||!l.next().done?!1:!0}catch(p){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.
|
|
37
|
-
h.
|
|
34
|
+
ea("Map",function(a){function b(){var h={};return h.Sa=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.Sa;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&&Ja(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,ha:p}}return{id:l,
|
|
35
|
+
list:m,index:-1,ha:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
|
|
36
|
+
"t"!=m.value[1]||!l.next().done?!1:!0}catch(p){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ha?l.ha.value=k:(l.ha={next:this.g,Sa:this.g.Sa,head:this.g,key:h,value:k},l.list.push(l.ha),this.g.Sa.next=l.ha,this.g.Sa=l.ha,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.ha&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ha.Sa.next=h.ha.next,h.ha.next.Sa=h.ha.Sa,
|
|
37
|
+
h.ha.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Sa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ha};e.prototype.get=function(h){return(h=d(this,h).ha)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
|
|
38
38
|
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
|
|
39
39
|
ea("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
40
40
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
|
|
@@ -94,9 +94,9 @@ function Cc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004)
|
|
|
94
94
|
function Ec(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new N(2,2,2003);}
|
|
95
95
|
function Ic(a){if(window.TextEncoder&&!wc()){var b=new TextEncoder;return Gb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Gb(b)}function Jc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",Ac);Ac.resetFromCharCode=function(){Dc.g=void 0};Ac.toUTF16=Jc;Ac.toUTF8=Ic;Ac.fromBytesAutoDetect=Ec;Ac.fromUTF16=Cc;
|
|
96
96
|
Ac.fromUTF8=Bc;var Dc=new mc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Wa:65536};0<b.Wa;b={Wa:b.Wa},b.Wa/=2)if(a(b.Wa))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Wa)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Wa));return e}}(b);return null});function Kc(){}function Lc(a){a=Fb(a);a=Dc.value()(a);return btoa(a)}function Mc(a,b){b=void 0==b?!0:b;a=Lc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Nc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Oc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
97
|
-
function Pc(a){var b=Fb(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Qc(){for(var a=Ia.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Kc);Kc.concat=Qc;Kc.toHex=Pc;Kc.fromHex=Oc;Kc.fromBase64=Nc;Kc.toBase64=Mc;Kc.toStandardBase64=Lc;function Rc(){var a=this;this.o=Kb.get("muxjs")();this.
|
|
97
|
+
function Pc(a){var b=Fb(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Qc(){for(var a=Ia.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Kc);Kc.concat=Qc;Kc.toHex=Pc;Kc.fromHex=Oc;Kc.fromBase64=Nc;Kc.toBase64=Mc;Kc.toStandardBase64=Lc;function Rc(){var a=this;this.o=Kb.get("muxjs")();this.h=this.g=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.o&&(this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Qc(b.initSegment,b.data))}),this.g.on("done",function(){var b={data:Qc.apply(Kc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1}))}Rc.prototype.destroy=function(){this.g&&this.g.dispose();this.g=null;return Promise.resolve()};
|
|
98
98
|
function Sc(a,b){if(!Kb.get("muxjs")()||!Tc(a))return!1;if(b)return MediaSource.isTypeSupported(Uc(b,a));b=Uc("audio",a);a=Uc("video",a);return MediaSource.isTypeSupported(b)||MediaSource.isTypeSupported(a)}function Tc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
99
|
-
function Uc(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","audio"));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){var c="avc1.",d=a[1],e=Number(a[2]);c=("66"==d?c+"4200":"77"==d?c+"4d00":c+"6400")+(e>>4).toString(16);c+=(e&15).toString(16);b=b.replace(a[0],c)}return b}function Vc(a,b){a.l=!0;a.h=new lc;a.m=[];a.j=[];a.i=[];b=Fb(b);a.g.push(b);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Wc(){}function Xc(a,b){b&&(a+='; codecs="'+b+'"');return a}function Yc(a,b,c){
|
|
99
|
+
function Uc(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","audio"));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){var c="avc1.",d=a[1],e=Number(a[2]);c=("66"==d?c+"4200":"77"==d?c+"4d00":c+"6400")+(e>>4).toString(16);c+=(e&15).toString(16);b=b.replace(a[0],c)}return b}function Vc(a,b){a.l=!0;a.h=new lc;a.m=[];a.j=[];a.i=[];b=Fb(b);a.g.push(b);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Wc(){}function Xc(a,b){b&&(a+='; codecs="'+b+'"');return a}function Yc(a,b,c){b=Xc(a,b);if(Tc(b)){if(Kb.get("muxjs")())return Uc(c,b)}else if("video/mp2t"!=a&&"audio"==c)return b.replace("video","audio");return b}
|
|
100
100
|
function Zc(a){var b=$c(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
|
|
101
101
|
case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function ad(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function $c(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}M("shaka.util.MimeUtils",Wc);Wc.getFullType=Xc;
|
|
102
102
|
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function bd(a){this.j=null;this.i=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.B="";this.o=new Map}function cd(a){return dd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}bd.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
|
|
@@ -127,9 +127,9 @@ function Td(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return K(function(y){if(d=a.some(fu
|
|
|
127
127
|
function Xd(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=fc("video",g);f=Ud(f);g=fc("audio",g);g=Yc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Ud(f);f=Yc(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
128
128
|
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Vd(d.codecs),f=Yc(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
|
|
129
129
|
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),y=t.next();!y.done;y=t.next())n.add(y.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
130
|
-
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}
|
|
131
|
-
function Ud(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Qd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Yd(d,a.audio)||c&&a&&a.video&&!Yd(c,a.video)?!1:!0})}
|
|
132
|
-
function Sd(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;if(Zd.has(f)){l.A(5);break}g=$d.get(f);if(!g){Zd.set(f,!1);l.A(5);break}return u(l,ae(g),7);case 7:h=l.h,Zd.set(f,h);case 5:(k=Zd.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,A(l)}})}
|
|
130
|
+
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
|
|
131
|
+
function Vd(a){return tc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function Ud(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Qd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Yd(d,a.audio)||c&&a&&a.video&&!Yd(c,a.video)?!1:!0})}
|
|
132
|
+
function Rd(a){a.textStreams=a.textStreams.filter(function(b){return cd(Xc(b.mimeType,b.codecs))})}function Sd(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;if(Zd.has(f)){l.A(5);break}g=$d.get(f);if(!g){Zd.set(f,!1);l.A(5);break}return u(l,ae(g),7);case 7:h=l.h,Zd.set(f,h);case 5:(k=Zd.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,A(l)}})}
|
|
133
133
|
function ae(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function Yd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
134
134
|
function be(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=r(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=r(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
135
135
|
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,
|
|
@@ -162,9 +162,9 @@ function Te(a){return new Oe(Promise.all(a.map(function(b){return b.promise})),f
|
|
|
162
162
|
Oe.prototype.Z=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ue(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new lc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Oe(f,function(){return d()})};
|
|
163
163
|
function Ue(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",Oe);Oe.prototype.chain=Oe.prototype.Z;Oe.prototype["finally"]=Oe.prototype.finally;Oe.all=Te;Oe.prototype.abort=Oe.prototype.abort;Oe.notAbortable=Se;Oe.completed=Re;Oe.aborted=Qe;Oe.failed=Pe;function Q(a,b){if(b)if(b instanceof Map)for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
164
164
|
function Ve(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",Q);
|
|
165
|
-
var We={xg:"abrstatuschanged",yg:"adaptation",zg:"buffering",
|
|
166
|
-
|
|
167
|
-
R.prototype.release=function(){this.
|
|
165
|
+
var We={xg:"abrstatuschanged",yg:"adaptation",zg:"buffering",Ag:"downloadfailed",Bg:"downloadheadersreceived",Cg:"drmsessionupdate",Eg:"emsg",Error:"error",Fg:"expirationupdated",Gg:"gapjumped",Hg:"loaded",Ig:"loading",Kg:"manifestparsed",Lg:"mediaqualitychanged",Metadata:"metadata",Ng:"onstatechange",Og:"onstateidle",Pg:"ratechange",Rg:"sessiondata",Sg:"stalldetected",Tg:"streaming",Ug:"textchanged",Vg:"texttrackvisibility",Wg:"timelineregionadded",Xg:"timelineregionenter",Yg:"timelineregionexit",
|
|
166
|
+
Zg:"trackschanged",ah:"unloading",bh:"variantchanged"};function R(){this.ea=new xd;this.Rc=this}R.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};R.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};R.prototype.dispatchEvent=function(a){if(!this.ea)return!0;var b=this.ea.get(a.type)||[],c=this.ea.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Rc;a.currentTarget=this.Rc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
167
|
+
R.prototype.release=function(){this.ea=null};function Xe(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Ye(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ze(){this.g=[]}function $e(a,b){a.g.push(b.finally(function(){eb(a.g,b)}))}Ze.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function af(a,b,c){R.call(this);this.i=!1;this.m=new Ze;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa(af,R);q=af.prototype;q.ce=function(a){this.o=a};function bf(a,b,c,d){c=c||cf;var e=df[a];if(!e||c>=e.priority)df[a]={priority:c,Yf:b,Zf:void 0===d?!1:d}}q.$f=function(a){this.g.add(a)};q.qg=function(a){this.g.delete(a)};q.gf=function(){this.g.clear()};q.ag=function(a){this.h.add(a)};q.rg=function(a){this.h.delete(a)};q.hf=function(){this.h.clear()};
|
|
168
168
|
function ef(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();R.prototype.release.call(this);return this.m.destroy()};
|
|
169
169
|
q.request=function(a,b){var c=this,d=new ff;if(this.i){var e=Promise.reject(new N(2,7,7001));e.catch(function(){});return new gf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Xe(b.retryParameters):Me();b.uris=Xe(b.uris);e=hf(this,a,b);var f=e.Z(function(){return jf(c,a,b,new Le(b.retryParameters,!1),0,null,d)}),g=f.Z(function(p){return kf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
170
170
|
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.Nf||!c.l||t.fromCache||a!=lf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new gf(m.promise,function(){return m.abort()},d);$e(this.m,e);return e};
|
|
@@ -191,14 +191,14 @@ function Wf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
|
|
|
191
191
|
function Zf(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
192
192
|
function $f(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function ag(a){a=Number(a);return 0===a%1?a:null}function bg(a){a=Number(a);return 0===a%1&&0<a?a:null}function cg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function dg(a){a=Number(a);return isNaN(a)?null:a}function eg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
193
193
|
function fg(a,b){var c=new DOMParser,d=gg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function hg(a,b){try{var c=Bc(a);return fg(c,b)}catch(d){return null}}
|
|
194
|
-
var gg=new mc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function ig(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.
|
|
195
|
-
function lg(a){return K(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.ea.stop(),a.ea=null,a.T.stop(),a.T=null,u(b,mg(a),2);case 2:if(!a.l){b.A(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.u=null,a.B=[],a.h=null,a.m=function(){},a.D=null,a.Y=!1,a.F=null,A(b)}})}q.configure=function(a){this.h=a};function ng(a,b,c){a.
|
|
194
|
+
var gg=new mc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function ig(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.fa=this.ca=!1;this.I=0;this.g=null;this.s=new of;this.i=new Map;this.B=[];this.o=new lc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.ja=new Map;this.da=new Map;this.T=new O(function(){return jg(c)});this.M=!1;this.L=[];this.O=!1;this.ea=(new O(function(){kg(c)})).Fa(b);this.o.catch(function(){});this.j=new mf(function(){return lg(c)});this.Y=!1;this.F=null}q=ig.prototype;q.destroy=function(){return this.j.destroy()};
|
|
195
|
+
function lg(a){return K(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.ea.stop(),a.ea=null,a.T.stop(),a.T=null,u(b,mg(a),2);case 2:if(!a.l){b.A(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.u=null,a.B=[],a.h=null,a.m=function(){},a.D=null,a.Y=!1,a.F=null,A(b)}})}q.configure=function(a){this.h=a};function ng(a,b,c){a.fa=!0;a.B=[];a.M=c;return og(a,b)}
|
|
196
196
|
function pg(a,b,c){a.B=c;a.M=0<c.length;return og(a,b)}function qg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return rg(a,g,[])}
|
|
197
197
|
function og(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){if(1==v.g){if(c=sg(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=vf(a.h.servers),tg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=ug(l),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,vg(t,vf(a.h.servers),vf(a.h.advanced||{}),a.h.keySystemsMapping);
|
|
198
198
|
return u(v,Td(b,a.M,a.Y),2)}y=g||Object.keys(a.h.servers).length;if(!y)return a.ca=!0,v.return(Promise.resolve());x=rg(a,void 0,b);return v.return(g?x:x.catch(function(){}))})}function wg(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.F){c.A(2);break}return u(c,a.F,3);case 3:return nf(a.j),c.return();case 2:return C(c,4),a.F=a.l.setMediaKeys(a.u),u(c,a.F,6);case 6:va(c,5);break;case 4:b=F(c),a.m(new N(2,6,6003,b.message));case 5:nf(a.j),A(c)}})}
|
|
199
199
|
function xg(a,b){return K(function(c){if(1==c.g)return u(c,wg(a),2);yg(a,b.initDataType,Fb(b.initData));A(c)})}
|
|
200
|
-
q.Zb=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.u)return b.s.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),d.return();b.l=a;b.s.oa(b.l,"play",function(){for(var e=r(b.L),f=e.next();!f.done;f=e.next())zg(b,f.value);b.O=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return mg(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||"com.apple.fps"!==b.g.keySystem||b.B.length?
|
|
201
|
-
wg(b),2):d.A(2)}Ag(b);c||b.B.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(e){return xg(b,e)});A(d)})};
|
|
200
|
+
q.Zb=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.u)return b.s.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),d.return();b.l=a;b.s.oa(b.l,"play",function(){for(var e=r(b.L),f=e.next();!f.done;f=e.next())zg(b,f.value);b.O=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return mg(b)});return(c=b.g?b.g.initData.find(function(e){return 0<e.initData.length}):null)||"com.apple.fps"!==b.g.keySystem||b.B.length?
|
|
201
|
+
u(d,wg(b),2):d.A(2)}Ag(b);c||b.B.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(e){return xg(b,e)});A(d)})};
|
|
202
202
|
function Bg(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=ef([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.lb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=F(g),new N(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
203
203
|
C(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function Cg(a,b){var c,d,e;return K(function(f){if(1==f.g)return u(f,Dg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Ka=new lc,d.push(e.Ka);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);A(f)})}
|
|
204
204
|
function Ag(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,yg(a,d.initDataType,d.initData);c=r(a.B);for(d=c.next();!d.done;d=c.next())Dg(a,d.value);b.length||a.B.length||a.o.resolve();return a.o}function yg(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&!sc("Tizen 2"))return;0<a.i.size&&Eg(a)&&(a.o.resolve(),a.o=new lc,a.o.catch(function(){}));Fg(a,b,c,a.g.sessionType)}}
|
|
@@ -226,7 +226,7 @@ b.close().catch(function(){}));Eg(a)&&(a.o.resolve(),a.T.R(Og))}function jg(a){v
|
|
|
226
226
|
function Pg(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,p,
|
|
227
227
|
n;return K(function(t){switch(t.g){case 1:C(t,2);if("org.w3.clearkey"===l&&xc())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,sc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:F(t),f.set(l,null),A(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(wf(f))})}
|
|
228
228
|
function Qg(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).R(Rg)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);A(c)})}
|
|
229
|
-
function mg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return C(g,2),a.
|
|
229
|
+
function mg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return C(g,2),a.fa||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Qg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);A(g)})})),0)})}
|
|
230
230
|
function Sg(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=r(b),g=f.next();!g.done;e={Ga:e.Ga},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Ga=[];e.Ga=e.Ga.concat(d.initData||[]);e.Ga=e.Ga.concat(g.initData||[]);e.Ga=e.Ga.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Ga.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ia(d.keyIds),ia(g.keyIds))):
|
|
231
231
|
d.keyIds||g.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||g.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||g.persistentStateRequired,videoRobustness:d.videoRobustness||g.videoRobustness,audioRobustness:d.audioRobustness||g.audioRobustness,serverCertificate:d.serverCertificate||g.serverCertificate,serverCertificateUri:d.serverCertificateUri||g.serverCertificateUri,
|
|
232
232
|
initData:e.Ga,keyIds:f});break}}return c}function ug(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function kg(a){a.i.forEach(function(b,c){var d=b.Rd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Rd=e)})}function Eg(a){a=a.i.values();return uf(a,function(b){return b.loaded})}
|
|
@@ -260,7 +260,7 @@ f-1),kh(b,b.g,15-b.g),c.j=a);break;case 46:kh(c.l,0,15);break;case 47:b=null,c.h
|
|
|
260
260
|
function di(a,b){var c=[];try{for(;b.ma();){var d=Rh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Rh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Sh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=Rh(e),l=k.value,m=k.pts;if(16===l){var p=Rh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Kh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.B-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Lh(t,n,g.i));if(t.h+1>=t.F){n=t;for(var y=0,x=1;16>x;x++,
|
|
261
261
|
y++)n.i[y]=n.i[x];for(x=0;1>x;x++,y++)n.i[y]=Ih()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Lh(t,n,g.i));t.i[t.h]=Ih();t.g=0;break;case 12:t.isVisible()&&(e=Lh(t,n,g.i)),Hh(t),n=t,n.h=0,n.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=Th(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Jh(g.g,"\u266a"):Jh(g.g,
|
|
262
262
|
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Jh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Zh.has(e)){var w=Zh.get(e);Jh(g.g,w)}else Jh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Jh(g.g,"_"):Jh(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function ei(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function fi(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,ve:c,lf:d}}function gi(a,b){return{pe:1==b?a.Lb():a.N()}}function hi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
|
|
263
|
-
function ii(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Yd:null,sampleSize:null,ad:null};c&256&&(g.Yd=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.ad=0==b?a.N():a.Le());e.push(g)}return{
|
|
263
|
+
function ii(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Yd:null,sampleSize:null,ad:null};c&256&&(g.Yd=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.ad=0==b?a.N():a.Le());e.push(g)}return{gh:d,Ne:e}};function ji(){this.i=new Map;this.h=this.g=0}
|
|
264
264
|
ji.prototype.init=function(a){var b=this,c=[],d=[];(new Bf).box("moov",Ff).box("mvex",Ff).U("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",Ff).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",Ff).U("mdhd",function(e){e=hi(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
265
265
|
ji.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Bf).box("moof",Ff).box("traf",Ff).U("trun",function(k){f=ii(k.reader,k.version,k.flags).Ne}).U("tfhd",function(k){k=fi(k.reader,k.flags);d=k.ve||b.g;e=k.lf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=gi(k.reader,k.version).pe}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,p=d,n=e,t=f,y=0,x=n;for(t.length&&(x=t[0].sampleSize||n);k.ma();){var v=k.N();if(6==
|
|
266
266
|
(k.Ta()&31)){var w=0;t.length>y&&(w=t[y].ad||0);w=(l+w)/m;for(var D=[],z,B=k.$a(v-1),G=z=0;G<B.length;)2==z&&3==B[G]?(z=0,B=[].concat(ia(B)),B.splice(G,1),B=new Uint8Array(B)):0==B[G]?z++:z=0,G++;z=B;for(G=0;G<z.length;){for(B=0;255==z[G];)B+=255,G++;B+=z[G++];for(var E=0;255==z[G];)E+=255,G++;E+=z[G++];4==B&&D.push(z.subarray(G,G+E));G+=E}D=r(D);for(z=D.next();!z.done;z=D.next())c.push({Xf:z.value,pts:w})}else try{k.skip(v-1)}catch(H){break}x-=v+4;0==x&&(l=t.length>y?l+(t[y].Yd||p):l+p,y++,x=t.length>
|
|
@@ -270,7 +270,7 @@ function li(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){va
|
|
|
270
270
|
function oi(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){l=void 0===l?[]:l;t=void 0===t?pi:t;this.startTime=a;this.j=this.endTime=b;this.s=c;this.Ea=d;this.la=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.o=void 0===p?null:p;this.g=void 0===n?null:n;this.status=t;this.l=void 0===y?null:y;this.m=0}q=oi.prototype;q.Ba=function(){return this.s()};q.getStartTime=function(){return this.startTime};q.uf=function(){return this.endTime};
|
|
271
271
|
q.kc=function(){return this.Ea};q.fc=function(){return this.la};q.Kf=function(){return this.tilesLayout};q.Jf=function(){return this.o};q.Eb=function(){return this.status};q.Rf=function(){this.status=qi};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=r(this.h),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};q.he=function(a){null==this.g?Ua("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};
|
|
272
272
|
M("shaka.media.SegmentReference",oi);oi.prototype.syncAgainst=oi.prototype.he;oi.prototype.offset=oi.prototype.offset;oi.prototype.markAsUnavailable=oi.prototype.Rf;oi.prototype.getStatus=oi.prototype.Eb;oi.prototype.getTileDuration=oi.prototype.Jf;oi.prototype.getTilesLayout=oi.prototype.Kf;oi.prototype.getEndByte=oi.prototype.fc;oi.prototype.getStartByte=oi.prototype.kc;oi.prototype.getEndTime=oi.prototype.uf;oi.prototype.getStartTime=oi.prototype.getStartTime;oi.prototype.getUris=oi.prototype.Ba;
|
|
273
|
-
var pi=0,qi=1;oi.Status={wg:pi
|
|
273
|
+
var pi=0,qi=1;oi.Status={wg:pi,$g:qi,Jg:2};function ri(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function si(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ti(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
|
|
274
274
|
function ui(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(vi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}function wi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=vi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
|
|
275
275
|
function vi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function xi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.M={};this.L={};this.g=null;this.F=!1;this.T=d||function(){};this.i={};this.s=new of;this.o={};this.B=b;this.G=new lc;this.l=yi(this,this.G);this.D=new mf(function(){return zi(e)});this.I="";this.u=!1;this.O=new lc}function yi(a,b){var c=new MediaSource;a.s.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Ai(c);a.j.src=a.I;return c}q=xi.prototype;q.destroy=function(){return this.D.destroy()};
|
|
276
276
|
function zi(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p.catch(bc)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.o)b.push(a.o[k].destroy());return u(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.o={};a.B=null;a.i={};
|
|
@@ -295,7 +295,7 @@ T.prototype.setUserSeekStart=T.prototype.Se;T.prototype.getSegmentAvailabilitySt
|
|
|
295
295
|
T.prototype.setSegmentAvailabilityDuration=T.prototype.fe;T.prototype.setStatic=T.prototype.xc;T.prototype.setClockOffset=T.prototype.Re;T.prototype.getPresentationStartTime=T.prototype.Ff;T.prototype.setDuration=T.prototype.Da;T.prototype.getMaxSegmentDuration=T.prototype.Af;T.prototype.getDuration=T.prototype.getDuration;function Yi(a,b,c){this.l=c;this.j=a;this.s=Zi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}Yi.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function $i(a,b){a.i=b}function aj(a){this.g=a}function Zi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(vi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function bj(a,b,c,d,e){var f=this;this.o=e;this.g=a;this.s=b;this.D=c;this.i=new of;this.m=!1;this.B=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.C(a,"waiting",function(){return cj(f)});this.j=(new O(function(){cj(f)})).Fa(.25)}bj.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.s=this.o=null};bj.prototype.Sd=function(){this.l=!0;cj(this)};
|
|
296
296
|
function cj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.B&&(a.B=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Zi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=wi(c,b,a.D.gapDetectionThreshold),null==
|
|
297
297
|
d||0==d&&!a.l||(e=c.start(d),e>=a.s.Qa()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.u++,a.o(new Q("gapjumped")))))}}};function dj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ej.value().get(b),c.oa(a,b,d))}var ej=new mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function fj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new of;this.i=new gj(a);dj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){hj(d,d.j)})}fj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function ij(a){return a.m?a.g.currentTime:a.j}function jj(a,b){0<a.g.readyState?kj(a.i,b):dj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){hj(a,a.j)})}
|
|
298
|
-
function hj(a,b){.001>Math.abs(a.g.currentTime-b)?lj(a):(a.h.oa(a.g,"seeking",function(){lj(a)}),kj(a.i,0
|
|
298
|
+
function hj(a,b){.001>Math.abs(a.g.currentTime-b)?lj(a):(a.h.oa(a.g,"seeking",function(){lj(a)}),kj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function lj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()})}function gj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}gj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
299
299
|
function kj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Fa(.1)};function mj(a){this.g=a;this.j=!1;this.h=null;this.i=new of}q=mj.prototype;q.vd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.oa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;dj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.wd=function(a){this.h=this.j?this.h:a};q.Fc=function(){return(this.j?this.g.currentTime:this.h)||0};q.ne=function(){return 0};
|
|
300
300
|
q.me=function(){return 0};q.He=function(){};
|
|
301
301
|
function nj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=oj(a,c,f);this.j=new bj(a,b.presentationTimeline,c,this.o,f);this.h=new fj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=ij(g.h);h=pj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;jj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},qj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=ij(g.h),k=g.g.Db(),l=g.g.Qa();3>
|
|
@@ -343,7 +343,7 @@ f,e,g,h,k),4);case 4:nf(a.h),A(l)}})}function ok(a,b,c){var d,e,f,g;return K(fun
|
|
|
343
343
|
function lk(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=Lj(c.Ba(),c.Ea,c.la,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof mi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.lb.request(e,f),b.va=h,u(l,h.promise,2);k=l.h;b.va=null;return l.return(k.data)})}
|
|
344
344
|
function Zj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.bb=!1,b.ed=!1,b.Ic=0,b.bc=!0,b.ra=null,b.Uc=null,b.ba=null,d?(e=a.g.Pc(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,Ri(a.g.P,b.type),4);if(3!=g.g)return nf(a.h),c?u(g,a.g.P.flush(b.type),3):g.A(3);nf(a.h);b.bc=!1;b.endOfStream=!1;b.sa||b.La||Tj(a,b,0);A(g)})}
|
|
345
345
|
function Tj(a,b,c){var d=b.type;if(d!=jc||a.i.has(d))b.La=(new nc(function(){var e;return K(function(f){if(1==f.g)return C(f,2),u(f,ck(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);A(f)})})).R(c)}function Oj(a){null!=a.La&&(a.La.stop(),a.La=null)}function Pj(a){return K(function(b){return a.va?u(b,a.va.abort(),0):b.A(0)})}function ek(a,b){return K(function(c){if(1==c.g)return u(c,Ne(a.D),2);nf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);A(c)})};function pk(a,b){var c=qk(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return rk(d)});this.s=new mf(function(){return sk(d)})}pk.prototype.destroy=function(){return this.s.destroy()};function sk(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),tk(a),u(e,a.u,2);a.g&&a.g.Ja.nb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ja.nb();a.g=null;a.m=[];a.j=null;A(e)})}
|
|
346
|
-
function uk(a,b){var c={Jb:function(){},Wc:function(){},nb:function(){},onError:function(){},Yc:function(){},
|
|
346
|
+
function uk(a,b){var c={Jb:function(){},Wc:function(){},nb:function(){},onError:function(){},Yc:function(){},fh:function(){}};a.m.push({create:b,Ja:c});a.h&&a.h.abort();tk(a);return c}
|
|
347
347
|
function rk(a){return K(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.ib)var c=!1;else{a.g&&(a.g.Ja.nb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ja.Jb(),a.g={node:d.node,payload:d.payload,ib:d.ib,Ja:c.Ja}):c.Ja.Yc();c=!0}c?c=Promise.resolve():a.g?c=vk(a):(a.j.Uf(a.i),a.o=new lc,c=a.o);b=u(b,c,1)}return b})}
|
|
348
348
|
function vk(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.Cf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.mf(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ja.Wc(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ja.nb();else a.g.Ja.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function tk(a){a.o&&(a.o.resolve(),a.o=null)};function wk(a){var b=[],c=700<=a.fontWeight,d="italic"==a.fontStyle,e=a.textDecoration.includes("underline");c&&b.push("b");d&&b.push("i");e&&b.push("u");c=b.reduce(function(f,g){return f+"<"+g+">"},"");b=b.reduceRight(function(f,g){return f+"</"+g+">"},"");return a.lineBreak?"\n":a.nestedCues.length?a.nestedCues.map(wk).join(""):c+a.payload+b}
|
|
349
349
|
function xk(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.isContainer)xk(c.nestedCues,b);else{var d=c.clone();d.nestedCues=[];d.payload=wk(c);b.push(d)}return b};function yk(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=yk.prototype;q.remove=function(a,b){if(!this.g)return!1;zk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
@@ -358,7 +358,7 @@ function Gk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.
|
|
|
358
358
|
t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.sc?(c.appendChild(d.sc),d.sc.appendChild(d.xd)):c.appendChild(d.xd)}}function Ek(a,b){if(a.g){var c=a.B.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.o.values());for(var d=b.next();!d.done;d=b.next())Ck(d.value);Ck(a.g);a.h.clear();a.o.clear()}if(a.j){b=new Map;d=r(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));Gk(a,a.i,a.g,c,[])}}}
|
|
359
359
|
function Hk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Ik(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Ab?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Ab?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=document.createElement("span"),h=c.heightUnits==Ab?"%":"px",k=c.widthUnits==Ab?"%":"px",l=c.viewportAnchorUnits==Ab?"%":
|
|
360
360
|
"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(e,g);c=g}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=
|
|
361
|
-
b.backgroundColor,f.appendChild(e));a.h.set(b,{xd:f,We:e,sc:c})}
|
|
361
|
+
b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{xd:f,We:e,sc:c})}
|
|
362
362
|
function Ik(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Jk(c.linePadding,c,a.m);f.paddingRight=Jk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
|
|
363
363
|
"no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Kk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent=
|
|
364
364
|
"before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Jk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==mb?(f.width="100%",c.lineAlign==ob?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==ob?f.left=c.line+
|
|
@@ -372,7 +372,7 @@ function Qk(a){var b=a.type;if(a.init)return dl;if("video"==b)return a.codecs.in
|
|
|
372
372
|
function Wk(a,b){var c=a.h.Za();if(!c.length)return NaN;a=c[0];c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Rk:return a.videoBandwidth||NaN;case Sk:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
373
373
|
function al(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
374
374
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function cl(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=al(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
375
|
-
function bl(a,b){if(!b||a.includes("offline:"))return a;a=new Nb(a);a.g.set("CMCD",b);return a.toString()}var $k="m",Sk="a",Rk="v",Tk="av",dl="i",el="c",Uk="tt",Pk="v",Ok="l";M("shaka.util.CmcdManager.StreamingFormat",{
|
|
375
|
+
function bl(a,b){if(!b||a.includes("offline:"))return a;a=new Nb(a);a.g.set("CMCD",b);return a.toString()}var $k="m",Sk="a",Rk="v",Tk="av",dl="i",el="c",Uk="tt",Pk="v",Ok="l";M("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Qg:"s",Mg:"o"});function fl(){}
|
|
376
376
|
function gl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Xe(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Xe(l)),k=gl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
|
|
377
377
|
k),g=!1)}return g}function hl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function il(a,b){return a&&b}M("shaka.util.ConfigUtils",fl);fl.convertToConfigObject=hl;fl.mergeConfigObjects=gl;function jl(){}function kl(a){a=Ec(a);return(new Nb(a)).Ia}function ll(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Jc(b,!0):e=b;a=Ec(a);a=Jc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",jl);
|
|
378
378
|
jl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Bc(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Gb(Nc(c)))}};jl.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};jl.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
|
|
@@ -389,10 +389,10 @@ preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",prefe
|
|
|
389
389
|
sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h.return(ol(g,f.preferredAudioLanguage))})};return f}function pl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return gl(a,b,c||nl(),d,"")}
|
|
390
390
|
function ol(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=wd(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return md(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
|
|
391
391
|
2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=jc&&"image"!=d.type||b.push(d);return b}M("shaka.util.PlayerConfiguration",ml);ml.mergeConfigObjects=pl;ml.createDefault=nl;function ql(){this.g=null;this.h=[]}function rl(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function sl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
|
|
392
|
-
function tl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function ul(){this.i=this.h=null;this.g=[]}function vl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function wl(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.O=this.T=this.I=this.L=this.M=this.l=this.o=NaN;this.g=new ql;this.h=new ul};function U(a,b){R.call(this);var c=this;this.l=xl;this.Kc=this.g=null;this.
|
|
393
|
-
this.$b=this.h.preferForcedSubs;this.Yb=[];this.ec=null;b&&b(this);this.F=zl(this);this.F.ce(this.h.streaming.forceHTTPS);this.D=null;Al&&(this.D=Al());this.Sc.C(window,"online",function(){c.Xd()});this.O={name:"detach"};this.Y={name:"attach"};this.
|
|
394
|
-
function(e,f){return Se(Bl(c,e,f))});d.set(this.O,function(e){e.K&&(c.Ob.ob(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Se(e)});d.set(this.
|
|
395
|
-
d.set(this.yb,function(e,f){return Jl(c,e,f)});this.ya=new pk(this.O,{Cf:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Y);e==c.Y&&(k=g==c.O||f.K!=h.K?c.O:g==c.Y?c.Y:g==c.wb||g==c.ca?c.wb:g==c.yb?c.Td:null);e==c.wb&&(k=g==c.ca&&f.K==h.K?c.Qd:c.
|
|
392
|
+
function tl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function ul(){this.i=this.h=null;this.g=[]}function vl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function wl(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.O=this.T=this.I=this.L=this.M=this.l=this.o=NaN;this.g=new ql;this.h=new ul};function U(a,b){R.call(this);var c=this;this.l=xl;this.Kc=this.g=null;this.da=!1;this.Sc=new of;this.Ob=new of;this.s=new of;this.Dd=this.u=this.Xb=this.i=this.Tc=this.I=this.j=this.ja=this.T=this.xa=this.M=this.Lc=this.G=this.xb=this.B=this.L=this.m=this.F=null;this.Ke=1E9;this.h=yl(this);this.dc={width:Infinity,height:Infinity};this.o=null;this.Ma=new De(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.vb=this.h.preferredTextLanguage;this.ac=this.h.preferredTextRole;
|
|
393
|
+
this.$b=this.h.preferForcedSubs;this.Yb=[];this.ec=null;b&&b(this);this.F=zl(this);this.F.ce(this.h.streaming.forceHTTPS);this.D=null;Al&&(this.D=Al());this.Sc.C(window,"online",function(){c.Xd()});this.O={name:"detach"};this.Y={name:"attach"};this.fa={name:"unload"};this.Qd={name:"manifest-parser"};this.Md={name:"manifest"};this.wb={name:"media-source"};this.Ed={name:"drm-engine"};this.ca={name:"load"};this.Td={name:"src-equals-drm-engine"};this.yb={name:"src-equals"};var d=new Map;d.set(this.Y,
|
|
394
|
+
function(e,f){return Se(Bl(c,e,f))});d.set(this.O,function(e){e.K&&(c.Ob.ob(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Se(e)});d.set(this.fa,function(e){return Se(Cl(c,e))});d.set(this.wb,function(e){e=Dl(c,e);return Se(e)});d.set(this.Qd,function(e,f){e=El(c,e,f);return Se(e)});d.set(this.Md,function(e){return Fl(c,e)});d.set(this.Ed,function(e){e=Gl(c,e);return Se(e)});d.set(this.ca,function(e,f){return Se(Hl(c,e,f))});d.set(this.Td,function(e,f){e=Il(c,e,f);return Se(e)});
|
|
395
|
+
d.set(this.yb,function(e,f){return Jl(c,e,f)});this.ya=new pk(this.O,{Cf:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Y);e==c.Y&&(k=g==c.O||f.K!=h.K?c.O:g==c.Y?c.Y:g==c.wb||g==c.ca?c.wb:g==c.yb?c.Td:null);e==c.wb&&(k=g==c.ca&&f.K==h.K?c.Qd:c.fa);e==c.Qd&&(k=Kl(c.ca,c.Md,c.fa,g,f,h));e==c.Md&&(k=Kl(c.ca,c.Ed,c.fa,g,f,h));e==c.Ed&&(k=Kl(c.ca,c.ca,c.fa,g,f,h));e==c.Td&&(k=g==c.yb&&f.K==h.K?c.yb:c.fa);if(e==c.ca||e==c.yb)k=c.fa;e==c.fa&&(k=h.K&&f.K==h.K?c.Y:c.O);return k},mf:function(e,f,g){c.dispatchEvent(Ll("onstatechange",
|
|
396
396
|
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?u(f,Cl(c,e),2):f.return(e.K?c.Y:c.O)})},Uf:function(e){c.dispatchEvent(Ll("onstateidle",(new Map).set("state",e.name)))}});this.Je=new O(function(){Nd(c.i.variants,c.h.restrictions,c.dc)&&Ml(c)});a&&this.Zb(a,!0)}pa(U,R);function Ll(a,b){return new Q(a,b)}q=U.prototype;
|
|
397
397
|
q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Nl)return c.return();a.l=Nl;b=uk(a.ya,function(){return{node:a.O,payload:qk(),ib:!1}});return u(c,new Promise(function(d){b.Jb=function(){};b.Wc=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.Yc=function(){d()}}),2);case 2:return u(c,a.ya.destroy(),3);case 3:a.Sc&&(a.Sc.release(),a.Sc=null);a.Ob&&(a.Ob.release(),a.Ob=null);a.s&&(a.s.release(),a.s=null);a.Dd=null;a.u=null;a.h=null;a.o=null;a.Kc=null;
|
|
398
398
|
a.T=null;if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:R.prototype.release.call(a),A(c)}})};q.Zb=function(a,b){b=void 0===b?!0:b;if(this.l==Nl)return Promise.reject(Ol());var c=qk();c.K=a;oc()||(b=!1);var d=b?this.wb:this.Y;a=uk(this.ya,function(){return{node:d,payload:c,ib:!1}});a.Jb=function(){};return Pl(a)};q.detach=function(){var a=this;if(this.l==Nl)return Promise.reject(Ol());var b=uk(this.ya,function(){return{node:a.O,payload:qk(),ib:!1}});b.Jb=function(){};return Pl(b)};
|
|
@@ -412,15 +412,15 @@ function Gl(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=
|
|
|
412
412
|
function Hl(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y;return K(function(x){switch(x.g){case 1:b.startTime=c.startTime;null!=a.ec&&(b.startTime=a.ec,a.ec=null);d=b.K;e=b.uri;a.Xb=e;a.G=new xj({Qc:function(){return d.playbackRate},Mc:function(){return d.defaultPlaybackRate},ee:function(v){d.playbackRate=v},Ge:function(v){d.currentTime+=v}});f=function(){return em(a)};g=function(){return fm(a)};a.s.C(d,"playing",f);a.s.C(d,"pause",f);a.s.C(d,"ended",f);a.s.C(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.Dd==h||
|
|
413
413
|
(a.Dd=h,a.u=h(),"function"!=typeof a.u.setMediaElement&&(ue(),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.Ma=new De(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.vb=a.h.preferredTextLanguage;a.ac=a.h.preferredTextRole;a.$b=a.h.preferForcedSubs;gm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(v,w,D){a.j&&v!=a.j.l&&hm(a,v,!0,void 0===w?!1:w,void 0===D?0:D)});a.u.setMediaElement(d);a.B=im(a,b.startTime);a.xb=jm(a);
|
|
414
414
|
k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);km(a,k);zd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=lm(a);a.j.configure(a.h.streaming);a.l=mm;d.textTracks&&a.s.C(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":nm(a,v)}});a.dispatchEvent(Ll("streaming"));l=null;if(m=a.Za().find(function(v){return v.active})){x.A(2);break}l=Ml(a);hm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.A(3);
|
|
415
|
-
break}p=a.B.Fc();return u(x,om(l,p),4);case 4:n=x.h,a.B.wd(n);case 3:pm(a,null,be(l));case 2:return a.B.vd(),t=a.Fb().find(function(v){return v.active}),t||((y=le(a.i.textStreams,a.vb,a.ac,a.$b)[0]||null)&&vl(a.o.h,y,!0),l&&(y?(l.audio&&qm(a,l.audio,y)&&(a.
|
|
415
|
+
break}p=a.B.Fc();return u(x,om(l,p),4);case 4:n=x.h,a.B.wd(n);case 3:pm(a,null,be(l));case 2:return a.B.vd(),t=a.Fb().find(function(v){return v.active}),t||((y=le(a.i.textStreams,a.vb,a.ac,a.$b)[0]||null)&&vl(a.o.h,y,!0),l&&(y?(l.audio&&qm(a,l.audio,y)&&(a.da=!0),a.da&&a.L.m.setTextVisibility(!0),rm(a)):a.da=!1),y&&(a.h.streaming.alwaysStreamText||a.Cd())&&Yj(a.j,y)),u(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),sm(a)),Qd(a.j?a.j.l:null,a.i),tm(a.i),um(a),vm(a),a.i.variants.some(function(v){return v.primary}),
|
|
416
416
|
a.s.oa(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.ge}),A(x)}})}
|
|
417
417
|
function Il(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=kc,e=Date.now()/1E3,f=!0,a.m=bm(a,{lb:a.F,onError:function(p){Ul(a,p)},Xc:function(p){cm(a,p)},onExpirationUpdated:function(p,n){dm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Xg(g),k=Sl[h],"application/x-mpegurl"==k&&vc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
|
|
418
418
|
primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?ad(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ta,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
419
419
|
a.m.Y=!0,u(m,pg(a.m,[l],[]),2)):u(m,a.m.Zb(b.K),0)})}
|
|
420
420
|
function Jl(a,b,c){function d(){return em(a)}b.uri=c.uri;b.startTime=c.startTime;a.Xb=b.uri;var e=b.K;a.B=new mj(e);var f=!1;a.Yb.push(function(){f=!0});null!=b.startTime&&a.B.wd(b.startTime);a.G=new xj({Qc:function(){return e.playbackRate},Mc:function(){return e.defaultPlaybackRate},ee:function(k){e.playbackRate=k},Ge:function(k){e.currentTime+=k}});km(a,a.h.streaming.rebufferingGoal);a.s.C(e,"playing",d);a.s.C(e,"pause",d);a.s.C(e,"ended",d);a.s.C(e,"ratechange",function(){return fm(a)});"none"!=
|
|
421
421
|
e.preload&&a.s.oa(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.ge});e.audioTracks&&(a.s.C(e.audioTracks,"addtrack",function(){return um(a)}),a.s.C(e.audioTracks,"removetrack",function(){return um(a)}),a.s.C(e.audioTracks,"change",function(){return um(a)}));e.textTracks&&(a.s.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":wm(a,k);break;case "chapters":nm(a,k);break;default:um(a)}}),a.s.C(e.textTracks,"removetrack",function(){return um(a)}),a.s.C(e.textTracks,
|
|
422
|
-
"change",function(){return um(a)}));var g=Xg(b.uri);e.src=Yk(a.T,b.uri,Sl[g]);(tc()||sc("Web0S"))&&e.load();a.l=xm;a.dispatchEvent(Ll("streaming"));var h=new lc;dj(e,HTMLMediaElement.HAVE_METADATA,a.s,function(){a.B.vd();h.resolve()});dj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var k;return K(function(l){if(1==l.g)return ym(a),k=zm(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.s.oa(e.textTracks,"change",m);(new O(m)).R(1)}),
|
|
423
|
-
Am(a);A(l)})});e.error?h.reject(Tl(a)):"none"==e.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.s.oa(e,"error",function(){h.reject(Tl(a))});return new Oe(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
|
|
422
|
+
"change",function(){return um(a)}));var g=Xg(b.uri);e.src=Yk(a.T,b.uri,Sl[g]);(tc()||sc("Web0S"))&&e.load();a.l=xm;a.dispatchEvent(Ll("streaming"));var h=new lc;dj(e,HTMLMediaElement.HAVE_METADATA,a.s,function(){a.B.vd();h.resolve()});dj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var k;return K(function(l){if(1==l.g)return ym(a),k=zm(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.da=!0),l.A(2)):u(l,new Promise(function(m){a.s.oa(e.textTracks,"change",m);(new O(m)).R(1)}),
|
|
423
|
+
2);if(f)return l.return();Am(a);A(l)})});e.error?h.reject(Tl(a)):"none"==e.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.s.oa(e,"error",function(){h.reject(Tl(a))});return new Oe(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
|
|
424
424
|
function ym(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.$d(b);var c=a.h.preferredVariantRole;""!=c&&a.$d(b,c)}}function Am(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.ae(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.ae(b,d,c)}}
|
|
425
425
|
function wm(a,b){if("metadata"==b.kind){b.mode="hidden";a.s.C(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Xl(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Bm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Nb().R(.5);a.Yb.push(function(){c.stop()})}}
|
|
426
426
|
function Xl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Ll("metadata",b))}function nm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Nb().R(.5);a.Yb.push(function(){c.stop()})}}function am(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function bm(a,b){return new ig(b,a.h.drm.updateExpirationTime)}
|
|
@@ -442,16 +442,16 @@ q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.va
|
|
|
442
442
|
q.Fb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ce(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 ge(f)}):[]};q.vf=function(){return this.i?this.i.imageStreams.map(function(a){return de(a)}):[]};
|
|
443
443
|
q.If=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B;return K(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.A(3):u(G,d.createSegmentIndex(),3):G.return(null):G.A(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;y=m*p;x=f.j-
|
|
444
444
|
f.startTime;v=f.o||x/y;w=f.startTime;z=D=0;1<y&&(B=Math.floor((b-f.startTime)/v),w=f.startTime+B*v,D=B%m*n,z=Math.floor(B/m)*t);return G.return({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:z,startTime:w,duration:v,uris:f.Ba(),width:n})}return G.return(null)})};
|
|
445
|
-
q.Oe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(vl(this.o.h,b,!1),Yj(this.j,b),Gm(this),this.vb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ee(c)==a.id?c.mode=this.
|
|
445
|
+
q.Oe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(vl(this.o.h,b,!1),Yj(this.j,b),Gm(this),this.vb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ee(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";Gm(this)}};
|
|
446
446
|
q.Pe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&je(d)&&(hm(this,d,!1,b,c),this.Ma=new Ce(d),vm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
447
447
|
ee(c)==a.id){Hm(this,c);break}};q.pf=function(){return Im(this.Za())};q.Hf=function(){return Im(this.Fb())};q.nf=function(){return Array.from(Jm(this.Za()))};q.Gf=function(){return Array.from(Jm(this.Fb()))};
|
|
448
448
|
q.$d=function(a,b){if(this.i&&this.B){this.Ma=new De(a,b||"",0,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var c=this.Ma.create(this.i.variants),d=null;c=r(c.values());for(var e=c.next();!e.done;e=c.next())if(e=e.value,!d||b(d,a)>b(e,a))d=e;d?(b=be(d),this.Pe(b,!0)):Fm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);a=md(a);c=d=null;e=
|
|
449
449
|
r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=ie(f);md(g.language)==a&&(d=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Hm(this,c):d&&Hm(this,d)}};
|
|
450
450
|
q.ae=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.vb=a,this.ac=b||"",this.$b=c,(a=le(this.i.textStreams,this.vb,this.ac,this.$b)[0]||null)&&a!=this.j.o&&(vl(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Cd()))Yj(this.j,a),Gm(this)}else{var d=md(a);(a=this.Fb().find(function(e){return md(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Oe(a)}};
|
|
451
|
-
q.hg=function(a){if(this.i&&this.B){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ma=new De(b.language,"",0,a),Fm(this))}};q.Cd=function(){var a=this.
|
|
451
|
+
q.hg=function(a){if(this.i&&this.B){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ma=new De(b.language,"",0,a),Fm(this))}};q.Cd=function(){var a=this.da;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?zm(this).some(function(b){return"showing"==b.mode}):a};q.Ae=function(){return this.g&&this.g.src&&this.g.textTracks?Km(this).map(function(a){return ge(a)}):[]};
|
|
452
452
|
q.rf=function(a){var b=md(a),c=Km(this).filter(function(h){return md(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};
|
|
453
453
|
function zm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Bm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Km(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
454
|
-
q.ng=function(a){a=!!a;if(this.
|
|
454
|
+
q.ng=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==mm)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=le(this.i.textStreams,this.vb,this.ac,this.$b),0<a.length&&(Yj(this.j,a[0]),Gm(this))):Uj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}rm(this)}};
|
|
455
455
|
q.Ef=function(){if(!this.W())return null;var a=this.ya.l,b=0;if(this.B)b=this.B.Fc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
456
456
|
q.Be=function(){if(!this.W())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.Pa=function(){if(this.l==mm)return this.L.Pa();var a={total:[],audio:[],video:[],text:[]};this.l==xm&&(a.total=vi(this.g.buffered));return a};
|
|
457
457
|
q.getStats=function(){if(this.l!=mm&&this.l!=xm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};em(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
|
|
@@ -496,15 +496,15 @@ U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h
|
|
|
496
496
|
oc()?!!Yg[n]:pc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ia(Xi));
|
|
497
497
|
k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=oc()?cd(l)?!0:MediaSource.isTypeSupported(l)||Sc(l):pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Wm;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
498
498
|
U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||sc("Trident/"))return!1;var a=xc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:oc()?!0:pc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Al=a};
|
|
499
|
-
U.registerSupportPlugin=function(a,b){Wm[a]=b};U.prototype.destroy=U.prototype.destroy;var Nl=0,xl=1,mm=2,xm=3;U.LoadMode={DESTROYED:Nl,NOT_LOADED:xl,MEDIA_SOURCE:mm,SRC_EQUALS:xm};U.version="v4.2.
|
|
499
|
+
U.registerSupportPlugin=function(a,b){Wm[a]=b};U.prototype.destroy=U.prototype.destroy;var Nl=0,xl=1,mm=2,xm=3;U.LoadMode={DESTROYED:Nl,NOT_LOADED:xl,MEDIA_SOURCE:mm,SRC_EQUALS:xm};U.version="v4.2.9";var Xm=["4","2"];ve=new function(a){this.g=a;this.i=we;this.h=xe}(new te(Number(Xm[0]),Number(Xm[1])));
|
|
500
500
|
var Vm=["output-restricted","internal-error"],Wm={},Al=null,Sl={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Pm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
501
501
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function Ym(){this.h=[];this.j=this.i=this.g=0};function V(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new of;this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=V.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
502
502
|
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()};
|
|
503
503
|
q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
504
504
|
q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};M("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;
|
|
505
505
|
V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;
|
|
506
|
-
V.prototype.getDuration=V.prototype.getDuration;function Zm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new of;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.2.
|
|
507
|
-
function(f){an(e,f)});this.i
|
|
506
|
+
V.prototype.getDuration=V.prototype.getDuration;function Zm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new of;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.2.9");this.g=null;this.h.oa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){$m(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
507
|
+
function(f){an(e,f)});this.h.C(this.i,"ended",function(){e.m.contentComplete()})}Zm.prototype.stop=function(){this.g&&this.g.stop();this.o&&Ck(this.o)};Zm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function an(a,b){b.getError();bn(a,null);a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
508
508
|
function $m(a,b){a.l(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",b)))}cn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,dn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
|
|
509
509
|
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,dn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,dn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,dn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
|
|
510
510
|
{once:!0})}catch(e){bn(a,null)}}function dn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
@@ -512,8 +512,8 @@ function cn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new Q(d,c)
|
|
|
512
512
|
function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){bn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){bn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
513
513
|
a.h.C(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.C(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.C(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.C(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.C(a.g,
|
|
514
514
|
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.C(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.C(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.C(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.C(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.C(a.g,google.ima.AdEvent.Type.AD_METADATA,
|
|
515
|
-
function(c){b(c,"ad-metadata")});a.h.C(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
516
|
-
function bn(a,b){a.l(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}q=W.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
515
|
+
function(c){b(c,"ad-metadata")});a.h.C(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
516
|
+
function en(a,b){var c=b.getAd();a.j=new V(c,a.g,a.i);b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new Q("ad-started",b));a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.muted?0:a.i.volume))}function bn(a,b){a.l(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}q=W.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
517
517
|
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
518
518
|
q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;
|
|
519
519
|
W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;
|
|
@@ -525,8 +525,8 @@ f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}fn.prototyp
|
|
|
525
525
|
function gn(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.F||a.h.C(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function X(){R.call(this);this.g=this.i=null;this.h=new Ym;this.j=navigator.language}pa(X,R);q=X.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new Zm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
526
526
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);R.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new Ym};q.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
|
|
527
527
|
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new fn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
528
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.2.
|
|
529
|
-
(c.F=!0),c.j=new lc,c.g.requestStream(a),c.B=b||"",c.G=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.2.
|
|
528
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.2.9";c=this.g;c.j?a=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
529
|
+
(c.F=!0),c.j=new lc,c.g.requestStream(a),c.B=b||"",c.G=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.2.9";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
|
|
530
530
|
q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",X);
|
|
531
531
|
X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
|
|
532
532
|
X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
|
|
@@ -536,13 +536,13 @@ TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(vi(c))
|
|
|
536
536
|
function jn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=kn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
537
537
|
function kn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
538
538
|
var ln="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),mn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),nn=["loop","playbackRate"],on=["pause","play"],pn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
539
|
-
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},qn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},
|
|
539
|
+
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},qn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},rn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},un=[["getConfiguration","configure"]],vn=[["isTextTrackVisible","setTextTrackVisibility"]],wn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
540
540
|
xn=["attach","detach","load","unload"];function yn(a,b,c,d,e,f,g){var h=this;this.G=a;this.O=g;this.j=new O(b);this.T=c;this.u=!1;this.s=d;this.F=e;this.L=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return zn(h)};this.D=function(k,l){k=jn(l);switch(k.type){case "event":var m=k.targetName,p=Ve(k.event);h.s(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.u&&(h.T(),h.u=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new N(n.severity,n.category,
|
|
541
541
|
n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;An.add(this)}q=yn.prototype;q.destroy=function(){An.delete(this);Bn(this);Cn&&Dn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};q.ua=function(){return this.h};q.Vd=function(){return this.M};
|
|
542
542
|
q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Nb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.O,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(An),d=c.next();!d.done;d=c.next())En(d.value,b)},function(b){for(var c=r(An),d=c.next();!d.done;d=c.next())d=d.value,Fn="available"==b,d.j.Nb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Fn&&this.j.R(Gn);(a=Cn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
543
543
|
En(this,a):Cn=null}else window.__onGCastApiAvailable!==Hn&&(In=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Hn)};q.be=function(a){this.o=a;this.h&&Jn(this,{type:"appData",appData:this.o})};q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!Fn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new lc;chrome.cast.requestSession(function(d){return Kn(b,a,d)},function(d){return Ln(b,d)});return u(c,b.l,0)})};
|
|
544
544
|
function Mn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return Kn(a,b,c)},function(c){return Ln(a,c)})}}q.Ab=function(){if(this.h){Bn(this);if(Cn){Dn(this);try{Cn.stop(function(){},function(){})}catch(a){}Cn=null}zn(this)}};
|
|
545
|
-
q.get=function(a,b){var c=this;if("video"==a){if(on.includes(b))return function(){return c.Me.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))}}else if("player"==a){if(
|
|
545
|
+
q.get=function(a,b){var c=this;if("video"==a){if(on.includes(b))return function(){return c.Me.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))}}else if("player"==a){if(rn[b]&&!this.get("player","isLive")())return function(){};if(wn.includes(b))return function(){return c.Me.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(xn.includes(b))return function(){return c.cg.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(pn[b]||qn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
546
546
|
q.set=function(a,b,c){this.g[a][b]=c;Jn(this,{type:"set",targetName:a,property:b,value:c})};function Kn(a,b,c){Cn=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);zn(a);Jn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Ln(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
|
|
547
547
|
q.Me=function(a,b){Jn(this,{type:"call",targetName:a,methodName:b,args:Ia.apply(2,arguments)})};q.cg=function(a,b){var c=Ia.apply(2,arguments),d=new lc,e=this.I.toString();this.I++;this.i[e]=d;try{Jn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function En(a,b){var c=a.L();a.l=new lc;a.u=!0;Kn(a,c,b)}function Dn(a){var b=Cn;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
|
|
548
548
|
function zn(a){var b=Cn?"connected"==Cn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Bn(a)}a.h=b;a.M=b?Cn.receiver.friendlyName:"";a.j.Nb()}function Bn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function Jn(a,b){b=hn(b);var c=Cn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new N(2,8,8005,d),c=new Q("error",(new Map).set("detail",b)),a.s("player",c),a.Ab(),b;}}var Gn=.02,Fn=!1,Cn=null,In=null,An=new Set;
|
|
@@ -570,7 +570,7 @@ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=func
|
|
|
570
570
|
function go(a){var b;K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new Q("caststatuschanged");a.dispatchEvent(b);io(a)||jo(a);A(c)})}
|
|
571
571
|
function ko(a,b,c){var d,e,f,g,h,k,l,m,p,n;K(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,C(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=F(t),h=(new Map).set("detail",g),k=new Q("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
|
|
572
572
|
a.g.autoplay=f;b.manifest&&(a.g.play(),jo(a));A(t)}})}function fo(a,b,c){a.h&&(Zn(a),bo(a,{type:"event",targetName:b,event:c},a.l))}
|
|
573
|
-
function Zn(a){a.G.R(lo);for(var b={video:{},player:{}},c=r(mn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.W())for(var e in
|
|
573
|
+
function Zn(a){a.G.R(lo);for(var b={video:{},player:{}},c=r(mn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.W())for(var e in rn)0==a.m%rn[e]&&(b.player[e]=a.h[e]());for(var f in pn)0==a.m%pn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;bo(a,{type:"update",update:b},a.l);for(var g in qn)0==a.m%qn[g]&&(b={player:{}},b.player[g]=a.h[g](),bo(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
574
574
|
1);io(a)}function io(a){return a.u&&(a.g.duration||a.h.W())?(mo(a),a.u=!1,!0):!1}function mo(a,b){var c={contentId:a.h.yd(),streamType:a.h.W()?"LIVE":"BUFFERED",contentType:""};a.h.W()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);jo(a,void 0===b?0:b,c)}
|
|
575
575
|
function eo(a,b){var c=jn(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.u=!0;ko(a,c.initState,c.appData);Zn(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
576
576
|
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.I[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return no(a,g,f,null)},function(h){return no(a,g,f,h)})}}
|
|
@@ -578,7 +578,7 @@ function co(a,b){var c=jn(b.data);switch(c.type){case "PLAY":a.g.play();jo(a);br
|
|
|
578
578
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||jo(a);break;case "LOAD":a.m=0;a.B=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.L(b.contentId);f=c.autoplay||!0;a.D(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&mo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");bo(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:bo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
579
579
|
function no(a,b,c,d){a.h&&bo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function bo(a,b,c,d){a.F&&(a=hn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function jo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?oo:a.h.zd()?po:a.g.paused?qo:ro,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);bo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
580
580
|
M("shaka.cast.CastReceiver",Yn);Yn.prototype.destroy=Yn.prototype.destroy;Yn.prototype.setContentArtist=Yn.prototype.ig;Yn.prototype.setContentImage=Yn.prototype.jg;Yn.prototype.setContentTitle=Yn.prototype.lg;Yn.prototype.clearContentMetadata=Yn.prototype.jf;Yn.prototype.setContentMetadata=Yn.prototype.kg;Yn.prototype.isIdle=Yn.prototype.Pf;Yn.prototype.isConnected=Yn.prototype.isConnected;var lo=.5,ho=5,oo="IDLE",ro="PLAYING",po="BUFFERING",qo="PAUSED";function so(a,b,c){var d=to(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g.delete(null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Zd?(e=h.init||e,!1):!0}),f.length&&(a=uo(e,f,c,g),0==a.length&&(a=[ec("",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(ec(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
|
|
581
|
-
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ue:g,
|
|
581
|
+
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ue:g,dh:e,drmInfos:a,ye:!0}}function vo(a,b,c,d){var e=so(a,c,d);if(b.ye){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.ye=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.ue||b.ue}
|
|
582
582
|
function wo(a){var b=0,c=Ib(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=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
583
583
|
function xo(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function yo(a){a=Qf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Nc(a.textContent);a=wo(a).filter(function(b){return b.type===zo})[0];if(!a)return"";a=Cc(a.value,!0);return(a=fg(a,"WRMHEADER"))?xo(a):""}
|
|
584
584
|
function uo(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Zd];if(g){var h;if(h=Qf(f.node,"urn:microsoft:playready","pro")){h=Nc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Lf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Zd)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
|
|
@@ -587,8 +587,8 @@ function Bo(a){var b=a.getAttribute("schemeIdUri"),c=Tf(a,"urn:mpeg:cenc:2013","
|
|
|
587
587
|
var zo=1,Ao=(new Map).set("com.widevine.alpha",function(a){return(a=Qf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",yo).set("com.microsoft.playready.recommendation",yo).set("com.microsoft.playready.software",yo).set("com.microsoft.playready.hardware",yo).set("org.w3.clearkey",function(a){return(a=Qf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Co(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
|
|
588
588
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
589
589
|
function Do(a,b){var c=Eo(a,b,"timescale"),d=1;c&&(d=bg(c)||1);var e=Eo(a,b,"duration");c=bg(e||"");"image"==a.H.contentType&&(c=dg(e||""));c&&(c/=d);var f=Eo(a,b,"startNumber");e=Number(Eo(a,b,"presentationTimeOffset"))||0;var g=cg(f||"");if(null==f||null==g)g=1;f=Fo(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.V.duration||Infinity;f=Nf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=Xf(m,"t",cg),t=Xf(m,"d",cg);m=Xf(m,"r",ag);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
|
|
590
|
-
m)if(p){p=Xf(p,"t",cg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,sg:n}),n=k}b=h}return{timescale:d,
|
|
591
|
-
function Fo(a,b,c){return[b(a.H),b(a.
|
|
590
|
+
m)if(p){p=Xf(p,"t",cg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,sg:n}),n=k}b=h}return{timescale:d,ia:c,Mb:g,Ua:e/d||0,le:e,timeline:b}}function Eo(a,b,c){return[b(a.H),b(a.ga),b(a.aa)].filter(cc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
591
|
+
function Fo(a,b,c){return[b(a.H),b(a.ga),b(a.aa)].filter(cc).map(function(d){return Mf(d,c)}).reduce(function(d,e){return d||e})}
|
|
592
592
|
function Go(a,b,c,d,e,f){for(var g=Tf(a,"http://www.w3.org/1999/xlink","href"),h=Tf(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 Pe(new N(2,4,4028));if("onLoad"!=h)return Pe(new N(2,4,4027));var m=dc([d],[g]);return e.request(0,ef(m,b)).Z(function(p){p=hg(p.data,a.tagName);if(!p)return Pe(new N(2,4,4001,g));
|
|
593
593
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return Ho(a,b,c,m[0],e,f+1)})}
|
|
594
594
|
function Ho(a,b,c,d,e,f){f=void 0===f?0:f;if(Tf(a,"http://www.w3.org/1999/xlink","href")){var g=Go(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return Ho(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Tf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Ho(k,b,c,d,e,f)));return Te(g).Z(function(){return a})};function Io(a,b,c,d,e,f,g){var h,k=(new Bf).U("sidx",function(l){h=Jo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
|
|
@@ -601,13 +601,13 @@ function Uo(a,b){var c=Number(Eo(a,Vo,"presentationTimeOffset"))||0,d=Eo(a,Vo,"t
|
|
|
601
601
|
function Yo(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,D,z,B,G;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Oa||!a.V.Bd,l=a.V.start,m=a.V.duration,p=a.H.mimeType.split("/")[1],n=b,t=null,y=[n(d,e,f),"webm"==p?n(c.Ba(),c.Ea,c.la):null],n=null,u(E,Promise.all(y),2);x=E.h;v=x[0];w=x[1]||null;D=null;z=l-g;B=l;G=m?l+m:Infinity;if("mp4"==p)var H=Io(v,e,d,c,z,B,G);else{H=new Ko(w);if(440786851!=Lo(H).id)throw new N(2,3,3008);var I=Lo(H);if(408125543!=I.id)throw new N(2,3,3009);H=I.g.byteOffset;
|
|
602
602
|
I=new Ko(I.g);for(var J=null;I.ma();){var L=Lo(I);if(357149030==L.id){J=L;break}}if(!J)throw new N(2,3,3010);J=new Ko(J.g);L=1E6;for(I=null;J.ma();){var P=Lo(J);if(2807729==P.id)L=Po(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=L/1E9;I*=J;L=Lo(new Ko(v));if(475249515!=L.id)throw new N(2,3,3007);H=Qo(L,H,J,I,d,c,z,B,G)}D=H;h.Ib(D);t=new tj(D);k&&t.Ya(B,G,!0);return E.return(t)})}
|
|
603
603
|
function Vo(a){return a.vc}function Xo(a){var b=Fo(a,Vo,"RepresentationIndex");a=Eo(a,Vo,"indexRange");a=$f(a||"");b&&(a=Xf(b,"range",$f,a));return a}function Wo(a,b){Zo(a,b);if(!Xo(a))throw new N(2,4,4002);}function Zo(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=jc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
|
|
604
|
-
function To(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Vc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function $o(a,b){var c=So(a,ap),d=bp(a);if(!d.
|
|
605
|
-
Infinity,b);f&&(f.segmentIndex=e);return{Bb:function(){e&&0!=e.J.length||e.pc(g);return Promise.resolve(e)}}}function ap(a){return a.ab}function bp(a){var b=dp(a);a=Do(a,ap);var c=a.Mb;0==c&&(c=1);var d=0;a.
|
|
606
|
-
function cp(a,b,c,d,e){var f=d.Gb.length;d.timeline&&d.timeline.length!=d.Gb.length&&(f=Math.min(d.timeline.length,d.Gb.length));for(var g=a-d.Ua,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={ld:m.ld},p++){var n=d.Gb[p];m.ld=dc(c,[n.Tf]);var t=void 0;t=null!=d.
|
|
607
|
-
function dp(a){return[a.H.ab,a.
|
|
608
|
-
Infinity,n=!(a.Oa&&a.V.Bd);l?(n&&(new tj(m)).Ya(c,p,!0),l.Hb(m,a.presentationTimeline.Ra())):l=new tj(m);a.presentationTimeline.Ib(m);n&&l.Ya(c,p);d&&a.Oa&&(d.segmentIndex=l);return{Bb:function(){l&&0!=l.J.length||l.pc(m);return Promise.resolve(l)}}}function kp(a){return a.wc}function gp(a){var b=Do(a,kp),c=Eo(a,kp,"media");a=Eo(a,kp,"index");return{
|
|
609
|
-
function hp(a){var b=a.mc?1:0;b+=a.timeline?1:0;b+=a.
|
|
610
|
-
function ip(a,b,c,d,e){function f(J){var L=(J-t)*n,P=L+b.Ua,S=L+l;L=S+n;var Y=Math.min(L,h());S=new oi(S,Y,function(){var fa=Co(x,w,J,v,P*y);return dc(D,[fa])},0,null,d,z,l,h());S.j=L;return S}function g(){var J=[Math.max(k.Ra(),l),Math.min(k.hb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/n),Math.ceil(J[1]/n)-1].map(function(L){return L+t})}function h(){var J=null!=m&&e[m]||p;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.V.start,m=a.aa.id,p=a.V.duration,n=b.
|
|
604
|
+
function To(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Vc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function $o(a,b){var c=So(a,ap),d=bp(a);if(!d.ia&&!d.timeline&&1<d.Gb.length)throw new N(2,4,4002);if(!d.ia&&!a.V.duration&&!d.timeline&&1==d.Gb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=cp(a.V.start,a.V.duration,a.H.za,d,c);b=!e;e?e.Hb(g,a.presentationTimeline.Ra()):e=new tj(g);a.presentationTimeline.Ib(g);a.Oa&&a.V.Bd||e.Ya(a.V.start,a.V.duration?a.V.start+a.V.duration:
|
|
605
|
+
Infinity,b);f&&(f.segmentIndex=e);return{Bb:function(){e&&0!=e.J.length||e.pc(g);return Promise.resolve(e)}}}function ap(a){return a.ab}function bp(a){var b=dp(a);a=Do(a,ap);var c=a.Mb;0==c&&(c=1);var d=0;a.ia?d=a.ia*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ia:a.ia,startTime:d,Mb:c,Ua:a.Ua,timeline:a.timeline,Gb:b}}
|
|
606
|
+
function cp(a,b,c,d,e){var f=d.Gb.length;d.timeline&&d.timeline.length!=d.Gb.length&&(f=Math.min(d.timeline.length,d.Gb.length));for(var g=a-d.Ua,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={ld:m.ld},p++){var n=d.Gb[p];m.ld=dc(c,[n.Tf]);var t=void 0;t=null!=d.ia?l+d.ia:d.timeline?d.timeline[p].end:l+b;k.push(new oi(a+l,a+t,function(y){return function(){return y.ld}}(m),n.start,n.end,e,g,a,h));l=t}return k}
|
|
607
|
+
function dp(a){return[a.H.ab,a.ga.ab,a.aa.ab].filter(cc).map(function(b){return Nf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ee&&(a.Ee=!0);var c=b.getAttribute("media");b=Xf(b,"mediaRange",$f,{start:0,end:null});return{Tf:c,start:b.start,end:b.end}})};function ep(a,b,c,d,e,f){var g=fp(a),h=gp(a);hp(h);var k=Ye(a);if(h.mc)return Zo(a,g),{Bb:function(){var t=Co(h.mc,k.H.id,null,k.bandwidth||null,null);t=dc(k.H.za,[t]);return Yo(k,b,g,t,0,null,h.Ua)}};if(h.ia)return d||"image"===a.ga.contentType||(a.presentationTimeline.Od(h.ia),a.presentationTimeline.Pd(a.V.start)),{Bb:function(){return ip(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=jp(k,h,g);c=a.V.start;var p=a.V.duration?a.V.start+a.V.duration:
|
|
608
|
+
Infinity,n=!(a.Oa&&a.V.Bd);l?(n&&(new tj(m)).Ya(c,p,!0),l.Hb(m,a.presentationTimeline.Ra())):l=new tj(m);a.presentationTimeline.Ib(m);n&&l.Ya(c,p);d&&a.Oa&&(d.segmentIndex=l);return{Bb:function(){l&&0!=l.J.length||l.pc(m);return Promise.resolve(l)}}}function kp(a){return a.wc}function gp(a){var b=Do(a,kp),c=Eo(a,kp,"media");a=Eo(a,kp,"index");return{ia:b.ia,timescale:b.timescale,Mb:b.Mb,Ua:b.Ua,le:b.le,timeline:b.timeline,Ld:c,mc:a}}
|
|
609
|
+
function hp(a){var b=a.mc?1:0;b+=a.timeline?1:0;b+=a.ia?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.mc&&(a.timeline=null),a.ia=null);if(!a.mc&&!a.Ld)throw new N(2,4,4002);}
|
|
610
|
+
function ip(a,b,c,d,e){function f(J){var L=(J-t)*n,P=L+b.Ua,S=L+l;L=S+n;var Y=Math.min(L,h());S=new oi(S,Y,function(){var fa=Co(x,w,J,v,P*y);return dc(D,[fa])},0,null,d,z,l,h());S.j=L;return S}function g(){var J=[Math.max(k.Ra(),l),Math.min(k.hb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/n),Math.ceil(J[1]/n)-1].map(function(L){return L+t})}function h(){var J=null!=m&&e[m]||p;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.V.start,m=a.aa.id,p=a.V.duration,n=b.ia,t=b.Mb,y=b.timescale,
|
|
611
611
|
x=b.Ld,v=a.bandwidth||null,w=a.H.id,D=a.H.za,z=l-b.Ua,B=g();a=a.Oa?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var G=a;G<=B;++G){var E=f(G);c.push(E)}var H=new tj(c);c=k.hb()<h();G=k.W();if(c||G){var I=Math.max(a,B+1);H.bd(n,function(){var J=k.Ra();H.fb(J);var L=r(g());L.next();L=L.next().value;for(var P=[];I<=L;){var S=f(I);P.push(S);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
|
|
612
612
|
function jp(a,b,c){var d=a.V.start,e=a.V.duration,f=d-b.Ua;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={kd:h.kd,od:h.od,rd:h.rd,gd:h.gd,td:h.td,hd:h.hd},k++){var l=b.timeline[k],m=l.start,p=l.sg;l=l.end;h.rd=k+b.Mb;h.td=p+b.le;h.od=a.H.id;h.gd=a.bandwidth||null;h.kd=b.Ld;h.hd=a.H.za;g.push(new oi(d+m,d+l,function(n){return function(){var t=Co(n.kd,n.od,n.rd,n.gd||null,n.td);return dc(n.hd,[t]).map(function(y){return y.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
613
613
|
function fp(a){var b=Eo(a,kp,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.za;return new mi(function(){var f=Co(b,c,null,d,null);return dc(e,[f])},0,null,To(a))};function lp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}lp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
|
|
@@ -644,7 +644,7 @@ function Sp(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=ef(a.m,
|
|
|
644
644
|
function Up(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=hg(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Vp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Ho(d,a.g.retryParameters,f,c,a.h.networkingEngine);$e(a.o,g);return u(k,g.promise,2)}h=k.h;return k.return(Vp(a,h,c))})}
|
|
645
645
|
function Vp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,J,L,P,S,Y,fa,ua,Ca,Da,Ga;return K(function(Ha){switch(Ha.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Nf(b,"Location").map(Vf).filter(cc);0<f.length&&(g=dc(e,f),e=a.m=g);h=Nf(b,"BaseURL");k=h.map(Vf);l=dc(e,k);m=0;h&&h.length&&(m=Xf(h[0],"availabilityTimeOffset",dg)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=Xf(b,"minBufferTime",Zf)||0);a.F=Xf(b,"minimumUpdatePeriod",Zf,-1);t=Xf(b,"availabilityStartTime",Yf);y=Xf(b,
|
|
646
646
|
"timeShiftBufferDepth",Zf);x=a.g.dash.ignoreSuggestedPresentationDelay;v=null;x||(v=Xf(b,"suggestedPresentationDelay",Zf));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Xf(b,"maxSegmentDuration",Zf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,G=r(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.fb(B.Ra());else I=a.g.defaultPresentationDelay||1.5*n,J=null!=v?v:I,B=new T(t,J,a.g.dash.autoCorrectDrift);B.xc("static"==z);(L=B.W())&&
|
|
647
|
-
!isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);B.fe(y);P=b.getAttribute("profiles")||"";S={Oa:"static"!=z,presentationTimeline:B,aa:null,V:null,
|
|
647
|
+
!isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);B.fe(y);P=b.getAttribute("profiles")||"";S={Oa:"static"!=z,presentationTimeline:B,aa:null,V:null,ga:null,H:null,bandwidth:0,Ee:!1,zb:m,profiles:P.split(",")};Y=Wp(a,S,l,b);fa=Y.duration;ua=Y.periods;"static"!=z&&Y.we||B.Da(fa||Infinity);a.u&&!a.B&&(Ca=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.Qe(a.u):a.u&&Va("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
648
648
|
B.Od(D||1);return u(Ha,mp(a.j,ua,S.Oa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ha.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!B.Ve()){Ha.A(4);break}Da=Nf(b,"UTCTiming");return u(Ha,Xp(a,l,Da),5);case 5:Ga=Ha.h;if(!a.h)return Ha.return();B.Re(Ga);case 4:B.Id();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ha)}})}
|
|
649
649
|
function Wp(a,b,c,d){var e=Xf(d,"mediaPresentationDuration",Zf),f=[],g=0;d=Nf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Xf(k,"start",Zf,g),p=k.id,n=Xf(k,"duration",Zf),t=null;if(l){var y=Xf(l,"start",Zf);null!=y&&(t=y-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.s&&null!==p&&null!==m&&m<a.s)||a.L.includes(p)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=Yp(a,b,c,{start:m,duration:t,node:k,Bd:null==t||!l});f.push(g);b.aa.id&&t&&(a.M[b.aa.id]=t);if(null==t){g=
|
|
650
650
|
null;break}g=m+t}}a.L=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,we:!1}:{periods:f,duration:g,we:!0}}
|
|
@@ -652,16 +652,16 @@ function Yp(a,b,c,d){b.aa=Zp(d.node,null,c);b.V=d;b.aa.zb=b.zb;b.aa.id||(b.aa.id
|
|
|
652
652
|
}d=c.filter(function(m){return!m.je});c=c.filter(function(m){return m.je});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.je.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Ec:h.Ec},l=k.next())h.Ec=l.value,h.Ec.trickModeVideo=e.streams.find(function(m){return function(p){return Zc(m.Ec.codecs)==Zc(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:bq(d,"audio");g=a.g.disableVideo?[]:bq(d,"video");f=a.g.disableText?
|
|
653
653
|
[]:bq(d,jc);c=a.g.disableThumbnails?[]:bq(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,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.aa.id,Gc:d,dd:e,textStreams:g,imageStreams:f}}
|
|
654
654
|
function bq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
655
|
-
function aq(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.
|
|
655
|
+
function aq(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ga=Zp(c,b.aa,null);var e=!1,f=Nf(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(cc),h=void 0,k=b.ga.contentType==jc;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=
|
|
656
656
|
l}}var p;m=Nf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=Nf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
|
|
657
657
|
10)));m=Nf(c,"Accessibility");var y=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var x=r(t),v=x.next();!v.done;v=x.next()){var w=v.value,D=v=void 0;w.includes("=")?(w=w.split("="),v=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(v="CC"+n,2==t.length?n+=2:n++,D=w);y.set(v,md(D))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
|
|
658
658
|
1,null!=t)for(t=r(t.split(";")),v=t.next();!v.done;v=t.next())v=v.value,w=x=void 0,v.includes("=")?(v=v.split("="),x="svc"+v[0],w=v[1].split(",")[0].split(":").pop()):(x="svc"+n,n++,w=v),y.set(x,md(w));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Nf(c,"ContentProtection");var z=so(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=md(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Nf(c,"Label"))&&l.length&&
|
|
659
|
-
(l=l[0],l.textContent&&(G=l.textContent));l=Nf(c,"Representation");c=l.map(function(E){if(E=cq(a,b,z,h,B,G,e,g,y,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.
|
|
660
|
-
m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(cc);return{id:b.
|
|
661
|
-
function cq(a,b,c,d,e,f,g,h,k,l){b.H=Zp(l,b.
|
|
659
|
+
(l=l[0],l.textContent&&(G=l.textContent));l=Nf(c,"Representation");c=l.map(function(E){if(E=cq(a,b,z,h,B,G,e,g,y,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ga.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ga.contentType||"application"==b.ga.contentType)for(b.ga.contentType=dq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.ga.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
660
|
+
m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(cc);return{id:b.ga.id||"__fake__"+a.G++,contentType:b.ga.contentType,language:B,eh:e,streams:c,drmInfos:z.drmInfos,je:f,eg:k}}
|
|
661
|
+
function cq(a,b,c,d,e,f,g,h,k,l){b.H=Zp(l,b.ga,null);a.u=Math.min(a.u,b.H.zb);if(!eq(b.H))return null;var m=b.V.start;b.bandwidth=Xf(l,"bandwidth",bg)||0;var p=b.H.contentType,n=p==jc||"application"==p;p="image"==p;try{var t=function(H,I,J){return fq(a,H,I,J)};if(b.H.vc)var y=Uo(b,t);else if(b.H.ab)y=$o(b,a.l);else if(b.H.wc)y=ep(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var x=b.H.za,v=b.V.duration||0;y={Bb:function(){return Promise.resolve(vj(m,v,x))}}}}catch(H){if((n||p)&&4002==H.code)return null;
|
|
662
662
|
throw H;}t=Nf(l,"ContentProtection");t=vo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Nf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Nf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
663
663
|
(z=l.getAttribute("value")),!z))return null;var B;l=b.H.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 G=b.H.id?b.aa.id+","+b.H.id:"",E={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,I,J;return K(function(L){if(1==L.g){I=(H=G&&b.Oa&&a.l[G])?a.l[G]:E;if(I.segmentIndex)return L.A(0);J=I;return u(L,y.Bb(),3)}J.segmentIndex=L.h;A(L)})},closeSegmentIndex:function(){E.segmentIndex&&
|
|
664
|
-
(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.
|
|
664
|
+
(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.ga.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Vc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:w,closedCaptions:k,
|
|
665
665
|
hdr:B,tilesLayout:z,matchedStreams:[]};G&&b.Oa&&!a.l[G]&&(a.l[G]=E);return E}function Rp(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Sp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();Tp(a,b);A(d)}})}function Tp(a,b){0>a.F||a.D.R(Math.max(3,a.F-b,Ra(a.I)))}
|
|
666
666
|
function Zp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vc:null,audioSamplingRate:null,zb:0};c=c||b.za;var d=Nf(a,"BaseURL"),e=d.map(Vf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Xf(a,"frameRate",eg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Nf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
|
|
667
667
|
m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Nf(a,"AudioChannelConfiguration");m=gq(m)||b.Vc;n=Xf(a,"audioSamplingRate",cg)||b.audioSamplingRate;f||(f=dq(g,h));var t=Mf(a,"SegmentBase"),y=Mf(a,"SegmentTemplate"),x=t?Xf(t,"availabilityTimeOffset",dg)||0:0,v=y?Xf(y,"availabilityTimeOffset",dg)||0:0;d=d&&d.length?Xf(d[0],"availabilityTimeOffset",dg)||0:0;d=b.zb+d+x+v;return{za:dc(c,e),vc:t||b.vc,ab:Mf(a,"SegmentList")||b.ab,wc:y||b.wc,width:Xf(a,"width",cg)||b.width,height:Xf(a,
|
|
@@ -679,7 +679,7 @@ function xq(a,b,c){b=Bc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
|
|
|
679
679
|
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=yq(a,m),zq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=rq(d,m.trim()),h&&g.push(h),e.push(new lq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new lq("",g,k)));return new iq(c,b,f,e)}f.push(h);
|
|
680
680
|
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new mq("URI",k)),e=!0)}}return new iq(c,b,f)}function yq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new N(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new sq(d);var f;(f=uq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=uq(d,g);)c.push(new mq(f[1],f[2]||f[3])),tq(d)}return new jq(a,b,c,e)}
|
|
681
681
|
var zq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Aq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Bq(){}function Cq(a){try{var b=Dq(a);return Re({uri:a,Ie:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Pe(c)}}function Dq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Nc(a):e=Ic(a);return{data:e,contentType:c}}
|
|
682
|
-
M("shaka.net.DataUriPlugin",Bq);Bq.parse=Cq;bf("data",Cq);function Eq(){var a=this;this.g=this.i=null;this.Ma=1;this.o=new Map;this.u=new Map;this.ya=new Set;this.h=new Map;this.j=null;this.M="";this.da=new wq;this.xa=0;this.T=!1;this.O=null;this.ca=Infinity;this.B=new O(function(){Fq(a)});this.m=Gq;this.I=null;this.
|
|
682
|
+
M("shaka.net.DataUriPlugin",Bq);Bq.parse=Cq;bf("data",Cq);function Eq(){var a=this;this.g=this.i=null;this.Ma=1;this.o=new Map;this.u=new Map;this.ya=new Set;this.h=new Map;this.j=null;this.M="";this.da=new wq;this.xa=0;this.T=!1;this.O=null;this.ca=Infinity;this.B=new O(function(){Fq(a)});this.m=Gq;this.I=null;this.fa=0;this.F=Infinity;this.Y=this.ja=0;this.D=new Ze;this.G=[];this.L=new Map;this.s=new Map;this.ea=new Map;this.l=!1}q=Eq.prototype;q.configure=function(a){this.g=a};
|
|
683
683
|
q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),u(f,Hq(c,a),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,Iq(c,d.data,a),3);e=c.xa;0<e&&c.B.R(e);return f.return(c.I)})};q.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.g=this.i=null;this.ya.clear();this.I=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
|
|
684
684
|
q.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.m==Gq)return h.return();b=[];c=Array.from(a.h.values());return c.length?u(h,Jq(a,c[0]),2):h.A(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Jq(a,c[d]));return u(h,Promise.all(b),4)}Kq(a);e=c.some(function(k){return 0==k.Ce});e||(f=Lq,Mq(a,f.Ye),g=c.map(function(k){return k.nc}),a.j.Da(Math.min.apply(Math,ia(g))),a.i.updateDuration());A(h)})};
|
|
685
685
|
function Jq(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return K(function(y){if(1==y.g)return c=b.Ze,d=new Nb(c),a.l&&b.df&&Qb(d,new Sb("_HLS_skip=YES")),u(y,Hq(a,d.toString()),2);e=y.h;f=xq(a.da,e.data,e.uri);if(1!=f.type)throw new N(2,4,4017);g=nq(f.g,"EXT-X-DEFINE");h=Nq(a,g);k=b.stream;l=Oq(a,f,k.type,b.oc,h);a.G.push(l);k.segmentIndex.Hb(l,a.j.Ra());l.length&&(m=qq(f.g,"EXT-X-MEDIA-SEQUENCE"),p=b.oc.get(m),k.segmentIndex.fb(p));n=l[l.length-1];if(t=pq(f.g,"EXT-X-ENDLIST"))b.Ce=!0,b.nc=n.endTime;A(y)})}
|
|
@@ -690,7 +690,7 @@ function Rq(a){if(!a.T&&Infinity==a.ca){for(var b=Infinity,c=r(a.h.values()),d=c
|
|
|
690
690
|
!0}}}function Qq(a,b){a.nc+=b;for(var c=r(a.oc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.oc.set(d,e+b)}}
|
|
691
691
|
function Iq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,J,L,P,S,Y,fa,ua,Ca,Da,Ga,Ha,Fc,Gc,hc,qd,tb,oe,Hc,rd;return K(function(Na){switch(Na.g){case 1:d=xq(a.da,b,a.M);e=nq(d.g,"EXT-X-DEFINE");Sq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],I=ad(G),J=new Map,u(Na,Tq(a,d,c,c,I,H,"",!0,"Media Playlist",null,J,null,!1,!1,E),8);k=nq(d.g,"EXT-X-MEDIA");l=nq(d.g,"EXT-X-STREAM-INF");m=nq(d.g,"EXT-X-IMAGE-STREAM-INF");Uq(a,l);p=
|
|
692
692
|
nq(d.g,"EXT-X-SESSION-DATA");n=r(p);for(t=n.next();!t.done;t=n.next())if(y=t.value,x=Z(y,"DATA-ID"),v=Z(y,"URI"),w=Z(y,"LANGUAGE"),D=Z(y,"VALUE"),z=(new Map).set("id",x),v&&z.set("uri",rq(a.M,v)),w&&z.set("language",w),D&&z.set("value",D),B=new Q("sessiondata",z),a.i)a.i.onEvent(B);return u(Na,Vq(a,k),4);case 4:return Wq(a,k),u(Na,Xq(a,l),5);case 5:return f=Na.h,u(Na,Yq(a,k),6);case 6:return g=Na.h,u(Na,Zq(a,m),7);case 7:h=Na.h;Na.A(3);break;case 8:L=Na.h,a.h.set(c,L),f.push({id:0,language:"und",
|
|
693
|
-
disabledUntilTime:0,primary:!0,audio:"audio"==H?L.stream:null,video:"video"==H?L.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new N(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?Pq(a):Rq(a);P=Infinity;S=r(a.h.values());for(Y=S.next();!Y.done;Y=S.next())fa=Y.value,"text"!=fa.stream.type&&(P=Math.min(P,fa.nc));a.m!=Gq?(a.j=new T(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Y?a.Y:3*a.
|
|
693
|
+
disabledUntilTime:0,primary:!0,audio:"audio"==H?L.stream:null,video:"video"==H?L.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new N(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?Pq(a):Rq(a);P=Infinity;S=r(a.h.values());for(Y=S.next();!Y.done;Y=S.next())fa=Y.value,"text"!=fa.stream.type&&(P=Math.min(P,fa.nc));a.m!=Gq?(a.j=new T(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Y?a.Y:3*a.fa),a.j.xc(!1)):(a.j=new T(null,0),
|
|
694
694
|
a.j.xc(!0));if(a.m!=Gq)a.xa=a.F,ua=Lq,a.m==ua.Xe&&(Ca=a.j.$c,isNaN(a.g.availabilityWindowOverride)||(Ca=a.g.availabilityWindowOverride),a.j.fe(Ca));else for(a.j.Da(P),Da=r(a.h.values()),Y=Da.next();!Y.done;Y=Da.next())Ga=Y.value,Ga.stream.segmentIndex.Ya(0,P);a.G=[];Ha=[];Fc=r(f);for(Gc=Fc.next();!Gc.done;Gc=Fc.next())for(hc=Gc.value,qd=r([hc.video,hc.audio]),tb=qd.next();!tb.done;tb=qd.next())(oe=tb.value)&&Ha.push(oe);return u(Na,Promise.all(Ha.map(function(Of){return K(function(Pf){return u(Pf,
|
|
695
695
|
Of.createSegmentIndex(),0)})})),9);case 9:Hc=r(Ha);for(tb=Hc.next();!tb.done;tb=Hc.next())rd=tb.value,a.G.push(rd.segmentIndex.J);Kq(a);a.j.Id();a.I={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.I);A(Na)}})}function Sq(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=Z(d,"NAME");d=Z(d,"VALUE");c&&d&&(a.o.has(c)||a.o.set(c,d))}}
|
|
696
696
|
function Nq(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.o.get(e))&&c.set(e,d)}return c}
|
|
@@ -709,13 +709,13 @@ function ar(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){if(1==v.g)
|
|
|
709
709
|
function br(a,b){var c,d,e,f,g,h,k,l,m,p;return K(function(n){if(1==n.g){c=gr(kq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=fr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(n,hr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(a.h.has(c))return n.return(a.h.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*Number(m.split("x")[1]);
|
|
710
710
|
if(p=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function dr(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=gr(kq(b,"URI"),a.o);if(a.h.has(e))return k.return(a.h.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.L.get(l):null;g=fc(d,c);return u(k,hr(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(a.h.has(e))return k.return(a.h.get(e));a.h.set(e,h);return k.return(h)})}
|
|
711
711
|
function hr(a,b,c,d,e,f,g,h,k,l,m,p){var n,t,y;return K(function(x){if(1==x.g)return n=rq(a.M,b),u(x,Hq(a,n),2);t=x.h;n=t.uri;y=xq(a.da,t.data,n);return x.return(Tq(a,y,b,n,c,d,e,f,g,h,k,l,m,p))})}
|
|
712
|
-
function Tq(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){var x,v,w,D,z,B,G,E,H,I,J,L,P,S,Y,fa,ua,Ca,Da,Ga,Ha,Fc,Gc,hc,qd,tb,oe,Hc,rd,Na,Of,Pf,
|
|
713
|
-
Y=kq(S,"METHOD"),"NONE"!=Y)if(E=!0,"AES-128"==Y)H=!0;else if(fa=kq(S,"KEYFORMAT"),Ca=(ua=kr[fa])?ua(S,y):null){if(Ca.keyIds)for(Da=r(Ca.keyIds),Ga=Da.next();!Ga.done;Ga=Da.next())Ha=Ga.value,J.add(Ha);I.push(Ca)}if(E&&!I.length&&!H)throw new N(2,4,4026);Xi.includes(y)&&(e="");Fc=new Map;Gc=a.l;hc=Oq(a,b,f,Fc,v);Gc!=a.l&&ir(a,b);qd=hc[hc.length-1].endTime;tb=new tj(hc);oe=f==jc?"subtitle":void 0;Hc=[];if(p)for(rd=r(p.split(",")),Na=rd.next();!Na.done;Na=rd.next())Of=Na.value,Hc.push(Of);
|
|
714
|
-
"EXT-X-SERVER-CONTROL"))?null!=Pf.getAttribute("CAN-SKIP-UNTIL"):!1;
|
|
715
|
-
return td.return({stream:
|
|
712
|
+
function Tq(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){var x,v,w,D,z,B,G,E,H,I,J,L,P,S,Y,fa,ua,Ca,Da,Ga,Ha,Fc,Gc,hc,qd,tb,oe,Hc,rd,Na,Of,Pf,sn,tn;return K(function(td){if(1==td.g){if(1!=b.type)throw new N(2,4,4017);x=nq(b.g,"EXT-X-DEFINE");v=Nq(a,x);ir(a,b);return y?td.A(2):u(td,jr(a,f,e,b,v),3)}2!=td.g&&(y=td.h);w=[];if(b.segments)for(D=r(b.segments),z=D.next();!z.done;z=D.next())B=z.value,G=nq(B.g,"EXT-X-KEY"),w.push.apply(w,ia(G));H=E=!1;I=[];J=new Set;L=r(w);for(P=L.next();!P.done;P=L.next())if(S=P.value,
|
|
713
|
+
Y=kq(S,"METHOD"),"NONE"!=Y)if(E=!0,"AES-128"==Y)H=!0;else if(fa=kq(S,"KEYFORMAT"),Ca=(ua=kr[fa])?ua(S,y):null){if(Ca.keyIds)for(Da=r(Ca.keyIds),Ga=Da.next();!Ga.done;Ga=Da.next())Ha=Ga.value,J.add(Ha);I.push(Ca)}if(E&&!I.length&&!H)throw new N(2,4,4026);Xi.includes(y)&&(e="");Fc=new Map;Gc=a.l;hc=Oq(a,b,f,Fc,v);Gc!=a.l&&ir(a,b);qd=hc[hc.length-1].endTime;tb=new tj(hc);oe=f==jc?"subtitle":void 0;Hc=[];if(p)for(rd=r(p.split(",")),Na=rd.next();!Na.done;Na=rd.next())Of=Na.value,Hc.push(Of);sn=(Pf=pq(b.g,
|
|
714
|
+
"EXT-X-SERVER-CONTROL"))?null!=Pf.getAttribute("CAN-SKIP-UNTIL"):!1;tn={id:a.Ma++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:tb,mimeType:y,codecs:e,kind:oe,encrypted:E,drmInfos:I,keyIds:J,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Hc,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,closedCaptions:m,hdr:void 0,tilesLayout:void 0};
|
|
715
|
+
return td.return({stream:tn,cd:c,Ze:d,nc:qd,oc:Fc,df:sn,Ce:!1})})}
|
|
716
716
|
function lr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new N(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Oc(e.substr(2));if(16!=f.byteLength)throw new N(2,4,4043);}else d=qq(c.g,"EXT-X-MEDIA-SEQUENCE");b=rq(c.h,kq(b,"URI"));var g=ef([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return K(function(p){if(1==p.g)return u(p,
|
|
717
717
|
mr(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new N(2,4,4044);l={name:"AES-CBC"};m=h;return u(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;A(p)})}};return h}
|
|
718
|
-
function ir(a,b){var c=pq(b.g,"EXT-X-PLAYLIST-TYPE"),d=pq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Mq(a,Gq);else{c?Mq(a,nr):Mq(a,or);d=pq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=pq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ja=Number(kq(c,"PART-TARGET")),a.F=Math.min(a.ja,a.F),b=pq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=b?Number(kq(b,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.
|
|
718
|
+
function ir(a,b){var c=pq(b.g,"EXT-X-PLAYLIST-TYPE"),d=pq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Mq(a,Gq);else{c?Mq(a,nr):Mq(a,or);d=pq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=pq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ja=Number(kq(c,"PART-TARGET")),a.F=Math.min(a.ja,a.F),b=pq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=b?Number(kq(b,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.fa=Math.max(d,a.fa)}}
|
|
719
719
|
function pr(a,b,c,d){c=pq(c,"EXT-X-MAP");if(!c)return null;var e=kq(c,"URI");d=gr(rq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=qr(d,c),a.ea.set(b,c));return a.ea.get(b)}function qr(a,b){var c=0,d=null;if(b=Z(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new mi(function(){return[a]},c,d)}
|
|
720
720
|
function rr(a,b,c,d,e,f,g,h,k){var l=d.g,m=gr(d.i,f),p=pq(l,"EXTINF"),n=f=0,t=null;d.h.length&&!a.l&&Va("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var x=pq(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(y=Yf(x.value))}x=pi;pq(l,"EXT-X-GAP")&&(x=2);if(!p){if(0==d.h.length)throw new N(2,4,4024,"EXTINF");
|
|
721
721
|
if(!a.l)return null}var v=[];if(a.l)for(var w={},D=0;D<d.h.length;w={md:w.md},D++){var z=d.h[D],B=0==D?c:v[v.length-1],G=0==D?e:B.endTime,E=Number(Z(z,"DURATION"))||a.ja;if(E){E=G+E;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=Z(z,"BYTERANGE-START"))?Number(H):0:(H=Z(z,"BYTERANGE"),I=r(sr(B,H)),H=I.next().value,I=I.next().value);if(B=Z(z,"URI"))w.md=rq(g,B),B=pi,"YES"==Z(z,"GAP")&&(B=2),v.push(new oi(G,E,function(J){return function(){return[J.md]}}(w),H,I,b,0,0,Infinity,[],"",null,null,B))}}p?
|
|
@@ -728,10 +728,10 @@ function gr(a,b){a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.mat
|
|
|
728
728
|
function jr(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,y,x,v;return K(function(w){if(1==w.g){f=kc;g=lf;h=Math.trunc((d.segments.length-1)/2);k=gr(d.segments[h].i,e);l=new Nb(k);m=l.wa.split(".").pop();p=tr[b];if((n=p[m])||(n=ur[m]))return w.return(n);if(b==f.X){if("vtt"==c||"wvtt"==c)return w.return("text/vtt");if(c&&""!==c)return w.return("application/mp4")}if(b==f.Wb&&(!c||"jpeg"==c))return w.return("image/jpeg");t=ef([k],a.g.retryParameters);t.method="HEAD";return u(w,mr(a,t,g),2)}y=w.h;x=y.headers["content-type"];
|
|
729
729
|
if(!x){if(b==f.X)return w.return("text/vtt");v=p.mp4;return w.return(v)}return w.return(x.split(";")[0])})}function Hq(a,b){b=ef([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return mr(a,b,0)}function Fq(a){var b,c;K(function(d){if(1==d.g){if(!a.i)return d.return();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return a.m!=Gq&&(b=a.xa,a.B.R(b)),va(d,0);c=F(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.B.R(.1);A(d)})}
|
|
730
730
|
function Mq(a,b){a.m=b;a.j&&a.j.xc(a.m==Gq);a.m!=Gq||a.B.stop()}function mr(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);$e(a.D,b);return b.promise}M("shaka.hls.HlsParser",Eq);
|
|
731
|
-
var ur={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},tr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t"},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",
|
|
732
|
-
ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},kr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new N(2,4,4041);return ec("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=kq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
733
|
-
"URI");b=Dq(b);b=Fb(b.data);b=ec("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=kq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=kq(a,"URI");a=Dq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Lf(a,b,new Set,0);return ec("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Gq="VOD",
|
|
734
|
-
"EVENT",nr="LIVE",Lq={Ye:Gq,
|
|
731
|
+
var ur={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},tr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
732
|
+
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},kr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new N(2,4,4041);return ec("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=kq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
733
|
+
b=kq(a,"URI");b=Dq(b);b=Fb(b.data);b=ec("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=kq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=kq(a,"URI");a=Dq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Lf(a,b,new Set,0);return ec("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Gq="VOD",
|
|
734
|
+
or="EVENT",nr="LIVE",Lq={Ye:Gq,Dg:or,Xe:nr};sc("Tizen 3")||sc("Tizen 2")||uc()||(Yg.m3u8=function(){return new Eq},Wg["application/x-mpegurl"]=function(){return new Eq},Wg["application/vnd.apple.mpegurl"]=function(){return new Eq});function vr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Ie:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ec(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function wr(){}function xr(a,b,c,d,e){var f=new yr;vf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new zr,h={re:!1,Ue:!1};a=Ar(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Oe(a,function(){h.re=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Ue=!0;g.abort()});k.R(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
735
735
|
function Ar(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,D,z;return K(function(B){switch(B.g){case 1:return h=Br,k=Cr,n=p=0,t=Date.now(),C(B,2),u(B,h(a,c),4);case 4:return l=B.h,f(Dr(l.headers)),y=l.clone().body.getReader(),v=(x=l.headers.get("Content-Length"))?parseInt(x,10):0,w=function(G){function E(){var H,I;return K(function(J){switch(J.g){case 1:return C(J,2),u(J,y.read(),4);case 4:H=J.h;va(J,3);break;case 2:return F(J),J.return();case 3:if(H.done){J.A(5);break}p+=H.value.byteLength;if(!g){J.A(5);
|
|
736
736
|
break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-t||H.done)e(I-t,p-n,v-p),n=p,t=I;H.done?G.close():(G.enqueue(H.value),E());A(J)}})}E()},new k({start:w}),u(B,l.arrayBuffer(),5);case 5:m=B.h;va(B,3);break;case 2:D=F(B);if(d.re)throw new N(1,1,7001,a,b);if(d.Ue)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return z=Dr(l.headers),B.return(vr(z,m,l.status,a,l.url,b))}})}function Dr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
737
737
|
function Er(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",wr);wr.isSupported=Er;wr.parse=xr;var Br=window.fetch,zr=window.AbortController,Cr=window.ReadableStream,yr=window.Headers;Er()&&(bf("http",xr,2,!0),bf("https",xr,2,!0),bf("blob",xr,2,!0));function Fr(){}
|
|
@@ -760,7 +760,7 @@ ss.prototype.cc=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[]
|
|
|
760
760
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
761
761
|
function ts(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
|
|
762
762
|
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function us(){Zr.apply(this,arguments)}pa(us,Zr);q=us.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return cs(this,a,b)};q.cc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function vs(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=vs.prototype;
|
|
763
|
-
q.init=function(){var a=this,b=new lc,c=!1,d=new O(function(){c=!0;b.reject(new N(2,9,9017))});d.R(
|
|
763
|
+
q.init=function(){var a=this,b=new lc,c=!1,d=new O(function(){c=!0;b.reject(new N(2,9,9017))});d.R(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new ns(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new ss(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
764
764
|
new ss(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new us(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new ds(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new N(2,
|
|
765
765
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),A(b)}})};
|
|
766
766
|
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
|
|
@@ -820,115 +820,115 @@ function Bt(){R.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(Bt,R);da
|
|
|
820
820
|
function Kt(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
821
821
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Lt);document.addEventListener("webkitfullscreenerror",Lt);document.addEventListener("mozfullscreenchange",Lt);document.addEventListener("mozfullscreenerror",Lt);document.addEventListener("MSFullscreenChange",Lt);document.addEventListener("MSFullscreenError",Lt)}}
|
|
822
822
|
function Lt(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}xt.Fullscreen=Jt;Jt.install=Kt;yt(Kt);function Mt(){}function Nt(){var a=!0;if(vc()||sc("PlayStation 5")||wc()||sc("Web0S")||tc()||sc("CrKey")||sc("PC=EOS")||sc("Hisense")||sc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Ot=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Pt)}
|
|
823
|
-
function Pt(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w;return K(function(D){switch(D.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return D.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!oc())return D.return(b);if(c){if(sc("CrKey"))
|
|
824
|
-
c.
|
|
823
|
+
function Pt(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w;return K(function(D){switch(D.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return D.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!oc())return D.return(b);if(c){if(sc("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var z=c.contentType;c.width&&c.height&&(z+="; width="+c.width+"; height="+c.height);c.framerate&&(z+="; framerate="+c.framerate);"pq"===
|
|
824
|
+
c.transferFunction&&(z+="; eotf=smpte2084");z=cast.__platform__.canDisplayType(z)}else z=MediaSource.isTypeSupported(c.contentType);else z=MediaSource.isTypeSupported(c.contentType);e=z;if(!e)return D.return(b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return D.return(b)}else if("file"==a.type){if(c&&(h=c.contentType,k=pc(h),!k)||d&&(l=d.contentType,m=pc(l),!m))return D.return(b)}else return D.return(b);if(!a.keySystemConfiguration)return b.supported=!0,D.return(Promise.resolve(b));
|
|
825
825
|
p=a.keySystemConfiguration;n=[];t=[];p.audio&&(y={robustness:p.audio.robustness||"",contentType:a.audio.contentType},n.push(y));p.video&&(x={robustness:p.video.robustness||"",contentType:a.video.contentType},t.push(x));v={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};n.length&&(v.audioCapabilities=n);t.length&&(v.videoCapabilities=t);C(D,3);return u(D,navigator.requestMediaKeySystemAccess(p.keySystem,[v]),
|
|
826
|
-
5);case 5:w=D.h;va(D,4);break;case 3:F(D);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return D.return(b)}})}xt.MediaCapabilities=Mt;Mt.install=Nt;var Ot=null;Mt.originalMcap=Ot;yt(Nt,-1);function Qt(){}function Rt(){var a=xc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?St():a?12>=a?(Tt(),Ut()):Tt():(sc("Tizen 2")||sc("Tizen 3")||sc("Tizen 4"))&&
|
|
827
|
-
function Tt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function Ut(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Vt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"
|
|
828
|
-
function St(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
|
|
829
|
-
function
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
xt.PatchedMediaKeysApple=
|
|
834
|
-
function
|
|
826
|
+
5);case 5:w=D.h;va(D,4);break;case 3:F(D);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return D.return(b)}})}xt.MediaCapabilities=Mt;Mt.install=Nt;var Ot=null;Mt.originalMcap=Ot;yt(Nt,-1);function Qt(){}function Rt(){var a=xc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?St():a?12>=a?(Tt(),Ut()):15>=a&&Tt():navigator.userAgent.match(/Edge?\//)?Vt():(sc("Tizen 2")||sc("Tizen 3")||sc("Tizen 4"))&&Wt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Xt()}
|
|
827
|
+
function Tt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function Ut(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Vt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
|
|
828
|
+
function Wt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=$c(b)[0]&&a(b)}}function St(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
|
|
829
|
+
function Xt(){var a=MediaSource.isTypeSupported;sc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}xt.MediaSource=Qt;Qt.install=Rt;yt(Rt);function Yt(){}function Zt(){screen.orientation||void 0!=window.orientation&&$t()}function $t(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new au;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}xt.Orientation=Yt;
|
|
830
|
+
Yt.install=Zt;function au(){R.call(this);this.type="";this.angle=0}pa(au,R);
|
|
831
|
+
au.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
832
|
+
au.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};yt(Zt);function bu(){}function cu(a,b){try{var c=new du(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function eu(a){var b=this.mediaKeys;b&&b!=a&&fu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?fu(a,this):Promise.resolve()}function gu(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Ic(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gb(a);this.dispatchEvent(b)}
|
|
833
|
+
xt.PatchedMediaKeysApple=bu;bu.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=eu,window.MediaKeys=hu,window.MediaKeySystemAccess=du,navigator.requestMediaKeySystemAccess=cu,window.shakaMediaKeysPolyfill=!0)};
|
|
834
|
+
function du(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
835
835
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=r(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
836
|
-
|
|
837
|
-
function
|
|
838
|
-
q.generateRequest=function(a,b){var c=this;this.h=new lc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Eb()?"license-request":"license-renewal").set("message",Gb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(
|
|
839
|
-
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
840
|
-
q.update=function(a){this.g=new lc;try{this.i.update(Fb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function
|
|
841
|
-
function
|
|
842
|
-
function
|
|
843
|
-
function
|
|
844
|
-
function
|
|
845
|
-
function
|
|
836
|
+
du.prototype.createMediaKeys=function(){var a=new hu(this.keySystem);return Promise.resolve(a)};du.prototype.getConfiguration=function(){return this.g};function hu(a){this.h=new WebKitMediaKeys(a);this.g=new of}hu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new iu(this.h,a)};hu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
837
|
+
function fu(a,b){a.g.ob();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",gu);try{return dj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function iu(a){R.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new of;this.sessionId="";this.expiration=NaN;this.closed=new lc;this.keyStatuses=new ju}pa(iu,R);q=iu.prototype;
|
|
838
|
+
q.generateRequest=function(a,b){var c=this;this.h=new lc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Eb()?"license-request":"license-renewal").set("message",Gb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(ku(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
|
|
839
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ku(c,"output-not-allowed");break;default:ku(c,"internal-error")}});ku(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
840
|
+
q.update=function(a){this.g=new lc;try{this.i.update(Fb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function ku(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
|
|
841
|
+
function ju(){this.size=0;this.g=void 0}q=ju.prototype;q.Eb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Tg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function lu(){}function mu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=nu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ou,window.MediaKeys=pu,window.MediaKeySystemAccess=qu,window.shakaMediaKeysPolyfill=!0)}function nu(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
842
|
+
function ou(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}xt.PatchedMediaKeysNop=lu;lu.install=mu;function pu(){throw new TypeError("Illegal constructor.");}pu.prototype.createSession=function(){};pu.prototype.setServerCertificate=function(){};function qu(){this.keySystem="";throw new TypeError("Illegal constructor.");}qu.prototype.getConfiguration=function(){};qu.prototype.createMediaKeys=function(){};yt(mu,-10);function ru(){}
|
|
843
|
+
function su(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)tu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=uu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=vu;window.MediaKeys=wu;window.MediaKeySystemAccess=xu;window.shakaMediaKeysPolyfill=!0}}
|
|
844
|
+
function yu(a){var b=tu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function uu(a,b){try{var c=new xu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function vu(a){var b=this.mediaKeys;b&&b!=a&&zu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&zu(a,this);return Promise.resolve()}xt.PatchedMediaKeysWebkit=ru;ru.install=su;
|
|
845
|
+
function xu(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),
|
|
846
846
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=r(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
847
|
-
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
848
|
-
function
|
|
849
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=
|
|
850
|
-
function
|
|
851
|
-
q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?
|
|
852
|
-
function
|
|
853
|
-
function
|
|
854
|
-
function
|
|
855
|
-
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=
|
|
856
|
-
q.forEach=function(a){this.g&&a(this.g,Tg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var
|
|
857
|
-
function
|
|
858
|
-
function
|
|
859
|
-
function
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Sf(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new jb;var y=t.getAttribute("xml:id");if(y){n.id=y;var x=null;m&&(x=
|
|
863
|
-
null!=v&&(n.width=Number(v[1]),n.height=Number(v[2]),w||(null!=y&&(n.width=100*n.width/y),null!=x&&(n.height=100*n.height/x)),n.widthUnits=w||null!=y?Ab:0,n.heightUnits=w||null!=x?Ab:0);if(t=
|
|
864
|
-
2,2001,"<p> can only be inside <div> in TTML");m=r(Nf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Nf(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if(b=
|
|
865
|
-
function
|
|
866
|
-
a=[];if(!x)for(var v=r(n.childNodes),w=v.next();!w.done;w=v.next())(w=
|
|
867
|
-
w=Math.min(w,b.segmentEnd);if(!D&&0<a.length)for(v=Infinity,w=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,v=Math.min(v,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new hb(v,w,""),e.lineBreak=!0,e;b="";x&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(v,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=
|
|
868
|
-
z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=
|
|
869
|
-
function
|
|
870
|
-
f))a.backgroundColor=g;if(g=
|
|
871
|
-
"bold"==g&&(a.fontWeight=700);g=
|
|
872
|
-
f))d=d.split(" "),d[0].match(
|
|
873
|
-
function
|
|
874
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function
|
|
875
|
-
function
|
|
876
|
-
function
|
|
877
|
-
function
|
|
878
|
-
function
|
|
879
|
-
function
|
|
880
|
-
function
|
|
881
|
-
var
|
|
882
|
-
end:"end"},
|
|
883
|
-
M("shaka.text.Mp4TtmlParser",
|
|
884
|
-
|
|
847
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}xu.prototype.createMediaKeys=function(){var a=new wu(this.g);return Promise.resolve(a)};xu.prototype.getConfiguration=function(){return this.h};function wu(a){this.l=a;this.h=null;this.g=new of;this.i=[];this.j=new Map}
|
|
848
|
+
function zu(a,b){a.h=b;a.g.ob();var c=tu;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=Au(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Eb()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=Au(a,d.sessionId))Bu(d,"usable"),
|
|
849
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=Au(a,d.sessionId);e&&e.handleError(d)}))}wu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Cu(b,this.l,a);this.i.push(a);return a};wu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
850
|
+
function Au(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function Cu(a,b,c){R.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new lc;this.keyStatuses=new Du}pa(Cu,R);q=Cu.prototype;
|
|
851
|
+
q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Bu(this,"output-restricted"):1==b?Bu(this,"expired"):Bu(this,"internal-error"))};
|
|
852
|
+
function Eu(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Fb(Ic("LOAD_SESSION|"+c));else{var e=Ic("PERSISTENT|");d=Qc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new lc;var f=yu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
|
|
853
|
+
function Fu(a,b,c){if(a.g)a.g.then(function(){return Fu(a,b,c)}).catch(function(){return Fu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Bc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Nc(e.keys[0].k);e=Nc(e.keys[0].kid)}else d=Fb(c),e=null;var f=yu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
854
|
+
function Bu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return Eu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Eu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new lc;Fu(this,b,a);return b};
|
|
855
|
+
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=yu("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Du(){this.size=0;this.g=void 0}q=Du.prototype;q.Eb=function(){return this.g};
|
|
856
|
+
q.forEach=function(a){this.g&&a(this.g,Tg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var tu="";yt(su);function Gu(){}function Hu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Iu,Object.defineProperty(a,"disablePictureInPicture",{get:Ju,set:Ku,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Lu,document.addEventListener("webkitpresentationmodechanged",Mu,!0))}}
|
|
857
|
+
function Mu(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
858
|
+
function Iu(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Lu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
859
|
+
function Ju(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Ku(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}xt.PiPWebkit=Gu;Gu.install=Hu;yt(Hu);function Nu(){}function Ou(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Pu))}function Pu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}xt.RandomUUID=Nu;Nu.install=Ou;yt(Ou);function Qu(){}function Ru(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Su)}function Su(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}xt.StorageEstimate=Qu;Qu.install=Ru;yt(Ru);function Tu(){}function Uu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Vu})}function Vu(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}xt.Symbol=Tu;Tu.install=Uu;yt(Uu);function Wu(){}function Xu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}xt.VideoPlayPromise=Wu;Wu.install=Xu;yt(Xu);function Yu(){}function Zu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||uc())&&(a.getVideoPlaybackQuality=$u)}}function $u(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}xt.VideoPlaybackQuality=Yu;Yu.install=Zu;yt(Zu);function av(){}function bv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=cv;else if(6==b)a=dv;else{try{var c=!!cv(1,2,"")}catch(d){c=!1}c&&(a=cv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function cv(a,b,c){return new window.TextTrackCue(a,b,c)}function dv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}xt.VTTCue=av;av.install=bv;yt(bv);function ev(){}ev.prototype.parseInit=function(){};ev.prototype.setSequenceMode=function(){};ev.prototype.parseMedia=function(a,b){var c=null,d=[];a=Bc(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=fv.exec(e))){var f=gv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new hb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};M("shaka.text.LrcTextParser",ev);ev.prototype.parseMedia=ev.prototype.parseMedia;
|
|
860
|
+
ev.prototype.setSequenceMode=ev.prototype.setSequenceMode;ev.prototype.parseInit=ev.prototype.parseInit;var fv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,gv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;dd["application/x-subtitle-lrc"]=function(){return new ev};function hv(){}hv.prototype.parseInit=function(){};hv.prototype.setSequenceMode=function(){};
|
|
861
|
+
hv.prototype.parseMedia=function(a,b){var c=Bc(a);a=[];if(""==c)return a;var d=fg(c,"tt");if(!d)throw new N(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=Uf(d,iv,"frameRate"),f=Uf(d,iv,"subFrameRate"),g=Uf(d,iv,"frameRateMultiplier"),h=Uf(d,iv,"tickRate"),k=Uf(d,iv,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=Uf(d,jv,"extent");if("default"!=l&&"preserve"!=l)throw new N(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new kv(e,f,
|
|
862
|
+
g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Sf(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new jb;var y=t.getAttribute("xml:id");if(y){n.id=y;var x=null;m&&(x=lv.exec(m)||mv.exec(m));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var v,w;if(v=nv(t,g,"extent"))v=(w=lv.exec(v))||mv.exec(v),
|
|
863
|
+
null!=v&&(n.width=Number(v[1]),n.height=Number(v[2]),w||(null!=y&&(n.width=100*n.width/y),null!=x&&(n.height=100*n.height/x)),n.widthUnits=w||null!=y?Ab:0,n.heightUnits=w||null!=x?Ab:0);if(t=nv(t,g,"origin"))v=(w=lv.exec(t))||mv.exec(t),null!=v&&(n.viewportAnchorX=Number(v[1]),n.viewportAnchorY=Number(v[2]),w||(null!=x&&(n.viewportAnchorY=100*n.viewportAnchorY/x),null!=y&&(n.viewportAnchorX=100*n.viewportAnchorX/y)),n.viewportAnchorUnits=w||null!=y?Ab:0)}else n=null;n&&h.push(n)}if(Nf(c,"p").length)throw new N(2,
|
|
864
|
+
2,2001,"<p> can only be inside <div> in TTML");m=r(Nf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Nf(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if(b=ov(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
865
|
+
function ov(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var t=null,y=r(pv),x=y.next();!x.done&&!(t=qv(n,"backgroundImage",d,"#",x.value)[0]);x=y.next());y=m;if("p"==a.nodeName||t)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(n.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
|
|
866
|
+
a=[];if(!x)for(var v=r(n.childNodes),w=v.next();!w.done;w=v.next())(w=ov(w.value,b,c,d,e,f,g,h,k,n,m))&&a.push(w);d=null!=l;v=/\S/.test(n.textContent);var D=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(D||v||"br"==n.tagName||0!=a.length||d&&!h))return null;w=rv(n,c);v=w.start;for(w=w.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)w=sv(p,c,v,w),v=w.start,w=w.end,p=p.parentNode;null==v&&(v=0);v+=b.periodStart;w=null==w?Infinity:w+b.periodStart;v=Math.max(v,b.segmentStart);
|
|
867
|
+
w=Math.min(w,b.segmentEnd);if(!D&&0<a.length)for(v=Infinity,w=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,v=Math.min(v,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new hb(v,w,""),e.lineBreak=!0,e;b="";x&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(v,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=qv(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==
|
|
868
|
+
z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=qv(l,"region",f,"")[0]);tv(b,n,g,t,e,y,0==a.length);return b}
|
|
869
|
+
function tv(a,b,c,d,e,f,g){f=f||g;"rtl"==uv(b,c,e,"direction",f)&&(a.direction="rtl");g=uv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=ib);(g=uv(b,c,e,"textAlign",!0))?(a.positionAlign=vv[g],a.lineAlign=wv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=lb;if(g=uv(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=uv(b,c,e,"color",f))a.color=g;if(g=uv(b,c,e,"backgroundColor",
|
|
870
|
+
f))a.backgroundColor=g;if(g=uv(b,c,e,"border",f))a.border=g;if(g=uv(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=g}(g=uv(b,c,e,"fontWeight",f))&&
|
|
871
|
+
"bold"==g&&(a.fontWeight=700);g=uv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=uv(b,c,e,"lineHeight",f))&&g.match(xv)&&(a.lineHeight=g);(g=uv(b,c,e,"fontSize",f))&&(g.match(xv)||g.match(yv))&&(a.fontSize=g);if(g=uv(b,c,e,"fontStyle",f))a.fontStyle=zb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=uv(b,c,e,"textOutline",
|
|
872
|
+
f))d=d.split(" "),d[0].match(xv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(xv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=uv(b,c,e,"letterSpacing",f))&&d.match(xv)&&(a.letterSpacing=d);(d=uv(b,c,e,"linePadding",f))&&d.match(xv)&&(a.linePadding=d);if(f=uv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=nv(c,e,"textDecoration"))&&zv(a,c);(b=Av(b,e,"textDecoration"))&&zv(a,b)}
|
|
873
|
+
function zv(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&eb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&eb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
874
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function uv(a,b,c,d,e){e=void 0===e?!0:e;return(a=Av(a,c,d))?a:e?nv(b,c,d):null}function nv(a,b,c){if(!a)return null;var d=Uf(a,jv,c);return d?d:Bv(a,b,c)}function Av(a,b,c){var d=Uf(a,jv,c);return d?d:Bv(a,b,c)}
|
|
875
|
+
function Bv(a,b,c){a=qv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Tf(a[e],"urn:ebu:tt:style",c);f||(f=Uf(a[e],jv,c));f||(f=Av(a[e],b,c));f&&(d=f)}return d}
|
|
876
|
+
function qv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Tf(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function sv(a,b,c,d){a=rv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
|
|
877
|
+
function rv(a,b){var c=Cv(a.getAttribute("begin"),b),d=Cv(a.getAttribute("end"),b);a=Cv(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
878
|
+
function Cv(a,b){var c=null;if(Dv.test(a)){a=Dv.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(Ev.test(a))c=Fv(Ev,a);else if(Gv.test(a))c=Fv(Gv,a);else if(Hv.test(a))a=Hv.exec(a),c=Number(a[1])/b.frameRate;else if(Iv.test(a))a=Iv.exec(a),c=Number(a[1])/b.g;else if(Jv.test(a))c=Fv(Jv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
879
|
+
function Fv(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}M("shaka.text.TtmlTextParser",hv);hv.prototype.parseMedia=hv.prototype.parseMedia;hv.prototype.setSequenceMode=hv.prototype.setSequenceMode;hv.prototype.parseInit=hv.prototype.parseInit;
|
|
880
|
+
function kv(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
881
|
+
var lv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,yv=/^(\d{1,2}(?:\.\d+)?|100)%$/,xv=/^(\d+px|\d+em|\d*\.?\d+c)$/,mv=/^(\d+)px (\d+)px$/,Dv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Ev=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Gv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Hv=/^(\d*(?:\.\d*)?)f$/,Iv=/^(\d*(?:\.\d*)?)t$/,Jv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),wv={left:ob,center:"center",right:"end",start:ob,
|
|
882
|
+
end:"end"},vv={left:"line-left",center:"center",right:"line-right"},iv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],jv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],pv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];dd["application/ttml+xml"]=function(){return new hv};function Kv(){this.g=new hv}Kv.prototype.parseInit=function(a){var b=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};Kv.prototype.setSequenceMode=function(){};Kv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Bf).box("mdat",If(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};
|
|
883
|
+
M("shaka.text.Mp4TtmlParser",Kv);Kv.prototype.parseMedia=Kv.prototype.parseMedia;Kv.prototype.setSequenceMode=Kv.prototype.setSequenceMode;Kv.prototype.parseInit=Kv.prototype.parseInit;dd['application/mp4; codecs="stpp"']=function(){return new Kv};dd['application/mp4; codecs="stpp.ttml"']=function(){return new Kv};dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Kv};dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Kv};function Lv(){this.g=!1}Lv.prototype.parseInit=function(){};Lv.prototype.setSequenceMode=function(a){this.g=a};
|
|
884
|
+
Lv.prototype.parseMedia=function(a,b){a=Bc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new N(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Mv(new sq(d[1]));if(null==a)throw new N(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
|
|
885
885
|
e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new sq(d);var f=new jb;vq(d);tq(d);for(var g=vq(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
|
|
886
|
-
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");tq(d);g=vq(d)}b.push(f)}e=new Map;
|
|
886
|
+
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");tq(d);g=vq(d)}b.push(f)}e=new Map;Nv(e);d=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=r(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
|
|
887
887
|
(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new hb(0,0,""));for(var m=!1,p=0;p<k.length;p++){var n=/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(n){var t=n[2].trim().replace(";","");switch(n[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=t;break;case "color":m=!0;l.color=t;break;case "font-family":m=!0;l.fontFamily=t;break;case "font-size":m=!0;l.fontSize=t;break;case "font-weight":if(700<=parseInt(t,10)||"bold"==
|
|
888
888
|
t)m=!0,l.fontWeight=700;break;case "font-style":switch(t){case "normal":m=!0;l.fontStyle=rb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(t);break;case "text-shadow":m=!0;l.textShadow=t;break;case "white-space":m=!0,l.wrapLine="noWrap"!=t}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));
|
|
889
|
-
g=new sq(f[0]);k=
|
|
890
|
-
function
|
|
891
|
-
function Ov(a,b,c){0===c.size&&
|
|
889
|
+
g=new sq(f[0]);k=Mv(g);p=uq(g,/[ \t]+--\x3e[ \t]+/g);l=Mv(g);if(null==k||null==p||null==l)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.payload=""):f=new hb(k,l,"");Ov(m,f,e);tq(g);for(k=vq(g);k;)Pv(f,k,b),tq(g),k=vq(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
|
|
890
|
+
function Nv(a){for(var b=r(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new hb(0,0,"");e.color=d;a.set("."+c,e)}b=r(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new hb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
891
|
+
function Ov(a,b,c){0===c.size&&Nv(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+1:">"===a[e]&&0<f&&(f=
|
|
892
892
|
a.substr(f,e-f),f.match(Qv)&&d.push(f),f=-1);d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):
|
|
893
|
-
">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=fg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=r(e);for(e=a.next();!e.done;e=a.next())
|
|
894
|
-
function
|
|
895
|
-
function
|
|
896
|
-
h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=
|
|
897
|
-
r(a.childNodes),a=b.next();!a.done;a=b.next())
|
|
893
|
+
">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=fg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=Rv(a);return}a=r(e);for(e=a.next();!e.done;e=a.next())Sv(e.value,b,d,c);b.nestedCues=d}else b.payload=Rv(a)}
|
|
894
|
+
function Tv(a,b){return a&&0<a.length?a:b}
|
|
895
|
+
function Sv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=Tv(h.backgroundColor,e.backgroundColor),e.color=Tv(h.color,e.color),e.fontFamily=Tv(h.fontFamily,e.fontFamily),e.fontSize=Tv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
|
|
896
|
+
h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Mv(new sq(g)))e.startTime=g}}if(Wf(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=Rv(a),c.push(f)),f=!1;else for(b=
|
|
897
|
+
r(a.childNodes),a=b.next();!a.done;a=b.next())Sv(a.value,e,c,d)}
|
|
898
898
|
function Pv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=lb:a.textAlign=ub[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
|
|
899
|
-
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
900
|
-
function
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
c+n.ad:a;a=y+(t||0);var x=0;do{var v=m.N();x+=v;var w=m.N(),D=null;"vttc"==Jf(w)?8<v&&(D=m.$a(v-8)):m.skip(v-8);t&&D&&(v=
|
|
904
|
-
function
|
|
905
|
-
function
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={sd:e.sd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=
|
|
909
|
-
function
|
|
899
|
+
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Uv(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=nb,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function Uv(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
|
|
900
|
+
function Mv(a){a=uq(a,Qv);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function Rv(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}M("shaka.text.VttTextParser",Lv);Lv.prototype.parseMedia=Lv.prototype.parseMedia;
|
|
901
|
+
Lv.prototype.setSequenceMode=Lv.prototype.setSequenceMode;Lv.prototype.parseInit=Lv.prototype.parseInit;var Qv=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;dd["text/vtt"]=function(){return new Lv};dd['text/vtt; codecs="vtt"']=function(){return new Lv};dd['text/vtt; codecs="wvtt"']=function(){return new Lv};function Vv(){this.g=null}Vv.prototype.parseInit=function(a){var b=this,c=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).U("mdhd",function(d){d=hi(d.reader,d.version);b.g=d.timescale}).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};Vv.prototype.setSequenceMode=function(){};
|
|
902
|
+
Vv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Bf).box("moof",Ff).box("traf",Ff).U("tfdt",function(z){g=!0;c=gi(z.reader,z.version).pe}).U("tfhd",function(z){l=fi(z.reader,z.flags).ve}).U("trun",function(z){h=!0;d=ii(z.reader,z.version,z.flags).Ne}).box("mdat",If(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);a=c;for(var m=new yf(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;var t=n.Yd||l,y=n.ad?
|
|
903
|
+
c+n.ad:a;a=y+(t||0);var x=0;do{var v=m.N();x+=v;var w=m.N(),D=null;"vttc"==Jf(w)?8<v&&(D=m.$a(v-8)):m.skip(v-8);t&&D&&(v=Wv(D,b.periodStart+y/this.g,b.periodStart+a/this.g),f.push(v))}while(n.sampleSize&&x<n.sampleSize)}return f.filter(cc)};function Wv(a,b,c){var d,e,f;(new Bf).box("payl",If(function(g){d=Bc(g)})).box("iden",If(function(g){e=Bc(g)})).box("sttg",If(function(g){f=Bc(g)})).parse(a);return d?Xv(d,e,f,b,c):null}
|
|
904
|
+
function Xv(a,b,c,d,e){d=new hb(d,e,"");Ov(a,d,new Map);b&&(d.id=b);if(c)for(a=new sq(c),b=vq(a);b;)Pv(d,b,[]),tq(a),b=vq(a);return d}M("shaka.text.Mp4VttParser",Vv);Vv.prototype.parseMedia=Vv.prototype.parseMedia;Vv.prototype.setSequenceMode=Vv.prototype.setSequenceMode;Vv.prototype.parseInit=Vv.prototype.parseInit;dd['application/mp4; codecs="wvtt"']=function(){return new Vv};function Yv(){}Yv.prototype.parseInit=function(){};Yv.prototype.setSequenceMode=function(){};Yv.prototype.parseMedia=function(a){var b=Bc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new sq(c[0]),e=Zv(d),f=uq(d,/,/g);d=Zv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
905
|
+
function Zv(a){a=uq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",Yv);Yv.prototype.parseMedia=Yv.prototype.parseMedia;Yv.prototype.setSequenceMode=Yv.prototype.setSequenceMode;Yv.prototype.parseInit=Yv.prototype.parseInit;dd["text/x-subviewer"]=function(){return new Yv};function $v(){this.g=new Lv}$v.prototype.parseInit=function(){};$v.prototype.setSequenceMode=function(){};$v.prototype.parseMedia=function(a,b){a=Bc(a);a=aw(a);a=Fb(Ic(a));return this.g.parseMedia(a,b)};function aw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",$v);
|
|
906
|
+
$v.srt2webvtt=aw;$v.prototype.parseMedia=$v.prototype.parseMedia;$v.prototype.setSequenceMode=$v.prototype.setSequenceMode;$v.prototype.parseInit=$v.prototype.parseInit;dd["text/srt"]=function(){return new $v};function bw(){}bw.prototype.parseInit=function(){};bw.prototype.setSequenceMode=function(){};
|
|
907
|
+
bw.prototype.parseMedia=function(a){var b="",c="";a=Bc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=cw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=dw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(ew);else if("Style"==e){e=f.split(ew);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
908
|
+
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={sd:e.sd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=dw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(ew);else if("Dialogue"==f){g=g.split(ew);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=fw(f.Start);var k=fw(f.End);g=new hb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.sd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.sd}}(e)))&&gw(g,f);d.push(g)}return d};
|
|
909
|
+
function gw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=hw(c))a.color=c;if(c=b.BackColour)if(c=hw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=pb;a.textAlign="start";break;case 2:a.displayAlign=pb;a.textAlign=lb;break;case 3:a.displayAlign=pb;a.textAlign="end";
|
|
910
910
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=lb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=lb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
911
|
-
function
|
|
912
|
-
var
|
|
911
|
+
function hw(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function fw(a){a=iw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",bw);bw.prototype.parseMedia=bw.prototype.parseMedia;bw.prototype.setSequenceMode=bw.prototype.setSequenceMode;bw.prototype.parseInit=bw.prototype.parseInit;
|
|
912
|
+
var cw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,dw=/^\s*([^:]+):\s*(.*)/,ew=/\s*,\s*/,iw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;dd["text/x-ssa"]=function(){return new bw};/*
|
|
913
913
|
@license
|
|
914
914
|
EME Encryption Scheme Polyfill
|
|
915
915
|
Copyright 2019 Google LLC
|
|
916
916
|
SPDX-License-Identifier: Apache-2.0
|
|
917
917
|
*/
|
|
918
|
-
function
|
|
919
|
-
function
|
|
918
|
+
function jw(){}var kw;function lw(){kw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(kw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=mw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
919
|
+
function mw(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,kw.call(c,a,b),2);d=e.h;if(nw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=kw,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=ow;return e.return(ow.call(c,
|
|
920
920
|
a,b))})}
|
|
921
|
-
function
|
|
922
|
-
p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,
|
|
923
|
-
function
|
|
924
|
-
function
|
|
925
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
926
|
-
function
|
|
927
|
-
new
|
|
928
|
-
function
|
|
929
|
-
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}M("McEncryptionSchemePolyfill",
|
|
930
|
-
|
|
931
|
-
function
|
|
932
|
-
function
|
|
921
|
+
function ow(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return K(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=pw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=qw(h.videoCapabilities,d),l=qw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw p=Error("Unsupported keySystem or supportedConfigurations."),
|
|
922
|
+
p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,kw.call(c,a,e),2)}n=t.h;return t.return(new rw(n,d))})}function qw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",jw);jw.install=lw;function sw(){}var tw;
|
|
923
|
+
function uw(){tw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(tw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=vw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
924
|
+
function vw(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,tw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&nw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=tw,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
925
|
+
navigator.mediaCapabilities.decodingInfo=ww;if(d){f.A(3);break}e=c;return u(f,xw(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(ww.call(b,a))}})}
|
|
926
|
+
function ww(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=pw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,tw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
927
|
+
new rw(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,xw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
928
|
+
function xw(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
|
|
929
|
+
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}M("McEncryptionSchemePolyfill",sw);sw.install=uw;function rw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
930
|
+
rw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};rw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
931
|
+
function pw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function nw(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
932
|
+
function yw(){}function It(){lw();uw()}M("EncryptionSchemePolyfills",yw);yw.install=It;"undefined"!==typeof module&&module.exports&&(module.exports=yw);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
933
933
|
|
|
934
934
|
//# sourceMappingURL=shaka-player.compiled.map
|