shaka-player 4.6.16 → 4.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/locales.js +32 -32
- package/dist/shaka-player.compiled.debug.js +10 -11
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +202 -201
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +12 -14
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +229 -228
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/faq.md +13 -0
- package/docs/tutorials/offline.md +3 -0
- package/lib/media/playhead.js +3 -3
- package/lib/media/streaming_engine.js +1 -13
- package/lib/player.js +7 -3
- package/lib/util/stream_utils.js +2 -3
- package/package.json +1 -1
- package/test/media/playhead_unit.js +1 -1
package/dist/shaka-player.ui.js
CHANGED
|
@@ -15,10 +15,10 @@ 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 ia(aa(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
16
|
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function w(a){if(!(a instanceof Array)){a=t(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.
|
|
19
|
-
function sa(a,b){a.i={
|
|
20
|
-
function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.
|
|
21
|
-
function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.
|
|
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.lk=b.prototype}function qa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function ra(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}qa.prototype.u=function(a){this.h=a};
|
|
19
|
+
function sa(a,b){a.i={Hg:b,Pg:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function D(a,b,c){a.g=c;return{value:b}}qa.prototype.F=function(a){this.g=a};function F(a){a.g=0}function ta(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a,b){a.m=0;a.j=b||0}function va(a,b,c){a.g=b;a.m=c||0}function wa(a,b){a.m=b||0;b=a.i.Hg;a.i=null;return b}function xa(a){a.C=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Pg?a.g=a.m||a.j:void 0!=c.F&&a.j<c.F?(a.g=c.F,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new qa;this.h=a}function Aa(a,b){ra(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ca(a)}
|
|
21
|
+
function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Pg)throw b.Hg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
22
|
function Da(a){this.next=function(b){ra(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Ca(a));return b};this.throw=function(b){ra(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.u):(sa(a.g,b),b=Ca(a));return b};this.return=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}function Ea(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
|
|
23
23
|
function K(a){return Ea(new Da(new za(a)))}function Fa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
24
24
|
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
@@ -39,7 +39,7 @@ function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,
|
|
|
39
39
|
ea("Set",function(a){function b(c){this.g=new Map;if(c){c=t(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(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
40
40
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
|
|
41
41
|
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
|
|
42
|
-
function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{
|
|
42
|
+
function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{Ng:e,v:f}}return{Ng:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).Ng}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
|
|
43
43
|
ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function La(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
|
|
44
44
|
ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=La(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
|
|
45
45
|
var Ma="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ga(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Ma});ea("Array.prototype.values",function(a){return a?a:function(){return Ja(this,function(b,c){return c})}});
|
|
@@ -56,8 +56,8 @@ function L(a,b){a=a.split(".");var c=Na;a[0]in c||"undefined"==typeof c.execScri
|
|
|
56
56
|
*/
|
|
57
57
|
function O(a,b){if(b)if(b instanceof Map)for(var c=t(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}
|
|
58
58
|
function Oa(a){var b=new O(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}O.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};O.prototype.stopImmediatePropagation=function(){this.g=!0};O.prototype.stopPropagation=function(){};L("shaka.util.FakeEvent",O);
|
|
59
|
-
var Pa={
|
|
60
|
-
|
|
59
|
+
var Pa={oj:"abrstatuschanged",pj:"adaptation",qj:"buffering",rj:"complete",sj:"downloadfailed",tj:"downloadheadersreceived",uj:"drmsessionupdate",wj:"emsg",Mj:"prft",Error:"error",xj:"expirationupdated",yj:"firstquartile",zj:"gapjumped",Cj:"keystatuschanged",Ej:"loaded",Fj:"loading",Hj:"manifestparsed",Ij:"manifestupdated",Jj:"mediaqualitychanged",Metadata:"metadata",Kj:"midpoint",Lj:"onstatechange",Oj:"ratechange",Pj:"segmentappended",Qj:"sessiondata",Rj:"stalldetected",Sj:"started",Tj:"statechanged",
|
|
60
|
+
Uj:"streaming",Vj:"textchanged",Wj:"texttrackvisibility",Xj:"thirdquartile",Yj:"timelineregionadded",Zj:"timelineregionenter",$j:"timelineregionexit",bk:"trackschanged",dk:"unloading",fk:"variantchanged"};function Qa(){}function Ra(){}function Sa(){}function Ta(a){var b=Fa.apply(1,arguments);Ua.has(a)||(Ua.add(a),Sa.apply(Qa,w(b)))}function Va(){}function Wa(){}function Ya(){}function Za(){}var Ua=new Set;window.console&&(Sa=function(){return console.warn.apply(console,w(Fa.apply(0,arguments)))},Ra=function(){console.error.apply(console,w(Fa.apply(0,arguments)))});function $a(){this.g={}}p=$a.prototype;p.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};p.get=function(a){return(a=this.g[a])?a.slice():null};p.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};p.forEach=function(a){for(var b in this.g)a(b,this.g[b])};p.size=function(){return Object.keys(this.g).length};p.keys=function(){return Object.keys(this.g)};function ab(){this.ma=new $a;this.me=this}ab.prototype.addEventListener=function(a,b){this.ma&&this.ma.push(a,b)};ab.prototype.removeEventListener=function(a,b){this.ma&&this.ma.remove(a,b)};ab.prototype.dispatchEvent=function(a){if(!this.ma)return!0;var b=this.ma.get(a.type)||[],c=this.ma.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.me;a.currentTarget=this.me;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
61
61
|
ab.prototype.release=function(){this.ma=null};function bb(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function cb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function db(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function eb(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
|
|
62
62
|
@license
|
|
63
63
|
Copyright 2008 The Closure Library Authors
|
|
@@ -86,7 +86,7 @@ NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CE
|
|
|
86
86
|
CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,
|
|
87
87
|
CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function Bb(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new gb(a[0]);b=new gb(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new gb(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new gb(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
|
|
88
88
|
function Cb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}function Db(a,b){if(1==b.length)return b[0];a=Eb(a,b);if(null!=a)return a;throw new P(2,4,4025,b);}
|
|
89
|
-
function Eb(a,b){for(var c=t(Hb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Ib?"":null}var Ib="text",Jb={na:"video",W:"audio",ya:Ib,jd:"image",
|
|
89
|
+
function Eb(a,b){for(var c=t(Hb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Ib?"":null}var Ib="text",Jb={na:"video",W:"audio",ya:Ib,jd:"image",mj:"application"},Hb={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/,/^iamf/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Kb(){}function Lb(a,b){a=Nb(a);b=Nb(b);return a.split("-")[0]==b.split("-")[0]}function Ob(a,b){a=Nb(a);b=Nb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Pb(a,b){a=Nb(a);b=Nb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
|
|
90
90
|
function Nb(a){a=t(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=t(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=Qb.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function Rb(a,b){var c=Sb(a),d=Sb(b);return a!=c&&b!=d&&c==d}function Tb(a,b){a=Nb(a);b=Nb(b);return b==a?4:Ob(b,a)?3:Pb(b,a)?2:Ob(a,b)?1:0}
|
|
91
91
|
function Sb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Qb.get(a)||a}function Ub(a){return a.language?Nb(a.language):a.audio&&a.audio.language?Nb(a.audio.language):a.video&&a.video.language?Nb(a.video.language):"und"}
|
|
92
92
|
function Vb(a,b){a=Nb(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(Nb(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Ob(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Pb(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Ob(a,b))return b;return null}L("shaka.util.LanguageUtils",Kb);Kb.findClosestLocale=Vb;Kb.getLocaleForVariant=Ub;
|
|
@@ -97,12 +97,12 @@ var Qb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
97
97
|
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
98
98
|
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
99
99
|
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Wb(a){ab.call(this);this.j=Nb(a);this.i=new Map;this.g=new Set;this.h=new Map}pa(Wb,ab);p=Wb.prototype;p.release=function(){ab.prototype.release.call(this)};
|
|
100
|
-
p.
|
|
101
|
-
p.wa=function(a,b,c){a=Nb(a);void 0===c&&(c=Yb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Yb||d.set(f,e)});this.h.set(a,d);Xb(this);this.dispatchEvent(new O("locale-updated"));return this};p.
|
|
102
|
-
p.
|
|
100
|
+
p.zg=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Nb(c.value));Xb(this);a=eb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new O("unknown-locales",(new Map).set("locales",a)));a=eb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new O("locale-changed",a))};
|
|
101
|
+
p.wa=function(a,b,c){a=Nb(a);void 0===c&&(c=Yb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Yb||d.set(f,e)});this.h.set(a,d);Xb(this);this.dispatchEvent(new O("locale-updated"));return this};p.Xi=function(a){for(var b=t(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};p.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new O("unknown-localization",a));return""};
|
|
102
|
+
p.Rh=function(){return this.g};
|
|
103
103
|
function Xb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=t(d),h=g.next();!h.done;f={yc:f.yc},h=g.next()){f.yc=h.value;e.add(f.yc);e.add(Sb(f.yc));h=eb(b.keys(),function(l){return function(m){return Rb(m,l.yc)}}(f));h.sort();var k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=eb(b.keys(),function(l){return function(m){return Sb(m)==l.yc}}(f));h.sort();k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=t(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
|
|
104
|
-
c.reverse();a.i.clear();b=t(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=t(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Zb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new O("missing-localizations",d)))}function Zb(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}L("shaka.ui.Localization",Wb);Wb.prototype.getCurrentLocales=Wb.prototype.
|
|
105
|
-
Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.
|
|
104
|
+
c.reverse();a.i.clear();b=t(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=t(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Zb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new O("missing-localizations",d)))}function Zb(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}L("shaka.ui.Localization",Wb);Wb.prototype.getCurrentLocales=Wb.prototype.Rh;
|
|
105
|
+
Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Xi;Wb.prototype.insert=Wb.prototype.wa;Wb.prototype.changeLocale=Wb.prototype.zg;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";function $b(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}$b.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function ac(a){return a.h/(1-Math.pow(a.g,a.i))};function bc(){this.h=new $b(2);this.j=new $b(5);this.g=0;this.i=128E3;this.l=16E3}bc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};bc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};bc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(ac(this.h),ac(this.j))};function dc(){this.g=new $a}p=dc.prototype;p.release=function(){this.rb();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new ec(a,b,c,d),this.g.push(b,a))};p.ka=function(a,b,c,d){function e(g){f.cc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.cc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.cc(),this.g.remove(b,e))}};
|
|
106
106
|
p.rb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,w(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.cc();this.g.g={}}};L("shaka.util.EventManager",dc);dc.prototype.removeAll=dc.prototype.rb;dc.prototype.unlisten=dc.prototype.cc;dc.prototype.listenOnce=dc.prototype.ka;dc.prototype.listen=dc.prototype.o;dc.prototype.release=dc.prototype.release;function ec(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=fc(a,d);this.target.addEventListener(b,c,this.g)}
|
|
107
107
|
ec.prototype.cc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function fc(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return gc(a)?b:b.capture||!1}
|
|
108
108
|
function gc(a){var b=hc;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}hc=b}return b||!1}var hc=void 0;function ic(a){if(jc.has(a))return jc.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);jc.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),jc.set(a,b),b):!1}function kc(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var jc=new Map;function lc(){}lc.prototype.extract=function(){};lc.prototype.decode=function(){return[]};lc.prototype.clear=function(){};lc.prototype.getStreams=function(){return[]};function mc(){}mc.prototype.init=function(){};mc.prototype.parse=function(){return[]};function nc(){}function oc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(pc(a)==pc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=qc(a);b=qc(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function pc(a){return a instanceof ArrayBuffer?a:a.buffer}function rc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
@@ -155,7 +155,7 @@ function pe(a){return{id:a.id,active:!1,type:Ib,bandwidth:0,language:a.language,
|
|
|
155
155
|
originalVideoId:null,originalAudioId:null,originalTextId:a.originalId,originalImageId:null,accessibilityPurpose:a.accessibilityPurpose,originalLanguage:a.originalLanguage}}
|
|
156
156
|
function qe(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,
|
|
157
157
|
primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId,accessibilityPurpose:null,originalLanguage:null}}function re(a){a.__shaka_id||(a.__shaka_id=se++);return a.__shaka_id}
|
|
158
|
-
function te(a){var b=ue(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="
|
|
158
|
+
function te(a){var b=ue(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="unknown");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ve(a){var b=ue(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
|
|
159
159
|
function ue(a){var b=a.language;return{id:re(a),active:!1,type:"",bandwidth:0,language:Nb(b||"und"),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
|
|
160
160
|
originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function we(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function xe(a){return a.filter(function(b){return we(b)})}
|
|
161
161
|
function ye(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Vb(Nb(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Nb(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ze(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(yd,[]);return a.length?
|
|
@@ -170,7 +170,7 @@ p.segmentDownloaded=function(a,b,c){this.i.sample(a,b);if(c&&null!=this.u&&this.
|
|
|
170
170
|
p.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.T(Fe)}),this.h.observe(this.j))};p.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function Ee(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
|
|
171
171
|
function Ce(a,b,c,d){a&&(b=b.filter(function(e){return Yd(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}function De(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}L("shaka.abr.SimpleAbrManager",Be);Be.prototype.configure=Be.prototype.configure;Be.prototype.setMediaElement=Be.prototype.setMediaElement;
|
|
172
172
|
Be.prototype.playbackRateChanged=Be.prototype.playbackRateChanged;Be.prototype.setVariants=Be.prototype.setVariants;Be.prototype.getBandwidthEstimate=Be.prototype.getBandwidthEstimate;Be.prototype.segmentDownloaded=Be.prototype.segmentDownloaded;Be.prototype.disable=Be.prototype.disable;Be.prototype.enable=Be.prototype.enable;Be.prototype.chooseVariant=Be.prototype.chooseVariant;Be.prototype.init=Be.prototype.init;Be.prototype.release=Be.prototype.release;Be.prototype.stop=Be.prototype.stop;
|
|
173
|
-
var Fe=1;function Ge(a,b){this.g=a;this.h=b}Ge.prototype.toString=function(){return"v"+this.g+"."+this.h};function He(a,b){var c=new Ge(5,0),d=Ie,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Je(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ke(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var Ie=null;L("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});L("shaka.config.CodecSwitchingStrategy",{
|
|
173
|
+
var Fe=1;function Ge(a,b){this.g=a;this.h=b}Ge.prototype.toString=function(){return"v"+this.g+"."+this.h};function He(a,b){var c=new Ge(5,0),d=Ie,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Je(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ke(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var Ie=null;L("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});L("shaka.config.CodecSwitchingStrategy",{Nj:"reload",qh:"smooth"});function Le(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Le.prototype.add=function(a,b,c){return Me(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
174
174
|
function Me(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||c&&!Ne(e,f)||!Oe(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Ne(a,b))&&Oe(a.roles,b.roles)));return d?!1:!0}Le.prototype.values=function(){return this.g.values()};
|
|
175
175
|
function Ne(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return nd(d)[0]});b=b.codecs.split(",").map(function(d){return nd(d)[0]});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Oe(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Pe(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Se(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"","","",b,c)}Pe.prototype.create=function(a){var b=this,c="smooth"==this.h&&kc(),d=a.filter(function(e){return Me(b.i,e,!c,b.g)});return d.length?new Le(d[0],d,!c,this.g):this.j.create(a)};
|
|
176
176
|
function Se(a,b,c,d,e,f,g,h){this.s=a;this.u=b;this.g=c;this.h=d;this.j=e;this.i=void 0===f?"":f;this.l=void 0===g?"reload":g;this.m=void 0===h?!1:h}
|
|
@@ -180,26 +180,26 @@ function We(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"P
|
|
|
180
180
|
function ff(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return D(d,new Promise(function(e){(new Cd(e)).T(c/1E3)}),2)}a.h*=a.m;F(d)})}function ef(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function gf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}gf.prototype.resolve=function(){};gf.prototype.reject=function(){};function hf(a,b){this.promise=a;this.i=b;this.g=!1}function jf(a){return new hf(Promise.reject(a),function(){return Promise.resolve()})}function kf(){var a=Promise.reject(new P(2,7,7001));a.catch(function(){});return new hf(a,function(){return Promise.resolve()})}function lf(a){return new hf(Promise.resolve(a),function(){return Promise.resolve()})}function mf(a){return new hf(a,function(){return a.catch(function(){})})}hf.prototype.abort=function(){this.g=!0;return this.i()};
|
|
181
181
|
function nf(a){return new hf(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}hf.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
182
182
|
hf.prototype.Da=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=of(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new gf,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new hf(f,function(){return d()})};
|
|
183
|
-
function of(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()}}}L("shaka.util.AbortableOperation",hf);hf.prototype.chain=hf.prototype.Da;hf.prototype["finally"]=hf.prototype.finally;hf.all=nf;hf.prototype.abort=hf.prototype.abort;hf.notAbortable=mf;hf.completed=lf;hf.aborted=kf;hf.failed=jf;function pf(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 WeakSet;return b(a)}function qf(a){var b={},c;for(c in a)b[c]=a[c];return b};function rf(){this.g=[]}function sf(a,b){a.g.push(b.finally(function(){Bc(a.g,b)}))}rf.prototype.destroy=function(){for(var a=[],b=t(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 tf(a,b,c,d,e){ab.call(this);this.i=!1;this.m=new rf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.u=c||null;this.C=d||null;this.D=e||null;this.s=!1}pa(tf,ab);p=tf.prototype;p.
|
|
184
|
-
p.
|
|
183
|
+
function of(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()}}}L("shaka.util.AbortableOperation",hf);hf.prototype.chain=hf.prototype.Da;hf.prototype["finally"]=hf.prototype.finally;hf.all=nf;hf.prototype.abort=hf.prototype.abort;hf.notAbortable=mf;hf.completed=lf;hf.aborted=kf;hf.failed=jf;function pf(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 WeakSet;return b(a)}function qf(a){var b={},c;for(c in a)b[c]=a[c];return b};function rf(){this.g=[]}function sf(a,b){a.g.push(b.finally(function(){Bc(a.g,b)}))}rf.prototype.destroy=function(){for(var a=[],b=t(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 tf(a,b,c,d,e){ab.call(this);this.i=!1;this.m=new rf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.u=c||null;this.C=d||null;this.D=e||null;this.s=!1}pa(tf,ab);p=tf.prototype;p.fg=function(a){this.s=a};function uf(a,b,c,d){c=c||vf;var e=wf[a];if(!e||c>=e.priority)wf[a]={priority:c,Ae:b,Oi:void 0===d?!1:d}}p.Pi=function(a){this.g.add(a)};p.ij=function(a){this.g.delete(a)};p.Ah=function(){this.g.clear()};p.Qi=function(a){this.h.add(a)};p.jj=function(a){this.h.delete(a)};
|
|
184
|
+
p.Bh=function(){this.h.clear()};function xf(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}}p.destroy=function(){this.i=!0;this.g.clear();this.h.clear();ab.prototype.release.call(this);return this.m.destroy()};
|
|
185
185
|
p.request=function(a,b,c){var d=this,e=new yf;if(this.i){var f=Promise.reject(new P(2,7,7001));f.catch(function(){});return new zf(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?pf(b.retryParameters):ef();b.uris=pf(b.uris);f=Af(this,a,b,c);var g=f.Da(function(){return Bf(d,a,b,c,new df(b.retryParameters,!1),0,null,e)}),h=g.Da(function(q){return Cf(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
186
|
-
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Da(function(q){var r=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=r;q.
|
|
186
|
+
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Da(function(q){var r=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=r;q.ri||!d.l||u.fromCache||"HEAD"==b.method||a!=Df||d.l(u.timeMs,u.data.byteLength,Ef(c));return u},function(q){q&&(q.severity=2);throw q;});f=new zf(n.promise,function(){return n.abort()},e);sf(this.m,f);return f};
|
|
187
187
|
function Af(a,b,c,d){function e(h){f=f.Da(function(){c.body&&(c.body=rc(c.body));return h(b,c,d)})}var f=lf(void 0);a.C&&e(a.C);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Da(void 0,function(h){if(h instanceof P&&7001==h.code)throw h;throw new P(2,1,1006,h);})}
|
|
188
|
-
function Bf(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.D&&a.D(b,d,c.uris[f],c.uris[f-1]);var k=new gb(c.uris[f]),l=k.ub,m=!1;l||(l=location.protocol,l=l.slice(0,-1),jb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=wf[l])?l.Ae:null;if(!n)return jf(new P(2,1,1E3,k));var q=l.
|
|
189
|
-
m=!0,h.g=H)},function(C){a.j&&a.j(C,c,b);y=!0});if(!q)return x;var A=c.retryParameters.connectionTimeout;A&&(r=new Cd(function(){v=!0;x.abort()}),r.T(A/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Cd(function(){v=!0;x.abort()}));return x}).Da(function(x){r&&r.stop();u&&u.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-z);var A={response:x,
|
|
188
|
+
function Bf(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.D&&a.D(b,d,c.uris[f],c.uris[f-1]);var k=new gb(c.uris[f]),l=k.ub,m=!1;l||(l=location.protocol,l=l.slice(0,-1),jb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=wf[l])?l.Ae:null;if(!n)return jf(new P(2,1,1E3,k));var q=l.Oi,r=null,u=null,v=!1,y=!1,z;return mf(ff(e)).Da(function(){if(a.i)return kf();z=Date.now();var x=n(c.uris[f],c,b,function(C,E,H){r&&r.stop();u&&u.T(B/1E3);a.l&&b==Df&&(a.l(C,E,Ef(d)),
|
|
189
|
+
m=!0,h.g=H)},function(C){a.j&&a.j(C,c,b);y=!0});if(!q)return x;var A=c.retryParameters.connectionTimeout;A&&(r=new Cd(function(){v=!0;x.abort()}),r.T(A/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Cd(function(){v=!0;x.abort()}));return x}).Da(function(x){r&&r.stop();u&&u.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-z);var A={response:x,ri:m};!y&&a.j&&a.j(x.headers,c,b);return A},function(x){r&&r.stop();u&&u.stop();if(a.u){var A=null,B=0;x instanceof P&&(A=x,1001==x.code&&(B=x.data[1]));a.u(c,
|
|
190
190
|
A,B,v)}if(a.i)return kf();v&&(x=new P(1,1,1003,c.uris[f],b));if(x instanceof P){if(7001==x.code)throw x;if(1010==x.code)throw g;if(1==x.severity)return A=(new Map).set("error",x),A=new O("retry",A),a.dispatchEvent(A),f=(f+1)%c.uris.length,Bf(a,b,c,d,e,f,x,h)}throw x;})}
|
|
191
191
|
function Cf(a,b,c,d){var e=lf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Re:f.Re},g=a.next())f.Re=g.value,e=e.Da(function(h){return function(){var k=c.response;k.data&&(k.data=rc(k.data));return h.Re(b,k,d)}}(f));return e.Da(function(){return c},function(h){var k=2;if(h instanceof P){if(7001==h.code)throw h;k=h.severity}throw new P(k,1,1007,h);})}function Ef(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.G&&!b.D)return!1}return!0}L("shaka.net.NetworkingEngine",tf);
|
|
192
|
-
tf.prototype.request=tf.prototype.request;tf.prototype.destroy=tf.prototype.destroy;tf.makeRequest=xf;tf.defaultRetryParameters=function(){return ef()};tf.prototype.clearAllResponseFilters=tf.prototype.
|
|
193
|
-
tf.registerScheme=uf;tf.prototype.setForceHTTPS=tf.prototype.
|
|
192
|
+
tf.prototype.request=tf.prototype.request;tf.prototype.destroy=tf.prototype.destroy;tf.makeRequest=xf;tf.defaultRetryParameters=function(){return ef()};tf.prototype.clearAllResponseFilters=tf.prototype.Bh;tf.prototype.unregisterResponseFilter=tf.prototype.jj;tf.prototype.registerResponseFilter=tf.prototype.Qi;tf.prototype.clearAllRequestFilters=tf.prototype.Ah;tf.prototype.unregisterRequestFilter=tf.prototype.ij;tf.prototype.registerRequestFilter=tf.prototype.Pi;tf.unregisterScheme=function(a){delete wf[a]};
|
|
193
|
+
tf.registerScheme=uf;tf.prototype.setForceHTTPS=tf.prototype.fg;function yf(){this.g=0}tf.NumBytesRemainingClass=yf;function zf(a,b,c){hf.call(this,a,b);this.h=c}pa(zf,hf);tf.PendingRequest=zf;var Df=1;tf.RequestType={MANIFEST:0,SEGMENT:Df,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};tf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var vf=3;tf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:vf};var wf={};function Ff(a){this.g=!1;this.h=new gf;this.i=a}Ff.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function Gf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Hf(a){this.h=a;this.g=void 0}Hf.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function If(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Jf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Kf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next()){var d=t(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Lf(){}
|
|
194
194
|
function Mf(a){if(!a)return"";a=qc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Qd())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ra('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
195
195
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
196
196
|
function Nf(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new P(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=uc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Of(d)}
|
|
197
197
|
function Pf(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=qc(a);if(239==c[0]&&187==c[1]&&191==c[2])return Mf(c);if(254==c[0]&&255==c[1])return Nf(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Nf(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Nf(a,!1);if(0==c[1]&&0==c[3])return Nf(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Mf(a);throw new P(2,2,2003);}
|
|
198
198
|
function Qf(a){if(window.TextEncoder&&!Qd()){var b=new TextEncoder;return rc(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 rc(b)}function Rf(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}function Of(a){return Sf.value()(a)}L("shaka.util.StringUtils",Lf);Lf.resetFromCharCode=function(){Sf.g=void 0};Lf.toUTF16=Rf;Lf.toUTF8=Qf;
|
|
199
199
|
Lf.fromBytesAutoDetect=Pf;Lf.fromUTF16=Nf;Lf.fromUTF8=Mf;var Sf=new Hf(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={Tb:65536};0<b.Tb;b={Tb:b.Tb},b.Tb/=2)if(a(b.Tb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Tb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Tb));return e}}(b);return null});function Tf(a,b){this.h=uc(a);this.i=b==Uf;this.g=0}p=Tf.prototype;p.qa=function(){return this.g<this.h.byteLength};p.Ea=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.ra=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Vf();}};p.Na=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Vf();}};p.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Vf();}};
|
|
200
|
-
p.
|
|
201
|
-
p.skip=function(a){if(this.g+a>this.h.byteLength)throw Vf();this.g+=a};p.
|
|
202
|
-
Tf.prototype.skip=Tf.prototype.skip;Tf.prototype.readBytes=Tf.prototype.Pb;Tf.prototype.readUint64=Tf.prototype.Qc;Tf.prototype.readInt32=Tf.prototype.
|
|
200
|
+
p.Xg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Vf();}};p.Qc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Vf();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};p.Pb=function(a){if(this.g+a>this.h.byteLength)throw Vf();var b=qc(this.h,this.g,a);this.g+=a;return b};
|
|
201
|
+
p.skip=function(a){if(this.g+a>this.h.byteLength)throw Vf();this.g+=a};p.Yi=function(a){if(this.g<a)throw Vf();this.g-=a};p.seek=function(a){if(0>a||a>this.h.byteLength)throw Vf();this.g=a};p.Cd=function(){for(var a=this.g;this.qa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=qc(this.h,a,this.g-a);this.g+=1;return Mf(a)};function Vf(){return new P(2,3,3E3)}L("shaka.util.DataViewReader",Tf);Tf.prototype.readTerminatedString=Tf.prototype.Cd;Tf.prototype.seek=Tf.prototype.seek;Tf.prototype.rewind=Tf.prototype.Yi;
|
|
202
|
+
Tf.prototype.skip=Tf.prototype.skip;Tf.prototype.readBytes=Tf.prototype.Pb;Tf.prototype.readUint64=Tf.prototype.Qc;Tf.prototype.readInt32=Tf.prototype.Xg;Tf.prototype.readUint32=Tf.prototype.O;Tf.prototype.readUint16=Tf.prototype.Na;Tf.prototype.readUint8=Tf.prototype.ra;Tf.prototype.getLength=Tf.prototype.getLength;Tf.prototype.getPosition=Tf.prototype.Ea;Tf.prototype.hasMoreData=Tf.prototype.qa;var Uf=1;Tf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Uf};function Wf(){this.i=[];this.h=[];this.g=!1}p=Wf.prototype;p.box=function(a,b){a=Xf(a);this.i[a]=Yf;this.h[a]=b;return this};p.S=function(a,b){a=Xf(a);this.i[a]=Zf;this.h[a]=b;return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new Tf(a,0);for(this.g=!1;a.qa()&&!this.g;)this.Oc(0,a,b,c)};
|
|
203
203
|
p.Oc=function(a,b,c,d){var e=b.Ea();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.O(),g=b.O(),h=$f(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ea()+8>b.getLength()){this.g=!0;return}f=b.Qc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Zf){if(d&&b.Ea()+4>b.getLength()){this.g=!0;return}n=b.O();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Ea(),b=0<d?b.Pb(d):new Uint8Array(0),b=new Tf(b,0),l({name:h,parser:this,
|
|
204
204
|
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Ea(),b.getLength()-b.Ea()))}};function ag(a){for(var b=bg(a);a.reader.qa()&&!a.parser.g;)a.parser.Oc(a.start+b,a.reader,a.partialOkay)}function cg(a){for(var b=bg(a),c=a.reader.O(),d=0;d<c&&(a.parser.Oc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function dg(a){var b=bg(a);for(a.reader.skip(78);a.reader.qa()&&!a.parser.g;)a.parser.Oc(a.start+b,a.reader,a.partialOkay)}
|
|
205
205
|
function eg(a){var b=bg(a);a.reader.skip(8);var c=a.reader.Na();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.qa()&&!a.parser.g;)a.parser.Oc(a.start+b,a.reader,a.partialOkay)}function fg(a){return function(b){a(b.reader.Pb(b.reader.getLength()-b.reader.Ea()))}}function Xf(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function $f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
@@ -237,9 +237,9 @@ function nh(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,y;return K(function(z){switch(z
|
|
|
237
237
|
z.h,z.return(c);case 6:wa(z);case 7:Gf(a.j);case 3:h=g.next();z.F(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){z.F(11);break}q=n.value;r=t(b.keys());h=r.next();case 12:if(h.done){n=m.next();z.F(9);break}u=h.value;v=b.get(u);y=v.drmInfos.some(function(x){return!!x.licenseServerUri});if(y!=q){z.F(13);break}ta(z,15);return D(z,navigator.requestMediaKeySystemAccess(u,[v]),17);case 17:return c=z.h,z.return(c);case 15:wa(z);case 16:Gf(a.j);case 13:h=r.next();z.F(12);break;case 11:return z.return(c)}})}
|
|
238
238
|
function Wg(a){a=If(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=ig(kg(f),!1));f=e;22!=f.length&&(f=ig(kg(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:qc(Qf(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
|
|
239
239
|
videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}function ph(a){ih(a)&&a.l.resolve()}function qh(a,b){(new Cd(function(){b.loaded=!0;ph(a)})).T(rh)}
|
|
240
|
-
function gh(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:try{d=a.u.createSession("persistent-license")}catch(n){return e=new P(2,6,6005,n.message),a.s(e),m.return(Promise.reject(e))}a.D.o(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.L.push(n):ch(a,n)});a.D.o(d,"keystatuseschange",function(n){return sh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,
|
|
240
|
+
function gh(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:try{d=a.u.createSession("persistent-license")}catch(n){return e=new P(2,6,6005,n.message),a.s(e),m.return(Promise.reject(e))}a.D.o(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.L.push(n):ch(a,n)});a.D.o(d,"keystatuseschange",function(n){return sh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Pf:Infinity,Ab:null,type:"persistent-license"};a.i.set(d,f);ta(m,2);return D(m,
|
|
241
241
|
d.load(b),4);case 4:return g=m.h,Gf(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.s(new P(h,6,6013)),f.loaded=!0),qh(a,f),ph(a),m.return(d);case 2:k=wa(m),Gf(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.s(new P(l,6,6005,k.message)),f.loaded=!0,ph(a);case 3:return m.return(Promise.resolve())}})}
|
|
242
|
-
function jh(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.s(new P(2,6,6005,f.message));return}a.D.o(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.L.push(f):ch(a,f)});a.D.o(e,"keystatuseschange",function(f){return sh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,
|
|
242
|
+
function jh(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.s(new P(2,6,6005,f.message));return}a.D.o(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.L.push(f):ch(a,f)});a.D.o(e,"keystatuseschange",function(f){return sh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Pf:Infinity,Ab:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof P||(b=new P(2,6,6016,f));a.s(b);return}a.h.logLicenseExchange&&ig(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
243
243
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.s(new P(2,6,6006,f.message,f,h))}})}
|
|
244
244
|
function ch(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u;K(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&ig(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=xf([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(kh(a.g.keySystem)){var y=
|
|
245
245
|
Nf(g.body,!0,!0);if(y.includes("PlayReadyKeyMessage")){y=Jg(y,"PlayReadyKeyMessage");for(var z=t(y.getElementsByTagName("HttpHeader")),x=z.next();!x.done;x=z.next())x=x.value,g.headers[x.getElementsByTagName("name")[0].textContent]=x.getElementsByTagName("value")[0].textContent;g.body=jg(y.getElementsByTagName("Challenge")[0].textContent)}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();ta(v,2);l=a.G.sc.request(2,g);return D(v,l.promise,4);case 4:k=v.h;va(v,3);break;case 2:return m=
|
|
@@ -252,22 +252,22 @@ function vh(a){var b;return K(function(c){if(1==c.g)return b=new Promise(functio
|
|
|
252
252
|
function Qg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return D(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return ta(g,2),a.ha||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?D(g,vh(e),5):D(g,e.remove(),5);if(2!=g.g)return va(g,0);wa(g);F(g)})})),0)})}function xh(a,b){return a.length&&b.length&&a!==b?0<yh(a,b).length:!0}
|
|
253
253
|
function yh(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(w(d.keyIds),w(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
254
254
|
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
|
|
255
|
-
function Yg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Og(a){a.i.forEach(function(b,c){var d=b.
|
|
255
|
+
function Yg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Og(a){a.i.forEach(function(b,c){var d=b.Pf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Pf=e)})}function ih(a){a=a.i.values();return cb(a,function(b){return b.loaded})}function hh(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.U.get(c.value))return!1;return!0}
|
|
256
256
|
function Xg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
257
257
|
function oh(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={Ta:g.Ta},h=a.next()){g.Ta=h.value;b.includes(g.Ta.licenseServerUri)||b.push(g.Ta.licenseServerUri);d.includes(g.Ta.serverCertificateUri)||d.push(g.Ta.serverCertificateUri);g.Ta.serverCertificate&&(c.some(function(m){return function(n){return oc(n,m.Ta.serverCertificate)}}(g))||c.push(g.Ta.serverCertificate));if(g.Ta.initData){h={};for(var k=t(g.Ta.initData),l=k.next();!l.done;h={Md:h.Md},l=k.next())h.Md=l.value,e.some(function(m){return function(n){var q=
|
|
258
258
|
m.Md;return n.keyId&&n.keyId==q.keyId?!0:n.initDataType==q.initDataType&&oc(n.initData,q.initData)}}(h))||e.push(h.Md)}if(g.Ta.keyIds)for(h=t(g.Ta.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
259
259
|
function Zg(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
|
|
260
|
-
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var wh=1,rh=5,th=.5,zh=new Hf(function(){return rc(new Uint8Array([0]))});function Ah(){}function Bh(a,b){if(b){var c=Ch[b.toLowerCase()];if(c)return c}throw new P(2,4,4E3,a,b);}L("shaka.media.ManifestParser",Ah);Ah.unregisterParserByMime=function(a){delete Ch[a]};Ah.registerParserByMime=function(a,b){Ch[a]=b};Ah.registerParserByExtension=function(){He("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Ah.AccessibilityPurpose={
|
|
260
|
+
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var wh=1,rh=5,th=.5,zh=new Hf(function(){return rc(new Uint8Array([0]))});function Ah(){}function Bh(a,b){if(b){var c=Ch[b.toLowerCase()];if(c)return c}throw new P(2,4,4E3,a,b);}L("shaka.media.ManifestParser",Ah);Ah.unregisterParserByMime=function(a){delete Ch[a]};Ah.registerParserByMime=function(a,b){Ch[a]=b};Ah.registerParserByExtension=function(){He("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Ah.AccessibilityPurpose={ek:"visually impaired",Aj:"hard of hearing"};var Ch={};function Dh(a){function b(){d=!0}function c(l){f.push(l);ag(l)}a=qc(a);var d=!1,e,f=[],g=[];(new Wf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).S("stsd",function(l){e=l;f.push(l);cg(l)}).S("encv",b).S("enca",b).S("dvav",function(l){g.push({box:l,ab:1701733238})}).S("dva1",function(l){g.push({box:l,ab:1701733238})}).S("dvh1",function(l){g.push({box:l,ab:1701733238})}).S("dvhe",function(l){g.push({box:l,ab:1701733238})}).S("hev1",function(l){g.push({box:l,ab:1701733238})}).S("hvc1",
|
|
261
261
|
function(l){g.push({box:l,ab:1701733238})}).S("avc1",function(l){g.push({box:l,ab:1701733238})}).S("avc3",function(l){g.push({box:l,ab:1701733238})}).S("ac-3",function(l){g.push({box:l,ab:1701733217})}).S("ec-3",function(l){g.push({box:l,ab:1701733217})}).S("ac-4",function(l){g.push({box:l,ab:1701733217})}).S("mp4a",function(l){g.push({box:l,ab:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw Za(mg(a)),new P(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
|
|
262
262
|
a=Eh(a,e,k.box,f,k.ab);return a}
|
|
263
263
|
function Eh(a,b,c,d,e){var f=Fh.value(),g=a.subarray(c.start,c.start+c.size),h=uc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=uc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Gh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Hd()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Gh(e,d.start,d.size+k.byteLength);k=uc(e,b.start);b=bg(b);a=k.getUint32(b);
|
|
264
264
|
k.setUint32(b,a+1);return e}function Gh(a,b,c){a=uc(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Fh=new Hf(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Hh(a,b,c,d,e,f,g){this.ba=a;this.fb=b;this.La=c;this.Mf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g}Hh.prototype.Mb=function(){return this.fb};Hh.prototype.Jb=function(){return this.La};function Ih(a,b){return a===b?!0:a&&b?a.Mb()==b.Mb()&&a.Jb()==b.Jb()&&Dc(a.ba().sort(),b.ba().sort())&&oc(a.g,b.g):a==b}L("shaka.media.InitSegmentReference",Hh);Hh.prototype.getEndByte=Hh.prototype.Jb;Hh.prototype.getStartByte=Hh.prototype.Mb;
|
|
265
|
-
function Jh(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v){l=void 0===l?[]:l;r=void 0===r?Kh:r;this.startTime=a;this.j=this.endTime=b;this.J=c;this.fb=d;this.La=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.I=void 0===n?null:n;this.g=void 0===q?null:q;this.status=r;this.s=!1;this.m=!0;this.u=!1;this.aes128Key=void 0===u?null:u;this.H=null;this.l=0;this.C=void 0===v?!1:v;this.D=this.G=!1;a=t(this.i);for(b=a.next();!b.done;b=a.next())b.value.
|
|
266
|
-
this.C&&this.i.length&&this.i[this.i.length-1].
|
|
267
|
-
p.
|
|
268
|
-
p.
|
|
269
|
-
Jh.prototype.markAsLastPartial=Jh.prototype.
|
|
270
|
-
Jh.prototype.getEndByte=Jh.prototype.Jb;Jh.prototype.getStartByte=Jh.prototype.Mb;Jh.prototype.getEndTime=Jh.prototype.
|
|
265
|
+
function Jh(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v){l=void 0===l?[]:l;r=void 0===r?Kh:r;this.startTime=a;this.j=this.endTime=b;this.J=c;this.fb=d;this.La=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.I=void 0===n?null:n;this.g=void 0===q?null:q;this.status=r;this.s=!1;this.m=!0;this.u=!1;this.aes128Key=void 0===u?null:u;this.H=null;this.l=0;this.C=void 0===v?!1:v;this.D=this.G=!1;a=t(this.i);for(b=a.next();!b.done;b=a.next())b.value.Tg();
|
|
266
|
+
this.C&&this.i.length&&this.i[this.i.length-1].Sg()}p=Jh.prototype;p.ba=function(){return this.J()};p.getStartTime=function(){return this.startTime};p.Th=function(){return this.endTime};p.Mb=function(){return this.fb};p.Jb=function(){return this.La};p.li=function(){return this.tilesLayout};p.ki=function(){return this.I};p.lc=function(){return this.status};p.Hi=function(){this.status=Lh};p.Lf=function(){this.s=!0};p.Bi=function(){return this.s};p.qe=function(){this.m=!1};p.xi=function(){return this.m};
|
|
267
|
+
p.Tg=function(){this.G=!0};p.Ai=function(){return this.G};p.Sg=function(){this.D=!0};p.zi=function(){return this.D};p.Rg=function(){this.u=!0};p.si=function(){return this.u};p.hh=function(a){this.H=a};p.ji=function(){return this.H};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
|
|
268
|
+
p.kg=function(a){null==this.g?Ra("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};L("shaka.media.SegmentReference",Jh);Jh.prototype.syncAgainst=Jh.prototype.kg;Jh.prototype.offset=Jh.prototype.offset;Jh.prototype.getThumbnailSprite=Jh.prototype.ji;Jh.prototype.setThumbnailSprite=Jh.prototype.hh;Jh.prototype.hasByterangeOptimization=Jh.prototype.si;Jh.prototype.markAsByterangeOptimization=Jh.prototype.Rg;Jh.prototype.isLastPartial=Jh.prototype.zi;
|
|
269
|
+
Jh.prototype.markAsLastPartial=Jh.prototype.Sg;Jh.prototype.isPartial=Jh.prototype.Ai;Jh.prototype.markAsPartial=Jh.prototype.Tg;Jh.prototype.isIndependent=Jh.prototype.xi;Jh.prototype.markAsNonIndependent=Jh.prototype.qe;Jh.prototype.isPreload=Jh.prototype.Bi;Jh.prototype.markAsPreload=Jh.prototype.Lf;Jh.prototype.markAsUnavailable=Jh.prototype.Hi;Jh.prototype.getStatus=Jh.prototype.lc;Jh.prototype.getTileDuration=Jh.prototype.ki;Jh.prototype.getTilesLayout=Jh.prototype.li;
|
|
270
|
+
Jh.prototype.getEndByte=Jh.prototype.Jb;Jh.prototype.getStartByte=Jh.prototype.Mb;Jh.prototype.getEndTime=Jh.prototype.Th;Jh.prototype.getStartTime=Jh.prototype.getStartTime;Jh.prototype.getUris=Jh.prototype.ba;var Kh=0,Lh=1;Jh.Status={nj:Kh,ck:Lh,Gj:2};function Mh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Nh(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Oh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Ph(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}
|
|
271
271
|
function Qh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Ph(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ph(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};/*
|
|
272
272
|
@license
|
|
273
273
|
Shaka Player
|
|
@@ -279,8 +279,8 @@ function Vh(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
|
|
|
279
279
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Mf(qc(a.data,1,d));a=Mf(qc(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Mf(qc(a.data,1,d));a=Mf(qc(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Mf(qc(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
280
280
|
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=rc(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Mf(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Mf(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=rc(a.data),b):null}
|
|
281
281
|
function Wh(a){for(var b=0,c=[];Sh(a,b);){var d=Uh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Uh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Vh(e))&&c.push(f);b+=e.size+10}Th(a,b)&&(b+=10)}return c}function Xh(a,b){for(var c=b=void 0===b?0:b,d=0;Sh(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Uh(a,b+6),Th(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}L("shaka.util.Id3Utils",Rh);Rh.getID3Data=Xh;
|
|
282
|
-
Rh.getID3Frames=Wh;function Yh(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Qc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,
|
|
283
|
-
function bi(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={
|
|
282
|
+
Rh.getID3Frames=Wh;function Yh(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Qc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,Fg:c,Fh:d,gk:e}}function Zh(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function $h(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.Na();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
283
|
+
function bi(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Yf:null,sampleSize:null,De:null};c&256&&(h.Yf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.De=0==b?a.O():a.Xg());e.push(h)}return{kk:d,$g:e,Eh:f}}
|
|
284
284
|
function ci(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.O();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.Na()+a.Na()/16;a=a.Na()+a.Na()/16;return{trackId:c,width:b,height:a}}
|
|
285
285
|
function di(a){for(var b="mp4a",c,d;a.qa();){c=a.ra();for(var e=a.ra();e&128;)e=a.ra();if(3==c)a.Na(),e=a.ra(),e&128&&a.Na(),e&64&&a.skip(a.ra()),e&32&&a.Na();else if(4==c)d=a.ra(),a.skip(12);else if(5==c)break}d&&(b+="."+this.g(d),5==c&&a.qa()&&(c=a.ra(),d=(c&248)>>3,31===d&&a.qa()&&(d=32+((c&7)<<3)+((a.ra()&224)>>5)),b+="."+d));return{va:b}}function ei(a,b){a.skip(87);return{va:b+"."+this.g(a.ra())+this.g(a.ra())+this.g(a.ra())}}function fi(a){a=a.O();return{va:$f(a)}};/*
|
|
286
286
|
|
|
@@ -306,19 +306,19 @@ k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0
|
|
|
306
306
|
l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.je&&(g.je=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.J=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.D=
|
|
307
307
|
f.audio,this.C=f.audioCodec);-1!=f.je&&(this.G=f.je);d&&!this.I&&(d=!1,e=b-188);this.I=!0;break;case this.J:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.D:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);break;case this.G:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
308
308
|
function si(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=ti(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.s&&(a.s=d),c.dts=ti(d,
|
|
309
|
-
a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.
|
|
310
|
-
p.
|
|
309
|
+
a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.Ni=function(a){He("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Sf(a)};
|
|
310
|
+
p.Sf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var q=a[n];if(q){if(2<=g&&1==q){b&&!h.length&&-1==k&&(q=n-(3<g?3:g),c&&0!=q&&(q=a.subarray(0,q),b.data=ng(b.data,q),b.fullData=ng(b.fullData,q)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=ng(b.data,k),b.fullData=ng(b.fullData,k)));if(n>=e-f)return h;
|
|
311
311
|
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=ng(b.data,a),b.fullData=ng(b.fullData,a));return h};p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=ng.apply(gg,w(c.value)),(c=si(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Wh(c.data),dts:c.dts,pts:c.pts});return a};
|
|
312
312
|
p.jc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=ng.apply(gg,w(c.value)),e=si(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=ng(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
313
|
-
p.Hc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=ng.apply(gg,w(d.value)),f=si(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=ng(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.
|
|
313
|
+
p.Hc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=ng.apply(gg,w(d.value)),f=si(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=ng(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.Sf(d,
|
|
314
314
|
g,void 0),d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.jc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Hc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};
|
|
315
|
-
p.qd=function(){return{audio:this.C,video:this.m}};p.ee=function(){for(var a=[],b=t(this.Hc()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};p.
|
|
315
|
+
p.qd=function(){return{audio:this.C,video:this.m}};p.ee=function(){for(var a=[],b=t(this.Hc()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};p.oi=function(){He("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Cf();return{height:a.height,width:a.width}};p.Cf=function(){return"hvc"==this.m?ui(this):vi(this)};
|
|
316
316
|
function vi(a){var b={height:null,width:null,va:null};a=a.ee();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new gi(a.data);var c=ni(a),d=ni(a),e=ni(a);li(a);if(wi.includes(c)){var f=Q(a);3===f&&ii(a,1);li(a);li(a);ii(a,1);if(S(a)){f=3!==f?8:12;for(var g=0;g<f;g++)S(a)&&(6>g?oi(a,16):oi(a,64))}}li(a);f=Q(a);if(0===f)Q(a);else if(1===f)for(ii(a,1),li(a),li(a),f=Q(a),g=0;g<f;g++)li(a);li(a);ii(a,1);f=Q(a);g=Q(a);var h=ji(a,1);0===h&&ii(a,1);ii(a,1);var k=0,l=0,m=0,n=
|
|
317
317
|
0;S(a)&&(k=Q(a),l=Q(a),m=Q(a),n=Q(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.va="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
318
318
|
function ui(a){var b={height:null,width:null,va:null};a=a.ee();if(!a.length)return b;a=a.find(function(B){return 33==B.type});if(!a)return b;var c=new gi(a.fullData,!0);ni(c);ni(c);ji(c,4);var d=ji(c,3);S(c);var e=ji(c,2),f=ji(c,1),g=ji(c,5),h=ji(c,32);a=ni(c);for(var k=ni(c),l=ni(c),m=ni(c),n=ni(c),q=ni(c),r=ni(c),u=[],v=[],y=0;y<d;y++)u.push(S(c)),v.push(S(c));if(0<d)for(y=d;8>y;y++)ji(c,2);for(y=0;y<d;y++)u[y]&&ji(c,88),v[y]&&ni(c);Q(c);d=Q(c);3==d&&ji(c,1);u=Q(c);v=Q(c);var z=y=0,x=0,A=0;S(c)&&
|
|
319
319
|
(y+=Q(c),z+=Q(c),x+=Q(c),A+=Q(c));b.width=String(u-(y+z)*(1===d||2===d?2:1));b.height=String(v-(x+A)*(1===d?2:1));c=function(B){for(var C=0,E=0;32>E;E++)C|=(B>>E&1)<<31-E;return C>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+r;q&&(e+="."+q.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
|
|
320
|
-
a.toString(16).toUpperCase());b.va=e;return b}function ti(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function xi(a){return 0>ri(a)?!1:!0}function ri(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}L("shaka.util.TsParser",qi);qi.syncOffset=ri;qi.probe=xi;qi.prototype.getVideoInfo=qi.prototype.Cf;qi.prototype.getVideoResolution=qi.prototype.
|
|
321
|
-
qi.prototype.getCodecs=qi.prototype.qd;qi.prototype.getStartTime=qi.prototype.getStartTime;qi.prototype.getVideoData=qi.prototype.Hc;qi.prototype.getAudioData=qi.prototype.jc;qi.prototype.getMetadata=qi.prototype.getMetadata;qi.prototype.parseNalus=qi.prototype.
|
|
320
|
+
a.toString(16).toUpperCase());b.va=e;return b}function ti(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function xi(a){return 0>ri(a)?!1:!0}function ri(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}L("shaka.util.TsParser",qi);qi.syncOffset=ri;qi.probe=xi;qi.prototype.getVideoInfo=qi.prototype.Cf;qi.prototype.getVideoResolution=qi.prototype.oi;qi.prototype.getVideoNalus=qi.prototype.ee;
|
|
321
|
+
qi.prototype.getCodecs=qi.prototype.qd;qi.prototype.getStartTime=qi.prototype.getStartTime;qi.prototype.getVideoData=qi.prototype.Hc;qi.prototype.getAudioData=qi.prototype.jc;qi.prototype.getMetadata=qi.prototype.getMetadata;qi.prototype.parseNalus=qi.prototype.Sf;qi.prototype.parseAvcNalus=qi.prototype.Ni;qi.prototype.parse=qi.prototype.parse;qi.prototype.clearData=qi.prototype.clearData;qi.Timescale=9E4;var wi=[100,110,122,244,44,83,86,118,128,138,139,134];function yi(a,b,c){this.g=null;this.s=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Sa("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,He("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Sa("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Sa("Could not find LCEVC Library on this page"),
|
|
322
322
|
a=!1):(this.h.SupportObject.SupportStatus||Sa(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function zi(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
323
323
|
yi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ai(a,b,c){var d=Bi,e=Ci;switch(b.mimeType){case "video/webm":d=Di;break;case "video/mp4":d=Ei}switch(c){case "DASH":e=Fi;break;case "HLS":e=Gi}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}L("shaka.lcevc.Dec",yi);yi.prototype.release=yi.prototype.release;var Bi=0,Di=1,Ei=2,Gi=0,Fi=1,Ci=-1;function Hi(a,b,c,d){var e=this;this.i=a;this.G=null;this.H=b;this.g={};this.I={};this.sa={};this.h=null;this.Z=!1;this.za=c||function(){};this.U=d||null;this.j={};this.u=new dc;this.m={};this.J=null;this.M=new gf;this.N="";this.$=!1;this.l=Ii(this,this.M);this.D=!1;this.K=new Ff(function(){return Ji(e)});this.C=!1;this.V="UNKNOWN";this.ha=this.ua=!1;this.aa=new gf;this.s=!1;this.ma=!0;this.L=null}
|
|
324
324
|
function Ii(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.u.o(c,"startstreaming",function(){a.ma=!0});a.u.o(c,"endstreaming",function(){a.ma=!1});a.u.ka(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.u.ka(a.i,"playing",function(){a.$=!0});a.N=Ki(c);a.i.src=a.N;return c}c=new MediaSource;a.u.ka(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.u.ka(a.i,"playing",function(){a.$=!0});a.N=Ki(c);a.i.src=a.N;return c}
|
|
@@ -348,36 +348,36 @@ function kj(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B,C,E,H,G;return K(func
|
|
|
348
348
|
4);case 4:return a.m={},a.g={},y=a.l.duration,a.M=new gf,a.l=Ii(a,a.M),D(I,a.M,5);case 5:a.l.duration=y;z=new gf;x=a.l.sourceBuffers;A=b.size;B=0;a.u.o(x,"addsourcebuffer",function(){B++;B===A&&z.resolve()});C=t(b.keys());for(E=C.next();!E.done;E=C.next())H=E.value,G=b.get(H),Li(a,H,G,G.codecs),a.s?(a.j[c.W]=[],a.j[c.na]=[]):a.j[H]=[];a.i.currentTime=d;return D(I,z,2);case 2:xa(I),a.D=!1,Gf(a.K),a.u.ka(a.i,"canplaythrough",function(){Gf(a.K);a.i.autoplay=e;f||a.i.play()}),ya(I,0)}})}
|
|
349
349
|
function lj(a,b){return gj(a,function(){return kj(a,b)})}
|
|
350
350
|
function ej(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return K(function(v){if(1==v.g){if(b==Ib)return v.return(!1);e=nd(pd(a.I[b]))[0];f=od(a.I[b]);h=hd(c.mimeType,c.codecs);k=a.G.forceTransmux;if(!ic(h)||!a.C&&id.includes(h))k=!0;l=jd(c.mimeType,c.codecs);k&&(m=bd(l))&&(g=m(),h=g.convertCodecs(b,l));n=pd(h);q=nd(n)[0];r=od(h);if(e===q&&f===r)return v.return(!1);u=!0;if(a.s||n.split(",").length&&g&&!a.m[b])u=!1;if(u&&"smooth"===a.G.codecSwitchingStrategy&&kc())return D(v,jj(a,b,h,g),3);g&&g.destroy();return D(v,
|
|
351
|
-
lj(a,d),3)}return v.return(!0)})}function mj(a,b,c){if(b==Ib)var d=!1;else{d=nd(pd(a.I[b]))[0];var e=od(a.I[b]),f=hd(c.mimeType,c.codecs),g=a.G.forceTransmux;if(!ic(f)||!a.C&&id.includes(f))g=!0;c=jd(c.mimeType,c.codecs);g&&(g=bd(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=nd(pd(f))[0];f=od(f);d=d!==b||e!==f}return d?"smooth"!==a.G.codecSwitchingStrategy||!kc()||a.s:!1}var Ki=window.URL.createObjectURL,Ni="sequence";function nj(a,b,c){this.i=a;this.s=b;this.C=this.j=Infinity;this.g=1;this.h=this.l=null;this.u=0;this.H=!0;this.I=0;this.D=void 0===c?!0:c;this.J=0;this.m=!1;this.G=null}p=nj.prototype;p.getDuration=function(){return this.j};p.
|
|
352
|
-
p.
|
|
353
|
-
p.zd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.u)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.we(b);this.h=Math.max(this.h,c);null!=this.i&&this.D&&!this.m&&(this.i=d-this.h-this.g)}};p.oe=function(){this.m=!0};p.
|
|
354
|
-
p.we=function(a){this.l=null==this.l?a:Math.min(this.l,a)};p.
|
|
355
|
-
p.Zb=function(){return this.R()||this.nc()?Math.min(Math.max(0,(Date.now()+this.u)/1E3-this.g-this.i)+this.J,this.j):this.h?Math.min(this.h,this.j):this.j};p.sd=function(a){var b=Math.max(this.l,this.I);return Infinity==this.C?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Zb()-this.C+a,this.Lb()))};p.Gc=function(){return this.sd(0)};p.Lb=function(){return Math.max(0,this.Zb()-(this.R()||this.nc()?this.s:0))};p.
|
|
356
|
-
p.
|
|
357
|
-
nj.prototype.isInProgress=nj.prototype.nc;nj.prototype.isLive=nj.prototype.R;nj.prototype.offset=nj.prototype.offset;nj.prototype.notifyMaxSegmentDuration=nj.prototype.
|
|
358
|
-
nj.prototype.getDelay=nj.prototype.
|
|
351
|
+
lj(a,d),3)}return v.return(!0)})}function mj(a,b,c){if(b==Ib)var d=!1;else{d=nd(pd(a.I[b]))[0];var e=od(a.I[b]),f=hd(c.mimeType,c.codecs),g=a.G.forceTransmux;if(!ic(f)||!a.C&&id.includes(f))g=!0;c=jd(c.mimeType,c.codecs);g&&(g=bd(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=nd(pd(f))[0];f=od(f);d=d!==b||e!==f}return d?"smooth"!==a.G.codecSwitchingStrategy||!kc()||a.s:!1}var Ki=window.URL.createObjectURL,Ni="sequence";function nj(a,b,c){this.i=a;this.s=b;this.C=this.j=Infinity;this.g=1;this.h=this.l=null;this.u=0;this.H=!0;this.I=0;this.D=void 0===c?!0:c;this.J=0;this.m=!1;this.G=null}p=nj.prototype;p.getDuration=function(){return this.j};p.ai=function(){return this.g};p.gh=function(a){this.i=a};p.eb=function(a){this.j=a};p.di=function(){return this.i};p.bh=function(a){this.u=a};p.Rc=function(a){this.H=a};p.Ge=function(a){this.C=a};p.dg=function(a){this.s=a};p.Sh=function(){return this.s};
|
|
352
|
+
p.Wg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.we(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.D&&!this.m&&(this.i=(Date.now()+this.u)/1E3-this.h-this.g)}};
|
|
353
|
+
p.zd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.u)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.we(b);this.h=Math.max(this.h,c);null!=this.i&&this.D&&!this.m&&(this.i=d-this.h-this.g)}};p.oe=function(){this.m=!0};p.Di=function(){return this.m};p.eh=function(a){this.G=a};p.Vh=function(){return this.G};
|
|
354
|
+
p.we=function(a){this.l=null==this.l?a:Math.min(this.l,a)};p.Nf=function(a){this.g=Math.max(this.g,a)};p.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};p.R=function(){return Infinity==this.j&&!this.H};p.nc=function(){return Infinity!=this.j&&!this.H};p.xb=function(){return Math.max(this.I,this.Zb()-this.C)};p.ih=function(a){this.I=a};
|
|
355
|
+
p.Zb=function(){return this.R()||this.nc()?Math.min(Math.max(0,(Date.now()+this.u)/1E3-this.g-this.i)+this.J,this.j):this.h?Math.min(this.h,this.j):this.j};p.sd=function(a){var b=Math.max(this.l,this.I);return Infinity==this.C?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Zb()-this.C+a,this.Lb()))};p.Gc=function(){return this.sd(0)};p.Lb=function(){return Math.max(0,this.Zb()-(this.R()||this.nc()?this.s:0))};p.mh=function(){return null==this.i||null!=this.h&&this.D?!1:!0};
|
|
356
|
+
p.ah=function(a){this.J=a};L("shaka.media.PresentationTimeline",nj);nj.prototype.setAvailabilityTimeOffset=nj.prototype.ah;nj.prototype.usingPresentationStartTime=nj.prototype.mh;nj.prototype.getSeekRangeEnd=nj.prototype.Lb;nj.prototype.getSeekRangeStart=nj.prototype.Gc;nj.prototype.getSafeSeekRangeStart=nj.prototype.sd;nj.prototype.getSegmentAvailabilityEnd=nj.prototype.Zb;nj.prototype.setUserSeekStart=nj.prototype.ih;nj.prototype.getSegmentAvailabilityStart=nj.prototype.xb;
|
|
357
|
+
nj.prototype.isInProgress=nj.prototype.nc;nj.prototype.isLive=nj.prototype.R;nj.prototype.offset=nj.prototype.offset;nj.prototype.notifyMaxSegmentDuration=nj.prototype.Nf;nj.prototype.notifyMinSegmentStartTime=nj.prototype.we;nj.prototype.getInitialProgramDateTime=nj.prototype.Vh;nj.prototype.setInitialProgramDateTime=nj.prototype.eh;nj.prototype.isStartTimeLocked=nj.prototype.Di;nj.prototype.lockStartTime=nj.prototype.oe;nj.prototype.notifySegments=nj.prototype.zd;nj.prototype.notifyTimeRange=nj.prototype.Wg;
|
|
358
|
+
nj.prototype.getDelay=nj.prototype.Sh;nj.prototype.setDelay=nj.prototype.dg;nj.prototype.setSegmentAvailabilityDuration=nj.prototype.Ge;nj.prototype.setStatic=nj.prototype.Rc;nj.prototype.setClockOffset=nj.prototype.bh;nj.prototype.getPresentationStartTime=nj.prototype.di;nj.prototype.setDuration=nj.prototype.eb;nj.prototype.setPresentationStartTime=nj.prototype.gh;nj.prototype.getMaxSegmentDuration=nj.prototype.ai;nj.prototype.getDuration=nj.prototype.getDuration;function oj(a,b,c){this.j=c;this.l=a;this.u=pj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}oj.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function qj(a,b){a.i=b}function rj(a){this.g=a}function pj(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Ph(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 sj(a,b,c,d,e){var f=this;this.C=e;this.g=a;this.D=b;this.u=c;this.l=new dc;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.s=!1;this.l.o(a,"waiting",function(){return tj(f)});this.m=(new Cd(function(){tj(f)})).xa(this.u.gapJumpTimerTime)}sj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.D=this.C=null};sj.prototype.Qf=function(){this.s=!0;tj(this)};
|
|
359
359
|
function tj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=pj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.j(new O("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Qh(c,b,a.u.gapDetectionThreshold),null==
|
|
360
360
|
d||0==d&&!a.s||(e=c.start(d),e>=a.D.Lb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.C(new O("gapjumped")))))}}};function uj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=vj.value().get(b),c.ka(a,b,d))}var vj=new Hf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function wj(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new dc;this.i=new xj(a);uj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){yj(e,e.j())})}wj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function zj(a){return a.s?a.g.currentTime:a.j()}
|
|
361
361
|
function Aj(a,b){0<a.g.readyState?Bj(a.i,b):uj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){yj(a,a.j())})}function yj(a,b){.001>Math.abs(a.g.currentTime-b)?Cj(a):(a.h.ka(a.g,"seeking",function(){Cj(a)}),Bj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Cj(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
|
|
362
|
-
function xj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Cd(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}xj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Bj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.xa(.1)};function Dj(a){this.g=a;this.j=!1;this.h=null;this.i=new dc}p=Dj.prototype;p.Ve=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ka(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;uj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};p.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};p.Sd=function(a){this.h=this.j?this.h:a};p.kd=function(){return(this.j?this.g.currentTime:this.h)||0};p.
|
|
363
|
-
p.
|
|
362
|
+
function xj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Cd(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}xj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Bj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.xa(.1)};function Dj(a){this.g=a;this.j=!1;this.h=null;this.i=new dc}p=Dj.prototype;p.Ve=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ka(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;uj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};p.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};p.Sd=function(a){this.h=this.j?this.h:a};p.kd=function(){return(this.j?this.g.currentTime:this.h)||0};p.ug=function(){return 0};
|
|
363
|
+
p.sg=function(){return 0};p.Vg=function(){};
|
|
364
364
|
function Ej(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.D=b.minBufferTime||0;this.l=c;this.C=e;this.u=null;this.s=Fj(a,c,f);this.j=new sj(a,b.presentationTimeline,c,this.s,f);this.h=new wj(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=zj(g.h);h=Gj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;Aj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
|
|
365
|
-
g.g.Gc():g.g.Lb():0>h&&(h=g.g.Lb()+h);return Hj(g,Ij(g,h))});this.m=new Cd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=zj(g.h),k=g.g.Gc(),l=g.g.Lb();3>l-k&&(k=l-3);h<k
|
|
366
|
-
p.kd=function(){var a=zj(this.h);return 0<this.i.readyState&&!this.i.paused?Ij(this,a):a};p.
|
|
365
|
+
g.g.Gc():g.g.Lb():0>h&&(h=g.g.Lb()+h);return Hj(g,Ij(g,h))});this.m=new Cd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=zj(g.h),k=g.g.Gc(),l=g.g.Lb();3>l-k&&(k=l-3);if(h<k||h>l)h=Gj(g,h),g.i.currentTime=h}})}p=Ej.prototype;p.Ve=function(){this.m.xa(.25)};p.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};p.Sd=function(a){Aj(this.h,a)};
|
|
366
|
+
p.kd=function(){var a=zj(this.h);return 0<this.i.readyState&&!this.i.paused?Ij(this,a):a};p.ug=function(){return this.s?this.s.s:0};p.sg=function(){return this.j.G};p.Vg=function(){this.j.Qf()};function Hj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
367
367
|
function Gj(a,b){var c=Math.max(a.D,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Gc(),f=a.g.Lb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.sd(c),k=a.g.sd(d);c=a.g.sd(c+d);return b>=g?Hj(a,b):b>f?f:b<e?Nh(a.i.buffered,k)?k:c:b>=h||Nh(a.i.buffered,b)?b:c}function Ij(a,b){var c=a.g.Gc();if(b<c)return c;a=a.g.Lb();return b>a?a:b}
|
|
368
|
-
function Fj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new oj(new rj(a),b.stallThreshold,c);qj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Jj(a){this.g=a;this.m=null;this.j=0;this.s=!1}p=Jj.prototype;p.Yb=function(){return this.g.length};p.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.
|
|
368
|
+
function Fj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new oj(new rj(a),b.stallThreshold,c);qj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Jj(a){this.g=a;this.m=null;this.j=0;this.s=!1}p=Jj.prototype;p.Yb=function(){return this.g.length};p.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Ii=function(){this.s=!0};function Kj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};
|
|
369
369
|
p.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.s)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};p.se=function(a){if(!this.s&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,w(a))}};
|
|
370
370
|
p.yd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.se(a);this.vb(b)};p.vb=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
|
|
371
371
|
p.Bc=function(a,b,c){c=void 0===c?!1:c;if(!this.s){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new Jh(a.startTime,b,a.J,a.fb,a.La,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.I,a.g,a.status,a.aes128Key),this.g[this.g.length-1].l=a.l)}};
|
|
372
372
|
p.Je=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new Cd(function(){var d=b();d?c.g.push.apply(c.g,w(d)):(c.m.stop(),c.m=null)}),this.m.xa(a))};Jj.prototype[Symbol.iterator]=function(){return this.kc(0)};
|
|
373
373
|
Jj.prototype.kc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.m;)e--,f=c.i[e];if(!f.m)return Ra("No independent partial segment found!"),null;b++;d=e-1;break}}return new Lj(this,b,d)};function Mj(a,b,c){a=new Jh(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Jj([a])}L("shaka.media.SegmentIndex",Jj);Jj.forSingleSegment=Mj;
|
|
374
|
-
Jj.prototype.getIteratorForTime=Jj.prototype.kc;Jj.prototype.updateEvery=Jj.prototype.Je;Jj.prototype.fit=Jj.prototype.Bc;Jj.prototype.evict=Jj.prototype.vb;Jj.prototype.mergeAndEvict=Jj.prototype.yd;Jj.prototype.offset=Jj.prototype.offset;Jj.prototype.get=Jj.prototype.get;Jj.prototype.find=Jj.prototype.find;Jj.prototype.markImmutable=Jj.prototype.
|
|
374
|
+
Jj.prototype.getIteratorForTime=Jj.prototype.kc;Jj.prototype.updateEvery=Jj.prototype.Je;Jj.prototype.fit=Jj.prototype.Bc;Jj.prototype.evict=Jj.prototype.vb;Jj.prototype.mergeAndEvict=Jj.prototype.yd;Jj.prototype.offset=Jj.prototype.offset;Jj.prototype.get=Jj.prototype.get;Jj.prototype.find=Jj.prototype.find;Jj.prototype.markImmutable=Jj.prototype.Ii;Jj.prototype.release=Jj.prototype.release;function Lj(a,b,c){this.i=a;this.g=b;this.h=c}Lj.prototype.Dh=function(){return this.g};
|
|
375
375
|
Lj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.C&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};Lj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.C&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};L("shaka.media.SegmentIterator",Lj);Lj.prototype.next=Lj.prototype.next;Lj.prototype.current=Lj.prototype.current;
|
|
376
|
-
Lj.prototype.currentPosition=Lj.prototype.
|
|
376
|
+
Lj.prototype.currentPosition=Lj.prototype.Dh;function Nj(){Jj.call(this,[]);this.h=[]}pa(Nj,Jj);p=Nj.prototype;p.clone=function(){var a=new Nj;a.h=this.h.slice();return a};p.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};p.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.j+d.Yb()}return null};
|
|
377
377
|
p.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.Yb()}return null};p.offset=function(){};p.se=function(){};p.vb=function(){};p.yd=function(){};p.Bc=function(){};p.Je=function(){};L("shaka.media.MetaSegmentIndex",Nj);Nj.prototype.updateEvery=Nj.prototype.Je;Nj.prototype.fit=Nj.prototype.Bc;Nj.prototype.mergeAndEvict=Nj.prototype.yd;Nj.prototype.evict=Nj.prototype.vb;Nj.prototype.merge=Nj.prototype.se;Nj.prototype.offset=Nj.prototype.offset;
|
|
378
|
-
Nj.prototype.get=Nj.prototype.get;Nj.prototype.find=Nj.prototype.find;Nj.prototype.release=Nj.prototype.release;function Oj(a){var b=this;this.g=a;this.h=this.g.ce();this.i=new Cd(function(){b.g.
|
|
379
|
-
Rj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Bd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Mf;break a}}d=null}if(e=d)e=c.
|
|
380
|
-
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.
|
|
378
|
+
Nj.prototype.get=Nj.prototype.get;Nj.prototype.find=Nj.prototype.find;Nj.prototype.release=Nj.prototype.release;function Oj(a){var b=this;this.g=a;this.h=this.g.ce();this.i=new Cd(function(){b.g.Ug(.25*b.h)})}Oj.prototype.release=function(){this.set(this.Ec());this.i&&(this.i.stop(),this.i=null);this.g=null};Oj.prototype.set=function(a){if(this.h!=a)a:{this.h=a,this.i.stop();if(0<=this.h)try{var b=this.h;this.g.ce()!=b&&this.g.hg(b);break a}catch(c){}this.i.xa(.25);0!=this.g.ce()&&this.g.hg(0)}};Oj.prototype.Ec=function(){return this.g.Ec()};function Pj(a){var b=this;this.h=a;this.g=new Set;this.i=(new Cd(function(){Qj(b,!1)})).xa(.25)}Pj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Qj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Rj(a){ab.call(this);this.g=new Map;this.h=a}pa(Rj,ab);Rj.prototype.release=function(){this.g.clear();ab.prototype.release.call(this)};function Sj(a,b){var c=a.g.get(b);c||(c={Bd:[],Dg:null,contentType:b},a.g.set(b,c));return c}function Tj(a,b,c){var d=Sj(a,b.contentType);Uj(a,d);a={Mf:b,position:c};d=d.Bd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
379
|
+
Rj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Bd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Mf;break a}}d=null}if(e=d)e=c.Dg,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
380
|
+
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Dg=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Uj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Bd;b.Bd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Bd=[]};function Vj(a){ab.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Cd(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).xa(2)}pa(Vj,ab);Vj.prototype.release=function(){this.g.clear();this.h.stop();ab.prototype.release.call(this)};function Wj(a,b){ab.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{wc:null,vc:Xj,mc:function(d,e){return Yj(c,"enter",d,e)}},{wc:Zj,vc:Xj,mc:function(d,e){return Yj(c,"enter",d,e)}},{wc:ak,vc:Xj,mc:function(d,e){return Yj(c,"enter",d,e)}},{wc:Xj,vc:Zj,mc:function(d,e){return Yj(c,"exit",d,e)}},{wc:Xj,vc:ak,mc:function(d,e){return Yj(c,"exit",d,e)}},{wc:Zj,vc:ak,mc:function(d,e){return Yj(c,"skip",d,e)}},{wc:ak,vc:Zj,mc:function(d,e){return Yj(c,"skip",d,e)}}];this.h=new dc;this.h.o(this.i,
|
|
381
381
|
"regionremove",function(d){c.g.delete(d.region)})}pa(Wj,ab);Wj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ab.prototype.release.call(this)};Wj.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Zj:a>d.endTime?ak:Xj;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.wc==e&&h.vc==f&&h.mc(d,b)}}};
|
|
382
382
|
function Yj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Zj=1,Xj=2,ak=3;function bk(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function ck(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.kc(Math.max(b.startTime,a.j));if(d){var e=b;c&&(e=d.next().value)&&e.startTime==b.startTime&&e.endTime==b.endTime&&(e=null);for(;a.g.size<a.i&&null!=e;)b=!0,e.s&&null!=e.La&&(b=!1),2==e.lc()&&(b=!1),b&&!a.g.has(e)&&(b=new dk(a.l),ek(b,e,a.h),a.g.set(e,b)),a.j=e.startTime,e=d.next().value}}}
|
|
383
383
|
function fk(a,b){if(a.h.segmentIndex&&a.g.size<a.i&&!a.g.has(b)){var c=new dk(a.l);ek(c,b,a.h);a.g.set(b,c)}}function gk(a){if(0!==a.g.size){for(var b=t(a.g.keys()),c=b.next();!c.done;c=b.next())(c=c.value)&&hk(a,c);a.j=0}}function ik(a,b){b&&b!==a.h&&(gk(a),a.h=b)}function hk(a,b){var c=a.g.get(b);a.g.delete(b);c&&c.abort()}function dk(a){this.i=a;this.g=this.h=null}
|
|
@@ -386,31 +386,31 @@ p.configure=function(a){this.i=a;this.I=new df({maxAttempts:Math.max(a.retryPara
|
|
|
386
386
|
(c.Ga=null)}else 0<a.segmentPrefetchLimit&&(c.Ga=ok(this,c.stream))};p.start=function(){var a=this;return K(function(b){if(1==b.g)return D(b,pk(a),2);Gf(a.l);a.D=!0;F(b)})};
|
|
387
387
|
function qk(a,b){var c,d,e,f,g,h,k;K(function(l){switch(l.g){case 1:return c=Jb,a.H++,d=a.H,ta(l,2),D(l,cj(a.g.Y,c.ya),4);case 4:va(l,3);break;case 2:if(e=wa(l),a.g)a.g.onError(e);case 3:f=hd(b.mimeType,b.codecs),Mi(a.g.Y,f,a.m.sequenceMode,b.external),g=a.g.Y.H,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.H==d&&(k=rk(a,b),a.h.set(c.ya,k),sk(a,k,0)),F(l)}})}function tk(a){var b=a.h.get(Ib);b&&(mk(b),nk(b).catch(function(){}),a.h.delete(Ib));a.s=null}
|
|
388
388
|
function uk(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.tc&&(vk(a,b,!1,0,!1),c.tc=d);else if(d=c.tc)c.tc=null,vk(a,d,!0,0,!1)}}function wk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.D&&(b.video&&vk(a,b.video,c,d,e,f),b.audio&&vk(a,b.audio,c,d,e,f))}function xk(a,b){K(function(c){if(1==c.g)return a.s=b,a.D?b.segmentIndex?c.F(2):D(c,b.createSegmentIndex(),2):c.return();vk(a,b,!0,0,!1);F(c)})}
|
|
389
|
-
function vk(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Ib?g&&(g.tc&&(b.trickModeVideo?(g.tc=b,b=b.trickModeVideo):g.tc=null),g.stream!=b||e)&&(g.Ga&&ik(g.Ga,b),b.type==Ib&&(e=hd(b.mimeType,b.codecs),Mi(a.g.Y,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ea=null,g.
|
|
389
|
+
function vk(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Ib?g&&(g.tc&&(b.trickModeVideo?(g.tc=b,b=b.trickModeVideo):g.tc=null),g.stream!=b||e)&&(g.Ga&&ik(g.Ga,b),b.type==Ib&&(e=hd(b.mimeType,b.codecs),Mi(a.g.Y,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ea=null,g.vg=!!f,c&&(g.md?g.Ke=!0:g.Sa?(g.Rb=!0,g.Xd=d,g.Ke=!0):(mk(g),yk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),zk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):qk(a,b)}
|
|
390
390
|
function zk(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.bb)return e.return();c=b.stream;d=b.bb;return c.segmentIndex?e.F(2):D(e,c.createSegmentIndex(),2)}if(b.bb!=d||b.stream!=c)return e.return();var f=a.g.be();var g=Si(a.g.Y,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.La?k.La-k.fb:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.La?k.La-k.fb:null)||0),k=a.g.getBandwidthEstimate(),
|
|
391
391
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.bb.h.g>h?!0:!1):f=!1;f&&b.bb.abort();F(e)})}
|
|
392
392
|
p.Fd=function(){if(this.g)for(var a=this.g.be(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e=null;c.ea&&(e=c.ea.current());if(!e||e.startTime>a||e.endTime<a)c.ea=null;e=this.g.Y;e.D?e=!1:d==Ib?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Ri(e,d),e=Nh(e,a));e||((null!=Si(this.g.Y,d)||c.Sa)&&Ak(this,c),c.bb&&(c.bb.abort(),c.bb=null),d===Ib&&(d=this.g.Y,d.J&&d.J.h()),c.Fd=!0)}};
|
|
393
393
|
function Ak(a,b){b.md||b.Rb||(b.Sa?(b.Rb=!0,b.Xd=0):null==Qi(a.g.Y,b.type)?null==b.Bb&&sk(a,b,0):(mk(b),yk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
394
394
|
function pk(a){var b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){b=Jb;if(!a.j)throw new P(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.W,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.na,a.j.video),d.add(a.j.video));a.s&&(c.set(b.ya,a.s),d.add(a.s));e=a.g.Y;return D(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}Gf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.h.has(h)||(l=rk(a,k),a.h.set(h,l),sk(a,l,
|
|
395
|
-
0));F(m)})}function rk(a,b){return{stream:b,type:b.type,ea:null,Ga:ok(a,b),Ra:null,Lc:null,Jf:null,Hf:null,Gf:null,tc:null,endOfStream:!1,Sa:!1,Bb:null,Rb:!1,Xd:0,Ke:!1,md:!1,Fd:!0,
|
|
395
|
+
0));F(m)})}function rk(a,b){return{stream:b,type:b.type,ea:null,Ga:ok(a,b),Ra:null,Lc:null,Jf:null,Hf:null,Gf:null,tc:null,endOfStream:!1,Sa:!1,Bb:null,Rb:!1,Xd:0,Ke:!1,md:!1,Fd:!0,Vf:!1,ud:!1,bb:null}}function ok(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.i.segmentPrefetchLimit?new bk(a.i.segmentPrefetchLimit,b,function(c,d,e){return Bk(a,c,d,e)}):null}p.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Y.eb(a):this.g.Y.eb(Math.pow(2,32))};
|
|
396
396
|
function Ck(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:Gf(a.l);if(b.Sa||null==b.Bb||b.md)return h.return();b.Bb=null;if(!b.Rb){h.F(2);break}return D(h,yk(a,b,b.Ke,b.Xd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.F(4);break}c=b.stream;return D(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Sa||b.Bb||sk(a,b,0),h.return();case 4:ta(h,6);d=Dk(a,b);null!=d&&(sk(a,b,d),b.ud=!1);va(h,7);break;case 6:return e=
|
|
397
397
|
wa(h),D(h,Ek(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.h.values());if(!a.D||!f.every(function(k){return k.endOfStream})){h.F(0);break}return D(h,a.g.Y.endOfStream(),10);case 10:Gf(a.l),g=a.g.Y.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.eb(g),F(h)}})}
|
|
398
398
|
function Dk(a,b){if(Fk(b))return $i(a.g.Y,b.stream.originalId||""),null;b.type==Ib&&aj(a.g.Y);if(!a.g.Y.ma&&b.type!=Ib)return a.i.updateIntervalSeconds/2;var c=a.g.be(),d=b.Ra?b.Ra.endTime:c,e=Ti(a.g.Y,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=Si(a.g.Y,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(Ib))&&Fk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/
|
|
399
399
|
2;e=Gk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;f=Infinity;g=Array.from(a.h.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Fk(h)||h.ea&&!h.ea.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.Ga&&b.ea&&(d=e.h,!d||b.Ra&&Ih(d,b.Lc)||fk(b.Ga,d),ck(b.Ga,e));Hk(a,b,c,e).catch(function(){});return null}
|
|
400
|
-
function Gk(a,b,c,d){if(b.ea)return b.ea.current();if(b.Ra||d)return
|
|
400
|
+
function Gk(a,b,c,d){if(b.ea)return b.ea.current();if(b.Ra||d)return b.ea=b.stream.segmentIndex.kc(b.Ra?b.Ra.endTime:d),b.ea&&b.ea.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ea=b.stream.segmentIndex.kc(d),e=b.ea&&b.ea.next().value);e||(b.ea=b.stream.segmentIndex.kc(c),e=b.ea&&b.ea.next().value);return e}
|
|
401
401
|
function Hk(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:e=Jb;f=b.stream;g=b.ea;b.Sa=!0;ta(B,2);if(2==d.lc())throw new P(1,1,1011);return D(B,Ik(a,b,d),4);case 4:Gf(a.l);if(a.u)return B.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.u))return n=new Uint8Array(0),r=q=!1,v=function(C){var E,H,G,I;return K(function(J){switch(J.g){case 1:if(q)return J.return();r=!0;Gf(a.l);if(a.u)return J.return();
|
|
402
402
|
ta(J,2);n=Jk(n,C);E=!1;H=0;(new Wf).box("mdat",function(M){H=M.size+M.start;E=!0}).parse(n,!1,!0);if(!E){J.F(4);break}G=n.subarray(0,H);n=n.subarray(H);return D(J,Kk(a,b,c,f,d,G,!0),5);case 5:b.Ga&&b.ea&&ck(b.Ga,d,!0);case 4:va(J,0);break;case 2:u=I=wa(J),F(J)}})},D(B,Lk(a,b,d,v),9);l=Lk(a,b,d);return D(B,l,7);case 7:m=B.h;Gf(a.l);if(a.u)return B.return();Gf(a.l);return b.Rb?(b.Sa=!1,sk(a,b,0),B.return()):D(B,Kk(a,b,c,f,d,m),6);case 9:y=B.h;if(u)throw u;if(r){B.F(10);break}q=!0;Gf(a.l);return a.u?
|
|
403
|
-
B.return():b.Rb?(b.Sa=!1,sk(a,b,0),B.return()):D(B,Kk(a,b,c,f,d,y),10);case 10:b.Ga&&b.ea&&ck(b.Ga,d,!0);case 6:Gf(a.l);if(a.u)return B.return();b.Ra=d;g.next();b.Sa=!1;b.
|
|
403
|
+
B.return():b.Rb?(b.Sa=!1,sk(a,b,0),B.return()):D(B,Kk(a,b,c,f,d,y),10);case 10:b.Ga&&b.ea&&ck(b.Ga,d,!0);case 6:Gf(a.l);if(a.u)return B.return();b.Ra=d;g.next();b.Sa=!1;b.Vf=!1;z=a.g.Y.Ib();x=z[b.type];Ya(JSON.stringify(x));b.Rb||a.g.Qf(d.startTime,d.endTime,b.type);sk(a,b,0);va(B,0);break;case 2:A=wa(B);Gf(a.l,A);if(a.u)return B.return();b.Sa=!1;if(7001==A.code)b.Sa=!1,mk(b),sk(a,b,0),B.F(0);else if(b.type==e.ya&&a.i.ignoreTextStreamFailures)a.h.delete(e.ya),B.F(0);else if(3017==A.code)Mk(a,b,A),
|
|
404
404
|
B.F(0);else return b.ud=!0,A.severity=2,D(B,Ek(a,b,A),0)}})}function Nk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b,d.cryptoKey?h.F(2):D(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=qc(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Jk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
405
|
-
function Mk(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.
|
|
406
|
-
function Ik(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v;return K(function(y){if(1==y.g){d=Jb;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=nd(b.stream.codecs)[0];k=od(b.stream.mimeType);l=c.timestampOffset;if(l==b.Jf&&f==b.Hf&&g==b.Gf&&h==b.If&&k==b.
|
|
407
|
-
new Map,a.j.audio&&z.set(d.W,a.j.audio),a.j.video&&z.set(d.na,a.j.video),ta(C,2),b.Hf=f,b.Gf=g,b.If=h,b.
|
|
405
|
+
function Mk(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Vf})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.ud=!0;a.u=!0;a.g.onError(c);return}b.Vf=!0}sk(a,b,4)}
|
|
406
|
+
function Ik(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v;return K(function(y){if(1==y.g){d=Jb;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=nd(b.stream.codecs)[0];k=od(b.stream.mimeType);l=c.timestampOffset;if(l==b.Jf&&f==b.Hf&&g==b.Gf&&h==b.If&&k==b.Qg)return y.F(2);if(m=b.If&&b.Qg&&mj(a.g.Y,b.type,b.stream))n=null,b.type===d.na?n=a.h.get(d.W):b.type===d.W&&(n=a.h.get(d.na)),n&&(n.Lc=null,Ak(a,n),nk(n).catch(function(){}));q=function(){var z,x,A,B;return K(function(C){if(1==C.g)return z=
|
|
407
|
+
new Map,a.j.audio&&z.set(d.W,a.j.audio),a.j.video&&z.set(d.na,a.j.video),ta(C,2),b.Hf=f,b.Gf=g,b.If=h,b.Qg=k,b.Jf=l,x=a.m.sequenceMode||"HLS"==a.m.type,D(C,dj(a.g.Y,b.type,l,f,g,x,b.stream,z),4);if(2!=C.g)return m&&(A=null,b.type===d.na?A=a.h.get(d.W):b.type===d.W&&(A=a.h.get(d.na)),A&&(A.Rb=!1,A.Sa=!1,Ak(a,A))),va(C,0);B=wa(C);b.Hf=null;b.Gf=null;b.If=null;b.Jf=null;throw B;})};return D(y,q(),2)}Ih(c.h,b.Lc)||(b.Lc=c.h,c.m&&c.h&&(r=Lk(a,b,c.h),u=function(){var z,x,A,B,C,E;return K(function(H){switch(H.g){case 1:return ta(H,
|
|
408
408
|
2),D(H,r,4);case 4:return z=H.h,Gf(a.l),x=null,A=new Map,B=new Wf,B.box("moov",ag).box("trak",ag).box("mdia",ag).S("mdhd",function(G){x=$h(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.Pb(4);var I=String.fromCharCode(G[0]);I+=String.fromCharCode(G[1]);I+=String.fromCharCode(G[2]);I+=String.fromCharCode(G[3]);switch(I){case "soun":A.set(d.W,x);break;case "vide":A.set(d.na,x)}x=null}).parse(z),A.has(b.type)?c.h.timescale=A.get(b.type):null!=x&&(c.h.timescale=x),C=b.stream.closedCaptions&&
|
|
409
|
-
0<b.stream.closedCaptions.size,D(H,a.g.
|
|
409
|
+
0<b.stream.closedCaptions.size,D(H,a.g.xg(b.type,z),5);case 5:return D(H,Vi(a.g.Y,b.type,z,null,b.stream,C),6);case 6:va(H,0);break;case 2:throw E=wa(H),b.Lc=null,E;}})},a.g.Ki(c.startTime,c.h),e.push(u())));a.m.sequenceMode&&(v=b.Ra?b.Ra.l:null,c.l!=v&&e.push(fj(a.g.Y,b.type,c.startTime)));return D(y,Promise.all(e),0)})}
|
|
410
410
|
function Kk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return K(function(r){switch(r.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;m=a.i.parsePrftBox&&!a.G;if(l||m)k=new Wf;l&&k.S("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var y=u.reader.Cd();var z=u.reader.Cd();var x=u.reader.O();var A=u.reader.O();var B=u.reader.O();var C=u.reader.O();var E=e.startTime+A/x}else x=u.reader.O(),E=u.reader.Qc()/
|
|
411
|
-
x+e.timestampOffset,A=E-e.startTime,B=u.reader.O(),C=u.reader.O(),y=u.reader.Cd(),z=u.reader.Cd();u=u.reader.Pb(u.reader.getLength()-u.reader.Ea());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.
|
|
412
|
-
y||(y=Wh(u),y.length&&e&&a.g.
|
|
413
|
-
a.G=!0}});(l||m)&&k.parse(f);return D(r,Ok(a,b,c),2);case 2:return Gf(a.l),n=b.Fd,b.Fd=!1,q=b.
|
|
411
|
+
x+e.timestampOffset,A=E-e.startTime,B=u.reader.O(),C=u.reader.O(),y=u.reader.Cd(),z=u.reader.Cd();u=u.reader.Pb(u.reader.getLength()-u.reader.Ea());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.Li():(v=(new Map).set("detail",{startTime:E,endTime:E+B/x,schemeIdUri:y,value:z,timescale:x,presentationTimeDelta:A,eventDuration:B,id:C,messageData:u}),v=new O("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=y&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
412
|
+
y||(y=Wh(u),y.length&&e&&a.g.Mi([{cueTime:e.startTime,data:u,frames:y,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.S("prft",function(u){if(!a.G&&e.h.timescale){var v=u.reader,y=u.version;v.O();u=v.O();var z=v.O();u=1E3*u+z/Math.pow(2,32)*1E3;0===y?v=v.O():(y=v.O(),v=v.O(),v=y*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.h.timescale*1E3)});v=new O("prft",v);a.g.onEvent(v);
|
|
413
|
+
a.G=!0}});(l||m)&&k.parse(f);return D(r,Ok(a,b,c),2);case 2:return Gf(a.l),n=b.Fd,b.Fd=!1,q=b.vg,b.vg=!1,D(r,a.g.xg(b.type,f),3);case 3:return D(r,Vi(a.g.Y,b.type,f,e,d,h,n,q,g),4);case 4:Gf(a.l),F(r)}})}function Ok(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Qi(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return 1>=g?h.return():D(h,a.g.Y.remove(b.type,e,e+g),2)}Gf(a.l);F(h)})}
|
|
414
414
|
function Fk(a){return a&&a.type==Ib&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
415
415
|
function Lk(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof Hh&&(e=c.g))return l.return(e);f=null;if(b.Ga){var m=b.Ga;if(m.g.has(c)){var n=m.g.get(c);d&&(n.h=d);m.g.delete(c);f=n.g}else f=null}f||(f=Bk(a,c,b.stream,d));g=0;b.ea&&(g=b.ea.g);b.bb=f;return D(l,f.promise,2);case 2:h=l.h;b.bb=null;k=h.data;if(!c.aes128Key){l.F(3);break}return D(l,Nk(k,c.aes128Key,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
416
416
|
function Bk(a,b,c,d){var e=b instanceof Jh?b:void 0,f=e?1:0;b=jk(b.ba(),b.fb,b.La,a.i.retryParameters,d);return a.g.sc.request(Df,b,{type:f,stream:c,segment:e})}
|
|
@@ -435,11 +435,11 @@ function Xk(){}p=Xk.prototype;p.remove=function(){};p.append=function(){};p.dest
|
|
|
435
435
|
c.D,e=d.videoWidth;d=d.videoHeight;e&&d?c.j=e/d:c.j=null});this.s=null;"ResizeObserver"in window&&(this.s=new ResizeObserver(function(){bl(c,!0)}),this.s.observe(this.g));this.C=new Map}p=al.prototype;p.append=function(a){var b=[].concat(w(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={Ld:c.Ld},d=a.next())c.Ld=d.value,b.some(function(e){return function(f){return Qc(f,e.Ld)}}(c))||this.i.push(c.Ld);bl(this)};
|
|
436
436
|
p.destroy=function(){if(!this.g)return Promise.resolve();this.u.removeChild(this.g);this.g=null;this.m=!1;this.i=[];this.G&&this.G.stop();this.h.clear();this.l&&(this.l.release(),this.l=null);this.s&&(this.s.disconnect(),this.s=null);return Promise.resolve()};p.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});bl(this,c>this.i.length);return!0};p.isTextVisible=function(){return this.m};
|
|
437
437
|
p.setTextVisibility=function(a){this.m=a};function cl(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
438
|
-
function dl(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.
|
|
438
|
+
function dl(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.oh:null;l&&(g.push(l.cf),l.Dd&&g.push(l.Dd),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?cl(a,n)||(f=!0):(el(a,k,e),l=a.h.get(k),n=l.oh,f=!0));0<k.nestedCues.length&&n&&dl(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,r){return q.startTime!=
|
|
439
439
|
r.startTime?q.startTime-r.startTime:q.endTime-r.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Dd?(c.appendChild(d.Dd),d.Dd.appendChild(d.cf)):c.appendChild(d.cf)}}function bl(a,b){if(a.g){var c=a.D.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.C.values());for(var d=b.next();!d.done;d=b.next())$k(d.value);$k(a.g);a.h.clear();a.C.clear()}if(a.m){b=new Map;d=t(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));dl(a,a.i,a.g,c,[])}}}
|
|
440
440
|
function el(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=U(e);"br"!=e&&fl(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.j===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Xc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Xc?"%":"px");if(a.C.has(g))c=a.C.get(g);else{var h=U("span"),k=c.heightUnits==Xc?"%":"px",l=c.widthUnits==Xc?"%":"px",m=c.viewportAnchorUnits==
|
|
441
441
|
Xc?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.j===4/3?160:210)*100,k-=c.regionAnchorY*c.height*5.33/100,l-=c.regionAnchorX*c.width*e/100,h.style.top=k+"%",h.style.left=l+"%"):(h.style.top=c.viewportAnchorY-c.regionAnchorY*
|
|
442
|
-
c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.C.set(g,h);c=h}}e=f;d&&(e=U("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{cf:f,
|
|
442
|
+
c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.C.set(g,h);c=h}}e=f;d&&(e=U("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{cf:f,oh:e,Dd:c})}
|
|
443
443
|
function gl(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Gc?c:"left"===a||"start"===a&&b===Ic||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ic?"line-right":"center"}
|
|
444
444
|
function fl(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=hl(c.linePadding,c,a.u);f.paddingRight=hl(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
445
445
|
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=U("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=il(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=il(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?
|
|
@@ -456,7 +456,7 @@ function vl(a){if(0===a.type)return wl;if(a=a.stream){var b=a.type;if("video"==b
|
|
|
456
456
|
function Al(a,b){var c=a.h.jb();if(!c.length)return NaN;a=c[0];c=t(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 tl:return a.videoBandwidth||NaN;case nl:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
457
457
|
function ql(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(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"===
|
|
458
458
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function ul(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=t(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=ql(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
459
|
-
function rl(a,b){if(!b||a.includes("offline:"))return a;a=new gb(a);a.g.set("CMCD",b);return a.toString()}var pl="m",nl="a",tl="v",ol="av",wl="i",yl="c",xl="tt";L("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",
|
|
459
|
+
function rl(a,b){if(!b||a.includes("offline:"))return a;a=new gb(a);a.g.set("CMCD",b);return a.toString()}var pl="m",nl="a",tl="v",ol="av",wl="i",yl="c",xl="tt";L("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",qh:"s",OTHER:"o"});function Bl(){}
|
|
460
460
|
function Cl(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]=pf(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=pf(l)),k=Cl(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?(Ra("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Sa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ra("Invalid config, unrecognized key "+
|
|
461
461
|
k),g=!1)}return g}function Dl(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 El(a,b){return a&&b}L("shaka.util.ConfigUtils",Bl);Bl.convertToConfigObject=Dl;Bl.mergeConfigObjects=Cl;function Fl(){this.g=null;this.h=[]}function Gl(a,b){return K(function(c){if(1==c.g)return a.g?D(c,new Promise(function(d){return a.h.push(d)}),2):c.F(2);a.g=b;F(c)})}Fl.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function Hl(){}function Il(a){a=Pf(a);return(new gb(a)).Hb}function Jl(a,b,c){function d(h){uc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(qc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=Rf(b,!0):e=b;a=Pf(a);a=Rf(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Kl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Pf(a).split("skd://").pop();return Jl(a,c,b)}
|
|
462
462
|
function Ll(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}L("shaka.util.FairPlayUtils",Hl);Hl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Mf(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=rc(jg(c)))}};Hl.expressplayFairPlayRequest=function(a,b){Ll(a,b)};
|
|
@@ -475,23 +475,23 @@ navigator.platform.toLowerCase().includes("windows"))&&Gd()||(f="smooth");var g=
|
|
|
475
475
|
preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};e.trackSelectionCallback=
|
|
476
476
|
function(h){return K(function(k){return k.return(Ol(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return g}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 Cl(a,b,c||Nl(),d,"")}
|
|
477
477
|
function Ol(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Vb(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Nb(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
|
|
478
|
-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ib&&"image"!=c.type||b.push(c);return b}L("shaka.util.PlayerConfiguration",Ml);Ml.mergeConfigObjects=Pl;Ml.createDefault=Nl;function Ql(){this.g=null;this.h=[]}function Rl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Sl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(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 Tl(){this.i=this.h=null;this.g=[]}function Ul(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 Vl(){this.C=this.D=this.I=this.G=this.u=this.j=this.H=this.m=this.i=this.M=this.N=this.J=this.K=this.L=this.l=this.s=NaN;this.g=new Ql;this.h=new Tl};function V(a,b){ab.call(this);var c=this;this.l=Wl;this.fe=this.g=null;this.Z=!1;this.pe=new dc;this.Wa=new dc;this.s=new dc;this.ua=new dc;this.G=this.H=this.m=this.J=null;this.ye=0;this.V=new Fl;this.aa=this.$=this.i=this.Be=this.I=this.j=this.ha=this.L=this.
|
|
479
|
-
this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Qa=this.h.preferredTextLanguage;this.Fb=this.h.preferredTextRole;this.Cb=this.h.preferForcedSubs;this.Eb=[];b&&b(this);this.U=Yl(this);this.J=Zl(this);this.J.
|
|
478
|
+
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ib&&"image"!=c.type||b.push(c);return b}L("shaka.util.PlayerConfiguration",Ml);Ml.mergeConfigObjects=Pl;Ml.createDefault=Nl;function Ql(){this.g=null;this.h=[]}function Rl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Sl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(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 Tl(){this.i=this.h=null;this.g=[]}function Ul(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 Vl(){this.C=this.D=this.I=this.G=this.u=this.j=this.H=this.m=this.i=this.M=this.N=this.J=this.K=this.L=this.l=this.s=NaN;this.g=new Ql;this.h=new Tl};function V(a,b){ab.call(this);var c=this;this.l=Wl;this.fe=this.g=null;this.Z=!1;this.pe=new dc;this.Wa=new dc;this.s=new dc;this.ua=new dc;this.G=this.H=this.m=this.J=null;this.ye=0;this.V=new Fl;this.aa=this.$=this.i=this.Be=this.I=this.j=this.ha=this.L=this.nh=this.U=this.sa=this.M=this.K=this.Ua=null;this.pd=!1;this.Uf=this.u=null;this.pg=1E9;this.Vb=[];this.N=NaN;this.h=Xl(this);this.ve={width:Infinity,height:Infinity};this.C=null;this.za=new Se(this.h.preferredAudioLanguage,this.h.preferredVariantRole,
|
|
479
|
+
this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Qa=this.h.preferredTextLanguage;this.Fb=this.h.preferredTextRole;this.Cb=this.h.preferForcedSubs;this.Eb=[];b&&b(this);this.U=Yl(this);this.J=Zl(this);this.J.fg(this.h.streaming.forceHTTPS);this.D=null;$l&&(this.D=$l(),this.D.configure(this.h.ads));this.pe.o(window,"online",function(){am(c);c.Wf()});
|
|
480
480
|
this.ie=new Cd(function(){return bm(c)});a&&(He("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.zc(a,!0))}pa(V,ab);function cm(a){null!=a.L&&(zi(a.L),a.L.release(),a.L=null)}
|
|
481
|
-
function dm(a,b){if(b.lcevc.enabled){var c=a.jb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Gd()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Sa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));cm(a);null==a.L&&(a.L=new yi(a.g,a.
|
|
482
|
-
p.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==fm)return c.return();cm(a);b=a.detach();a.l=fm;return D(c,b,2);case 2:a.pe&&(a.pe.release(),a.pe=null);a.Wa&&(a.Wa.release(),a.Wa=null);a.s&&(a.s.release(),a.s=null);a.ua&&(a.ua.release(),a.ua=null);a.
|
|
481
|
+
function dm(a,b){if(b.lcevc.enabled){var c=a.jb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Gd()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Sa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));cm(a);null==a.L&&(a.L=new yi(a.g,a.nh,b.lcevc),a.H&&(a.H.U=a.L))}else cm(a)}function em(a,b){return new O(a,b)}p=V.prototype;
|
|
482
|
+
p.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==fm)return c.return();cm(a);b=a.detach();a.l=fm;return D(c,b,2);case 2:a.pe&&(a.pe.release(),a.pe=null);a.Wa&&(a.Wa.release(),a.Wa=null);a.s&&(a.s.release(),a.s=null);a.ua&&(a.ua.release(),a.ua=null);a.Uf=null;a.h=null;a.C=null;a.fe=null;a.U=null;if(!a.J){c.F(3);break}return D(c,a.J.destroy(),4);case 4:a.J=null;case 3:a.u&&(a.u.release(),a.u=null),ab.prototype.release.call(a),F(c)}})};
|
|
483
483
|
function gm(){window.Promise||Sa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Id("Trident/"))return!1;var a=Rd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Dd()?!0:Ed("application/x-mpegurl")}function hm(a,b){a.dispatchEvent(em("onstatechange",(new Map).set("state",b)))}
|
|
484
484
|
p.zc=function(a,b){b=void 0===b?!0:b;var c=this,d,e;return K(function(f){switch(f.g){case 1:if(c.l==fm)throw new P(2,7,7E3);if(!c.g||c.g==a){f.F(2);break}return D(f,c.detach(),2);case 2:return D(f,lm(c,"attach"),4);case 4:if(f.h)return f.return();ta(f,5,6);hm(c,"attach");d=function(){var g=mm(c);g&&nm(c,g)};c.Wa.o(a,"error",d);c.g=a;if(!b||!Dd()||c.H){f.F(6);break}return D(f,om(c),6);case 6:xa(f);c.V.release();ya(f,0);break;case 5:return e=wa(f),D(f,c.detach(),10);case 10:throw e;}})};
|
|
485
|
-
p.
|
|
485
|
+
p.wg=function(a){this.nh=a};p.detach=function(a){a=void 0===a?!1:a;var b=this;return K(function(c){if(1==c.g){if(b.l==fm)throw new P(2,7,7E3);return D(c,b.Sc(!1,a),2)}if(3!=c.g)return D(c,lm(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.Wa.rb(),b.g=null),hm(b,"detach"),b.D&&!a&&b.D.release()}finally{b.V.release()}F(c)})};function lm(a,b){var c;return K(function(d){return 1==d.g?(c=++a.ye,D(d,Gl(a.V,b),2)):c!=a.ye?(a.V.release(),d.return(!0)):d.return(!1)})}
|
|
486
486
|
p.Sc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return K(function(q){switch(q.g){case 1:return c.l!=fm&&(c.l=Wl),D(q,lm(c,"unload"),2);case 2:if(q.h)return q.return();ua(q,3);c.pd=!1;hm(c,"unload");a&&!Dd()&&(a=!1);cm(c);d=c.Eb.map(function(r){return r()});c.Eb=[];return D(q,Promise.all(d),5);case 5:c.dispatchEvent(em("unloading"));c.sa&&(c.sa.release(),c.sa=null);c.g&&(c.s.rb(),c.ua.rb());c.ie.stop();c.Ua&&(c.Ua.release(),c.Ua=null);if(!c.I){q.F(6);break}return D(q,
|
|
487
487
|
c.I.stop(),7);case 7:c.I=null,c.Be=null;case 6:if(!c.u){q.F(8);break}return D(q,c.u.stop(),8);case 8:if(!c.j){q.F(10);break}return D(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.K&&(c.K.release(),c.K=null);c.G&&(c.G.release(),c.G=null);if(!c.H){q.F(12);break}return D(q,c.H.destroy(),13);case 13:c.H=null;case 12:if(c.D&&!b)c.D.onAssetUnload();c.g&&$k(c.g);if(!c.g||!c.g.src){q.F(14);break}return D(q,new Promise(function(r){return(new Cd(r)).T(.1)}),15);case 15:c.g.removeAttribute("src"),c.g.load();
|
|
488
|
-
case 14:if(!c.m){q.F(16);break}return D(q,c.m.destroy(),17);case 17:c.m=null;case 16:c.$=null;c.M=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.C=new Vl;c.
|
|
489
|
-
!c.H)return D(q,om(c),0);q.F(0)}})};p.
|
|
488
|
+
case 14:if(!c.m){q.F(16);break}return D(q,c.m.destroy(),17);case 17:c.m=null;case 16:c.$=null;c.M=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.C=new Vl;c.Xf=null;c.Vb=[];c.N=NaN;pm(c);case 3:xa(q);c.V.release();ya(q,4);break;case 4:if(a&&Dd()&&
|
|
489
|
+
!c.H)return D(q,om(c),0);q.F(0)}})};p.lj=function(a){this.aa=a};
|
|
490
490
|
p.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:if(d.l==fm)throw new P(2,7,7E3);return D(m,Gl(d.V,"load"),2);case 2:d.V.release();if(!d.g)throw new P(2,7,7002);if(!d.$){m.F(3);break}return D(m,d.Sc(!1),3);case 3:e=++d.ye;f=function(){if(d.ye!=e)throw new P(2,7,7E3);};g=function(n,q){return K(function(r){switch(r.g){case 1:return ua(r,2),D(r,Gl(d.V,q),4);case 4:return f(),D(r,n(),5);case 5:f();case 2:xa(r),d.V.release(),ya(r,0)}})};ta(m,5);
|
|
491
491
|
d.aa=b;d.pd=!1;d.dispatchEvent(em("loading"));h=Date.now()/1E3;d.C=new Vl;d.$=a;if(c){m.F(7);break}return D(m,g(function(){return K(function(n){if(1==n.g)return D(n,qm(d),2);c=n.h;F(n)})},"guessMimeType_"),7);case 7:if(k=rm(d,c))return D(m,g(function(){return K(function(n){return D(n,sm(d,c),0)})},"initializeSrcEqualsDrmInner_"),16);if(d.H){m.F(11);break}return D(m,g(function(){return K(function(n){return D(n,om(d),0)})},"initializeMediaSourceEngineInner_"),11);case 11:return D(m,g(function(){return K(function(n){return D(n,
|
|
492
492
|
tm(d,c),0)})},"parseManifestInner_"),13);case 13:return D(m,g(function(){return K(function(n){return D(n,um(d),0)})},"initializeDrmInner_"),14);case 14:return D(m,g(function(){return K(function(n){return D(n,vm(d,h),0)})},"loadInner_"),10);case 16:return D(m,g(function(){return K(function(n){return D(n,wm(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(em("loaded"));va(m,0);break;case 5:l=wa(m);if(7E3==l.code){m.F(18);break}return D(m,d.Sc(!1),18);case 18:throw l;}})};
|
|
493
493
|
function qm(a){var b,c;return K(function(d){if(1==d.g)return b=a.h.manifest.retryParameters,D(d,Pk(a.$,a.J,b),2);c=d.h;"application/x-mpegurl"==c&&Pd()&&(c="application/vnd.apple.mpegurl");return d.return(c)})}function rm(a,b){if(!Dd())return!0;if(b){if(""==(a.g||Fd()).canPlayType(b))return!1;if(!(Dd()&&b in Ch))return!0;if("application/x-mpegurl"===b||"application/vnd.apple.mpegurl"===b){if(a.h.streaming.preferNativeHls)return!0;if(Pd())return a.h.streaming.useNativeHlsOnSafari}}return!1}
|
|
494
|
-
function om(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return hm(a,"media-source"),b=a.h.textDisplayFactory,c=b(),a.
|
|
494
|
+
function om(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return hm(a,"media-source"),b=a.h.textDisplayFactory,c=b(),a.Xf=b,d=xm(a.g,c,function(h,k,l){ym(a,h,k,l)},a.L),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.Z=f,D(g,d.M,2);a.H=d;F(g)})}
|
|
495
495
|
function tm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.J,hm(a,"manifest-parser"),a.Be=Bh(a.$,b||null),a.I=a.Be(),d=pf(a.h.manifest),a.g&&"AUDIO"===a.g.nodeName&&(d.disableVideo=!0),a.I.configure(d),a.sa=new Vj(function(){return a.Fa()}),a.sa.addEventListener("regionadd",function(n){n=n.region;zm(a,"timelineregionadded",n);if(a.D)a.D.onDashTimedMetadata(n)}),a.ha=null,a.h.streaming.observeQualityChanges&&(a.ha=new Rj(function(){return a.Ib()}),a.ha.addEventListener("qualitychange",
|
|
496
496
|
function(n){var q=n.quality;n=n.position;q=(new Map).set("mediaQuality",{bandwidth:q.bandwidth,audioSamplingRate:q.audioSamplingRate,codecs:q.codecs,contentType:q.contentType,frameRate:q.frameRate,height:q.height,mimeType:q.mimeType,channelsCount:q.channelsCount,pixelAspectRatio:q.pixelAspectRatio,width:q.width}).set("position",n);a.dispatchEvent(em("mediaqualitychanged",q))})),e={networkingEngine:c,filter:function(n){return Am(a,n)},makeTextStreamsForClosedCaptions:function(n){return Bm(a,n)},onTimelineRegionAdded:function(n){var q=
|
|
497
497
|
a.sa;a:{var r=t(q.g);for(var u=r.next();!u.done;u=r.next())if(u=u.value,u.schemeIdUri==n.schemeIdUri&&u.id==n.id&&u.startTime==n.startTime&&u.endTime==n.endTime){r=u;break a}r=null}null==r&&(q.g.add(n),n=new O("regionadd",new Map([["region",n]])),q.dispatchEvent(n))},onEvent:function(n){return a.dispatchEvent(n)},onError:function(n){return nm(a,n)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",
|
|
@@ -499,7 +499,7 @@ a.sa;a:{var r=t(q.g);for(var u=r.next();!u.done;u=r.next())if(u=u.value,u.scheme
|
|
|
499
499
|
Dm(a.i);k=Date.now()/1E3;l=k-f;a.C.H=l;F(m)})}
|
|
500
500
|
function um(a){var b,c,d,e;return K(function(f){return 1==f.g?(hm(a,"drm-engine"),b=Date.now()/1E3,c=!0,a.m=Em(a,{sc:a.J,onError:function(g){nm(a,g)},ze:function(g){Fm(a,g)},onExpirationUpdated:function(g,h){Gm(a,g,h)},onEvent:function(g){a.dispatchEvent(g);"drmsessionupdate"==g.type&&c&&(c=!1,a.C.j=Date.now()/1E3-b,a.L&&zi(a.L))}}),a.m.configure(a.h.drm),(d=Zd(a.i.variants,a.h.restrictions,a.ve))&&a.j&&Hm(a),e=xe(a.i.variants),D(f,Tg(a.m,e,a.i.offlineSessionIds),2)):3!=f.g?D(f,a.m.zc(a.g),3):D(f,
|
|
501
501
|
Am(a,a.i),0)})}
|
|
502
|
-
function vm(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B;return K(function(C){switch(C.g){case 1:hm(a,"load");c=a.g;a.K=new Oj({ce:function(){return c.playbackRate},Ec:function(){return c.defaultPlaybackRate},
|
|
502
|
+
function vm(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B;return K(function(C){switch(C.g){case 1:hm(a,"load");c=a.g;a.K=new Oj({ce:function(){return c.playbackRate},Ec:function(){return c.defaultPlaybackRate},hg:function(E){c.playbackRate=E},Ug:function(E){c.currentTime+=E}});d=function(){return Im(a)};e=function(){return Jm(a)};a.s.o(c,"playing",d);a.s.o(c,"pause",d);a.s.o(c,"ended",d);a.s.o(c,"ratechange",e);dm(a,a.h);f=a.h.abrFactory;a.u&&a.Uf==f||(a.Uf=f,a.u=f(),"function"!=typeof a.u.setMediaElement&&(He("AbrManager w/o setMediaElement",
|
|
503
503
|
"Please use an AbrManager with setMediaElement function."),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.za=new Se(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount,a.h.preferredVideoHdrLevel,a.h.preferredVideoLayout,a.h.preferredAudioLabel,a.h.mediaSource.codecSwitchingStrategy,a.h.manifest.dash.enableAudioGroups);a.Qa=a.h.preferredTextLanguage;a.Fb=a.h.preferredTextRole;a.Cb=a.h.preferForcedSubs;Km(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);
|
|
504
504
|
a.u.init(function(E,H,G){a.j&&E!=a.j.j&&Lm(a,E,!0,void 0===H?!1:H,void 0===G?0:G)});a.u.setMediaElement(c);Vd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);a.j=Mm(a);a.j.configure(a.h.streaming);a.l=Nm;c.textTracks&&a.s.o(c.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Om(a,E)}});a.dispatchEvent(em("streaming"));g=null;(h=a.j.j)||(g=Pm(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=m.next())(q=n.value)&&
|
|
505
505
|
!q.segmentIndex&&k.push(q.createSegmentIndex());if(!(0<k.length)){C.F(2);break}return D(C,Promise.all(k),2);case 2:if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(l);Km(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.G=Qm(a,a.aa);a.Ua=Rm(a,b);r=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Sm(a,c,r);if(h){C.F(4);break}Lm(a,g,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){C.F(4);break}u=a.G;v=u.Sd;return D(C,Tm(g,a.G.kd()),6);case 6:v.call(u,C.h);case 4:return a.G.Ve(),
|
|
@@ -507,14 +507,14 @@ y=a.$b().find(function(E){return E.active}),y||((z=ye(a.i.textStreams,a.Qa,a.Fb,
|
|
|
507
507
|
function(){return Zm(a)},a.s.o(c,"timeupdate",B),Zm(a));if(a.D)a.D.onManifestUpdated(x);a.pd=!0;a.s.ka(c,"loadedmetadata",function(){a.C.m=Date.now()/1E3-b});F(C)}})}
|
|
508
508
|
function sm(a,b){var c,d,e,f;return K(function(g){return 1==g.g?(c=Jb,d=Date.now()/1E3,e=!0,a.m=Em(a,{sc:a.J,onError:function(h){nm(a,h)},ze:function(h){Fm(a,h)},onExpirationUpdated:function(h,k){Gm(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.C.j=Date.now()/1E3-d)}}),a.m.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,
|
|
509
509
|
mimeType:b?od(b):"",codecs:b?pd(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Z=!0,D(g,Tg(a.m,[f],[]),2)):D(g,a.m.zc(a.g),0)})}
|
|
510
|
-
function wm(a,b,c){var d,e,f,g,h,k,l,m,n,q;return K(function(r){if(1==r.g)return hm(a,"src-equals"),d=a.g,a.G=new Dj(d),e=!1,a.Eb.push(function(){e=!0}),null!=a.aa&&a.G.Sd(a.aa),a.K=new Oj({ce:function(){return d.playbackRate},Ec:function(){return d.defaultPlaybackRate},
|
|
510
|
+
function wm(a,b,c){var d,e,f,g,h,k,l,m,n,q;return K(function(r){if(1==r.g)return hm(a,"src-equals"),d=a.g,a.G=new Dj(d),e=!1,a.Eb.push(function(){e=!0}),null!=a.aa&&a.G.Sd(a.aa),a.K=new Oj({ce:function(){return d.playbackRate},Ec:function(){return d.defaultPlaybackRate},hg:function(u){d.playbackRate=u},Ug:function(u){d.currentTime+=u}}),f=a.h.streaming.rebufferingGoal,Sm(a,d,f),g=function(){return Im(a)},h=function(){return Jm(a)},a.s.o(d,"playing",g),a.s.o(d,"pause",g),a.s.o(d,"ended",g),a.s.o(d,
|
|
511
511
|
"ratechange",h),"none"!=d.preload&&a.s.ka(d,"loadedmetadata",function(){a.C.m=Date.now()/1E3-b}),d.audioTracks&&(a.s.o(d.audioTracks,"addtrack",function(){return Hm(a)}),a.s.o(d.audioTracks,"removetrack",function(){return Hm(a)}),a.s.o(d.audioTracks,"change",function(){return Hm(a)})),d.textTracks&&(a.s.o(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":$m(a,u);break;case "chapters":Om(a,u);break;default:Hm(a)}}),a.s.o(d.textTracks,"removetrack",function(){return Hm(a)}),
|
|
512
512
|
a.s.o(d.textTracks,"change",function(){return Hm(a)})),d.src=ll(a.U,a.$,c),(Jd()||Id("Web0S"))&&d.load(),a.l=an,a.dispatchEvent(em("streaming")),k=new gf,uj(d,HTMLMediaElement.HAVE_METADATA,a.s,function(){a.G.Ve();k.resolve()}),uj(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var u;return K(function(v){if(1==v.g)return bn(a),u=cn(a),u.find(function(y){return"disabled"!=y.mode})?(0<u.length&&(a.Z=!0),v.F(2)):D(v,new Promise(function(y){a.s.ka(d.textTracks,"change",y);(new Cd(y)).T(1)}),2);if(e)return v.return();
|
|
513
513
|
dn(a);F(v)})}),d.error?k.reject(mm(a)):"none"==d.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.s.ka(d,"error",function(){k.reject(mm(a))}),D(r,k,2);(l=a.R())&&a.h.streaming.liveSync?(m=function(){return Ym(a)},a.s.o(d,"timeupdate",m)):l||(n=function(){return Zm(a)},a.s.o(d,"timeupdate",
|
|
514
|
-
n),Zm(a));a.D&&(a.D.onManifestUpdated(l),l&&(q=a.Fa().end,a.s.o(d,"progress",function(){var u=a.Fa().end;q!=u&&(a.D.onManifestUpdated(a.R()),q=u)})));a.pd=!0;F(r)})}function bn(a){var b=a.h.preferredAudioLanguage;""!=b&&a.Ee(b,a.h.preferredVariantRole)}function dn(a){var b=a.h.preferredTextLanguage;""!=b&&a
|
|
514
|
+
n),Zm(a));a.D&&(a.D.onManifestUpdated(l),l&&(q=a.Fa().end,a.s.o(d,"progress",function(){var u=a.Fa().end;q!=u&&(a.D.onManifestUpdated(a.R()),q=u)})));a.pd=!0;F(r)})}function bn(a){var b=a.h.preferredAudioLanguage;""!=b&&a.Ee(b,a.h.preferredVariantRole)}function dn(a){var b=a.h.preferredTextLanguage;""!=b&&a.$f(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
|
|
515
515
|
function $m(a,b){if("metadata"==b.kind){b.mode="hidden";a.s.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,en(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new Cd(function(){var d=fn(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Pa().T(.5);a.Eb.push(function(){c.stop()})}}
|
|
516
516
|
function ym(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())en(a,f,g,"org.id3",k.value);if(a.D)a.D.onHlsTimedMetadata(e,f)}}function en(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(em("metadata",b))}
|
|
517
|
-
function Om(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Cd(function(){b.mode="hidden"})).Pa().T(.5);a.Eb.push(function(){c.stop()})}}function Dm(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))}p.
|
|
517
|
+
function Om(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Cd(function(){b.mode="hidden"})).Pa().T(.5);a.Eb.push(function(){c.stop()})}}function Dm(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))}p.Si=function(){for(var a=this.V;a.g;)a.release()};function Em(a,b){return new Mg(b,a.h.drm.updateExpirationTime)}
|
|
518
518
|
function Zl(a){return new tf(function(b,c,d){a.u&&a.u.segmentDownloaded(b,c,d)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(em("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(em("downloadfailed",b))},function(b,c,d){var e=a.U;d=void 0===d?{}:d;if(e.g.enabled)if("HEAD"===c.method)sl(e,c);else switch(b){case 0:try{if(e.g.enabled){if(d.type){a:{switch(d.type){case 4:var f=
|
|
519
519
|
"d";break a;case 3:case 2:f="h";break a;case 5:f="s";break a}f=void 0}e.s=f}sl(e,c,{ot:pl,su:!e.j})}}catch(m){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",m)}break;case Df:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.R()?"l":"v"};h.ot=vl(b);var k=h.ot===tl||h.ot===nl||h.ot===ol||h.ot===xl,l=b.stream;l&&(k&&(h.bl=zl(e,l.type)),l.bandwidth&&(h.br=l.bandwidth/1E3));k&&h.ot!==xl&&(h.tb=Al(e,h.ot)/1E3);sl(e,c,h)}}catch(m){Ta("CMCD_SEGMENT_ERROR",
|
|
520
520
|
"Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:sl(e,c,{ot:"k"});break;case 4:sl(e,c,{ot:"o"})}},function(b,c,d,e){a.I&&a.I.banLocation&&a.I.banLocation(e)})}function Qm(a,b){return new Ej(a.g,a.i,a.h.streaming,b,function(){a.Ua&&Qj(a.Ua,!0);a.j&&a.j.Fd();a.M&&gn(a)},function(c){return a.dispatchEvent(c)})}
|
|
@@ -522,54 +522,55 @@ function Rm(a,b){b=new Wj(a.sa,a.R()||0<b);b.addEventListener("enter",function(d
|
|
|
522
522
|
function Sm(a,b,c){a.M=new $e;a.M.g=bf;cf(a.M,c,Math.min(.5,c/2));pm(a);a.s.o(b,"waiting",function(){return gn(a)});a.s.o(b,"stalled",function(){return gn(a)});a.s.o(b,"canplaythrough",function(){return gn(a)});a.s.o(b,"progress",function(){return gn(a)})}
|
|
523
523
|
function gn(a){switch(a.l){case an:if(a.g.ended)var b=!0;else{var c=Mh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Nm:a:if(a.g.ended||Pi(a.H))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Zb();var d=Mh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Oh(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?af:bf;c.g=d;b!=d&&pm(a)}function xm(a,b,c,d){return new Hi(a,b,c,d)}
|
|
524
524
|
function Yl(a){return new kl({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Ib:function(){return a.Ib()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Kb:function(){return a.Kb()},Xb:function(){return a.Xb()},jb:function(){return a.jb()},R:function(){return a.R()}},a.h.cmcd)}
|
|
525
|
-
function Mm(a){return new kk(a.i,{be:function(){return a.G?a.G.kd():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},Y:a.H,sc:a.J,onError:function(b){return nm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},
|
|
526
|
-
c){(c=c.Mf)&&a.ha&&Tj(a.ha,c,b)},
|
|
525
|
+
function Mm(a){return new kk(a.i,{be:function(){return a.G?a.G.kd():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},Y:a.H,sc:a.J,onError:function(b){return nm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Li:function(){a.I&&a.I.update&&a.I.update()},Qf:function(b,c,d){if(a.G){a.G.Vg();var e=Qi(a.H,d);!a.R()&&a.g.paused&&null!=e&&0<e&&a.G.kd()<e&&a.G.Sd(e)}gn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(em("segmentappended",b))},Ki:function(b,
|
|
526
|
+
c){(c=c.Mf)&&a.ha&&Tj(a.ha,c,b)},xg:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){c=new og(qc(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;bh(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},Mi:function(b,c,d){ym(a,b,c,d)},df:function(b,c){return a.df(b,c)}})}
|
|
527
527
|
p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Dl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(He("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(He("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
528
528
|
a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2));var c=Pl(this.h,a,Xl(this));hn(this);return c};
|
|
529
|
-
function hn(a){if(a.I){var b=pf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{jn(a,a.i)}catch(f){nm(a,f)}a.u&&Xm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||kn(a)}a.J&&a.J.
|
|
530
|
-
e.destroy());d.h&&(d.h.j=c);a.
|
|
531
|
-
p.
|
|
529
|
+
function hn(a){if(a.I){var b=pf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{jn(a,a.i)}catch(f){nm(a,f)}a.u&&Xm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||kn(a)}a.J&&a.J.fg(a.h.streaming.forceHTTPS);if(a.H&&(a.H.configure(a.h.mediaSource),a.H.Z=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Xf!=b)){var c=b(),d=a.H,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),
|
|
530
|
+
e.destroy());d.h&&(d.h.j=c);a.Xf=b;a.j&&(b=a.j,(c=b.h.get(Ib))&&vk(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Wm(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),cf(a.M,b,Math.min(.5,b/2)));a.i&&Km(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.D&&a.D.configure(a.h.ads);a.U&&a.U.configure(a.h.cmcd)}p.getConfiguration=function(){var a=Xl(this);Pl(a,this.h,Xl(this));return a};
|
|
531
|
+
p.Jh=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Fa().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};p.Wi=function(){for(var a in this.h)delete this.h[a];Pl(this.h,Xl(this),Xl(this));hn(this)};p.ae=function(){return this.l};p.zf=function(){return this.i?this.i.type:null};p.bi=function(){return this.g};
|
|
532
532
|
p.Xb=function(){return this.J};p.yf=function(){return this.$};p.Yd=function(){return this.D?this.D:null};p.R=function(){return this.i?this.i.presentationTimeline.R():this.g&&this.g.src?Infinity==this.g.duration:!1};p.nc=function(){return this.i?this.i.presentationTimeline.nc():!1};p.Jc=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
533
|
-
p.Fa=function(){if(this.i){if(!this.pd&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Gc(),end:a.Lb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};p.
|
|
533
|
+
p.Fa=function(){if(this.i){if(!this.pd&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Gc(),end:a.Lb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};p.pi=function(){this.R()&&(this.g.currentTime=this.Fa().end)};p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.m?this.m.g:null};p.rd=function(){return this.m?this.m.rd():Infinity};
|
|
534
534
|
p.xf=function(){return this.m?this.m.xf():[]};p.$d=function(){return this.m?this.m.$d():{}};p.wd=function(){return this.M?this.M.g==bf:!1};p.Kb=function(){return this.g?this.K?this.K.h:1:0};
|
|
535
|
-
p.Jd=function(a){var b=this;0==a?Sa("A trick play rate of 0 is unsupported!"):(this.ua.rb(),this.g.paused&&this.g.play(),this.K.set(a),this.l==Nm&&(this.u.playbackRateChanged(a),uk(this.j,1<Math.abs(a))),this.R()&&this.ua.o(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Fa(),e=b.h.streaming.safeSeekOffset;0<a?c>=d.end&&b.ld():c<=d.start+e&&b.ld()}))};
|
|
535
|
+
p.Jd=function(a){var b=this;0==a?Sa("A trick play rate of 0 is unsupported!"):(this.ua.rb(),this.g.paused&&this.g.play(),this.K.set(a),this.l==Nm&&(this.u.playbackRateChanged(a),uk(this.j,1<Math.abs(a))),this.R()&&this.ua.o(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Fa(),e=b.h.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.ld():Math.floor(c)<=Math.floor(d.start+e)&&b.ld()}))};
|
|
536
|
+
p.ld=function(){var a=this.K.Ec();this.l==an&&this.K.set(a);this.l==Nm&&(this.K.set(a),this.u.playbackRateChanged(a),uk(this.j,!1));this.ua.rb()};
|
|
536
537
|
p.jb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,we(e)){var f=oe(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ve(g)}):[]};
|
|
537
538
|
p.$b=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=pe(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?cn(this).map(function(f){return te(f)}):[]};p.Zd=function(){var a=this.Vb;this.i&&(a=this.i.imageStreams);return a.map(function(b){return qe(b)})};
|
|
538
|
-
p.
|
|
539
|
+
p.Gh=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Nm&&b.l!=an)return g.return(null);c=b.Vb;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.F(2):D(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Kj(d.segmentIndex,function(h){var k=ln(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.hc;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.Bf(a,h.startTime+l*m/k))}}),D(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
539
540
|
function ln(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{hc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
540
541
|
p.Bf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B;return K(function(C){if(1==C.g){if(c.l!=Nm&&c.l!=an)return C.return(null);d=c.Vb;c.i&&(d=c.i.imageStreams);return(e=d.find(function(E){return E.id==a}))?e.segmentIndex?C.F(2):D(C,e.createSegmentIndex(),2):C.return(null)}f=e.segmentIndex.find(b);if(null==f)return C.return(null);g=e.segmentIndex.get(f);h=ln(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.hc;n=l/h.rows;q=h.hc*h.rows;r=g.j-g.startTime;
|
|
541
542
|
u=g.I||r/q;v=g.startTime;z=y=0;1<q&&(x=Math.floor((b-g.startTime)/u),v=g.startTime+x*u,y=x%h.hc*m,z=Math.floor(x/h.hc)*n);A=!1;if(B=g.H)A=!0,n=B.height,y=B.positionX,z=B.positionY,m=B.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:y,positionY:z,startTime:v,duration:u,uris:g.ba(),width:m,sprite:A})})};
|
|
542
|
-
p.
|
|
543
|
+
p.ag=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Ul(this.C.h,b,!1),xk(this.j,b),mn(this),this.Qa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=cn(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,re(c)==a.id?c.mode=this.Z?"showing":"hidden":c.mode="disabled";mn(this)}};
|
|
543
544
|
p.Fe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&we(d)&&(Lm(this,d,!1,b,c),this.za=new Pe(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),Xm(this))}else if(this.g&&this.g.audioTracks)for(b=
|
|
544
|
-
Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,re(c)==a.id){nn(this,c);break}};p.
|
|
545
|
+
Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,re(c)==a.id){nn(this,c);break}};p.Ih=function(){return on(this.jb())};p.ii=function(){return on(this.$b())};p.Hh=function(){return Array.from(pn(this.jb()))};p.gi=function(){return Array.from(pn(this.$b()))};
|
|
545
546
|
p.Ee=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.G){this.za=new Se(a,b||"",c,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.za.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,b))c=
|
|
546
|
-
f;c?(a=oe(c),this.Fe(a,!0,d)):kn(this)}else this.g&&this.g.audioTracks&&(d=ye(this.jb(),a,b||"",!1)[0])&&this.Fe(d)};p
|
|
547
|
-
p.
|
|
548
|
-
p.qc=function(){var a=this.Z;return this.H&&this.l==Nm?this.H.H.isTextVisible():this.g&&this.g.src&&this.g.textTracks?cn(this).some(function(b){return"showing"==b.mode}):a};p.
|
|
549
|
-
p.
|
|
547
|
+
f;c?(a=oe(c),this.Fe(a,!0,d)):kn(this)}else this.g&&this.g.audioTracks&&(d=ye(this.jb(),a,b||"",!1)[0])&&this.Fe(d)};p.$f=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Qa=a,this.Fb=b||"",this.Cb=c,(a=ye(this.i.textStreams,this.Qa,this.Fb,this.Cb)[0]||null)&&a!=this.j.s&&(Ul(this.C.h,a,!1),this.h.streaming.alwaysStreamText||this.qc()))xk(this.j,a),mn(this)}else(a=ye(this.$b(),a,b||"",c)[0])&&this.ag(a)};
|
|
548
|
+
p.cj=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.G){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.za=new Se(d.language,"",0,"","",a,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),kn(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&nn(this,b)}};
|
|
549
|
+
p.qc=function(){var a=this.Z;return this.H&&this.l==Nm?this.H.H.isTextVisible():this.g&&this.g.src&&this.g.textTracks?cn(this).some(function(b){return"showing"==b.mode}):a};p.Jg=function(){return this.g&&this.g.src&&this.g.textTracks?qn(this).map(function(a){return te(a)}):[]};
|
|
550
|
+
p.Lh=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=Nb(a),c=qn(this).filter(function(h){return Nb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(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};
|
|
550
551
|
function cn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function fn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function qn(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
551
552
|
p.He=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.l==Nm)this.H.H.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=ye(this.i.textStreams,this.Qa,this.Fb,this.Cb),0<a.length&&(xk(this.j,a[0]),mn(this))):tk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=cn(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Vm(this)}};
|
|
552
|
-
p.
|
|
553
|
-
p.
|
|
553
|
+
p.ci=function(){if(!this.R())return null;if(this.G)var a=this.G.kd();else{if(null==this.aa)return new Date;a=this.aa}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.G||b.i)+a))}return this.g&&this.g.getStartDate?(b=this.g.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};
|
|
554
|
+
p.Lg=function(){if(!this.R())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};p.Ib=function(){if(this.l==Nm)return this.H.Ib();var a={total:[],audio:[],video:[],text:[]};this.l==an&&(a.total=Ph(this.g.buffered));return a};
|
|
554
555
|
p.getStats=function(){if(this.l!=Nm&&this.l!=an)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:[]};Im(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.C;b=
|
|
555
|
-
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.C.M=this.G.
|
|
556
|
-
NaN,b.s=c.video.width||NaN,b.l=d);this.R()&&(c=this.
|
|
556
|
+
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.C.M=this.G.sg(),this.C.N=this.G.ug());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.C;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.K=d;this.C.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.K?c.K:NaN):c=NaN;this.C.u=c;if(this.l==Nm){c=this.j.j;b=this.j.s;if(c){d=this.K?this.K.h:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.C.D=e}c&&c.video&&(b=this.C,d=c.video.height||
|
|
557
|
+
NaN,b.s=c.video.width||NaN,b.l=d);this.R()&&(c=this.Lg().valueOf()+1E3*a.currentTime,this.C.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.C.I=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.C.C=c}this.l==an&&(c=this.C,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var f=this.C;a=f.s;c=f.l;b=f.D;d=f.K;e=f.L;var g=f.J,h=f.N,k=f.M,l=f.C,m=f.i,n=f.m,q=f.H,r=f.j,u=Rl(f.g,"playing"),v=Rl(f.g,"paused"),y=Rl(f.g,"buffering"),z=f.u,x=f.G,A=f.I,B=Sl(f.g),C=[];f=t(f.h.g);
|
|
557
558
|
for(var E=f.next();!E.done;E=f.next())E=E.value,C.push({timestamp:E.timestamp,id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:q,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:y,licenseTime:z,liveLatency:x,maxSegmentDuration:A,stateHistory:B,switchHistory:C}};
|
|
558
|
-
p.
|
|
559
|
-
l&&C.label==(f||"")&&C.kind==c}))return Hm(h),B.return(n);throw new P(1,2,2012);case 4:q=Jb;r=h.g.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new P(1,4,4033);if(!k.length){B.F(6);break}return D(B,tn(h,a,h.J,h.h.streaming.retryParameters),7);case 7:u=B.h,v=un(h,u,d,k),y=new Blob([v],{type:"text/vtt"}),a=Ki(y),d="text/vtt";case 6:z={id:h.
|
|
559
|
+
p.uh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,r,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:if(h.l!=Nm&&h.l!=an)throw new P(1,7,7004);"subtitles"!=c&&"captions"!=c&&Sa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){B.F(2);break}return D(B,rn(h,a),3);case 3:d=B.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.l!=an){B.F(4);break}g&&(c="forced");return D(B,sn(h,a,b,c,d,f||"",k),5);case 5:l=Nb(b);m=h.$b();if(n=m.find(function(C){return Nb(C.language)==
|
|
560
|
+
l&&C.label==(f||"")&&C.kind==c}))return Hm(h),B.return(n);throw new P(1,2,2012);case 4:q=Jb;r=h.g.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new P(1,4,4033);if(!k.length){B.F(6);break}return D(B,tn(h,a,h.J,h.h.streaming.retryParameters),7);case 7:u=B.h,v=un(h,u,d,k),y=new Blob([v],{type:"text/vtt"}),a=Ki(y),d="text/vtt";case 6:z={id:h.pg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mj(0,r,[a]),mimeType:d||"",
|
|
560
561
|
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.ya,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};x=hd(z.mimeType,z.codecs);A=rd(x);if(!A)throw new P(2,2,2014,d);h.i.textStreams.push(z);Hm(h);return B.return(pe(z))}})};
|
|
561
|
-
p.
|
|
562
|
-
vttOffset:0};l=qc(f);m=h.parseMedia(l,k,a);n=[];q={};r=t(m);for(u=r.next();!u.done;q={ed:q.ed,dc:q.dc},u=r.next())q.dc=u.value,q.ed=null,v=function(B){return function(){null==B.ed&&(B.ed=Bb([a],[B.dc.payload]));return B.ed||[]}}(q),y=new Jh(q.dc.startTime,q.dc.endTime,v,0,null,null,0,0,Infinity),q.dc.payload.includes("#xywh")&&(z=q.dc.payload.split("#xywh=")[1].split(","),4===z.length&&y.
|
|
563
|
-
n.push(y);x={id:c.
|
|
562
|
+
p.vh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x;return K(function(A){switch(A.g){case 1:if(c.l!=Nm&&c.l!=an)throw new P(1,7,7004);if(b){A.F(2);break}return D(A,rn(c,a),3);case 3:b=A.h;case 2:if("text/vtt"!=b)throw new P(1,2,2017,a);d=Jb;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new P(1,4,4045);return D(A,tn(c,a,c.J,c.h.streaming.retryParameters),4);case 4:f=A.h;g=sd[b];if(!g)throw new P(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
563
|
+
vttOffset:0};l=qc(f);m=h.parseMedia(l,k,a);n=[];q={};r=t(m);for(u=r.next();!u.done;q={ed:q.ed,dc:q.dc},u=r.next())q.dc=u.value,q.ed=null,v=function(B){return function(){null==B.ed&&(B.ed=Bb([a],[B.dc.payload]));return B.ed||[]}}(q),y=new Jh(q.dc.startTime,q.dc.endTime,v,0,null,null,0,0,Infinity),q.dc.payload.includes("#xywh")&&(z=q.dc.payload.split("#xywh=")[1].split(","),4===z.length&&y.hh({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
|
|
564
|
+
n.push(y);x={id:c.pg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Jj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.jd,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1};c.l==an?c.Vb.push(x):
|
|
564
565
|
c.i.imageStreams.push(x);Hm(c);return A.return(qe(x))}})};
|
|
565
|
-
p.
|
|
566
|
+
p.sh=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Nm&&d.l!=an)throw new P(1,7,7004);if(c){k.F(2);break}return D(k,rn(d,a),3);case 3:c=k.h;case 2:return e=[],d.D&&(e=d.D.getCuePoints()),D(k,sn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Jg();h=g.find(function(l){return l.language==b});if(!h){k.F(5);break}return D(k,new Promise(function(l,m){d.s.ka(f,"load",l);d.s.ka(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return Hm(d),k.return(h);case 5:throw new P(1,
|
|
566
567
|
2,2012);}})};function rn(a,b){var c;return K(function(d){switch(d.g){case 1:return ta(d,2),D(d,Pk(b,a.J,a.h.streaming.retryParameters),4);case 4:c=d.h;va(d,3);break;case 2:wa(d);case 3:if(c)return d.return(c);throw new P(1,2,2011,b);}})}
|
|
567
568
|
function sn(a,b,c,d,e,f,g){var h,k,l,m;return K(function(n){if(1==n.g)return"text/vtt"!=e||g.length?D(n,tn(a,b,a.J,a.h.streaming.retryParameters),3):n.F(2);2!=n.g&&(h=n.h,k=un(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ki(l),e="text/vtt");m=document.createElement("track");var q=a.U,r=b;try{if(q.g.enabled){var u=ml(q);u.ot=yl;u.su=!0;var v=ql(u);var y=rl(r,v)}else y=r}catch(z){Ta("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),y=r}m.src=y;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
568
569
|
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function tn(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=Df;f=xf([b],d);f.method="GET";var k=a.U;try{k.g.enabled&&sl(k,f,{ot:yl,su:!0})}catch(l){Ta("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return D(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
569
|
-
function un(a,b,c,d){var e=sd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=qc(b),b=c.parseMedia(b,a,null),jl(b,d);throw new P(2,2,2014,c);}p.
|
|
570
|
-
p
|
|
571
|
-
function Xl(a){var b=Nl();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.
|
|
572
|
-
function Bm(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Nj,l=e.closedCaptions.get(g);h={id:a.
|
|
570
|
+
function un(a,b,c,d){var e=sd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=qc(b),b=c.parseMedia(b,a,null),jl(b,d);throw new P(2,2,2014,c);}p.gg=function(a,b){this.ve.width=a;this.ve.height=b};p.Wf=function(a){if(this.l==Nm){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.u)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.ud||d.Sa||d.Bb||(d.ud=!1,sk(b,d,a));b=!0}}else b=!1;return b};
|
|
571
|
+
p.Zh=function(){Sa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};p.$h=function(){return this.Be};
|
|
572
|
+
function Xl(a){var b=Nl();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Wf(d))}};b.textDisplayFactory=function(){return a.fe?new al(a.g,a.fe):HTMLMediaElement.prototype.addTextTrack?new Uk(a.g,"Shaka Player TextTrack"):new Xk};return b}p.jg=function(a){this.fe=a};
|
|
573
|
+
function Bm(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Nj,l=e.closedCaptions.get(g);h={id:a.pg++,originalId:g,groupId:null,
|
|
573
574
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1};b.textStreams.push(h);c.add(g)}}
|
|
574
575
|
function Am(a,b){return K(function(c){if(1==c.g)return D(c,vn(a,b),2);jn(a,b);F(c)})}function vn(a,b){return K(function(c){if(1==c.g)return D(c,$d(a.m,b),2);if(!b.variants.some(we))throw new P(2,4,4032);F(c)})}function jn(a,b){if(a.l!=fm){Zd(b.variants,a.h.restrictions,a.ve)&&a.j&&Hm(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Cm(a,c.keySystem,e.video),Cm(a,c.keySystem,e.audio);wn(a,b)}}
|
|
575
576
|
function Cm(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,bh(a.m,e.initDataType,e.initData)}}}
|
|
@@ -588,18 +589,18 @@ p.df=function(a,b){if(!this.h.abr.enabled||this.l===fm||!navigator.onLine)return
|
|
|
588
589
|
function nm(a,b){if(a.l!=fm){2===b.severity&&am(a,!1);var c=em("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function zm(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(em(b,c))}
|
|
589
590
|
function mm(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new P(2,3,3016,b,c,a.g.error.message)}
|
|
590
591
|
function Fm(a,b){if(a.j){var c=em("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);c=1==d.length&&"00"==d[0];var e=!1;if(d.length){d=t(a.i.variants);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())if(l=l.value,(l=b[c?"00":l])||a.m.H)f.allowedByKeySystem=
|
|
591
|
-
f.allowedByKeySystem&&!!l&&!zn.includes(l)}h!=f.allowedByKeySystem&&(e=!0)}}}if(e&&(Hm(a),!Xm(a)))return;(b=a.j.j)&&!b.allowedByKeySystem&&kn(a)}}function Gm(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=em("expirationupdated");a.dispatchEvent(b)}function Km(a,b,c){0<b&&(a.R()||a.
|
|
592
|
+
f.allowedByKeySystem&&!!l&&!zn.includes(l)}h!=f.allowedByKeySystem&&(e=!0)}}}if(e&&(Hm(a),!Xm(a)))return;(b=a.j.j)&&!b.allowedByKeySystem&&kn(a)}}function Gm(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=em("expirationupdated");a.dispatchEvent(b)}function Km(a,b,c){0<b&&(a.R()||a.ih(b));b=a.getDuration();c<b&&(a.R()||a.eb(c))}
|
|
592
593
|
function wn(a,b){a=a.m?a.m.$d():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?zn.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
593
594
|
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new P(2,4,4012,a);}function xn(a,b){K(function(c){if(1==c.g)return D(c,Promise.resolve(),2);a.l!=fm&&a.dispatchEvent(b);F(c)})}function pn(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Nb(c.language)):b.add("und");return b}
|
|
594
595
|
function on(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Nb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
595
|
-
h.push({language:l,role:m,label:n})}});return h}L("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.
|
|
596
|
-
V.prototype.getBufferedInfo=V.prototype.Ib;V.prototype.getPresentationStartTimeAsDate=V.prototype.
|
|
597
|
-
V.prototype.getTextLanguages=V.prototype.
|
|
598
|
-
V.prototype.cancelTrickPlay=V.prototype.ld;V.prototype.trickPlay=V.prototype.Jd;V.prototype.getPlaybackRate=V.prototype.Kb;V.prototype.isBuffering=V.prototype.wd;V.prototype.getKeyStatuses=V.prototype.$d;V.prototype.getActiveSessionsMetadata=V.prototype.xf;V.prototype.getExpiration=V.prototype.rd;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.
|
|
599
|
-
V.prototype.isInProgress=V.prototype.nc;V.prototype.isLive=V.prototype.R;V.prototype.getAdManager=V.prototype.Yd;V.prototype.getAssetUri=V.prototype.yf;V.prototype.getNetworkingEngine=V.prototype.Xb;V.prototype.getMediaElement=V.prototype.
|
|
600
|
-
V.prototype.releaseAllMutexes=V.prototype.
|
|
596
|
+
h.push({language:l,role:m,label:n})}});return h}L("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.jg;V.prototype.getManifestParserFactory=V.prototype.$h;V.prototype.getManifest=V.prototype.Zh;V.prototype.retryStreaming=V.prototype.Wf;V.prototype.setMaxHardwareResolution=V.prototype.gg;V.prototype.addChaptersTrack=V.prototype.sh;V.prototype.addThumbnailsTrack=V.prototype.vh;V.prototype.addTextTrackAsync=V.prototype.uh;V.prototype.getStats=V.prototype.getStats;
|
|
597
|
+
V.prototype.getBufferedInfo=V.prototype.Ib;V.prototype.getPresentationStartTimeAsDate=V.prototype.Lg;V.prototype.getPlayheadTimeAsDate=V.prototype.ci;V.prototype.setTextTrackVisibility=V.prototype.He;V.prototype.getChapters=V.prototype.Lh;V.prototype.getChaptersTracks=V.prototype.Jg;V.prototype.isTextTrackVisible=V.prototype.qc;V.prototype.selectVariantsByLabel=V.prototype.cj;V.prototype.selectTextLanguage=V.prototype.$f;V.prototype.selectAudioLanguage=V.prototype.Ee;
|
|
598
|
+
V.prototype.getTextLanguages=V.prototype.gi;V.prototype.getAudioLanguages=V.prototype.Hh;V.prototype.getTextLanguagesAndRoles=V.prototype.ii;V.prototype.getAudioLanguagesAndRoles=V.prototype.Ih;V.prototype.selectVariantTrack=V.prototype.Fe;V.prototype.selectTextTrack=V.prototype.ag;V.prototype.getThumbnails=V.prototype.Bf;V.prototype.getAllThumbnails=V.prototype.Gh;V.prototype.getImageTracks=V.prototype.Zd;V.prototype.getTextTracks=V.prototype.$b;V.prototype.getVariantTracks=V.prototype.jb;
|
|
599
|
+
V.prototype.cancelTrickPlay=V.prototype.ld;V.prototype.trickPlay=V.prototype.Jd;V.prototype.getPlaybackRate=V.prototype.Kb;V.prototype.isBuffering=V.prototype.wd;V.prototype.getKeyStatuses=V.prototype.$d;V.prototype.getActiveSessionsMetadata=V.prototype.xf;V.prototype.getExpiration=V.prototype.rd;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.pi;V.prototype.seekRange=V.prototype.Fa;V.prototype.isAudioOnly=V.prototype.Jc;
|
|
600
|
+
V.prototype.isInProgress=V.prototype.nc;V.prototype.isLive=V.prototype.R;V.prototype.getAdManager=V.prototype.Yd;V.prototype.getAssetUri=V.prototype.yf;V.prototype.getNetworkingEngine=V.prototype.Xb;V.prototype.getMediaElement=V.prototype.bi;V.prototype.getManifestType=V.prototype.zf;V.prototype.getLoadMode=V.prototype.ae;V.prototype.resetConfiguration=V.prototype.Wi;V.prototype.getBufferFullness=V.prototype.Jh;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;
|
|
601
|
+
V.prototype.releaseAllMutexes=V.prototype.Si;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.lj;V.prototype.unload=V.prototype.Sc;V.prototype.detach=V.prototype.detach;V.prototype.attachCanvas=V.prototype.wg;V.prototype.attach=V.prototype.zc;
|
|
601
602
|
V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?D(h,uh(),3):h.F(2);2!=h.g&&(b=h.h);var k={};if(Dd())for(var l in Ch)k[l]=!0;l=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Dd()?!!Ch[m]:Ed(m);c=k;l='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",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(w(id));
|
|
602
|
-
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=Dd()?rd(m)?!0:ic(m)||(bd(m)?!0:!1):Ed(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=An;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=gm;V.setAdManagerFactory=function(a){$l=a};V.registerSupportPlugin=function(a,b){An[a]=b};V.prototype.destroy=V.prototype.destroy;var fm=0,Wl=1,Nm=2,an=3;V.LoadMode={DESTROYED:fm,NOT_LOADED:Wl,MEDIA_SOURCE:Nm,SRC_EQUALS:an};V.version="v4.6.
|
|
603
|
+
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=Dd()?rd(m)?!0:ic(m)||(bd(m)?!0:!1):Ed(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=An;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=gm;V.setAdManagerFactory=function(a){$l=a};V.registerSupportPlugin=function(a,b){An[a]=b};V.prototype.destroy=V.prototype.destroy;var fm=0,Wl=1,Nm=2,an=3;V.LoadMode={DESTROYED:fm,NOT_LOADED:Wl,MEDIA_SOURCE:Nm,SRC_EQUALS:an};V.version="v4.6.17";
|
|
603
604
|
var Bn=["4","6"];Ie=new function(a){this.g=a;this.i=Je;this.h=Ke}(new Ge(Number(Bn[0]),Number(Bn[1])));var zn=["output-restricted","internal-error"],An={},$l=null;function Cn(){this.h=[];this.j=this.i=this.g=0};function Dn(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new dc;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=Dn.prototype;p.getDuration=function(){return this.g.getDuration()};p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};
|
|
604
605
|
p.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
605
606
|
p.isMuted=function(){return 0==this.h.getVolume()};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};p.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
@@ -607,7 +608,7 @@ p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.ge
|
|
|
607
608
|
p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};L("shaka.ads.ClientSideAd",Dn);Dn.prototype.release=Dn.prototype.release;
|
|
608
609
|
Dn.prototype.getPodIndex=Dn.prototype.getPodIndex;Dn.prototype.getTimeOffset=Dn.prototype.getTimeOffset;Dn.prototype.getMediaUrl=Dn.prototype.getMediaUrl;Dn.prototype.getAdvertiserName=Dn.prototype.getAdvertiserName;Dn.prototype.getCreativeAdId=Dn.prototype.getCreativeAdId;Dn.prototype.getAdId=Dn.prototype.getAdId;Dn.prototype.getVastMediaWidth=Dn.prototype.getVastMediaWidth;Dn.prototype.getVastMediaHeight=Dn.prototype.getVastMediaHeight;Dn.prototype.getVastMediaBitrate=Dn.prototype.getVastMediaBitrate;
|
|
609
610
|
Dn.prototype.getDescription=Dn.prototype.getDescription;Dn.prototype.getTitle=Dn.prototype.getTitle;Dn.prototype.getPositionInSequence=Dn.prototype.getPositionInSequence;Dn.prototype.getSequenceLength=Dn.prototype.getSequenceLength;Dn.prototype.setMuted=Dn.prototype.setMuted;Dn.prototype.resize=Dn.prototype.resize;Dn.prototype.isLinear=Dn.prototype.isLinear;Dn.prototype.isMuted=Dn.prototype.isMuted;Dn.prototype.setVolume=Dn.prototype.setVolume;Dn.prototype.getVolume=Dn.prototype.getVolume;
|
|
610
|
-
Dn.prototype.play=Dn.prototype.play;Dn.prototype.pause=Dn.prototype.pause;Dn.prototype.skip=Dn.prototype.skip;Dn.prototype.canSkipNow=Dn.prototype.canSkipNow;Dn.prototype.getTimeUntilSkippable=Dn.prototype.getTimeUntilSkippable;Dn.prototype.isSkippable=Dn.prototype.isSkippable;Dn.prototype.isPaused=Dn.prototype.isPaused;Dn.prototype.getRemainingTime=Dn.prototype.getRemainingTime;Dn.prototype.getMinSuggestedDuration=Dn.prototype.getMinSuggestedDuration;Dn.prototype.getDuration=Dn.prototype.getDuration;function En(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.D=!1;this.u=this.G=null;this.H=NaN;this.m=e;this.j=null;this.h=new dc;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.6.
|
|
611
|
+
Dn.prototype.play=Dn.prototype.play;Dn.prototype.pause=Dn.prototype.pause;Dn.prototype.skip=Dn.prototype.skip;Dn.prototype.canSkipNow=Dn.prototype.canSkipNow;Dn.prototype.getTimeUntilSkippable=Dn.prototype.getTimeUntilSkippable;Dn.prototype.isSkippable=Dn.prototype.isSkippable;Dn.prototype.isPaused=Dn.prototype.isPaused;Dn.prototype.getRemainingTime=Dn.prototype.getRemainingTime;Dn.prototype.getMinSuggestedDuration=Dn.prototype.getMinSuggestedDuration;Dn.prototype.getDuration=Dn.prototype.getDuration;function En(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.D=!1;this.u=this.G=null;this.H=NaN;this.m=e;this.j=null;this.h=new dc;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.6.17");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
611
612
|
function(g){Fn(f,g)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Gn(f,g)});this.h.o(this.i,"ended",function(){f.l.contentComplete()});this.h.ka(this.i,"play",function(){f.D=!0})}En.prototype.configure=function(a){this.G=a};En.prototype.stop=function(){this.g&&this.g.stop();this.s&&$k(this.s)};En.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
|
|
612
613
|
function Gn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new O("ad-error",b));Hn(a,null);a.m(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
613
614
|
function Fn(a,b){a.m(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.G.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.C);a.m(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -657,8 +658,8 @@ function Zn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
657
658
|
p.release=function(){this.h&&(this.h.release(),this.h=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);ab.prototype.release.call(this)};p.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.j=new Cn};p.requestClientSideAds=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.H=Date.now()/1E3;b.l.requestAds(a)};
|
|
658
659
|
p.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Mn(a,b,c,function(e){return $n(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new P(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new P(1,10,10004)):(d.l=new gf,Pn(d,a,b),d.I=c||"",d.V=Date.now()/1E3,a=d.l);return a};
|
|
659
660
|
p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new Yn(a,b,this.m,function(d){return $n(c,d)});this.g.configure(this.l)};
|
|
660
|
-
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.6.
|
|
661
|
-
(c.I=!0),c.j=new gf,c.g.requestStream(a),c.D=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.6.
|
|
661
|
+
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.6.17";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
662
|
+
(c.I=!0),c.j=new gf,c.g.requestStream(a),c.D=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.6.17";this.g.g.replaceAdTagParameters(a)};
|
|
662
663
|
p.getServerSideCuePoints=function(){He("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
663
664
|
p.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)}};p.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
664
665
|
function $n(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}L("shaka.ads.AdManager",W);W.prototype.onCueMetadataChange=W.prototype.onCueMetadataChange;W.prototype.onHlsTimedMetadata=W.prototype.onHlsTimedMetadata;W.prototype.onDashTimedMetadata=W.prototype.onDashTimedMetadata;W.prototype.onManifestUpdated=W.prototype.onManifestUpdated;W.prototype.getStats=W.prototype.getStats;
|
|
@@ -674,32 +675,32 @@ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySy
|
|
|
674
675
|
oo=["attach","attachCanvas","detach","load","unload"];function po(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new Cd(b);this.M=c;this.u=!1;this.C=d;this.H=e;this.N=f;this.h=this.m=!1;this.K="";this.s=null;this.D=function(){return qo(h)};this.G=function(k,l){k=bo(l);switch(k.type){case "event":var m=k.targetName,n=Oa(k.event);h.C(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.u&&(h.M(),h.u=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new P(q.severity,q.category,
|
|
675
676
|
q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;ro.add(this)}p=po.prototype;p.destroy=function(){ro.delete(this);so(this);to&&uo(this);this.l&&(this.l.stop(),this.l=null);this.H=this.C=null;this.h=this.m=!1;this.G=this.D=this.j=this.i=this.g=this.s=null;return Promise.resolve()};p.Aa=function(){return this.h};p.Ce=function(){return this.K};
|
|
676
677
|
p.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Pa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(ro),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new gf;d.u=!0;vo(d,e)}},function(b){for(var c=t(ro),d=c.next();!d.done;d=c.next())d=d.value,wo="available"==b,d.l.Pa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});wo&&this.l.T(xo);(a=to)&&
|
|
677
|
-
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new gf,this.u=!0,vo(this,a)):to=null}else window.__onGCastApiAvailable!==yo&&(zo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=yo)};p.
|
|
678
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new gf,this.u=!0,vo(this,a)):to=null}else window.__onGCastApiAvailable!==yo&&(zo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=yo)};p.cg=function(a){this.s=a;this.h&&Ao(this,{type:"appData",appData:this.s})};
|
|
678
679
|
p.cast=function(){var a=this;return K(function(b){if(!a.m)throw new P(1,8,8E3);if(!wo)throw new P(1,8,8001);if(a.h)throw new P(1,8,8002);a.j=new gf;chrome.cast.requestSession(function(c){return vo(a,c)},function(c){return Bo(a,c)});return D(b,a.j,0)})};function Co(a){a.h&&chrome.cast.requestSession(function(b){return vo(a,b)},function(b){return Bo(a,b)})}p.Cc=function(){if(this.h){so(this);if(to){uo(this);try{to.stop(function(){},function(){})}catch(a){}to=null}qo(this)}};
|
|
679
|
-
p.get=function(a,b){var c=this;if("video"==a){if(ho.includes(b))return function(){return c
|
|
680
|
+
p.get=function(a,b){var c=this;if("video"==a){if(ho.includes(b))return function(){return c.Zg.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))}}else if("player"==a){if(ko[b]&&!this.get("player","isLive")())return function(){};if(no.includes(b))return function(){return c.Zg.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))};if(oo.includes(b))return function(){return c.Ti.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))};if(io[b]||jo[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
680
681
|
p.set=function(a,b,c){this.g[a][b]=c;Ao(this,{type:"set",targetName:a,property:b,value:c})};function vo(a,b){var c=a.N();to=b;b.addUpdateListener(a.D);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);qo(a);Ao(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function Bo(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new P(2,8,c,b))}
|
|
681
|
-
p
|
|
682
|
+
p.Zg=function(a,b){Ao(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};p.Ti=function(a,b){var c=Fa.apply(2,arguments),d=new gf,e=this.J.toString();this.J++;this.i[e]=d;try{Ao(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function uo(a){var b=to;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
682
683
|
function qo(a){var b=to?"connected"==to.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};so(a)}a.h=b;a.K=b?to.receiver.friendlyName:"";a.l.Pa()}function so(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function Ao(a,b){b=ao(b);var c=to;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Va)}catch(d){throw b=new P(2,8,8005,d),c=new O("error",(new Map).set("detail",b)),a.C("player",c),a.Cc(),b;}}var xo=.02,wo=!1,to=null,zo=null,ro=new Set;
|
|
683
684
|
function yo(a){zo?window.__onGCastApiAvailable=zo:delete window.__onGCastApiAvailable;zo=null;if(a)for(var b=t(ro),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Do(a,b,c,d){d=void 0===d?!1:d;ab.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.u=this.l=null;this.G=c;this.D=d;this.C=new Map;this.g=new po(c,function(){return Eo(e)},function(){return Fo(e)},function(f,g){return Go(e,f,g)},function(){return Ho(e)},function(){return Io(e)},d);Jo(this)}pa(Do,ab);p=Do.prototype;
|
|
684
685
|
p.destroy=function(a){a&&this.g.Cc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;ab.prototype.release.call(this);return Promise.all(a)};p.ac=function(){return this.l};p.Fc=function(){return this.u};p.Ze=function(){return this.g.m&&wo};p.Aa=function(){return this.g.Aa()};p.Ce=function(){return this.g.Ce()};
|
|
685
|
-
p.cast=function(){var a=this;return K(function(b){return 1==b.g?D(b,a.g.cast(),2):a.h?D(b,a.h.Sc(),0):b.return()})};p.
|
|
686
|
-
p.
|
|
686
|
+
p.cast=function(){var a=this;return K(function(b){return 1==b.g?D(b,a.g.cast(),2):a.h?D(b,a.h.Sc(),0):b.return()})};p.cg=function(a){this.g.cg(a)};p.kh=function(){Co(this.g)};p.Cc=function(){this.g.Cc()};
|
|
687
|
+
p.Ag=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.G&&b==c.D)return d.return();c.G=a;c.D=b;c.g.Cc();return D(d,c.g.destroy(),2)}c.g=null;c.g=new po(a,function(){return Eo(c)},function(){return Fo(c)},function(e,f){return Go(c,e,f)},function(){return Ho(c)},function(){return Io(c)},b);c.g.init();F(d)})};
|
|
687
688
|
function Jo(a){a.g.init();a.m=new dc;for(var b=t(eo),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Aa()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in Pa)a.m.o(a.h,Pa[d],function(f){a.g.Aa()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Wc=e,Object.defineProperty(a.l,b.Wc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Ko(a,f.Wc)}}(b),set:function(f){return function(g){var h=f.Wc;a.g.Aa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Wc:b.Wc};a.u={};Lo(a,
|
|
688
689
|
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Mo(a,f)}})});No(a);a.j=new ab;a.j.me=a.l;a.s=new ab;a.s.me=a.u}function No(a){var b=new Map;Lo(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
|
|
689
690
|
function Lo(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
690
691
|
function Io(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.yf(),startTime:null};a.i.pause();for(var c=t(go),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(lo);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(mo);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Eo(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
|
|
691
692
|
function Fo(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
692
693
|
function Ho(a){for(var b=t(lo),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(go);for(d=c.next();!d.done;d=c.next())d=
|
|
693
|
-
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(go),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(mo);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.He(h);g&&a.h
|
|
694
|
+
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(go),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(mo);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.He(h);g&&a.h.$f(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new O("error",l);a.h.dispatchEvent(l)})}
|
|
694
695
|
function Ko(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Aa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Aa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
695
696
|
function Mo(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Xb()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Yd()};
|
|
696
|
-
if("setVideoContainer"==b)return function(c){return a.h.
|
|
697
|
-
function Go(a,b,c){a.g.Aa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}L("shaka.cast.CastProxy",Do);Do.prototype.changeReceiverId=Do.prototype.
|
|
698
|
-
Do.prototype.getVideo=Do.prototype.ac;Do.prototype.destroy=Do.prototype.destroy;function Oo(a,b,c,d){ab.call(this);var e=this;this.g=a;this.h=b;this.j=new dc;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.D=!1;this.C=!0;this.u=this.l=null;this.I=new Cd(function(){Po(e)});Qo(this)}pa(Oo,ab);p=Oo.prototype;p.isConnected=function(){return this.H};p.
|
|
699
|
-
p.
|
|
697
|
+
if("setVideoContainer"==b)return function(c){return a.h.jg(c)};if(a.g.Aa()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Aa()&&0==Object.keys(a.g.g.video).length&&(io[b]||jo[b])||!a.g.Aa()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
698
|
+
function Go(a,b,c){a.g.Aa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}L("shaka.cast.CastProxy",Do);Do.prototype.changeReceiverId=Do.prototype.Ag;Do.prototype.forceDisconnect=Do.prototype.Cc;Do.prototype.suggestDisconnect=Do.prototype.kh;Do.prototype.setAppData=Do.prototype.cg;Do.prototype.cast=Do.prototype.cast;Do.prototype.receiverName=Do.prototype.Ce;Do.prototype.isCasting=Do.prototype.Aa;Do.prototype.canCast=Do.prototype.Ze;Do.prototype.getPlayer=Do.prototype.Fc;
|
|
699
|
+
Do.prototype.getVideo=Do.prototype.ac;Do.prototype.destroy=Do.prototype.destroy;function Oo(a,b,c,d){ab.call(this);var e=this;this.g=a;this.h=b;this.j=new dc;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.D=!1;this.C=!0;this.u=this.l=null;this.I=new Cd(function(){Po(e)});Qo(this)}pa(Oo,ab);p=Oo.prototype;p.isConnected=function(){return this.H};p.wi=function(){return this.s};p.fj=function(a){this.i=a};p.Ch=function(){this.i=null};
|
|
700
|
+
p.gj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.ej=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.dj=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
700
701
|
p.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.s=!0,a.l=null,a.u=null,ab.prototype.release.call(a),D(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
|
|
701
702
|
function Qo(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Ro(a)};b.onSenderDisconnected=function(){return Ro(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&So(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);So(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return To(a,
|
|
702
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Uo(a,e)};b.start();b=t(eo);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Vo(a,"video",e)});for(var d in Pa)a.j.o(a.h,Pa[d],function(e){return Vo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.
|
|
703
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Uo(a,e)};b.start();b=t(eo);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Vo(a,"video",e)});for(var d in Pa)a.j.o(a.h,Pa[d],function(e){return Vo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.gg(3840,2160):a.h.gg(1920,1080);a.j.o(a.g,"loadeddata",function(){a.D=!0});a.j.o(a.h,"loading",function(){a.s=
|
|
703
704
|
!1;Wo(a)});a.j.o(a.g,"playing",function(){a.s=!1;Wo(a)});a.j.o(a.g,"pause",function(){Wo(a)});a.j.o(a.h,"unloading",function(){a.s=!0;Wo(a)});a.j.o(a.g,"ended",function(){(new Cd(function(){a.g&&a.g.ended&&(a.s=!0,Wo(a))})).T(Xo)})}function Ro(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Wo(a)}
|
|
704
705
|
function Wo(a){var b;K(function(c){if(1==c.g)return D(c,Promise.resolve(),2);if(!a.h)return c.return();b=new O("caststatuschanged");a.dispatchEvent(b);Yo(a)||Zo(a);F(c)})}
|
|
705
706
|
function $o(a,b,c){var d,e,f,g,h,k,l,m,n,q;K(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ta(r,5),D(r,a.h.load(b.manifest,b.startTime),7)):D(r,Promise.resolve(),3);case 7:va(r,3);break;case 5:return g=wa(r),h=(new Map).set("detail",g),k=new O("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q);
|
|
@@ -711,7 +712,7 @@ function Uo(a,b){var c=bo(b.data);switch(c.type){case "init":a.m=0;a.D=!1;a.C=!0
|
|
|
711
712
|
function To(a,b){var c=bo(b.data);switch(c.type){case "PLAY":a.g.play();Zo(a);break;case "PAUSE":a.g.pause();Zo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Zo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Zo(a));break;case "STOP":a.h.Sc().then(function(){a.h&&Zo(a)});break;case "GET_STATUS":bp(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
712
713
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Zo(a);break;case "LOAD":a.m=0;a.D=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&bp(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");So(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:So(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
713
714
|
function cp(a,b,c,d){a.h&&So(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function So(a,b,c,d){a.H&&(a=ao(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Zo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?dp:a.h.wd()?ep:a.g.paused?fp:gp,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);So(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
714
|
-
L("shaka.cast.CastReceiver",Oo);Oo.prototype.destroy=Oo.prototype.destroy;Oo.prototype.setContentArtist=Oo.prototype.
|
|
715
|
+
L("shaka.cast.CastReceiver",Oo);Oo.prototype.destroy=Oo.prototype.destroy;Oo.prototype.setContentArtist=Oo.prototype.dj;Oo.prototype.setContentImage=Oo.prototype.ej;Oo.prototype.setContentTitle=Oo.prototype.gj;Oo.prototype.clearContentMetadata=Oo.prototype.Ch;Oo.prototype.setContentMetadata=Oo.prototype.fj;Oo.prototype.isIdle=Oo.prototype.wi;Oo.prototype.isConnected=Oo.prototype.isConnected;var ap=.5,Xo=5,dp="IDLE",gp="PLAYING",ep="BUFFERING",fp="PAUSED";function hp(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=ip(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],r=-1,u=-1,v=0;v<q.length;v++)if(null!=q[v]&&""!==q[v].g.trim()){r=v;break}for(v=q.length-1;0<=v;v--)if(null!=q[v]&&""!==q[v].g.trim()){u=v;break}if(-1===
|
|
715
716
|
r||-1===u)q=jp(d,e),a.nestedCues.push(q);else{for(;r<=u;r++)if(v=q[r]){var y=v.l,z=v.i,x=v.j,A=v.h;if(y!=h||z!=k||x!=l||A!=m)n.payload&&a.nestedCues.push(n),n=ip(d,e,y,z,x,A),h=y,k=z,l=x,m=A;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=jp(d,e),a.nestedCues.push(n));n=ip(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
716
717
|
function ip(a,b,c,d,e,f){a=new Ec(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function jp(a,b){a=new Ec(a,b,"");a.lineBreak=!0;return a}function kp(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function lp(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.u=b;this.j=this.m=!1;this.l="white";this.s="black";mp(this)}function np(a,b,c){var d="CC"+((a.C<<1|a.u)+1),e=new Ec(b,c,"");e.lineInterpretation=1;var f=op.get(a.g);f&&(e.line=f);return hp(e,d,a.i,b,c)}function mp(a){pp(a,0,15);a.g=1}
|
|
717
718
|
function qp(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case rp:d=sp.has(c)?sp.get(c):String.fromCharCode(c);break;case tp:d=up.get(c);break;case vp:a.i[a.g].pop();d=wp.get(c);break;case xp:a.i[a.g].pop(),d=yp.get(c)}d&&a.i[a.g].push(new kp(d,a.m,a.j,a.s,a.l))}}function zp(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function pp(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
@@ -738,13 +739,13 @@ function hq(a,b){var c=[];try{for(;b.qa();){var d=Wp(b).value,e=(d&224)>>5,f=d&3
|
|
|
738
739
|
eq.prototype.getStreams=function(){return Array.from(this.C)};L("shaka.cea.CeaDecoder",eq);yc=function(){return new eq};function jq(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(w(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function kq(){this.j=new Map;this.i=this.h=0;this.g=lq}
|
|
739
740
|
kq.prototype.init=function(a){function b(f){f=f.name;f in mq&&(c.g=mq[f])}var c=this,d=[],e=[];(new Wf).box("moov",ag).box("mvex",ag).S("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",ag).S("tkhd",function(f){f=ci(f.reader,f.version);d.push(f.trackId)}).box("mdia",ag).S("mdhd",function(f){f=$h(f.reader,f.version);e.push(f.timescale)}).box("minf",ag).box("stbl",ag).S("stsd",cg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",
|
|
740
741
|
b).box("encv",dg).box("sinf",ag).box("frma",function(f){f=fi(f.reader).va;f in mq&&(c.g=mq[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new P(2,2,2010);this.g==lq&&Sa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
741
|
-
kq.prototype.parse=function(a){var b=this;if(this.g==lq)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Wf).box("moof",function(l){f=l.start;g=[];ag(l)}).box("traf",ag).S("trun",function(l){l=bi(l.reader,l.version,l.flags);g.push(l)}).S("tfhd",function(l){l=Yh(l.reader,l.flags);d=l.
|
|
742
|
+
kq.prototype.parse=function(a){var b=this;if(this.g==lq)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Wf).box("moof",function(l){f=l.start;g=[];ag(l)}).box("traf",ag).S("trun",function(l){l=bi(l.reader,l.version,l.flags);g.push(l)}).S("tfhd",function(l){l=Yh(l.reader,l.flags);d=l.Fg||b.h;e=l.Fh||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).S("tfdt",function(l){h=Zh(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Sa("Unable to find base media decode time for CEA captions!"),
|
|
742
743
|
new P(2,2,2010);nq(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
743
|
-
function nq(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u
|
|
744
|
-
c+(n[l].
|
|
744
|
+
function nq(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.$g});n=[].concat.apply([],w(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Eh);b.qa();){g=b.O();var q=b.ra(),r=null;r=!1;h=1;switch(a.g){case oq:r=q&31;r=6==r;break;case pq:h=2;b.skip(1);r=q>>1&63;r=39==r||40==r;break;default:return}if(r)for(q=0,l<n.length&&(q=n[l].De||0),q=(c+q)/d,h=t(jq(b.Pb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:q});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
745
|
+
c+(n[l].Yf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}L("shaka.cea.Mp4CeaParser",kq);var lq=0,oq=1,pq=2,mq={avc1:oq,avc3:oq,hev1:pq,hvc1:pq,dvh1:pq,dvhe:pq};xc["video/mp4"]=function(){return new kq};function qq(){this.g=null}qq.prototype.init=function(){};qq.prototype.parse=function(a){this.g?this.g.clearData():this.g=new qi;var b=[];a=qc(a);if(!xi(a))return b;a=this.g.parse(a);var c=a.qd(),d=a.ee();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(jq(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
745
746
|
L("shaka.cea.TsCeaParser",qq);xc["video/mp2t"]=function(){return new qq};function rq(a,b,c){var d=sq(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(k){return k.keyId}));h.delete(null);if(1<h.size)throw new P(2,4,4010);if(!b){f=d.filter(function(k){return"urn:mpeg:dash:sea:2012"==k.Ed});if(1<f.length)throw new P(2,4,4050);f.length&&(g=tq(f[0]));f=d.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.Ed?(e=k.init||e,!1):"urn:mpeg:dash:sea:2012"!=k.Ed});f.length&&(a=uq(e,f,c,h),0==a.length&&(a=[Cb("",e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),
|
|
746
|
-
c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Cb(c,e));if(h=Array.from(h)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{
|
|
747
|
-
function vq(a,b,c,d){var e=rq(a,c,d);if(b.
|
|
747
|
+
c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Cb(c,e));if(h=Array.from(h)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Eg:h,hk:e,drmInfos:a,We:g,Ig:!0}}
|
|
748
|
+
function vq(a,b,c,d){var e=rq(a,c,d);if(b.Ig){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.Ig=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new P(2,4,4008);return e.Eg||b.Eg}
|
|
748
749
|
function wq(a){var b=0,c=uc(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=qc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
749
750
|
function xq(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(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""}
|
|
750
751
|
function yq(a){var b=sg(a.node,"https://dashif.org/CPS","Laurl");if(b&&b.textContent)return b.textContent;a=sg(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=jg(a.textContent);a=wq(a).filter(function(c){return c.type===zq})[0];if(!a)return"";a=Nf(a.value,!0);return(a=Jg(a,"WRMHEADER"))?xq(a):""}
|
|
@@ -752,12 +753,12 @@ function uq(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.
|
|
|
752
753
|
226,251,75]),m=new Uint8Array([]);k=[{initData:pg(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Cb(g,f.init||a||h||k);if(g=Aq.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function sq(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Bq(c.value))&&b.push(c);return b}
|
|
753
754
|
function Bq(a){var b=a.getAttribute("schemeIdUri"),c=vg(a,"urn:mpeg:cenc:2013","default_KID"),d=tg(a,"urn:mpeg:cenc:2013","pssh").map(xg);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:jg(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,Ed:b,keyId:c,init:0<e.length?e:null}}
|
|
754
755
|
function tq(a){if(!window.crypto||!window.crypto.subtle)throw Sa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new P(2,4,4042);var b=sg(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new P(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.getAttribute("schemeIdUri"))throw new P(2,4,4051);b=sg(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new P(2,4,4051);a=b.getAttribute("IV");b=b.getAttribute("keyUriTemplate");
|
|
755
|
-
if(!a||!b)throw new P(2,4,4051);a=kg(a.substr(2));if(16!=a.byteLength)throw new P(2,4,4048);return{
|
|
756
|
+
if(!a||!b)throw new P(2,4,4051);a=kg(a.substr(2));if(16!=a.byteLength)throw new P(2,4,4048);return{Ei:b,iv:a}}
|
|
756
757
|
var zq=1,Aq=(new Map).set("com.widevine.alpha",function(a){var b=sg(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?b.textContent:(a=sg(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",yq).set("com.microsoft.playready.recommendation",yq).set("com.microsoft.playready.software",yq).set("com.microsoft.playready.hardware",yq).set("org.w3.clearkey",function(a){var b=sg(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?
|
|
757
758
|
b.textContent:(a=sg(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Cq(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Sa("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
758
759
|
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
759
760
|
function Dq(a,b){var c=Eq(a,b,"timescale"),d=1;c&&(d=Eg(c)||1);var e=Eq(a,b,"duration");c=Eg(e||"");"image"==a.P.contentType&&(c=Gg(e||""));c&&(c/=d);var f=Eq(a,b,"startNumber");e=Number(Eq(a,b,"presentationTimeOffset"))||0;var g=Fg(f||"");if(null==f||null==g)g=1;var h=Fq(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ia.duration||Infinity;f=g;h=rg(h,"S");for(var k=[],l=-e,m=0;m<h.length;++m){var n=h[m],q=h[m+1],r=zg(n,"t",Fg),u=zg(n,"d",Fg),v=zg(n,"r",Dg);n=zg(n,"k",Dg)||0;null!=r&&(r-=e);if(!u)break;
|
|
760
|
-
r=null!=r?r:l;v=v||0;if(0>v)if(q){q=zg(q,"t",Fg);if(null==q)break;else if(r>=q)break;v=Math.ceil((q-r)/u)-1}else{if(Infinity==a)break;else if(r/b>=a)break;v=Math.ceil((a*b-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/b);for(q=0;q<=v;++q)l=r+u,k.push({start:r/b,end:l/b,
|
|
761
|
+
r=null!=r?r:l;v=v||0;if(0>v)if(q){q=zg(q,"t",Fg);if(null==q)break;else if(r>=q)break;v=Math.ceil((q-r)/u)-1}else{if(Infinity==a)break;else if(r/b>=a)break;v=Math.ceil((a*b-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/b);for(q=0;q<=v;++q)l=r+u,k.push({start:r/b,end:l/b,rg:r,yb:n,bj:k.length+f}),r=l}b=k}return{timescale:d,Oa:c,Id:g,Qb:e/d||0,qg:e,timeline:b}}function Gq(a,b){return[b(a.P),b(a.Ca),b(a.Ia)].filter(Ad)}
|
|
761
762
|
function Eq(a,b,c){b=Gq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.getAttribute(c));d=b.next());return a}function Fq(a,b,c){b=Gq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=qg(d.value,c));d=b.next());return a}
|
|
762
763
|
function Hq(a,b,c,d,e,f){for(var g=vg(a,"http://www.w3.org/1999/xlink","href"),h=vg(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(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 jf(new P(2,4,4028));if("onLoad"!=h)return jf(new P(2,4,4027));var m=Bb([d],[g]);return e.request(0,xf(m,b)).Da(function(n){n=Lg(n.data,a.tagName);if(!n)return jf(new P(2,4,4001,g));
|
|
763
764
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var q=n.childNodes[0];n.removeChild(q);a.appendChild(q)}n=t(Array.from(n.attributes));for(q=n.next();!q.done;q=n.next())a.setAttributeNode(q.value.cloneNode(!1));return Iq(a,b,c,m[0],e,f+1)})}
|
|
@@ -765,31 +766,31 @@ function Iq(a,b,c,d,e,f){f=void 0===f?0:f;if(vg(a,"http://www.w3.org/1999/xlink"
|
|
|
765
766
|
function Kq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Qc(),m=g.reader.Qc();g.reader.skip(2);var n=g.reader.Na();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.O(),r=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==r)throw new P(2,3,3006);h.push(new Jh(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function Lq(a){this.h=uc(a);this.g=new Tf(this.h,0)}Lq.prototype.qa=function(){return this.g.qa()};
|
|
766
767
|
function Mq(a){var b=Nq(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Nq(a);a:{d=t(Oq);for(var e=d.next();!e.done;e=d.next())if(oc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Ea();else{if(8==b.length&&b[1]&224)throw new P(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Ea()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Ea();d=uc(a.h,a.g.Ea(),b);a.g.skip(b);return new Pq(c,
|
|
767
768
|
d)}function Nq(a){var b=a.g.Ea(),c=a.g.ra();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return qc(a.h,b,c)}var Oq=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Pq(a,b){this.id=a;this.g=b}
|
|
768
|
-
function Qq(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Rq(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Lq(a.g);for(var n=null,q=null;a.qa();){var r=Mq(a);if(187==r.id){var u=Sq(r);u&&(r=c*u.
|
|
769
|
-
function Sq(a){var b=new Lq(a.g);a=Mq(b);if(179!=a.id)throw new P(2,3,3013);a=Qq(a);b=Mq(b);if(183!=b.id)throw new P(2,3,3012);b=new Lq(b.g);for(var c=0;b.qa();){var d=Mq(b);if(241==d.id){c=Qq(d);break}}return{
|
|
769
|
+
function Qq(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Rq(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Lq(a.g);for(var n=null,q=null;a.qa();){var r=Mq(a);if(187==r.id){var u=Sq(r);u&&(r=c*u.kj,u=b+u.Ri,null!=n&&m.push(new Jh(n+g,r+g,l,q,u-1,f,g,h,k)),n=r,q=u)}}null!=n&&m.push(new Jh(n+g,d+g,l,q,null,f,g,h,k));return m}
|
|
770
|
+
function Sq(a){var b=new Lq(a.g);a=Mq(b);if(179!=a.id)throw new P(2,3,3013);a=Qq(a);b=Mq(b);if(183!=b.id)throw new P(2,3,3012);b=new Lq(b.g);for(var c=0;b.qa();){var d=Mq(b);if(241==d.id){c=Qq(d);break}}return{kj:a,Ri:c}};function Tq(a,b,c){b=Fq(a,b,"Initialization");if(!b)return null;var d=a.P.wb(),e=b.getAttribute("sourceURL");e&&(d=Bb(d,[e]));e=0;var f=null;if(b=zg(b,"range",Cg))e=b.start,f=b.end;return new Hh(function(){return d},e,f,Uq(a),null,null,c)}
|
|
770
771
|
function Vq(a,b,c){var d=Number(Eq(a,Wq,"presentationTimeOffset"))||0,e=Eq(a,Wq,"timescale"),f=1;e&&(f=Eg(e)||1);var g=d/f||0,h=Tq(a,Wq,c);Xq(a,h);var k=qf(a);return{Dc:function(){var l=Fq(k,Wq,"RepresentationIndex");var m=k.P.wb();l&&(l=l.getAttribute("sourceURL"))&&(m=Bb(m,[l]));l=Yq(k);return Zq(k,b,h,m,l.start,l.end,g)}}}
|
|
771
772
|
function Zq(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,y,z,x,A,B,C;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Wb||!a.ia.Df,l=a.ia.start,m=a.ia.duration,n=a.P.mimeType.split("/")[1],q=b,r=null,u=[q(d,e,f,!1),"webm"==n?q(c.ba(),c.fb,c.La,!0):null],q=null,D(E,Promise.all(u),2);v=E.h;y=v[0];z=v[1]||null;x=null;A=l-g;B=l;C=m?l+m:Infinity;if("mp4"==n)var H=Jq(y,e,d,c,A,B,C);else{H=new Lq(z);if(440786851!=Mq(H).id)throw new P(2,3,3008);var G=Mq(H);if(408125543!=G.id)throw new P(2,3,3009);
|
|
772
773
|
H=G.g.byteOffset;G=new Lq(G.g);for(var I=null;G.qa();){var J=Mq(G);if(357149030==J.id){I=J;break}}if(!I)throw new P(2,3,3010);I=new Lq(I.g);J=1E6;for(G=null;I.qa();){var M=Mq(I);if(2807729==M.id)J=Qq(M);else if(17545==M.id)if(4==M.g.byteLength)G=M.g.getFloat32(0);else if(8==M.g.byteLength)G=M.g.getFloat64(0);else throw new P(2,3,3003);}if(null==G)throw new P(2,3,3011);I=J/1E9;G*=I;J=Mq(new Lq(y));if(475249515!=J.id)throw new P(2,3,3007);H=Rq(J,H,I,G,d,c,A,B,C)}x=H;h.zd(x);r=new Jj(x);k&&r.Bc(B,C,
|
|
773
774
|
!0);return E.return(r)})}function Wq(a){return a.Gd}function Yq(a){var b=Fq(a,Wq,"RepresentationIndex");a=Eq(a,Wq,"indexRange");a=Cg(a||"");b&&(a=zg(b,"range",Cg,a));return a}function Xq(a,b){$q(a,b);if(!Yq(a))throw new P(2,4,4002);}function $q(a,b){var c=a.P.mimeType.split("/")[1];if(a.P.contentType!=Ib&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
|
|
774
775
|
function Uq(a){var b=a.P;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.xe,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function ar(a,b,c){var d=Tq(a,br,c),e=cr(a);if(!e.Oa&&!e.timeline&&1<e.Mc.length)throw new P(2,4,4002);if(!e.Oa&&!a.ia.duration&&!e.timeline&&1==e.Mc.length)throw new P(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new P(2,4,4002);var f=null,g=null;a.Ia.id&&a.P.id&&(g=b[a.Ia.id+","+a.P.id])&&(f=g.segmentIndex);var h=dr(a.ia.start,a.ia.duration,a.P.wb,e,d,c);b=!f;f?f.yd(h,a.presentationTimeline.xb()):f=new Jj(h);a.presentationTimeline.zd(h);a.Wb&&a.ia.Df||f.Bc(a.ia.start,a.ia.duration?a.ia.start+
|
|
775
776
|
a.ia.duration:Infinity,b);g&&(g.segmentIndex=f);return{Dc:function(){f&&0!=f.Yb()||f.se(h);return Promise.resolve(f)}}}function br(a){return a.bc}function cr(a){var b=er(a);a=Dq(a,br);var c=a.Id;0==c&&(c=1);var d=0;a.Oa?d=a.Oa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Oa:a.Oa,startTime:d,Id:c,Qb:a.Qb,timeline:a.timeline,Mc:b}}
|
|
776
|
-
function dr(a,b,c,d,e,f){var g=d.Mc.length;d.timeline&&d.timeline.length!=d.Mc.length&&(g=Math.min(d.timeline.length,d.Mc.length));for(var h=a-d.Qb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},q=0;q<g;n={fd:n.fd,bd:n.bd},q++){n.bd=d.Mc[q];var r=void 0;r=null!=d.Oa?m+d.Oa:d.timeline?d.timeline[q].end:m+b;n.fd=null;l.push(new Jh(a+m,a+r,function(u){return function(){null==u.fd&&(u.fd=Bb(c(),[u.bd.
|
|
777
|
-
function er(a){return[a.P.bc,a.Ca.bc,a.Ia.bc].filter(Ad).map(function(b){return rg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.
|
|
778
|
-
Infinity,r=!(a.Wb&&a.ia.Df);m?(c=m,kr(c,k,n,q,r,h),c.vb(a.presentationTimeline.xb())):m=new lr(k,a.P.id,a.bandwidth,a.P.wb,n,q,h,r,g,a.P
|
|
779
|
-
function hr(a){var b=Dq(a,mr),c=Eq(a,mr,"media");a=Eq(a,mr,"index");return{Oa:b.Oa,timescale:b.timescale,Id:b.Id,Qb:b.Qb,
|
|
777
|
+
function dr(a,b,c,d,e,f){var g=d.Mc.length;d.timeline&&d.timeline.length!=d.Mc.length&&(g=Math.min(d.timeline.length,d.Mc.length));for(var h=a-d.Qb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},q=0;q<g;n={fd:n.fd,bd:n.bd},q++){n.bd=d.Mc[q];var r=void 0;r=null!=d.Oa?m+d.Oa:d.timeline?d.timeline[q].end:m+b;n.fd=null;l.push(new Jh(a+m,a+r,function(u){return function(){null==u.fd&&(u.fd=Bb(c(),[u.bd.Ji]));return u.fd}}(n),n.bd.start,n.bd.end,e,h,a,k,[],"",null,null,Kh,f));m=r}return l}
|
|
778
|
+
function er(a){return[a.P.bc,a.Ca.bc,a.Ia.bc].filter(Ad).map(function(b){return rg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Og&&(a.Og=!0);var c=b.getAttribute("media");b=zg(b,"mediaRange",Cg,{start:0,end:null});return{Ji:c,start:b.start,end:b.end}})};function fr(a,b,c,d,e,f,g){var h=gr(a,g),k=hr(a);ir(k);var l=qf(a);if(k.vd)return $q(a,h),{Dc:function(){var u=Cq(k.vd,l.P.id,null,null,l.bandwidth||null,null);u=Bb(l.P.wb(),[u]);return Zq(l,b,h,u,0,null,k.Qb)}};if(k.Oa)return d||"image"===a.Ca.contentType||(a.presentationTimeline.Nf(k.Oa),a.presentationTimeline.we(a.ia.start)),{Dc:function(){return jr(l,k,e,h,f,g)}};var m=null;d=d=null;a.Ia.id&&a.P.id&&(d=a.Ia.id+","+a.P.id,d=c[d])&&(m=d.segmentIndex);var n=a.ia.start,q=a.ia.duration?n+a.ia.duration:
|
|
779
|
+
Infinity,r=!(a.Wb&&a.ia.Df);m?(c=m,kr(c,k,n,q,r,h),c.vb(a.presentationTimeline.xb())):m=new lr(k,a.P.id,a.bandwidth,a.P.wb,n,q,h,r,g,a.P.Zf);k.timeline&&"image"!==a.Ca.contentType&&a.presentationTimeline.Wg(k.timeline,n);d&&a.Wb&&(d.segmentIndex=m);return{Dc:function(){m instanceof lr&&0==m.Yb()&&kr(m,k,n,q,r,h);return Promise.resolve(m)}}}function mr(a){return a.Hd}
|
|
780
|
+
function hr(a){var b=Dq(a,mr),c=Eq(a,mr,"media");a=Eq(a,mr,"index");return{Oa:b.Oa,timescale:b.timescale,Id:b.Id,Qb:b.Qb,qg:b.qg,timeline:b.timeline,Nc:c,vd:a}}function ir(a){var b=a.vd?1:0;b+=a.timeline?1:0;b+=a.Oa?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.vd&&(a.timeline=null),a.Oa=null);if(!a.vd&&!a.Nc)throw new P(2,4,4002);}
|
|
780
781
|
function jr(a,b,c,d,e,f){function g(J){var M=(J-u)*r,N=M+b.Qb,R=M+m;M=R+r;var T=Math.min(M,k());R=new Jh(R,T,function(){var fa=N*v;"BigInt"in window&&fa>Number.MAX_SAFE_INTEGER&&(fa=BigInt(N)*BigInt(v));fa=Cq(y,x,J,null,z,fa);return Bb(A(),[fa])},0,null,d,B,m,k(),[],"",null,null,Kh,f);R.j=M;return R}function h(){var J=[Math.max(l.xb(),m),Math.min(l.Zb(),k())].map(function(M){return M-m});return[Math.ceil(J[0]/r),Math.ceil(J[1]/r)-1].map(function(M){return M+u})}function k(){var J=null!=n&&e[n]||q;
|
|
781
782
|
return J?m+J:Infinity}var l=a.presentationTimeline,m=a.ia.start,n=a.Ia.id,q=a.ia.duration,r=b.Oa,u=b.Id,v=b.timescale,y=b.Nc,z=a.bandwidth||null,x=a.P.id,A=a.P.wb,B=m-b.Qb,C=h();a=a.Wb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var E=a;E<=C;++E){var H=g(E);c.push(H)}var G=new Jj(c);c=l.Zb()<k();E=l.R();if(c||E){var I=Math.max(a,C+1);G.Je(r,function(){var J=l.xb();G.vb(J);var M=t(h());M.next();M=M.next().value;for(var N=[];I<=M;){var R=g(I);N.push(R);I++}return J>k()&&!N.length?null:N})}return Promise.resolve(G)}
|
|
782
783
|
function gr(a,b){var c=Eq(a,mr,"initialization");if(!c)return null;var d=a.P.id,e=a.bandwidth||null,f=a.P.wb;return new Hh(function(){var g=Cq(c,d,null,null,e,null);return Bb(f(),[g])},0,null,Uq(a),null,null,b)}function lr(a,b,c,d,e,f,g,h,k,l){Jj.call(this,[]);this.h=a;this.H=b;this.D=c;this.G=d;this.i=e;this.l=f;this.u=g;this.C=k;this.I=l;h&&nr(this)}pa(lr,Jj);p=lr.prototype;p.Yb=function(){return this.h?this.h.timeline.length:0};p.release=function(){Jj.prototype.release.call(this);this.h=null};
|
|
783
784
|
p.vb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.Yb()&&this.release())}};function kr(a,b,c,d,e,f){a.u=f;if(a.h){c=a.h.timeline;a.h.Nc=b.Nc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,w(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&nr(a)}
|
|
784
785
|
function nr(a){if(!a.s){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.vb(a.i)}}p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
|
|
785
|
-
p.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.Yb()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.Nc,e=this.h.timeline[a],f=e.
|
|
786
|
+
p.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.Yb()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.Nc,e=this.h.timeline[a],f=e.bj,g=this.h.qg+e.rg;c=this.i-this.h.Qb;var h=this.i+e.end,k=h;a===this.Yb()-1&&Infinity!==this.l&&(k=this.l);for(var l=[],m=(e.end-e.start)/e.yb,n={},q=0;q<e.yb;n={gd:n.gd,Te:n.Te},q++){var r=e.start+m*q,u=r+m;n.Te=q+1;n.gd=null;r=new Jh(this.i+r,this.i+u,function(v){return function(){if(!b.h)return[];null==v.gd&&(v.gd=or(b.h.Nc,b.H,f,b.D,g,v.Te,b.G));return v.gd}}(n),
|
|
786
787
|
0,null,this.u,c,this.i,this.l,[],"",null,null,Kh,this.C);0==this.I?0<q&&r.qe():0!=q%this.I&&r.qe();l.push(r)}c=new Jh(this.i+e.start,k,function(){return 0<e.yb?[]:or(d,b.H,f,b.D,g,null,b.G)},0,null,this.u,c,this.i,this.l,l,"",null,null,Kh,this.C,0<e.yb);c.j=h;this.g[a]=c}return c};function or(a,b,c,d,e,f,g){a=Cq(a,b,c,f,d||null,e);return Bb(g(),[a]).map(function(h){return h.toString()})};function pr(a){this.s=null;this.C=a;this.I=new rf;this.j=[];this.h=null;this.m=[];this.D=null;this.H=[];this.G=300;this.l=new Map;this.i=new Map;this.g=null;this.u="UNKNOWN"}pr.prototype.configure=function(a){this.s=a};pr.prototype.destroy=function(){this.C=this.s=null;this.j=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};pr.prototype.setManifestType=function(a){this.u=a};
|
|
787
788
|
function qr(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=Bb(a.j,[rr(a,b)]),d=xf(c,a.s.retryParameters),e=a.C.networkingEngine.request(8,d),sf(a.I,e),ta(l,2),D(l,e.promise,4);if(2!=l.g)return f=l.h,g=Mf(f.data),h=JSON.parse(g),1==h.VERSION&&sr(a,h,f.uri),va(l,0);if((k=wa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Cd(function(){qr(a,b)});a.g.T(a.G);F(l)})}
|
|
788
789
|
function rr(a,b){if(!a.m.length)return b;b=new gb(b);var c=a.D||a.m[0],d=Math.round(a.C.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));zb(e)&&ob(b,e);return b.toString()}function sr(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Cd(function(){qr(a,d)});if(c=b.TTL)a.G=c;a.g.T(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
|
|
789
790
|
function tr(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}
|
|
790
|
-
function ur(a,b){b=a.l.get(b)||new Map;for(var c=[],d={},e=t(a.m),f=e.next();!f.done;d={fc:d.fc},f=e.next())if(d.fc=f.value,f=b.get(d.fc))c.push({
|
|
791
|
-
a.i.delete(f);c=c.filter(function(h){for(var k=t(a.i.keys()),l=k.next();!l.done;l=k.next())if(l.value.includes((new gb(h.location)).Hb))return!1;return!0});c.length&&(a.D=c[0].
|
|
792
|
-
p.
|
|
791
|
+
function ur(a,b){b=a.l.get(b)||new Map;for(var c=[],d={},e=t(a.m),f=e.next();!f.done;d={fc:d.fc},f=e.next())if(d.fc=f.value,f=b.get(d.fc))c.push({Tf:d.fc,location:f});else if(f=a.H.find(function(h){return function(k){return k.Bj==h.fc}}(d))){var g=b.get(f["BASE-ID"]);g&&(f["URI-REPLACEMENT"].ph?(g=new gb(g),mb(g,f["URI-REPLACEMENT"].ph),c.push({Tf:d.fc,location:g.toString()})):c.push({Tf:d.fc,location:g}))}d=Date.now();e=t(a.i.keys());for(f=e.next();!f.done;f=e.next())f=f.value,g=a.i.get(f),d>g&&
|
|
792
|
+
a.i.delete(f);c=c.filter(function(h){for(var k=t(a.i.keys()),l=k.next();!l.done;l=k.next())if(l.value.includes((new gb(h.location)).Hb))return!1;return!0});c.length&&(a.D=c[0].Tf);c=c.map(function(h){return h.location});if(!c.length&&a.h)for(d=t(a.h.split(",")),f=d.next();!f.done;f=d.next())if(e=b.get(f.value))a.D=a.h,c.push(e);if(!c.length)for(b=t(b.values()),d=b.next();!d.done;d=b.next())c.push(d.value);return Bb(a.j,c)};function vr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=new Set}p=vr.prototype;p.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};p.mi=function(){return this.j};p.Af=function(){return this.l.slice()};p.Uh=function(){return this.i};
|
|
793
|
+
p.Bg=function(a,b){var c,d,e,f,g=this,h,k,l,m,n,q,r,u,v,y,z,x,A,B,C,E,H,G,I,J,M,N,R,T,fa,Z,ha,Ha,Xa,Fb;return K(function(kb){if(1==kb.g){h=Jb;wr(a);if(!b&&1==a.length)return k=a[0],g.h=k.audioStreams,g.g=k.videoStreams,g.l=k.textStreams,g.i=k.imageStreams,kb.F(2);l=-1;for(m=0;m<a.length;m++)n=a[m],g.m.has(n.id)||(g.m.add(n.id),-1==l&&(l=m));if(-1==l)return kb.return();for(var cc=[],Ia=[],lb=[],hb=[],Gb=t(a),ib=Gb.next();!ib.done;ib=Gb.next())ib=ib.value,cc.push(ib.audioStreams),Ia.push(ib.videoStreams),
|
|
793
794
|
lb.push(ib.textStreams),hb.push(ib.imageStreams);c=cc;d=Ia;e=lb;f=hb;q=c;r=d;u=e;v=f;y=t(u);for(z=y.next();!z.done;z=y.next())x=z.value,x.push(xr(h.ya));A=t(v);for(B=A.next();!B.done;B=A.next())C=B.value,C.push(xr(h.jd));return D(kb,Promise.all([yr(g.h,q,l,zr,Ar),yr(g.g,r,l,zr,Ar),yr(g.l,u,l,zr,Ar),yr(g.i,v,l,zr,Ar)]),2)}E=0;H=[];if(g.g.length&&g.h.length)for(R=t(g.h),T=R.next();!T.done;T=R.next())for(fa=T.value,Z=t(g.g),ha=Z.next();!ha.done;ha=Z.next())Ha=ha.value,Xa=yh(fa.drmInfos,Ha.drmInfos),
|
|
794
795
|
fa.drmInfos.length&&Ha.drmInfos.length&&!Xa.length||(Fb=E++,H.push({id:Fb,language:fa.language,disabledUntilTime:0,primary:fa.primary,audio:fa,video:Ha,bandwidth:(fa.bandwidth||0)+(Ha.bandwidth||0),drmInfos:Xa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(G=g.g.length?g.g:g.h,I=t(G),J=I.next();!J.done;J=I.next())M=J.value,N=E++,H.push({id:N,language:M.language,disabledUntilTime:0,primary:M.primary,audio:M.type==h.W?M:null,video:M.type==h.na?M:null,bandwidth:M.bandwidth||
|
|
795
796
|
0,drmInfos:M.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});g.j=H;F(kb)})};
|
|
@@ -817,7 +818,7 @@ function Qr(a,b,c){if(a.id==c.id)return!0;var d=Tb(a.language,b.language),e=Tb(a
|
|
|
817
818
|
b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Rr(a,b,c){return a.id==c.id?!0:Tr(a.width*a.height,b.width*b.height,c.width*c.height)==Ur?!0:!1}
|
|
818
819
|
function Dr(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
|
|
819
820
|
function xr(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Jj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1}}
|
|
820
|
-
function Tr(a,b,c){if(b==a&&a!=c)return Vr;if(c==a&&a!=b)return Ur;if(b>a){if(c<=a||c-a<b-a)return Ur;if(c-a>b-a)return Vr}else{if(c>a)return Vr;if(a-c<a-b)return Ur;if(a-c>a-b)return Vr}return Xr}function Wr(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Ur:b<a?Vr:Xr}L("shaka.util.PeriodCombiner",vr);vr.prototype.combinePeriods=vr.prototype.
|
|
821
|
+
function Tr(a,b,c){if(b==a&&a!=c)return Vr;if(c==a&&a!=b)return Ur;if(b>a){if(c<=a||c-a<b-a)return Ur;if(c-a>b-a)return Vr}else{if(c>a)return Vr;if(a-c<a-b)return Ur;if(a-c>a-b)return Vr}return Xr}function Wr(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Ur:b<a?Vr:Xr}L("shaka.util.PeriodCombiner",vr);vr.prototype.combinePeriods=vr.prototype.Bg;vr.prototype.getImageStreams=vr.prototype.Uh;vr.prototype.getTextStreams=vr.prototype.Af;vr.prototype.getVariants=vr.prototype.mi;
|
|
821
822
|
var Ur=1,Xr=0,Vr=-1,Sr=new Map;function Yr(){var a=this;this.i=this.g=null;this.s=[];this.j=null;this.K=1;this.m={};this.M={};this.l=new vr;this.H=0;this.J=new $b(5);this.I=new Cd(function(){Zr(a)});this.G=new rf;this.C=null;this.L=[];this.D=Infinity;this.u=!1;this.h=null}p=Yr.prototype;p.configure=function(a){this.g=a;this.h&&this.h.configure(this.g)};p.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.u=b.isLowLatencyMode(),c.s=[a],c.i=b,D(e,$r(c),2);d=e.h;c.i&&as(c,d);if(!c.i)throw new P(2,7,7001);return e.return(c.j)})};
|
|
822
823
|
p.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.g=this.i=null;this.s=[];this.j=null;this.m={};this.l=null;null!=this.I&&(this.I.stop(),this.I=null);this.h&&this.h.destroy();return this.G.destroy()};p.update=function(){var a=this,b;return K(function(c){if(1==c.g)return ta(c,2),D(c,$r(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};
|
|
823
824
|
p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Zb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,as(this,0))}}};p.banLocation=function(a){this.h&&this.h.i.set(a,Date.now()+6E4)};
|
|
@@ -826,14 +827,14 @@ function cs(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Lg(b,"MPD");i
|
|
|
826
827
|
function ds(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B,C,E,H,G,I,J,M,N,R,T,fa,Z,ha,Ha,Xa,Fb,kb,cc,Ia,lb,hb,Gb,ib,ai,Qe,Nd,Re,Ac;return K(function(Mb){switch(Mb.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=rg(b,"Location").map(xg).filter(Ad);0<f.length&&(g=Bb(e,f),e=a.s=g);h=Promise.resolve();if((k=qg(b,"ContentSteering"))&&a.i)if(l=k.getAttribute("defaultServiceLocation"),a.h)a.h.j=e,a.h.h=l;else if(a.h=new pr(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.j=e,a.h.h=l,m=
|
|
827
828
|
xg(k))(n=zg(k,"queryBeforeStart",Hg,!1))?h=qr(a.h,m):qr(a.h,m);q=rg(b,"BaseURL");u=!1;if(a.h)for(a.h.l.clear(),v=t(q),y=v.next();!y.done;y=v.next())z=y.value,x=z.getAttribute("serviceLocation"),A=xg(z),x&&A&&(tr(a.h,"BaseURL",x,A),u=!0);u&&a.h||(B=q.map(xg),r=Bb(e,B));C=function(){return a.h&&u?ur(a.h,"BaseURL"):r?r:[]};E=0;q&&q.length&&(E=zg(q[0],"availabilityTimeOffset",Gg)||0);H=a.g.dash.ignoreMinBufferTime;G=0;H||(G=zg(b,"minBufferTime",Bg)||0);a.H=zg(b,"minimumUpdatePeriod",Bg,-1);I=zg(b,"availabilityStartTime",
|
|
828
829
|
Ag);J=zg(b,"timeShiftBufferDepth",Bg);M=a.g.dash.ignoreSuggestedPresentationDelay;N=null;M||(N=zg(b,"suggestedPresentationDelay",Bg));R=a.g.dash.ignoreMaxSegmentDuration;T=null;R||(T=zg(b,"maxSegmentDuration",Bg));fa=b.getAttribute("type")||"static";if(a.j)for(Z=a.j.presentationTimeline,ha=t(Object.values(a.m)),Ha=ha.next();!Ha.done;Ha=ha.next())Xa=Ha.value,Xa.segmentIndex&&Xa.segmentIndex.vb(Z.xb());else Fb=a.g.defaultPresentationDelay||1.5*G,kb=null!=N?N:Fb,Z=new nj(I,kb,a.g.dash.autoCorrectDrift);
|
|
829
|
-
Z.Rc("static"==fa);(cc=Z.R())&&!isNaN(a.g.availabilityWindowOverride)&&(J=a.g.availabilityWindowOverride);null==J&&(J=Infinity);Z.Ge(J);Ia=b.getAttribute("profiles")||"";lb={Wb:"static"!=fa,presentationTimeline:Z,Ia:null,ia:null,Ca:null,P:null,bandwidth:0,
|
|
830
|
-
Z.
|
|
831
|
-
break}Re=rg(b,"UTCTiming");return D(Mb,gs(a,C,Re),6);case 6:Ac=Mb.h;if(!a.i)return Mb.return();Z.
|
|
830
|
+
Z.Rc("static"==fa);(cc=Z.R())&&!isNaN(a.g.availabilityWindowOverride)&&(J=a.g.availabilityWindowOverride);null==J&&(J=Infinity);Z.Ge(J);Ia=b.getAttribute("profiles")||"";lb={Wb:"static"!=fa,presentationTimeline:Z,Ia:null,ia:null,Ca:null,P:null,bandwidth:0,Og:!1,Ac:E,profiles:Ia.split(",")};hb=es(a,lb,C,b);Gb=hb.duration;ib=hb.periods;"static"!=fa&&hb.Gg||Z.eb(Gb||Infinity);a.D&&!a.u&&(ai=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.u=a.i.isLowLatencyMode());a.u?Z.ah(a.D):a.D&&Sa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
831
|
+
Z.Nf(T||1);return D(Mb,a.l.Bg(ib,lb.Wb),2);case 2:return D(Mb,h,3);case 3:a.u&&(G=0,Qe=null!=N?N:a.g.defaultPresentationDelay,Z.dg(Qe));if(a.j){a.j.variants=a.l.j;Nd=a.l.Af();0<Nd.length&&(a.j.textStreams=Nd);a.j.imageStreams=a.l.i;a.i.filter(a.j);Mb.F(4);break}a.j={presentationTimeline:Z,variants:a.l.j,textStreams:a.l.Af(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:G||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:fs(b)};if(!Z.mh()){Mb.F(5);
|
|
832
|
+
break}Re=rg(b,"UTCTiming");return D(Mb,gs(a,C,Re),6);case 6:Ac=Mb.h;if(!a.i)return Mb.return();Z.bh(Ac);case 5:Z.oe();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),F(Mb)}})}
|
|
832
833
|
function fs(a){a=qg(a,"ServiceDescription");if(!a)return null;var b=qg(a,"Latency"),c=qg(a,"PlaybackRate");if(b&&b.getAttribute("max")||c){a=b&&b.getAttribute("max")?parseInt(b.getAttribute("max"),10)/1E3:null;var d=c?parseFloat(c.getAttribute("max")):null;b=b&&b.getAttribute("min")?parseInt(b.getAttribute("min"),10)/1E3:null;c=c?parseFloat(c.getAttribute("min")):null;return{maxLatency:a,maxPlaybackRate:d,minLatency:b,minPlaybackRate:c}}return null}
|
|
833
834
|
function es(a,b,c,d){var e=zg(d,"mediaPresentationDuration",Bg),f=[],g=0;d=rg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=zg(k,"start",Bg,g),n=k.id,q=zg(k,"duration",Bg),r=null;if(l){var u=zg(l,"start",Bg);null!=u&&(r=u-m)}else null!=e&&(r=e-m);null==r&&(r=q);if(!(null!==a.C&&null!==n&&null!==m&&m<a.C)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.C||m>a.C)&&(a.C=m);g=hs(a,b,c,{start:m,duration:r,node:k,Df:null==r||!l});f.push(g);b.Ia.id&&r&&(a.M[b.Ia.id]=r);if(null==r){g=
|
|
834
|
-
null;break}g=m+r}}a.L=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,
|
|
835
|
-
function hs(a,b,c,d){b.Ia=is(a,d.node,null,c);b.ia=d;b.Ia.Ac=b.Ac;b.Ia.id||(b.Ia.id="__shaka_period_"+d.start);var e=rg(d.node,"EventStream");c=b.presentationTimeline.xb();e=t(e);for(var f=e.next();!f.done;f=e.next())js(a,d.start,d.duration,f.value,c);c=rg(d.node,"AdaptationSet").map(function(m){return ks(a,b,m)}).filter(Ad);if(b.Wb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.
|
|
836
|
-
}d=c.filter(function(m){return!m.
|
|
835
|
+
null;break}g=m+r}}a.L=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,Gg:!1}:{periods:f,duration:g,Gg:!0}}
|
|
836
|
+
function hs(a,b,c,d){b.Ia=is(a,d.node,null,c);b.ia=d;b.Ia.Ac=b.Ac;b.Ia.id||(b.Ia.id="__shaka_period_"+d.start);var e=rg(d.node,"EventStream");c=b.presentationTimeline.xb();e=t(e);for(var f=e.next();!f.done;f=e.next())js(a,d.start,d.duration,f.value,c);c=rg(d.node,"AdaptationSet").map(function(m){return ks(a,b,m)}).filter(Ad);if(b.Wb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Vi);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
|
|
837
|
+
}d=c.filter(function(m){return!m.og});c=c.filter(function(m){return m.og});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.og.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Rd:h.Rd},l=k.next())h.Rd=l.value,h.Rd.trickModeVideo=e.streams.find(function(m){return function(n){return md(m.Rd.codecs)==md(n.codecs)}}(h))}}}c=ls(a.g.disableAudio,d,"audio");e=ls(a.g.disableVideo,d,"video");f=ls(a.g.disableText,
|
|
837
838
|
d,Ib);d=ls(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new P(2,4,4004);return{id:b.Ia.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function ls(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,w(e.streams));return d},[])}
|
|
838
839
|
function ks(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ca=is(a,c,b.Ia,null);var e=!1,f=rg(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Ad),h=void 0,k=b.Ca.contentType==Ib;k&&(h="subtitle");f=t(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=
|
|
839
840
|
l}}var n;m=rg(c,"EssentialProperty");f=null;var q=!1;l=!1;m=t(m);for(var r=m.next();!r.done;r=m.next()){r=r.value;var u=r.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==u?f=r.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==u?n=d(parseInt(r.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=u&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=u&&("urn:mpeg:dash:ssr:2023"==u?q=!0:l=!0)}m=rg(c,"SupplementalProperty");m=t(m);for(r=m.next();!r.done;r=
|
|
@@ -841,17 +842,17 @@ m.next())r=r.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r.getAttribute
|
|
|
841
842
|
B=A[1]||"und"):(x="CC"+r,2==u.length?r+=2:r++,B=A);v.set(x,Nb(B))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==r)if(r=1,null!=u)for(u=t(u.split(";")),x=u.next();!x.done;x=u.next())x=x.value,A=z=void 0,x.includes("=")?(x=x.split("="),z="svc"+x[0],A=x[1].split(",")[0].split(":").pop()):(z="svc"+r,r++,A=x),v.set(z,Nb(A));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==r?null!=u&&(g.push(u),"captions"==u&&(h="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==r&&("1"==
|
|
842
843
|
u?y="visually impaired":"2"==u&&(y="hard of hearing"));if(l)return null;l=rg(c,"ContentProtection");var C=rq(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),E=Nb(b.Ca.language||"und"),H=c.getAttribute("label");(l=rg(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(H=l.textContent));l=rg(c,"Representation");c=l.map(function(G){if(G=ms(a,b,C,h,E,H,e,g,v,G,y))G.hdr=G.hdr||n,G.fastSwitching=q;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Ca.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||
|
|
843
844
|
k||f)return null;throw new P(2,4,4003);}if(!b.Ca.contentType||"application"==b.Ca.contentType)for(b.Ca.contentType=ns(c[0].mimeType,c[0].codecs),k=t(c),r=k.next();!r.done;r=k.next())r.value.type=b.Ca.contentType;k=b.Ca.id||"__fake__"+a.K++;m=t(c);for(r=m.next();!r.done;r=m.next()){r=r.value;u=t(C.drmInfos);for(z=u.next();!z.done;z=u.next())z=z.value,z.keyIds=z.keyIds&&r.keyIds?new Set([].concat(w(z.keyIds),w(r.keyIds))):z.keyIds||r.keyIds;a.g.dash.enableAudioGroups&&(r.groupId=k)}l=l.map(function(G){return G.getAttribute("id")}).filter(Ad);
|
|
844
|
-
return{id:k,contentType:b.Ca.contentType,language:E,
|
|
845
|
-
function ms(a,b,c,d,e,f,g,h,k,l,m){b.P=is(a,l,b.Ca,null);a.D=Math.min(a.D,b.P.Ac);if(!os(b.P))return null;var n=b.ia.start;b.bandwidth=zg(l,"bandwidth",Eg)||0;var q=b.P.contentType,r=q==Ib||"application"==q;q="image"==q;try{var u=void 0;if(c.We){var v=b.P.wb,y=Bb(v(),[c.We.
|
|
845
|
+
return{id:k,contentType:b.Ca.contentType,language:E,ik:e,streams:c,drmInfos:C.drmInfos,og:f,Vi:l}}
|
|
846
|
+
function ms(a,b,c,d,e,f,g,h,k,l,m){b.P=is(a,l,b.Ca,null);a.D=Math.min(a.D,b.P.Ac);if(!os(b.P))return null;var n=b.ia.start;b.bandwidth=zg(l,"bandwidth",Eg)||0;var q=b.P.contentType,r=q==Ib||"application"==q;q="image"==q;try{var u=void 0;if(c.We){var v=b.P.wb,y=Bb(v(),[c.We.Ei]),z=xf(y,a.g.retryParameters);u={method:"AES-128",iv:c.We.iv,firstMediaSequenceNumber:0,fetchKey:function(){var I,J,M;return K(function(N){if(1==N.g)return D(N,bs(a,z,6),2);if(3!=N.g){I=N.h;if(!I.data||16!=I.data.byteLength)throw new P(2,
|
|
846
847
|
4,4049);J={name:"AES-CBC"};M=u;return D(N,window.crypto.subtle.importKey("raw",I.data,J,!0,["decrypt"]),3)}M.cryptoKey=N.h;u.fetchKey=void 0;F(N)})}}}v=function(I,J,M,N){return ps(a,I,J,M,N)};if(b.P.Gd)var x=Vq(b,v,u);else if(b.P.bc)x=ar(b,a.m,u);else if(b.P.Hd)x=fr(b,v,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.M,u);else{var A=b.ia.duration||0,B=b.P.wb;x={Dc:function(){return Promise.resolve(Mj(n,A,B()))}}}}catch(I){if((r||q)&&4002==I.code)return null;throw I;}v=rg(l,"ContentProtection");v=vq(v,c,
|
|
847
848
|
a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);v=new Set(v?[v]:[]);y=!1;rg(l,"SupplementalProperty").some(function(I){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==I.getAttribute("schemeIdUri")&&"JOC"==I.getAttribute("value")})&&(y=!0);var C=!1;r&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var E;if(q&&((l=rg(l,"EssentialProperty").find(function(I){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(I.getAttribute("schemeIdUri"))}))&&
|
|
848
849
|
(E=l.getAttribute("value")),!E))return null;var H;l=b.P.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"))&&(H="PQ");l=b.P.id?b.Ia.id+","+b.P.id:"";var G=l&&a.m[l]?a.m[l]:{id:a.K++,originalId:b.P.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.P.mimeType,
|
|
849
850
|
codecs:b.P.codecs,frameRate:b.P.frameRate,pixelAspectRatio:b.P.pixelAspectRatio,bandwidth:b.bandwidth,width:b.P.width,height:b.P.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.Ca.language,label:f,type:b.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.P.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.P.xe,audioSamplingRate:b.P.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:H,videoLayout:void 0,tilesLayout:E,matchedStreams:[],
|
|
850
851
|
accessibilityPurpose:m,external:!1,fastSwitching:!1};G.createSegmentIndex=function(){var I;return K(function(J){if(1==J.g){if(G.segmentIndex)return J.F(0);I=G;return D(J,x.Dc(),3)}I.segmentIndex=J.h;F(J)})};l&&b.Wb&&!a.m[l]&&(a.m[l]=G);return G}
|
|
851
852
|
function Zr(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,ta(d,2),D(d,$r(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();as(a,b);F(d)}})}function as(a,b){0>a.H||a.I.T(Math.max(a.H-b,ac(a.J)))}
|
|
852
|
-
function is(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,xe:null,audioSamplingRate:null,Ac:0
|
|
853
|
+
function is(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,xe:null,audioSamplingRate:null,Ac:0,Zf:0};d=d||c.wb;var e=b.getAttribute("id"),f=rg(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.getAttribute("serviceLocation");m=xg(m);l&&m&&(tr(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(xg));k=b.getAttribute("contentType")||c.contentType;l=b.getAttribute("mimeType")||c.mimeType;m=b.getAttribute("codecs")||
|
|
853
854
|
c.codecs;var n=zg(b,"frameRate",Ig)||c.frameRate,q=b.getAttribute("sar")||c.pixelAspectRatio,r=qs(rg(b,"InbandEventStream"),c.emsgSchemeIdUris),u=rg(b,"AudioChannelConfiguration");u=rs(u)||c.xe;var v=zg(b,"audioSamplingRate",Fg)||c.audioSamplingRate;k||(k=ns(l,m));var y=qg(b,"SegmentBase"),z=qg(b,"SegmentTemplate"),x=y?zg(y,"availabilityTimeOffset",Gg)||0:0,A=z?zg(z,"availabilityTimeOffset",Gg)||0:0,B=f&&f.length?zg(f[0],"availabilityTimeOffset",Gg)||0:0;x=c.Ac+B+x+A;A=null;(B=qg(b,"SegmentSequenceProperties"))&&
|
|
854
|
-
(B=qg(B,"SAP"))&&(A=zg(B,"cadence",Dg));return{wb:function(){return Bb(d(),f.length?a.h&&h?ur(a.h,e):g?g:[]:[])},Gd:y||c.Gd,bc:qg(b,"SegmentList")||c.bc,Hd:z||c.Hd,width:zg(b,"width",Fg)||c.width,height:zg(b,"height",Fg)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:r,id:e,language:b.getAttribute("lang"),xe:u,audioSamplingRate:v,Ac:x
|
|
855
|
+
(B=qg(B,"SAP"))&&(A=zg(B,"cadence",Dg));return{wb:function(){return Bb(d(),f.length?a.h&&h?ur(a.h,e):g?g:[]:[])},Gd:y||c.Gd,bc:qg(b,"SegmentList")||c.bc,Hd:z||c.Hd,width:zg(b,"width",Fg)||c.width,height:zg(b,"height",Fg)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:r,id:e,language:b.getAttribute("lang"),xe:u,audioSamplingRate:v,Ac:x,Zf:A||c.Zf}}
|
|
855
856
|
function qs(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.getAttribute("schemeIdUri"),b.includes(c)||b.push(c);return b}
|
|
856
857
|
function rs(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
857
858
|
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function os(a){var b=a.Gd?1:0;b+=a.bc?1:0;b+=a.Hd?1:0;if(0==b)return a.contentType==Ib||"application"==a.contentType?!0:!1;1!=b&&(a.Gd&&(a.bc=null),a.Hd=null);return!0}
|
|
@@ -860,7 +861,7 @@ function gs(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d
|
|
|
860
861
|
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.F(9);break;case 7:return D(n,ss(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return D(n,ss(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:va(n,
|
|
861
862
|
3);break;case 5:wa(n);case 3:g=f.next();n.F(2);break;case 4:return Sa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
862
863
|
function js(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=zg(d,"timescale",Fg)||1;d=t(rg(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=zg(k,"presentationTime",Fg)||0,m=zg(k,"duration",Fg)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.i.onTimelineRegionAdded(k))}}
|
|
863
|
-
function ps(a,b,c,d,e){var f,g,h,k;return K(function(l){if(1==l.g)return f=Df,g=e?0:1,h=jk(b,c,d,a.g.retryParameters),D(l,bs(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function ns(a,b){b=hd(a,b);return rd(b)?Ib:a.split("/")[0]}function bs(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);sf(a.G,b);return b.promise}L("shaka.dash.DashParser",Yr);Ch["application/dash+xml"]=function(){return new Yr};Ch["video/vnd.mpeg.dash.mpd"]=function(){return new Yr};function ts(){}L("shaka.dependencies",ts);ts.has=function(a){return us.has(a)};ts.add=function(a,b){if(!vs[a])throw Error(a+" is not supported");a==ws?He("mux.js","mux.js is no longer used in Shaka Player."):us.set(a,function(){return b})};var ws="muxjs",vs={
|
|
864
|
+
function ps(a,b,c,d,e){var f,g,h,k;return K(function(l){if(1==l.g)return f=Df,g=e?0:1,h=jk(b,c,d,a.g.retryParameters),D(l,bs(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function ns(a,b){b=hd(a,b);return rd(b)?Ib:a.split("/")[0]}function bs(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);sf(a.G,b);return b.promise}L("shaka.dash.DashParser",Yr);Ch["application/dash+xml"]=function(){return new Yr};Ch["video/vnd.mpeg.dash.mpd"]=function(){return new Yr};function ts(){}L("shaka.dependencies",ts);ts.has=function(a){return us.has(a)};ts.add=function(a,b){if(!vs[a])throw Error(a+" is not supported");a==ws?He("mux.js","mux.js is no longer used in Shaka Player."):us.set(a,function(){return b})};var ws="muxjs",vs={jk:ws,ISOBoxer:"ISOBoxer"};ts.Allowed=vs;var us=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function xs(a,b,c){this.type=a;this.g=b;this.segments=c||null}function ys(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}ys.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.g?this.g.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
864
865
|
function zs(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}ys.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function X(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function As(a,b){a=a.getAttribute(b);if(!a)throw new P(2,4,4023,b);return a.value}function Bs(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.yb=c}
|
|
865
866
|
function Cs(a,b){this.name=a;this.value=b};function Ds(a,b){return a.filter(function(c){return c.name==b})}function Es(a,b){return a.filter(function(c){return As(c,"TYPE")==b})}function Fs(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Gs(a,b,c){c=void 0===c?0:c;return(a=Fs(a,b))?Number(a.value):c}function Hs(a,b,c){return b?Is(a,[b],c):[]}
|
|
866
867
|
function Is(a,b,c){if(!b.length)return[];b=Bb(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new P(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function Js(a){this.h=a||"";this.g=0}function Ks(a){Ls(a,/[ \t]+/gm)}function Ls(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Ms(a){return a.g==a.h.length?null:(a=Ls(a,/[^ \t\n]*/gm))?a[0]:null};function Ns(){this.g=0}
|
|
@@ -875,13 +876,13 @@ c).box("Opus",c).box("fLaC",c).box("avc1",function(v){v=ei(v.reader,v.name);e.pu
|
|
|
875
876
|
r.set(b,b);u.h()}return{type:q?"audio":"video",mimeType:q?"audio/mp4":"video/mp4",codecs:Xs(e).join(", "),language:h,height:k,width:l,channelCount:m,sampleRate:n,closedCaptions:r}}function Xs(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=nd(d)[0];b.has(e)||(c.push(d),b.add(e))}return c};function Ys(){var a=this;this.g=this.i=null;this.C=1;this.s=new Map;this.J=new Map;this.L=new Map;this.L.set("video",new Map);this.L.set("audio",new Map);this.L.set(Ib,new Map);this.L.set("image",new Map);this.za=new Set;this.h=new Map;this.l=null;this.Z="";this.sa=new Ns;this.K=-1;this.U=Infinity;this.$=this.Wa=!1;this.u=new Cd(function(){Zs(a)});this.ma=$s;this.G=null;this.ua=0;this.m=Infinity;this.ha=this.aa=this.M=0;this.N=new rf;this.H=new Map;this.I=new Map;this.V=new Map;this.Ua=this.D=!1;
|
|
876
877
|
this.Qa=new $b(5);this.j=null}p=Ys.prototype;p.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};p.start=function(a,b){var c=this,d;return K(function(e){return 1==e.g?(c.i=b,c.D=b.isLowLatencyMode(),D(e,at(c,[a]),2)):3!=e.g?(d=e.h,c.Z=d.uri,D(e,bt(c,d.data,a),3)):e.return(c.G)})};
|
|
877
878
|
p.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.N&&(a.push(this.N.destroy()),this.N=null);this.g=this.i=null;this.za.clear();this.G=null;this.h.clear();this.J.clear();this.I.clear();this.s.clear();this.V.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
878
|
-
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){if(!ct(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(dt(a,g));return D(m,Promise.all(b),2)}et(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.td});d.length&&!h&&(k=ft,gt(a,k.
|
|
879
|
+
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){if(!ct(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(dt(a,g));return D(m,Promise.all(b),2)}et(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.td});d.length&&!h&&(k=ft,gt(a,k.rh),l=d.map(function(n){return n.Nb}),a.l.eb(Math.min.apply(Math,w(l))),a.i.updateDuration());
|
|
879
880
|
h&&ht(a);F(m)})};function it(a,b){return ct(a)?a.L.get(b.type):b.re}
|
|
880
881
|
function dt(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B,C,E,H,G,I,J,M,N,R,T,fa;return K(function(Z){if(1==Z.g){c=[];d=t(b.ba());for(e=d.next();!e.done;e=d.next())f=e.value,g=new gb(f),h=g.g,b.Vd&&(0<=b.pb&&h.add("_HLS_msn",String(b.pb)),0<=b.qb&&h.add("_HLS_part",String(b.qb))),b.Wd&&h.add("_HLS_skip","YES"),zb(h)&&ob(g,h),c.push(g.toString());return D(Z,at(a,c,!0),2)}k=Z.h;if(!b.stream.segmentIndex)return Z.return();l=Os(a.sa,k.data);if(1!=l.type)throw new P(2,4,4017);m=k.uri;m==k.originalUri||
|
|
881
|
-
b.ba().includes(m)||b.
|
|
882
|
+
b.ba().includes(m)||b.Yg.push(m);n=Ds(l.g,"EXT-X-DEFINE");q=jt(a,n,m);r=b.stream;u=it(a,b);v=kt(l,r.mimeType);y=v.keyIds;z=v.drmInfos;x=function(ha,Ha){return ha.size===Ha.size&&[].concat(w(ha)).every(function(Xa){return Ha.has(Xa)})};x(r.keyIds,y)||(r.keyIds=y,r.drmInfos=z,a.i.newDrmInfo(r));A=lt(a,l,r,u,q,b.ba);B=A.segments;C=A.bandwidth;r.bandwidth=C;r.segmentIndex.yd(B,a.l.xb());B.length&&(E=Gs(l.g,"EXT-X-MEDIA-SEQUENCE",0),G=(H=Fs(l.g,"EXT-X-SKIP"))?Number(X(H,"SKIPPED-SEGMENTS")):0,I=mt(E,B),
|
|
882
883
|
J=I.pb,M=I.qb,b.pb=J+G,b.qb=M,N=u.get(E),r.segmentIndex.vb(N));R=B[0];b.rc=R.startTime;T=B[B.length-1];b.Nb=T.endTime;if(fa=Fs(l.g,"EXT-X-ENDLIST"))b.td=!0;nt(a,l);F(Z)})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.i.set(a,Date.now()+6E4)};
|
|
883
884
|
function ot(a,b){for(var c=-1==a.K,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=it(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.K=Math.max(a.K,k));e.ef=k;break}}}}if(!(0>a.K))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(e=a.K-c.ef,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),pt(a,c,d)}
|
|
884
|
-
function qt(a,b){if(Infinity==a.U){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.U=Math.min(a.U,d.g))}}b=a.U;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Ra("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.ba(),"Expect AV sync issues!");else for(pt(a,c,f.g-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.
|
|
885
|
+
function qt(a,b){if(Infinity==a.U){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.U=Math.min(a.U,d.g))}}b=a.U;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Ra("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.ba(),"Expect AV sync issues!");else for(pt(a,c,f.g-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.kg(b)}}}
|
|
885
886
|
function pt(a,b,c){b.rc+=c;b.Nb+=c;a=it(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.ba()}
|
|
886
887
|
function bt(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B,C,E,H,G,I,J,M,N,R,T,fa,Z;return K(function(ha){switch(ha.g){case 1:d=Os(a.sa,b);e=Ds(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];if(1==d.type)return v=function(){return[c]},D(ha,rt(a,d,v),6);st(a,e);k=Ds(d.g,"EXT-X-MEDIA");l=Ds(d.g,"EXT-X-STREAM-INF");m=Ds(d.g,"EXT-X-IMAGE-STREAM-INF");n=Ds(d.g,"EXT-X-I-FRAME-STREAM-INF");q=Ds(d.g,"EXT-X-SESSION-KEY");r=Ds(d.g,"EXT-X-SESSION-DATA");u=Ds(d.g,"EXT-X-CONTENT-STEERING");tt(a,r);return D(ha,ut(a,u),4);
|
|
887
888
|
case 4:return vt(a,l),wt(a,k),f=xt(a,l,q,k),g=yt(a,k),D(ha,zt(a,m,n),5);case 5:h=ha.h;ha.F(3);break;case 6:return y=ha.h,z=y.type,x=y.mimeType,A=y.codecs,B=y.language,C=y.height,E=y.width,H=y.channelCount,G=y.sampleRate,I=y.closedCaptions,D(ha,At(a,a.C++,d,v,c,A,z,B,!0,"Media Playlist",H,I,null,!1,G,!1,x),7);case 7:J=ha.h,a.h.set(c,J),"video"==z&&Bt(J.stream,E,C,null,null,null),f.push({id:0,language:Nb(B||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==z?J.stream:null,video:"video"==z?J.stream:
|
|
@@ -892,7 +893,7 @@ xf(g,a.g.retryParameters),D(C,Gt(a,y,n,{type:1}),4);case 4:z=C.h;(x=z.headers["c
|
|
|
892
893
|
I.push("avc1.42E01E");M=!0;break;case "hvc":H.va?I.push(H.va):I.push("hvc1.1.6.L93.90");M=!0;break;case "av1":I.push("av01.0.01M.08"),M=!0}if(I.length){G=J&&!M;J=new Map;if(M){M=new wc("video/mp2t");M.i(E);E=t(M.j());for(var N=E.next();!N.done;N=E.next())N=N.value,J.set(N,N);M.h()}H={type:G?"audio":"video",mimeType:"video/mp2t",codecs:I.join(", "),language:null,height:H.height,width:H.width,channelCount:null,sampleRate:null,closedCaptions:J}}else H=null;if(A=H)return C.return(A)}else if("mp4"==l||
|
|
893
894
|
"cmfv"==l||"m4s"==l||"video/mp4"==x||"audio/mp4"==x||"video/iso.segment"==x)if(B=Ws(q,z.data))return C.return(B);return C.return(d)}})}
|
|
894
895
|
function ht(a){if(ct(a)){if(a.ma==Ht){for(var b,c=b=Infinity,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Nb),c=Math.min(c,e.rc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Ge(b)}if(!a.l.m)for(b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
895
|
-
c.g&&a.l.
|
|
896
|
+
c.g&&a.l.eh(c.g)}else a.l.eb(It(a));a.l.oe()}function st(a,b){var c=(new gb(a.Z)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=X(e,"NAME");var f=X(e,"VALUE");e=X(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
|
|
896
897
|
function jt(a,b,c){c=(new gb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=X(f,"NAME"),h=X(f,"VALUE");e=X(f,"QUERYPARAM");f=X(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.s.get(f))&&d.set(f,e)}return d}
|
|
897
898
|
function vt(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=X(d,"AUDIO");c=X(d,"VIDEO");var f=X(d,"SUBTITLES");d=Jt(a,d);if(f){var g=Eb(Ib,d);a.I.set(f,g);Bc(d,g)}e&&(f=Eb("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.I.set(e,f));c&&(e=Eb("video",d),e||(e=a.g.hls.defaultVideoCodec),a.I.set(c,e))}}
|
|
898
899
|
function tt(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=X(d,"DATA-ID");c=X(d,"URI");var f=X(d,"LANGUAGE");d=X(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Hs([a.Z],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new O("sessiondata",e);if(a.i)a.i.onEvent(c)}}
|
|
@@ -917,31 +918,31 @@ Number(m.split("x")[1]));if(n=X(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.
|
|
|
917
918
|
function Wt(a,b,c,d,e,f,g,h,k){for(var l=a.C++,m=[],n=t(b),q=n.next();!q.done;q=n.next()){var r=q.value;q=As(r,"URI");r=X(r,"PATHWAY-ID");a.j&&r&&tr(a.j,l,r,q);m.push(q)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=X(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.H.get(b);break a}if(!b&&a.H.size)for(b=t(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}}b=null}c=Db(d,c);d=Ot(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
|
|
918
919
|
function Ot(a,b,c,d,e,f,g,h,k,l,m,n,q,r){function u(C){var E,H,G,I,J,M,N,R,T,fa,Z,ha,Ha,Xa,Fb,kb,cc;return K(function(Ia){switch(Ia.g){case 1:return E=x.ba(),D(Ia,at(a,x.ba(),!0),2);case 2:H=Ia.h;if(C.aborted)return Ia.return();G=H.uri;G==H.originalUri||E.includes(G)||z.push(G);I=Os(a.sa,H.data);J=void 0;if(a.$||!a.g.hls.disableCodecGuessing){Ia.F(3);break}return D(Ia,rt(a,I,v),4);case 4:M=Ia.h,J=M.mimeType,d=M.codecs;case 3:return N=ct(a),D(Ia,At(a,0,I,v,G,d,e,f,g,h,k,l,m,n,q,r,J),5);case 5:R=Ia.h;
|
|
919
920
|
if(C.aborted)return Ia.return();T=R.stream;ct(a)&&!N&&Ct(a,I);x.rc=R.rc;x.Nb=R.Nb;x.Wd=R.Wd;x.Vd=R.Vd;x.td=R.td;x.re=R.re;x.pb=R.pb;x.qb=R.qb;x.Kf=!0;y.segmentIndex=T.segmentIndex;y.encrypted=T.encrypted;y.drmInfos=T.drmInfos;y.keyIds=T.keyIds;y.mimeType=T.mimeType;y.bandwidth=T.bandwidth;y.codecs=T.codecs||y.codecs;y.drmInfos.length&&a.i.newDrmInfo(y);fa=Jb;if(e==fa.na||e==fa.W)for(Z=t(a.h.values()),ha=Z.next();!ha.done;ha=Z.next())Ha=ha.value,Ha.Kf||Ha.type!=e||(Ha.stream.mimeType=T.mimeType);e==
|
|
920
|
-
fa.ya&&(Xa=T.segmentIndex.get(0))&&Xa.h&&(y.mimeType="application/mp4");Xt(a)&&(a.Wa?Dt(a,[x]):(a.Wa=!0,Fb=Array.from(a.h.values()),kb=Fb.filter(function(lb){return lb.stream.segmentIndex}),Dt(a,kb),ht(a),cc=a.m,0<cc&&a.u.T(cc)));F(Ia)}})}function v(){return a.j&&1<c.length?ur(a.j,b):z.concat(Is([a.Z],c,a.s))}var y=Yt(a,d,e,f,g,h,k,l,m,n,q,r),z=[],x={stream:y,type:e,
|
|
921
|
+
fa.ya&&(Xa=T.segmentIndex.get(0))&&Xa.h&&(y.mimeType="application/mp4");Xt(a)&&(a.Wa?Dt(a,[x]):(a.Wa=!0,Fb=Array.from(a.h.values()),kb=Fb.filter(function(lb){return lb.stream.segmentIndex}),Dt(a,kb),ht(a),cc=a.m,0<cc&&a.u.T(cc)));F(Ia)}})}function v(){return a.j&&1<c.length?ur(a.j,b):z.concat(Is([a.Z],c,a.s))}var y=Yt(a,d,e,f,g,h,k,l,m,n,q,r),z=[],x={stream:y,type:e,Yg:z,ba:v,rc:0,Nb:0,re:new Map,Wd:!1,Vd:!1,td:!1,ef:-1,pb:-1,qb:-1,Kf:!1},A=null,B=new AbortController;y.createSegmentIndex=function(){if(A)return A;
|
|
921
922
|
B=new AbortController;return A=new Promise(function(C){C(u(B.signal))})};y.closeSegmentIndex=function(){A&&!y.segmentIndex&&B.abort();y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null);A=null};return x}function It(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Nb));return b}
|
|
922
923
|
function et(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Kj(d.segmentIndex,function(e){c.push(e)});a.l.zd(c)}function Dt(a,b){if(!ct(a))for(var c=It(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Bc(0,c);et(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?ot(a,b):qt(a,b)}
|
|
923
924
|
function Xt(a){if(!a.G)return!1;var b=[],c=[];a=t(a.G.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
924
925
|
function At(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,y){var z,x,A,B,C,E,H,G,I,J,M,N,R,T,fa,Z,ha,Ha,Xa,Fb,kb,cc,Ia;return K(function(lb){if(1==lb.g){if(1!=c.type)throw new P(2,4,4017);z=Ds(c.g,"EXT-X-DEFINE");x=jt(a,z,e);var hb=Fs(c.g,"EXT-X-PLAYLIST-TYPE"),Gb=Fs(c.g,"EXT-X-ENDLIST");Gb=hb&&"VOD"==hb.value||Gb;hb=hb&&"EVENT"==hb.value&&!Gb;hb=!Gb&&!hb;Gb?gt(a,$s):hb?gt(a,Ht):gt(a,Zt);ct(a)&&nt(a,c);return y?lb.F(2):D(lb,$t(a,g,f,c,x,d),3)}2!=lb.g&&(y=lb.h);A=kt(c,y);B=A.drmInfos;C=A.keyIds;E=A.encrypted;H=
|
|
925
|
-
A.
|
|
926
|
-
return lb.return({stream:G,type:g,
|
|
926
|
+
A.wh;if(E&&!B.length&&!H)throw new P(2,4,4026);G=Yt(a,f,g,h,k,l,m,n,q,r,u,v);G.encrypted=E;G.drmInfos=B;G.keyIds=C;G.mimeType=y;I=ct(a)?a.L.get(g):new Map;J=lt(a,c,G,I,x,d);M=J.segments;N=J.bandwidth;G.bandwidth=N;ct(a)&&nt(a,c);R=M[0].startTime;T=M[M.length-1];fa=T.endTime;Z=new Jj(M);G.segmentIndex=Z;Ha=(ha=Fs(c.g,"EXT-X-SERVER-CONTROL"))?null!=ha.getAttribute("CAN-SKIP-UNTIL"):!1;Xa=ha?null!=ha.getAttribute("CAN-BLOCK-RELOAD"):!1;Fb=Gs(c.g,"EXT-X-MEDIA-SEQUENCE",0);kb=mt(Fb,M);cc=kb.pb;Ia=kb.qb;
|
|
927
|
+
return lb.return({stream:G,type:g,Yg:[],ba:d,rc:R,Nb:fa,Wd:Ha,Vd:Xa,td:!1,ef:-1,pb:cc,qb:Ia,re:I,Kf:!1})})}function mt(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{pb:a,qb:c};b=b[b.length-1];var d=b.i;if(!b.i.length)return a++,b.u&&(c=0),{pb:a,qb:c};c=d.length-1;d[d.length-1].s||(a++,c=0);return{pb:a,qb:c}}
|
|
927
928
|
function Yt(a,b,c,d,e,f,g,h,k,l,m,n){var q=Lt(c,b)||Mt(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Ib?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");return{id:a.C++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
928
929
|
segmentIndex:null,mimeType:q,codecs:b,kind:c==Ib?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Nb(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1}}
|
|
929
|
-
function kt(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=Ds(d.value.g,"EXT-X-KEY"),c.push.apply(c,w(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=As(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=X(g,"KEYFORMAT")||"identity",g=(h=Qt[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,
|
|
930
|
+
function kt(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=Ds(d.value.g,"EXT-X-KEY"),c.push.apply(c,w(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=As(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=X(g,"KEYFORMAT")||"identity",g=(h=Qt[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,wh:d}}
|
|
930
931
|
function au(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Sa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new P(2,4,4042);var f=0,g=X(b,"IV","");if(g){var h=kg(g.substr(2));if(16!=h.byteLength)throw new P(2,4,4048);}else f=Gs(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,q,r;return K(function(u){if(1==u.g)return l=Hs(d(),As(b,"URI"),e),m=xf(l,a.g.retryParameters),
|
|
931
932
|
D(u,Gt(a,m,6),2);if(3!=u.g){n=u.h;if(!n.data||16!=n.data.byteLength)throw new P(2,4,4049);q={name:"AES-CBC"};r=k;return D(u,window.crypto.subtle.importKey("raw",n.data,q,!0,["decrypt"]),3)}r.cryptoKey=u.h;k.fetchKey=void 0;F(u)})}};return k}
|
|
932
933
|
function nt(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Fs(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Fs(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Fs(b.g,"EXT-X-PART-INF"))a.M=Number(As(e,"PART-TARGET"));b=Fs(b.g,"EXT-X-SERVER-CONTROL");a.D&&a.M?(a.m=a.Ua?5*a.M<=c?Math.min(a.M,a.m):Math.min(c,a.m):Math.min(a.M,a.m),a.ha=b?Number(As(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
933
|
-
b.getAttribute("HOLD-BACK"):null,a.aa=c?Number(c.value):0);a.ua=Math.max(d,a.ua)}function Ct(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ha)b=a.ha;else if(a.aa)b=a.aa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.ua*c}a.l.
|
|
934
|
+
b.getAttribute("HOLD-BACK"):null,a.aa=c?Number(c.value):0);a.ua=Math.max(d,a.ua)}function Ct(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ha)b=a.ha;else if(a.aa)b=a.aa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.ua*c}a.l.gh(0);a.l.dg(b);a.l.Rc(!1)}
|
|
934
935
|
function Ft(a,b,c,d,e){var f=Fs(c,"EXT-X-MAP");if(!f)return null;var g=As(f,"URI"),h=Hs(d(),g,e);g=[h.toString(),X(f,"BYTERANGE","")].join("-");if(!a.V.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?"AES-128"==As(m,"METHOD")&&m.id<f.id&&(k=au(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=bu(h,f,l,k);a.V.set(g,b)}return a.V.get(g)}
|
|
935
936
|
function bu(a,b,c,d){var e=0,f=null;b=X(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Hh(function(){return a},e,f,null,null,null,d)}
|
|
936
937
|
function cu(a,b,c,d,e,f,g,h,k){var l=d.g,m=Fs(l,"EXTINF"),n=0,q=0,r=null;d.yb.length&&!a.D&&Sa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=Fs(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=Ag(v.value))}var y=Kh;Fs(l,"EXT-X-GAP")&&(y=2);if(!m){if(0==d.yb.length)throw new P(2,4,4024,"EXTINF");
|
|
937
938
|
if(!a.D)return null}var z=[];v=!1;var x=null,A=!1,B=!1;if(a.D&&d.yb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=u,E={},H=0;H<d.yb.length;E={dd:E.dd,Od:E.Od},H++){var G=d.yb[H],I=0==H?c:z[z.length-1],J=0==H?e:I.endTime,M=Number(X(G,"DURATION"))||a.M;if(M){var N=J+M,R=0,T=null;"EXT-X-PRELOAD-HINT"==G.name?(R=(R=X(G,"BYTERANGE-START"))?Number(R):0,(I=X(G,"BYTERANGE-LENGTH"))?T=R+Number(I)-1:R&&(T=Number.MAX_SAFE_INTEGER)):
|
|
938
939
|
(R=X(G,"BYTERANGE"),T=t(du(I,R)),R=T.next().value,T=T.next().value);E.Od=X(G,"URI");if(E.Od){I=Kh;"YES"==X(G,"GAP")&&(I=2,A=!0);E.dd=null;var fa=function(ha){return function(){null==ha.dd&&(ha.dd=Hs(h(),ha.Od,f));return ha.dd}}(E);n&&0<=R&&null!=T&&(x=fa,v=!0);J=new Jh(J,N,fa,R,T,b,0,0,Infinity,[],"",null,C,I,k);"EXT-X-PRELOAD-HINT"==G.name&&(J.Lf(),B=!0);"YES"!=X(G,"INDEPENDENT")&&0<H&&J.qe();z.push(J);C&&(C+=M)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=
|
|
939
|
-
z[z.length-1].endTime;else return null;v&&(A||0!=z[0].fb?(v=!1,x=null):z=[]);(m=Fs(l,"EXT-X-BYTERANGE"))?(r=t(du(c,m.value)),q=r.next().value,r=r.next().value):z.length&&(q=z[0].fb,r=z[z.length-1].La);c="";m=null;"image"==g.type&&(c="1x1",g=Fs(l,"EXT-X-TILES"))&&(c=As(g,"LAYOUT"),(g=X(g,"DURATION"))&&(m=Number(g)));var Z=null;b=new Jh(e,n,function(){if(x)return x();null==Z&&(Z=Hs(h(),d.h,f));return Z||[]},q,r,b,0,0,Infinity,z,c,m,u,y,k,0<z.length&&!!d.h);v&&(a.Ua=!0,b.
|
|
940
|
+
z[z.length-1].endTime;else return null;v&&(A||0!=z[0].fb?(v=!1,x=null):z=[]);(m=Fs(l,"EXT-X-BYTERANGE"))?(r=t(du(c,m.value)),q=r.next().value,r=r.next().value):z.length&&(q=z[0].fb,r=z[z.length-1].La);c="";m=null;"image"==g.type&&(c="1x1",g=Fs(l,"EXT-X-TILES"))&&(c=As(g,"LAYOUT"),(g=X(g,"DURATION"))&&(m=Number(g)));var Z=null;b=new Jh(e,n,function(){if(x)return x();null==Z&&(Z=Hs(h(),d.h,f));return Z||[]},q,r,b,0,0,Infinity,z,c,m,u,y,k,0<z.length&&!!d.h);v&&(a.Ua=!0,b.Rg(),B&&b.Lf());return b}
|
|
940
941
|
function du(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.La+1,d=c+b-1);return[c,d]}
|
|
941
942
|
function lt(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Gs(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Gs(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Fs(b.g,"EXT-X-SKIP"),n=m?Number(X(m,"SKIPPED-SEGMENTS")):0,q=l+n,r=0;ct(a)&&d.has(q)&&(r=d.get(q));0===r&&a.ma==Ht&&0<d.size&&!d.has(q)&&(r=a.l.xb());var u=[],v=null;m=[];for(var y=0;y<g.length;y++){var z=g[y],x=0==y?r:v.endTime;q=l+n+y;Fs(z.g,"EXT-X-DISCONTINUITY")&&k++;var A=t(z.g);for(var B=A.next();!B.done;B=A.next())B=B.value,"EXT-X-KEY"==B.name&&("AES-128"==As(B,
|
|
942
943
|
"METHOD")?h=au(a,B,b,f,e):h=void 0);d.set(q,x);A=Ft(a,b,z.g,f,e);!a.D&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.D=a.i.isLowLatencyMode());if(x=cu(a,A,v,z,x,e,c,f,h))(v=Gs(z.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:x.endTime-x.startTime}):m.length&&(v=m.pop(),v.duration+=x.endTime-x.startTime,m.push(v)),v=x,x.l=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.K&&q<a.K||u.push(x)}b=void 0;m.length&&(b=m.reduce(function(C,E){return C+E.duration},0),b=Math.round(m.reduce(function(C,
|
|
943
944
|
E){return C+E.bitrate*E.duration},0)/b*1E3));if(m=u.some(function(C){return null!=C.g}))for(c={},d=0;d<u.length;c={Vc:c.Vc,Uc:c.Uc,Kd:c.Kd,Sb:c.Sb,Tc:c.Tc},d++)if(c.Sb=u[d],null==c.Sb.g)for(c.Uc=0,c.Vc=d,e=function(C){return function(){var E=u[C.Vc];if(E){if(null!=E.g)return E.g+C.Uc;C.Uc-=E.endTime-E.startTime;C.Vc+=1}return null}}(c),c.Tc=0,c.Kd=d,f=function(C){return function(){var E=u[C.Kd];if(E){E!=C.Sb&&(C.Tc+=E.endTime-E.startTime);if(null!=E.g)return E.g+C.Tc;--C.Kd}return null}}(c);null==
|
|
944
|
-
c.Sb.g;)c.Sb.g=f(),null==c.Sb.g&&(c.Sb.g=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=t(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.U;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.
|
|
945
|
+
c.Sb.g;)c.Sb.g=f(),null==c.Sb.g&&(c.Sb.g=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=t(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.U;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.kg(a);return{segments:u,bandwidth:b}}
|
|
945
946
|
function Lt(a,b){if(a==Ib){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function Mt(a){return a==Ib?"text/vtt":eu[a].mp4}
|
|
946
947
|
function $t(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,y,z,x;return K(function(A){switch(A.g){case 1:g=Df;h=Math.trunc((d.segments.length-1)/2);k=Hs(f(),d.segments[h].h,e);l=new gb(k[0]);m=l.Va.split(".").pop();n=eu[b];if((q=n[m])||(q=Et[m])||(q=Lt(b,c)))return A.return(q);u=1;v=xf(k,a.g.retryParameters);ta(A,2);v.method="HEAD";return D(A,Gt(a,v,g,{type:u}),4);case 4:y=A.h;r=y.headers["content-type"];va(A,3);break;case 2:z=wa(A);if(!z||1002!=z.code&&1001!=z.code){A.F(3);break}v.method="GET";return D(A,
|
|
947
948
|
Gt(a,v,g,{type:u}),6);case 6:x=A.h,r=x.headers["content-type"];case 3:return r?A.return(r.split(";")[0]):A.return(Mt(b))}})}function Bt(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function at(a,b,c){return Gt(a,xf(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
@@ -950,7 +951,7 @@ function ct(a){return a.ma!=$s}function gt(a,b){a.ma=b;a.l&&a.l.Rc(!ct(a));ct(a)
|
|
|
950
951
|
var Et={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},eu={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",
|
|
951
952
|
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"}},Qt={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);return Cb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=As(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
952
953
|
b=As(a,"URI");b=Us(b);b=qc(b.data);b=Cb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=X(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=As(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=As(a,"URI");a=Us(a);a=qc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=pg(a,b,new Set,0);return Cb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a,
|
|
953
|
-
b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);a=As(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Cb("org.w3.clearkey",null):null}},$s="VOD",Zt="EVENT",Ht="LIVE",ft={
|
|
954
|
+
b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);a=As(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Cb("org.w3.clearkey",null):null}},$s="VOD",Zt="EVENT",Ht="LIVE",ft={rh:$s,vj:Zt,Dj:Ht};Ch["application/x-mpegurl"]=function(){return new Ys};Ch["application/vnd.apple.mpegurl"]=function(){return new Ys};function fu(a){var b=0,c=uc(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=qc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function gu(a){if(a=hu(a))a:{a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=qg(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
|
|
954
955
|
function hu(a){a=jg(a.textContent);a=fu(a).filter(function(b){return b.type===iu})[0];if(!a)return null;a=Nf(a.value,!0);return(a=Jg(a,"WRMHEADER"))?a:null}var iu=1,ju=(new Map).set("com.microsoft.playready",gu).set("com.microsoft.playready.recommendation",gu).set("com.microsoft.playready.software",gu).set("com.microsoft.playready.hardware",gu);function ku(a){if(!lu){lu=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);mu=pu("ftyp",b,d,b,c);b=pu("dref",qu);ru=pu("dinf",b)}this.g=a}
|
|
955
956
|
function su(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=pu;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(tu+1));m=Math.floor(m%(tu+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(uu(h,4)),[0,0,0,0],w(uu(n,4)),w(uu(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],w(uu(k,2)),[0,0],w(uu(l,
|
|
956
957
|
2)),[0,0]));h=pu("tkhd",h);k=pu;n=g.duration*g.timescale;l=Math.floor(n/(tu+1));n=Math.floor(n%(tu+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(uu(g.timescale,4)),w(uu(l,4)),w(uu(n,4)),w(uu(m,2)),[0,0]));l=pu("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=vu;break;case "audio":m=wu}n=pu("hdlr",m);a:{switch(g.type){case "video":g=pu("minf",pu("vmhd",xu),ru,yu(g));break a;
|
|
@@ -977,7 +978,7 @@ function Ou(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=xf(a.l,
|
|
|
977
978
|
q=zg(m,"DVRWindowLength",Fg);l&&(0===q||isNaN(q))&&(q=Infinity);var r=zg(m,"CanSeek",Hg,!1);0===q&&r&&(q=Infinity);r=null;q&&0<q&&(r=q/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.Ge(r);q=zg(m,"Duration",Fg,Infinity);l||a.i.eb(q/n);l={variants:[],textStreams:[],timescale:n,duration:q/n};r=rg(m,"Protection");var u;n=a.g.mss.keySystemsBySystemId;q=[];r=t(r);for(u=r.next();!u.done;u=r.next())q=q.concat(rg(u.value,"ProtectionHeader"));if(q.length){r=
|
|
978
979
|
[];for(u=0;u<q.length;u++){var v=q[u],y=v.getAttribute("SystemID").toLowerCase(),z=n[y];if(z){var x=hu(v);if(x)a:{x=t(x.getElementsByTagName("DATA"));for(var A=x.next();!A.done;A=x.next())if(A=qg(A.value,"KID")){x=jg(A.textContent);x=new Uint8Array([x[3],x[2],x[1],x[0],x[5],x[4],x[7],x[6]].concat(w(x.slice(8))));x=mg(x);break a}x=null}else x=null;A=jg(v.textContent);y=kg(y.replace(/-/g,""));y=[{initData:pg(A,y,new Set,0),initDataType:"cenc",keyId:x}];y=Cb(z,y);x&&y.keyIds.add(x);if(z=ju.get(z))y.licenseServerUri=
|
|
979
980
|
z(v);r.push(y)}}n=r}else n=[];u=n;r=[];n=[];q=[];m=rg(m,"StreamIndex");m=t(m);for(v=m.next();!v.done;v=m.next()){v=v.value;z=rg(v,"QualityLevel");y=l.timescale;x=l.duration;A=rg(v,"c");for(var B=[],C=0,E=0;E<A.length;++E){var H=A[E],G=A[E+1],I=zg(H,"t",Fg),J=zg(H,"d",Fg);H=zg(H,"r",Dg);if(!J)break;I=null!=I?I:C;H=H||0;if(0>H)if(G){G=zg(G,"t",Fg);if(null==G)break;else if(I>=G)break;H=Math.ceil((G-I)/J)-1}else{if(Infinity==x)break;else if(I/y>=x)break;H=Math.ceil((x*y-I)/J)-1}for(G=0;G<=H;++G)C=I+J,
|
|
980
|
-
B.push({start:I/y,end:C/y,
|
|
981
|
+
B.push({start:I/y,end:C/y,rg:I}),I=C}y=B;z=t(z);for(x=z.next();!x.done;x=z.next())(x=Pu(a,v,x.value,y,u,l))&&("audio"!=x.type||a.g.disableAudio?"video"!=x.type||a.g.disableVideo?x.type!=Ib||a.g.disableText||q.push(x):n.push(x):r.push(x))}m=[];r=t(0<r.length?r:[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,v=t(0<n.length?n:[null]),x=v.next();!x.done;x=v.next())z=m,y=z.push,x=x.value,A=0,u&&u.bandwidth&&0<u.bandwidth&&(A+=u.bandwidth),x&&x.bandwidth&&0<x.bandwidth&&(A+=x.bandwidth),x={id:a.u++,
|
|
981
982
|
language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!x&&x.primary,audio:u,video:x,bandwidth:A,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},y.call(z,x);l.variants=m;l.textStreams=q;a.j?(a.j.variants=l.variants,a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,
|
|
982
983
|
type:"MSS",serviceDescription:null},a.i.oe());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.D.sample(1,h);F(k)})}
|
|
983
984
|
function Pu(a,b,c,d,e,f){var g=b.getAttribute("Type");if("audio"!==g&&"video"!==g&&"text"!==g)return Sa("Ignoring unrecognized type:",g),null;var h=b.getAttribute("Language"),k=a.u++,l=zg(c,"Bitrate",Eg),m=zg(c,"MaxWidth",Eg),n=zg(c,"MaxHeight",Eg),q=zg(c,"Channels",Eg),r=zg(c,"SamplingRate",Eg),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.eb(Math.min(u,v));var y={id:k,originalId:b.getAttribute("Name")||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
@@ -988,10 +989,10 @@ if(a.m.has(y.id))var z=a.m.get(y.id);else z=[],"video"==y.type&&(z=y.mssPrivateD
|
|
|
988
989
|
function(){y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null)};return y}
|
|
989
990
|
function Su(a,b,c,d){if(a=a.getAttribute("CodecPrivateData"))return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|
|
|
990
991
|
b<<3;b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Tu(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function Uu(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
991
|
-
function Vu(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={cd:g.cd},h=e.next())g.cd=h.value,d.push(new Jh(g.cd.start,g.cd.end,function(k){return function(){return Bb(a.l,[f.replace("{start time}",String(k.cd.
|
|
992
|
-
Ch["application/vnd.ms-sstr+xml"]=function(){return new Mu};function Wu(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Pf(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Xu(){}function Yu(a,b,c,d,e){var f=new Zu;If(b.headers).forEach(function(l,m){f.append(m,l)});var g=new $u,h={
|
|
992
|
+
function Vu(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={cd:g.cd},h=e.next())g.cd=h.value,d.push(new Jh(g.cd.start,g.cd.end,function(k){return function(){return Bb(a.l,[f.replace("{start time}",String(k.cd.rg))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}L("shaka.mss.MssParser",Mu);var Ru="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Qu={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
993
|
+
Ch["application/vnd.ms-sstr+xml"]=function(){return new Mu};function Wu(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Pf(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Xu(){}function Yu(a,b,c,d,e){var f=new Zu;If(b.headers).forEach(function(l,m){f.append(m,l)});var g=new $u,h={yg:!1,lh:!1};a=av(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 hf(a,function(){h.yg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Cd(function(){h.lh=!0;g.abort()});k.T(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
993
994
|
function av(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:return h=bv,k=cv,q=n=0,r=Date.now(),ta(B,2),D(B,h(a,c),4);case 4:l=B.h;f(dv(l.headers));if("HEAD"==c.method){B.F(5);break}u=l.clone().body.getReader();y=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;z=function(C){function E(){var H,G;return K(function(I){switch(I.g){case 1:return ta(I,2),D(I,u.read(),4);case 4:H=I.h;va(I,3);break;case 2:return wa(I),I.return();case 3:if(H.done){I.F(5);break}n+=
|
|
994
|
-
H.value.byteLength;if(!g){I.F(5);break}return D(I,g(H.value),5);case 5:G=Date.now();if(100<G-r||H.done)e(G-r,n-q,y-n),q=n,r=G;H.done?C.close():(C.enqueue(H.value),E());F(I)}})}E()};new k({start:z});return D(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:va(B,3);break;case 2:x=wa(B);if(d.
|
|
995
|
+
H.value.byteLength;if(!g){I.F(5);break}return D(I,g(H.value),5);case 5:G=Date.now();if(100<G-r||H.done)e(G-r,n-q,y-n),q=n,r=G;H.done?C.close():(C.enqueue(H.value),E());F(I)}})}E()};new k({start:z});return D(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:va(B,3);break;case 2:x=wa(B);if(d.yg)throw new P(1,1,7001,a,b);if(d.lh)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,x,b);case 3:return A=dv(l.headers),B.return(Wu(A,m,l.status,a,l.url,b))}})}
|
|
995
996
|
function dv(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function ev(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}L("shaka.net.HttpFetchPlugin",Xu);Xu.isSupported=ev;Xu.parse=Yu;var bv=window.fetch,$u=window.AbortController,cv=window.ReadableStream,Zu=window.Headers;
|
|
996
997
|
ev()&&(uf("http",Yu,2,!0),uf("https",Yu,2,!0),uf("blob",Yu,2,!0));function fv(){}
|
|
997
998
|
function gv(a,b,c,d,e){var f=new hv,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new P(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var r=iv(f);e(r);n=!0}};f.onload=function(){var r=iv(f),u=f.response;try{var v=Wu(r,u,f.status,a,f.responseURL,c);l(v)}catch(y){m(y)}};f.onerror=function(r){m(new P(1,1,1002,a,r,
|
|
@@ -999,9 +1000,9 @@ c))};f.ontimeout=function(){m(new P(1,1,1003,a,c))};f.onprogress=function(r){var
|
|
|
999
1000
|
function iv(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}L("shaka.net.HttpXHRPlugin",fv);fv.parse=gv;var hv=window.XMLHttpRequest;uf("http",gv,1,!0);uf("https",gv,1,!0);uf("blob",gv,1,!0);function jv(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function kv(a){return a.ba().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.fb+":"+a.La}function lv(a,b){return jk(a.g.ba(),a.g.fb,a.g.La,b.streaming.retryParameters)};function mv(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function nv(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}mv.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function ov(a){var b=this;this.s=a;this.j=new Map;this.i=new Ff(function(){return pv(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new mv}ov.prototype.destroy=function(){return this.i.destroy()};function qv(a,b,c){a.m=b;a.l=c}function pv(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1000
1001
|
function rv(a,b,c,d,e,f){Gf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return K(function(u){if(1==u.g)return D(u,sv(a,c),2);h=u.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=qc(h),l=new og(k),l.data)n=Number(m),q=l.data[n],r=l.g[n],a.l(q,r);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function tv(a){return K(function(b){return 1==b.g?D(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1001
1002
|
function sv(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=Df,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),D(g,d.promise,2);f=g.h;Bc(a.h,e);return g.return(f.data)})};function uv(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new gf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}uv.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return D(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);F(b)})};
|
|
1002
|
-
function vv(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return D(g,b(f.key,f.value,f),2)}f.continue();F(g)})}})}uv.prototype.store=function(){return this.h};uv.prototype.promise=function(){return this.g};function wv(a){this.h=a;this.g=[]}wv.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function xv(a,b){return yv(a,b,"readwrite")}function yv(a,b,c){c=a.h.transaction([b],c);var d=new uv(c,b);a.g.push(d);d.promise().then(function(){Bc(a.g,d)},function(){Bc(a.g,d)});return d};function zv(a,b,c){this.h=new wv(a);this.i=b;this.g=c}p=zv.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return Av(this.i)};p.removeSegments=function(a,b){return Bv(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return D(d,Cv(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.
|
|
1003
|
+
function vv(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return D(g,b(f.key,f.value,f),2)}f.continue();F(g)})}})}uv.prototype.store=function(){return this.h};uv.prototype.promise=function(){return this.g};function wv(a){this.h=a;this.g=[]}wv.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function xv(a,b){return yv(a,b,"readwrite")}function yv(a,b,c){c=a.h.transaction([b],c);var d=new uv(c,b);a.g.push(d);d.promise().then(function(){Bc(a.g,d)},function(){Bc(a.g,d)});return d};function zv(a,b,c){this.h=new wv(a);this.i=b;this.g=c}p=zv.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return Av(this.i)};p.removeSegments=function(a,b){return Bv(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return D(d,Cv(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Cg(e)}))})};p.addManifests=function(){return Av(this.g)};
|
|
1003
1004
|
p.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function Dv(a,b,c){a=xv(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}p.updateManifestExpiration=function(a,b){var c=xv(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};p.removeManifests=function(a,b){return Bv(this,this.g,a,b)};
|
|
1004
|
-
p.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return D(d,Cv(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.nd(e)})))})};p.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=yv(a.h,a.g,"readonly"),c=new Map,D(d,vv(b,function(e,f){var g;return K(function(h){if(1==h.g)return D(h,a.nd(f),2);g=h.h;c.set(e,g);F(h)})}),2)):3!=d.g?D(d,b.promise(),3):d.return(c)})};p.
|
|
1005
|
+
p.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return D(d,Cv(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.nd(e)})))})};p.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=yv(a.h,a.g,"readonly"),c=new Map,D(d,vv(b,function(e,f){var g;return K(function(h){if(1==h.g)return D(h,a.nd(f),2);g=h.h;c.set(e,g);F(h)})}),2)):3!=d.g?D(d,b.promise(),3):d.return(c)})};p.Cg=function(a){return a};p.nd=function(a){return Promise.resolve(a)};
|
|
1005
1006
|
function Av(a){return Promise.reject(new P(2,9,9011,"Cannot add new value to "+a))}p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=xv(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Pd:g.Pd},k=h.next())l=k.value,g.Pd=e.add(l),g.Pd.onsuccess=function(n){return function(){f.push(n.Pd.result)}}(g);return D(m,d.promise(),2)}return m.return(f)})};
|
|
1006
1007
|
function Bv(a,b,c,d){a=xv(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Nd:e.Nd},f=c.next())e.Nd=f.value,b.delete(e.Nd).onsuccess=function(g){return function(){return d(g.Nd)}}(e);return a.promise()}
|
|
1007
1008
|
function Cv(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=yv(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={$c:h.$c,Xc:h.Xc},l=k.next())h.Xc=l.value,h.$c=e.get(h.Xc),h.$c.onsuccess=function(n){return function(){void 0==n.$c.result&&g.push(n.Xc);f[n.Xc]=n.$c.result}}(h);return D(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Ev(a){this.g=new wv(a)}Ev.prototype.destroy=function(){return this.g.destroy()};Ev.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=yv(a.g,"session-ids","readonly"),c=[],D(d,vv(b,function(e,f){c.push(f)}),2)):3!=d.g?D(d,b.promise(),3):d.return(c)})};Ev.prototype.add=function(a){var b=xv(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
@@ -1012,7 +1013,7 @@ function Mv(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.va
|
|
|
1012
1013
|
Ov.prototype.nd=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Pv(a.periods[c],e),b.push(f);return D(h,Cr(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
1013
1014
|
function Pv(a,b){Qv(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Rv(e,a.startTime,b)})}
|
|
1014
1015
|
function Rv(a,b,c){var d=a.initSegmentUri?Sv(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1015
|
-
Sv(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Ov.prototype.
|
|
1016
|
+
Sv(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Ov.prototype.Cg=function(a){return{data:a.data}};
|
|
1016
1017
|
function Sv(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new P(2,9,9004,"Could not parse uri "+a);}
|
|
1017
1018
|
function Qv(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
1018
1019
|
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Tv(){zv.apply(this,arguments)}pa(Tv,zv);
|
|
@@ -1045,7 +1046,7 @@ function nw(a){var b=[],c=xe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.n
|
|
|
1045
1046
|
case 4:b.h=null,b.g=null,F(k)}})})}function uw(){if(Dd())a:{var a=t(Gv.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}p=tw.prototype;p.destroy=function(){return this.l.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Dl(a,b));return Pl(this.h,a)};p.getConfiguration=function(){var a=Nl();Pl(a,this.h,Nl());return a};p.Xb=function(){return this.g};
|
|
1046
1047
|
p.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new ov(this.g);this.j.push(f);b=vw(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return c?h.F(2):D(h,Pk(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=Bh(a,c||null);return h.return(g())})},e,f);b=new hf(b,function(){return pv(f)});b.finally(function(){Bc(d.j,f)});return ww(this,b)};
|
|
1047
1048
|
function vw(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:return xw(),h=g=null,k=new Fv,n=m=l=null,ta(B,2,3),D(B,d(),5);case 5:return g=B.h,D(B,yw(a,b,g,e),6);case 6:q=B.h;zw(a);r=!q.presentationTimeline.R()&&!q.presentationTimeline.nc();if(!r)throw new P(2,9,9005,b);return D(B,Aw(a,q,function(C){n=n||C},e),7);case 7:h=B.h;zw(a);if(n)throw n;return D(B,Bw(q,h,e),8);case 8:return D(B,k.init(),9);case 9:return zw(a),D(B,Hv(k),10);case 10:return l=B.h,zw(a),u=Cw(h,
|
|
1048
|
-
q,b,c,e,f),v=u.
|
|
1049
|
+
q,b,c,e,f),v=u.Gi,y=u.mg,D(B,l.Ka.addManifests([v]),11);case 11:z=B.h;zw(a);m=z[0];zw(a);if(n)throw n;return D(B,Dw(a,y,m,v,f,e,l.Ka,q,h),12);case 12:return zw(a),Ew(q,v,h,e),D(B,l.Ka.updateManifest(m,v),13);case 13:return zw(a),x=new Yv("manifest",l.path.ob,l.path.Ka,m),B.return(ow(x,v));case 3:return xa(B),D(B,k.destroy(),14);case 14:if(!g){B.F(15);break}return D(B,g.stop(),15);case 15:if(!h){B.F(17);break}return D(B,h.destroy(),17);case 17:ya(B,0);break;case 2:A=wa(B);if(null==m){B.F(19);break}return D(B,
|
|
1049
1050
|
Fw(m),19);case 19:throw n||A;}})}
|
|
1050
1051
|
function Dw(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,v,y,z,x;return K(function(A){switch(A.g){case 1:l={};m=0;n=function(B,C){var E,H,G,I,J,M,N;return K(function(R){if(1==R.g){E={};H=t(B);for(G=H.next();!G.done;E={ec:E.ec},G=H.next())E.ec=G.value,I=lv(E.ec,f),J=E.ec.i,M=E.ec.h,N=function(T){return function(fa){var Z,ha,Ha;return K(function(Xa){if(1==Xa.g)return D(Xa,g.addSegments([{data:fa}]),2);Z=Xa.h;zw(a);ha=T.ec.g;Ha=kv(ha);l[Ha]=Z[0];m+=fa.byteLength;F(Xa)})}}(E),rv(e,E.ec.groupId,I,J,M,N);return D(R,
|
|
1051
1052
|
tv(e),2)}if(!C)return R.F(0);zw(a);Ew(h,d,k,f);return D(R,g.updateManifest(c,d),0)})};q=!1;ta(A,2);if(!Gw(h)||!q||Hw(h)){A.F(4);break}return D(A,n(b.filter(function(B){return B.h}),!0),5);case 5:return zw(a),b=b.filter(function(B){return!B.h}),r=l,u=m,l={},m=0,D(A,Iw(g,c,d,r,u,function(){return zw(a)}),6);case 6:zw(a);case 4:if(q){A.F(7);break}return D(A,n(b,!1),8);case 8:return zw(a),v=l,y=m,l={},m=0,D(A,Iw(g,c,d,v,y,function(){return zw(a)}),9);case 9:zw(a);case 7:va(A,0);break;case 2:return z=
|
|
@@ -1055,17 +1056,17 @@ function Iw(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,y;return K(function(z){switch(z
|
|
|
1055
1056
|
function Bw(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B,C,E,H,G,I,J,M,N,R,T;return K(function(fa){switch(fa.g){case 1:return d={width:Infinity,height:Infinity},Xd(a,c.restrictions,d),D(fa,ae(b,a,c.offline.usePersistentLicense),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Vd(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(oe(m));n=t(a.textStreams);for(q=n.next();!q.done;q=n.next())r=q.value,e.push(pe(r));u=t(a.imageStreams);
|
|
1056
1057
|
for(v=u.next();!v.done;v=u.next())y=v.value,e.push(qe(y));return D(fa,c.offline.trackSelectionCallback(e),3);case 3:z=fa.h;x=a.presentationTimeline.getDuration();A=0;B=t(z);for(C=B.next();!C.done;C=B.next())E=C.value,H=E.bandwidth*x/8,A+=H;ta(fa,4);return D(fa,c.offline.downloadSizeCallback(A),6);case 6:G=fa.h;if(!G)throw new P(2,9,9014);va(fa,5);break;case 4:I=wa(fa);if(I instanceof P)throw I;throw new P(2,9,9015);case 5:J=new Set;M=new Set;N=new Set;R=t(z);for(C=R.next();!C.done;C=R.next())T=C.value,
|
|
1057
1058
|
"variant"==T.type&&J.add(T.id),"text"==T.type&&M.add(T.id),"image"==T.type&&N.add(T.id);a.variants=a.variants.filter(function(Z){return J.has(Z.id)});a.textStreams=a.textStreams.filter(function(Z){return M.has(Z.id)});a.imageStreams=a.imageStreams.filter(function(Z){return N.has(Z.id)});Jw(a);F(fa)}})}
|
|
1058
|
-
function Cw(a,b,c,d,e,f){var g=mw(c,b,d),h=e.offline.progressCallback;qv(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&bh(a,"cenc",r)});var k=Gw(b)&&!Hw(b),l=null;k&&(l=Kw.get(a.g.keySystem));for(var m=new pw,n=t(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=t(b.imageStreams);for(q=n.next();!q.done;q=n.next())rw(m,q.value);q=t(b.variants);for(n=q.next();!n.done;n=q.next())qw(m,n.value);m=Lw(f,m,b,e);f=m.streams;m=m.
|
|
1059
|
-
q&&n&&(q.initData=[]);return{
|
|
1059
|
+
function Cw(a,b,c,d,e,f){var g=mw(c,b,d),h=e.offline.progressCallback;qv(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&bh(a,"cenc",r)});var k=Gw(b)&&!Hw(b),l=null;k&&(l=Kw.get(a.g.keySystem));for(var m=new pw,n=t(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=t(b.imageStreams);for(q=n.next();!q.done;q=n.next())rw(m,q.value);q=t(b.variants);for(n=q.next();!n.done;n=q.next())qw(m,n.value);m=Lw(f,m,b,e);f=m.streams;m=m.mg;q=a.g;n=e.offline.usePersistentLicense;
|
|
1060
|
+
q&&n&&(q.initData=[]);return{Gi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.rd(),streams:f,sessionIds:n?lh(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},mg:m}}function Gw(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1060
1061
|
function Hw(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Ew(a,b,c,d){b.expiration=c.rd();c=lh(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Gw(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}p.remove=function(a){return Mw(this,Nw(this,a))};
|
|
1061
1062
|
function Nw(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:xw();c=Zv(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new Fv;ua(k,2);return D(k,e.init(),4);case 4:return D(k,Jv(e,d.ob(),d.Ka()),5);case 5:return f=k.h,D(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],D(k,Promise.all([Ow(a,h,e),Pw(f,d,h)]),2);case 2:return xa(k),D(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
1062
1063
|
function Qw(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:hd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:hd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ow(a,b,c){return K(function(d){return D(d,Rw(a.g,a.h.drm,c,b),0)})}
|
|
1063
|
-
function Pw(a,b,c){function d(){}var e=Sw(c);ow(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.
|
|
1064
|
+
function Pw(a,b,c){function d(){}var e=Sw(c);ow(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Ui=function(){return Mw(this,Tw(this))};
|
|
1064
1065
|
function Tw(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return xw(),b=a.g,c=a.h.drm,d=new Fv,e=!1,ua(n,2),D(n,d.init(),4);case 4:f=[],Kv(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.F(2);break}k=h.value;return D(n,k.getAll(),8);case 8:return l=n.h,D(n,jw(c,b,l),9);case 9:return m=n.h,D(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.F(5);break;case 2:return xa(n),D(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
|
|
1065
1066
|
p.list=function(){return Mw(this,Uw())};function Uw(){var a,b,c;return K(function(d){switch(d.g){case 1:return xw(),a=[],b=new Fv,ua(d,2),D(d,b.init(),4);case 4:return c=Promise.resolve(),Iv(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return D(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=ow(new Yv("manifest",e.ob,e.Ka,l),k);a.push(k)});F(h)})})}),D(d,c,2);case 2:return xa(d),D(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
|
|
1066
1067
|
function yw(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
|
|
1067
1068
|
c.configure(d.manifest),zw(a),D(l,c.start(b,g),2);if(3!=l.g)return h=l.h,zw(a),k=Vw(h),D(l,Promise.all(bb(k,function(m){return m.createSegmentIndex()})),3);zw(a);if(e)throw e;return l.return(h)})}function Aw(a,b,c,d){var e;return K(function(f){return 1==f.g?(e=new Mg({sc:a.g,onError:c,ze:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),D(f,Rg(e,b.variants,d.offline.usePersistentLicense),2)):3!=f.g?D(f,dh(e),3):f.return(e)})}
|
|
1068
|
-
function Lw(a,b,c,d){var e=new Map,f=Vw(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Ww(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),
|
|
1069
|
+
function Lw(a,b,c,d){var e=new Map,f=Vw(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Ww(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),mg:Array.from(e.values())}}
|
|
1069
1070
|
function Ww(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,
|
|
1070
1071
|
spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;Xw(d,c.presentationTimeline.xb(),function(l){var m=kv(l),n=void 0;if(!f.has(m)){var q=l.endTime-l.startTime;q=sw(b,d.id)*q;q=nv(a.g,q);f.set(m,new jv(l,q,k,!1))}l.h&&(n=kv(l.h),f.has(n)||(q=.5*sw(b,d.id),q=nv(a.g,q),f.set(n,new jv(l.h,q,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,
|
|
1071
1072
|
endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Xw(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function zw(a){if(a.l.g)throw new P(2,9,7001);}function xw(){if(!uw())throw new P(2,9,9E3);}
|
|
@@ -1073,9 +1074,9 @@ function Mw(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c,2),D(c,b
|
|
|
1073
1074
|
function Rw(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Lv(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Qw(d,!1),videoCapabilities:Qw(d,!0)}});return D(h,jw(b,a,f),2)}return 3!=h.g?(g=h.h,D(h,e.remove(g),3)):D(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1074
1075
|
function Vw(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
1075
1076
|
function Jw(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}L("shaka.offline.Storage",tw);tw.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new Fv,ua(b,2),D(b,Mv(a),2)):5!=b.g?(xa(b),D(b,a.destroy(),5)):ya(b,0)})};
|
|
1076
|
-
tw.prototype.list=tw.prototype.list;tw.prototype.removeEmeSessions=tw.prototype.
|
|
1077
|
+
tw.prototype.list=tw.prototype.list;tw.prototype.removeEmeSessions=tw.prototype.Ui;tw.prototype.remove=tw.prototype.remove;tw.prototype.store=tw.prototype.store;tw.prototype.getNetworkingEngine=tw.prototype.Xb;tw.prototype.getConfiguration=tw.prototype.getConfiguration;tw.prototype.configure=tw.prototype.configure;tw.prototype.destroy=tw.prototype.destroy;tw.support=uw;
|
|
1077
1078
|
var Kw=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
|
|
1078
|
-
An.offline=uw;function Yw(){}function Zw(){for(var a=t($w),b=a.next();!b.done;b=a.next()){b=b.value;try{b.
|
|
1079
|
+
An.offline=uw;function Yw(){}function Zw(){for(var a=t($w),b=a.next();!b.done;b=a.next()){b=b.value;try{b.yh()}catch(c){Sa("Error installing polyfill!",c)}}}function ax(a,b){a={priority:b||0,yh:a};for(b=0;b<$w.length;b++)if($w[b].priority<a.priority){$w.splice(b,0,a);return}$w.push(a)}L("shaka.polyfill",Yw);Yw.register=ax;Yw.installAll=Zw;var $w=[];function bx(){this.g=new cx}function dx(){window.AbortController||(window.AbortController=bx,window.AbortSignal=cx)}bx.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new O("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(bx.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Yw.AbortController=bx;bx.install=dx;
|
|
1079
1080
|
function cx(){ab.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(cx,ab);da.Object.defineProperties(cx.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});ax(dx);function ex(){}function fx(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())gx(b.value)}function gx(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Yw.Aria=ex;ex.install=fx;ax(fx);function hx(){}function ix(){jx()}Yw.EncryptionScheme=hx;hx.install=ix;ax(ix,-2);function kx(){}
|
|
1080
1081
|
function lx(){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}}),
|
|
1081
1082
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",mx);document.addEventListener("webkitfullscreenerror",mx);document.addEventListener("mozfullscreenchange",mx);document.addEventListener("mozfullscreenerror",mx);document.addEventListener("MSFullscreenChange",mx);document.addEventListener("MSFullscreenError",mx)}}
|
|
@@ -1168,8 +1169,8 @@ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Gc);else if(d=/^regio
|
|
|
1168
1169
|
function Az(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function sz(a){a=Ls(a,wz);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)}
|
|
1169
1170
|
function xz(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||""}L("shaka.text.VttTextParser",rz);rz.prototype.parseMedia=rz.prototype.parseMedia;rz.prototype.setManifestType=rz.prototype.setManifestType;rz.prototype.setSequenceMode=rz.prototype.setSequenceMode;rz.prototype.parseInit=rz.prototype.parseInit;
|
|
1170
1171
|
var wz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;sd["text/vtt"]=function(){return new rz};sd['text/vtt; codecs="vtt"']=function(){return new rz};sd['text/vtt; codecs="wvtt"']=function(){return new rz};function Bz(){this.g=null}Bz.prototype.parseInit=function(a){var b=this,c=!1;(new Wf).box("moov",ag).box("trak",ag).box("mdia",ag).S("mdhd",function(d){d=$h(d.reader,d.version);b.g=d.timescale}).box("minf",ag).box("stbl",ag).S("stsd",cg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};Bz.prototype.setSequenceMode=function(){};Bz.prototype.setManifestType=function(){};
|
|
1171
|
-
Bz.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Wf).box("moof",ag).box("traf",ag).S("tfdt",function(A){g=!0;c=Zh(A.reader,A.version).baseMediaDecodeTime}).S("tfhd",function(A){l=Yh(A.reader,A.flags).
|
|
1172
|
-
q.value;var r=q.
|
|
1172
|
+
Bz.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Wf).box("moof",ag).box("traf",ag).S("tfdt",function(A){g=!0;c=Zh(A.reader,A.version).baseMediaDecodeTime}).S("tfhd",function(A){l=Yh(A.reader,A.flags).Fg}).S("trun",function(A){h=!0;d=bi(A.reader,A.version,A.flags).$g}).box("mdat",fg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);a=c;for(var m=new Tf(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=
|
|
1173
|
+
q.value;var r=q.Yf||l,u=q.De?c+q.De:a;a=u+(r||0);var v=0;do{var y=m.O();v+=y;var z=m.O(),x=null;"vttc"==$f(z)?8<y&&(x=m.Pb(y-8)):m.skip(y-8);r&&x&&(y=Cz(x,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(y))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(Ad)};function Cz(a,b,c){var d,e,f;(new Wf).box("payl",fg(function(g){d=Mf(g)})).box("iden",fg(function(g){e=Mf(g)})).box("sttg",fg(function(g){f=Mf(g)})).parse(a);return d?Dz(d,e,f,b,c):null}
|
|
1173
1174
|
function Dz(a,b,c,d,e){d=new Ec(d,e,"");vz(a,d,new Map);b&&(d.id=b);if(c)for(a=new Js(c),b=Ms(a);b;)uz(d,b,[]),Ks(a),b=Ms(a);return d}L("shaka.text.Mp4VttParser",Bz);Bz.prototype.parseMedia=Bz.prototype.parseMedia;Bz.prototype.setManifestType=Bz.prototype.setManifestType;Bz.prototype.setSequenceMode=Bz.prototype.setSequenceMode;Bz.prototype.parseInit=Bz.prototype.parseInit;sd['application/mp4; codecs="wvtt"']=function(){return new Bz};function Ez(){}Ez.prototype.parseInit=function(){};Ez.prototype.setSequenceMode=function(){};Ez.prototype.setManifestType=function(){};Ez.prototype.parseMedia=function(a){var b=Mf(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Js(c[0]),e=Fz(d),f=Ls(d,/,/g);d=Fz(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Ec(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1174
1175
|
function Fz(a){a=Ls(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)}L("shaka.text.SbvTextParser",Ez);Ez.prototype.parseMedia=Ez.prototype.parseMedia;Ez.prototype.setManifestType=Ez.prototype.setManifestType;Ez.prototype.setSequenceMode=Ez.prototype.setSequenceMode;Ez.prototype.parseInit=Ez.prototype.parseInit;sd["text/x-subviewer"]=function(){return new Ez};function Gz(){this.g=new rz}Gz.prototype.parseInit=function(){};Gz.prototype.setSequenceMode=function(){};Gz.prototype.setManifestType=function(){};Gz.prototype.parseMedia=function(a,b,c){a=Mf(a);a=Hz(a);a=qc(Qf(a));return this.g.parseMedia(a,b,c)};
|
|
1175
1176
|
function Hz(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}L("shaka.text.SrtTextParser",Gz);Gz.srt2webvtt=Hz;Gz.prototype.parseMedia=Gz.prototype.parseMedia;
|
|
@@ -1197,18 +1198,18 @@ Zz.prototype.getOriginalMimeType=Zz.prototype.getOriginalMimeType;Zz.prototype.c
|
|
|
1197
1198
|
(k=Q(c),l=Q(c),m=Q(c),n=Q(c));e=d=1;if(S(c)&&S(c)){var q=ni(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<q&&16>=q?(d=r[q-1],e=u[q-1]):255===q&&(d=ji(c,16),e=ji(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,w(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,w(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
|
|
1198
1199
|
225].concat(k,[1],b));return{height:c,width:f,Ba:a,Ha:d,Ja:e}}
|
|
1199
1200
|
function bA(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=pi(new gi(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
|
|
1200
|
-
{data:ng.apply(gg,w(c)),xd:b}:null}var aA=[100,110,122,244,44,83,86,118,128,138,139,134];function cA(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=dA(b.fullData);a=eA(c.fullData);var f=fA(d.fullData);b=gA(b.fullData,c.fullData,d.fullData,{
|
|
1201
|
-
Ba:b,Ha:a.
|
|
1201
|
+
{data:ng.apply(gg,w(c)),xd:b}:null}var aA=[100,110,122,244,44,83,86,118,128,138,139,134];function cA(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=dA(b.fullData);a=eA(c.fullData);var f=fA(d.fullData);b=gA(b.fullData,c.fullData,d.fullData,{Of:e.Of,lg:e.lg,vf:a.vf,wf:a.wf,nf:a.nf,uf:a.uf,pf:a.pf,qf:a.qf,rf:a.rf,tf:a.tf,gf:a.gf,hf:a.hf,jf:a.jf,kf:a.kf,lf:a.lf,mf:a.mf,bf:a.bf,ue:a.ue,$e:a.$e,Ye:a.Ye,Xe:a.Xe,Rf:f.Rf});return{height:a.height,width:a.width,
|
|
1202
|
+
Ba:b,Ha:a.aj,Ja:a.$i}}function dA(a){var b=new gi(a,!0);ni(b);ni(b);ji(b,4);ji(b,2);ji(b,6);a=ji(b,3);b=S(b);return{Of:a+1,lg:b}}
|
|
1202
1203
|
function eA(a){a=new gi(a,!0);ni(a);ni(a);var b=0,c=0,d=0,e=0;ji(a,4);var f=ji(a,3);S(a);for(var g=ji(a,2),h=ji(a,1),k=ji(a,5),l=ni(a),m=ni(a),n=ni(a),q=ni(a),r=ni(a),u=ni(a),v=ni(a),y=ni(a),z=ni(a),x=ni(a),A=ni(a),B=[],C=[],E=0;E<f;E++)B.push(S(a)),C.push(S(a));if(0<f)for(E=f;8>E;E++)ji(a,2);for(E=0;E<f;E++)B[E]&&ji(a,88),C[E]&&ni(a);Q(a);B=Q(a);3==B&&ji(a,1);C=Q(a);E=Q(a);S(a)&&(b+=Q(a),c+=Q(a),d+=Q(a),e+=Q(a));var H=Q(a),G=Q(a),I=Q(a);if(S(a))for(var J=0;J<=f;J++)Q(a),Q(a),Q(a);else Q(a),Q(a),
|
|
1203
1204
|
Q(a);Q(a);Q(a);Q(a);Q(a);Q(a);Q(a);if(S(a)&&S(a))for(J=0;4>J;J++)for(var M=0;M<(3===J?2:6);M++)if(S(a)){var N=Math.min(64,1<<4+(J<<1));1<J&&mi(a);for(var R=0;R<N;R++)mi(a)}else Q(a);S(a);S(a);S(a)&&(ni(a),Q(a),Q(a),S(a));J=Q(a);for(N=M=0;N<J;N++)if(R=!1,0!==N&&(R=S(a)),R){N===J&&Q(a);S(a);Q(a);for(var T=R=0;T<=M;T++){var fa=S(a),Z=!1;fa||(Z=S(a));(fa||Z)&&R++}M=R}else{T=Q(a);R=Q(a);M=T+R;for(fa=0;fa<T;fa++)Q(a),S(a);for(T=0;T<R;T++)Q(a),S(a)}if(S(a))for(J=Q(a),M=0;M<J;M++){for(N=0;N<I+4;N++)ji(a,
|
|
1204
1205
|
1);ji(a,1)}J=I=1;M=0;S(a);S(a);if(S(a)){S(a)&&(N=ni(a),R=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],T=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<N&&16>=N?(I=R[N-1],J=T[N-1]):255===N&&(I=ji(a,16),J=ji(a,16)));S(a)&&S(a);S(a)&&(ji(a,3),S(a),S(a)&&(ni(a),ni(a),ni(a)));S(a)&&(Q(a),Q(a));S(a);S(a);S(a);if(N=S(a))Q(a),Q(a),Q(a),Q(a);if(S(a)&&(ji(a,32),ji(a,32),S(a)&&Q(a),S(a))){T=!1;N=S(a);R=S(a);if(N||R){if(T=S(a))ni(a),ji(a,5),S(a),ji(a,5);ji(a,4);ji(a,4);T&&ji(a,4);ji(a,5);ji(a,5);ji(a,5)}for(fa=
|
|
1205
|
-
0;fa<=f;fa++){var ha=!0;Z=1;S(a)||(ha=S(a));var Ha=!1;ha?Q(a):Ha=S(a);Ha||(Z=Q(a)+1);if(N){for(ha=0;ha<Z;ha++)Q(a),Q(a),T&&(Q(a),Q(a));S(a)}if(R){for(ha=0;ha<Z;ha++)Q(a),Q(a),T&&(Q(a),Q(a));S(a)}}}S(a)&&(S(a),S(a),S(a),M=Q(a),Q(a),Q(a),Q(a),Q(a))}return{nf:A,vf:g,wf:h,uf:k,pf:l,qf:m,rf:n,tf:q,gf:r,hf:u,jf:v,kf:y,lf:z,mf:x,ue:M,bf:0,$e:B,Ye:H,Xe:G,width:C-(b+c)*(1===B||2===B?2:1),height:E-(d+e)*(1===B?2:1),
|
|
1206
|
-
function fA(a){var b=new gi(a,!0);ni(b);ni(b);Q(b);Q(b);S(b);S(b);ji(b,3);S(b);S(b);Q(b);Q(b);mi(b);S(b);S(b);S(b)&&Q(b);mi(b);mi(b);S(b);S(b);S(b);S(b);a=S(b);b=S(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{
|
|
1207
|
-
function gA(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.vf&3)<<6|(d.wf?1:0)<<5|d.uf&31;e[2]=d.pf;e[3]=d.qf;e[4]=d.rf;e[5]=d.tf;e[6]=d.gf;e[7]=d.hf;e[8]=d.jf;e[9]=d.kf;e[10]=d.lf;e[11]=d.mf;e[12]=d.nf;e[13]=240|(d.ue&3840)>>8;e[14]=d.ue&255;e[15]=252|d.
|
|
1208
|
-
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function hA(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*iA[14*(3===c?3-d:3===d?3:4)+e-1];f=jA[3*(3===c?0:2===c?1:2)+f];c=kA[c][d];var h=lA[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,X:k
|
|
1206
|
+
0;fa<=f;fa++){var ha=!0;Z=1;S(a)||(ha=S(a));var Ha=!1;ha?Q(a):Ha=S(a);Ha||(Z=Q(a)+1);if(N){for(ha=0;ha<Z;ha++)Q(a),Q(a),T&&(Q(a),Q(a));S(a)}if(R){for(ha=0;ha<Z;ha++)Q(a),Q(a),T&&(Q(a),Q(a));S(a)}}}S(a)&&(S(a),S(a),S(a),M=Q(a),Q(a),Q(a),Q(a),Q(a))}return{nf:A,vf:g,wf:h,uf:k,pf:l,qf:m,rf:n,tf:q,gf:r,hf:u,jf:v,kf:y,lf:z,mf:x,ue:M,bf:0,$e:B,Ye:H,Xe:G,width:C-(b+c)*(1===B||2===B?2:1),height:E-(d+e)*(1===B?2:1),aj:I,$i:J}}
|
|
1207
|
+
function fA(a){var b=new gi(a,!0);ni(b);ni(b);Q(b);Q(b);S(b);S(b);ji(b,3);S(b);S(b);Q(b);Q(b);mi(b);S(b);S(b);S(b)&&Q(b);mi(b);mi(b);S(b);S(b);S(b);S(b);a=S(b);b=S(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Rf:c}}
|
|
1208
|
+
function gA(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.vf&3)<<6|(d.wf?1:0)<<5|d.uf&31;e[2]=d.pf;e[3]=d.qf;e[4]=d.rf;e[5]=d.tf;e[6]=d.gf;e[7]=d.hf;e[8]=d.jf;e[9]=d.kf;e[10]=d.lf;e[11]=d.mf;e[12]=d.nf;e[13]=240|(d.ue&3840)>>8;e[14]=d.ue&255;e[15]=252|d.Rf&3;e[16]=252|d.$e&3;e[17]=248|d.Ye&7;e[18]=248|d.Xe&7;e[19]=0;e[20]=0;e[21]=(d.bf&3)<<6|(d.Of&7)<<3|(d.lg?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1209
|
+
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function hA(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*iA[14*(3===c?3-d:3===d?3:4)+e-1];f=jA[3*(3===c?0:2===c?1:2)+f];c=kA[c][d];var h=lA[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,X:k,Zi:8*c*h}}return null}
|
|
1209
1210
|
function mA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function nA(a,b){if(b+1<a.length&&mA(a,b)){var c=hA(a,b),d=4;c&&c.X&&(d=c.X);b+=d;return b===a.length||b+1<a.length&&mA(a,b)}return!1}
|
|
1210
1211
|
var iA=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],jA=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],kA=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],lA=[0,1,1,4];function oA(a){this.i=a;this.h=0;this.g=new Map}p=oA.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?ic(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1211
|
-
p.transmux=function(a,b,c,d){c=qc(a);for(var e=Xh(c).length;e<c.length&&!nA(c,e);e++);var f;for(a=[];e<c.length;){var g=hA(c,e);if(!g)return Promise.reject(new P(2,3,3018));f||(f=g);e+g.X<=c.length&&a.push({data:c.subarray(e,e+g.X),size:g.X,duration:1152,ib:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,mb:0}});e+=g.X}if(!f)return Promise.reject(new P(2,3,3018));c=9E4*f
|
|
1212
|
+
p.transmux=function(a,b,c,d){c=qc(a);for(var e=Xh(c).length;e<c.length&&!nA(c,e);e++);var f;for(a=[];e<c.length;){var g=hA(c,e);if(!g)return Promise.reject(new P(2,3,3018));f||(f=g);e+g.X<=c.length&&a.push({data:c.subarray(e,e+g.X),size:g.X,duration:1152,ib:0,flags:{kb:0,$a:0,Za:0,Xa:0,Ya:2,mb:0}});e+=g.X}if(!f)return Promise.reject(new P(2,3,3018));c=9E4*f.Zi/f.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:f.sampleRate,duration:d,gb:[],
|
|
1212
1213
|
oa:new Uint8Array([]),Ba:new Uint8Array([]),Ha:0,Ja:0,data:{zb:this.h,baseMediaDecodeTime:c,cb:a},stream:b};f=new ku([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=su(f),this.g.set(b.id,d));b=Ju(f);this.h++;b=ng(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Mp3Transmuxer",oA);oA.prototype.transmux=oA.prototype.transmux;oA.prototype.getOriginalMimeType=oA.prototype.getOriginalMimeType;oA.prototype.convertCodecs=oA.prototype.convertCodecs;oA.prototype.isSupported=oA.prototype.isSupported;
|
|
1213
1214
|
oA.prototype.destroy=oA.prototype.destroy;$c("audio/mpeg",function(){return new oA("audio/mpeg")},fd);function pA(a){this.h=a;this.g=null}p=pA.prototype;p.destroy=function(){};p.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=pd(a).split(","),c=Eb("audio",b);b=Eb("video",b);return!c||b||"mp3"!=md(c)?!1:ic(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
|
|
1214
1215
|
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new qi;a=qc(a);a=this.g.parse(a);if("mp3"!=a.qd().audio||"audio"!=e)return Promise.reject(new P(2,3,3018));e=new Uint8Array([]);a=t(a.jc());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=hA(b,c))?(c+d.X<=b.length&&(e=ng(e,b.subarray(c,c+d.X))),c+=d.X):c++;return Promise.resolve(e)};L("shaka.transmuxer.MpegTsTransmuxer",pA);pA.prototype.transmux=pA.prototype.transmux;pA.prototype.getOriginalMimeType=pA.prototype.getOriginalMimeType;
|
|
@@ -1228,7 +1229,7 @@ p.transmux=function(a,b,c){if(!c)return Promise.resolve(qc(a));if(!b.mssPrivateD
|
|
|
1228
1229
|
1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=tA(u,"traf")+tA(h,"senc")+16);var y=qc(e.write());return Promise.resolve(y)}catch(z){return z instanceof P?Promise.reject(z):Promise.reject(new P(2,3,3022))}};function tA(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}L("shaka.transmuxer.MssTransmuxer",qA);qA.prototype.transmux=qA.prototype.transmux;qA.prototype.getOriginalMimeType=qA.prototype.getOriginalMimeType;
|
|
1229
1230
|
qA.prototype.convertCodecs=qA.prototype.convertCodecs;qA.prototype.isSupported=qA.prototype.isSupported;qA.prototype.destroy=qA.prototype.destroy;var sA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);$c("mss/audio/mp4",function(){return new qA("mss/audio/mp4")},fd);$c("mss/video/mp4",function(){return new qA("mss/video/mp4")},fd);function uA(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}p=uA.prototype;p.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1230
1231
|
p.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=pd(c).split(",");c=Eb("audio",d);d=Eb("video",d);if(c&&(c=md(c),!vA.includes(c))||d&&(c=md(d),!wA.includes(c)))return!1;if(b)return ic(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return ic(b)||ic(a)};
|
|
1231
|
-
p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=pd(b).replace("mp4a.40.34","mp3").split(",").map(this.
|
|
1232
|
+
p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=pd(b).replace("mp4a.40.34","mp3").split(",").map(this.Qh).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.Qh=function(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)}return a};p.getOriginalMimeType=function(){return this.l};
|
|
1232
1233
|
p.transmux=function(a,b,c,d,e){var f=qc(a);if("audio"==e&&!xi(f)){for(var g=Xh(f),h=g.length;h<f.length;h++)if(nA(f,h))return Promise.reject(new P(2,3,3018));for(h=g.length;h<f.length;h++)if(Sz(f,h))return this.h||(this.h=new Uz("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new P(2,3,3018))}this.j?this.j.clearData():this.j=new qi;g=this.j.parse(f);a=[];var k=g.qd();try{f=null;if("video"==e){switch(k.video){case "avc":var l=[],m=null,n=[],q=g.Hc();if(!q.length)throw new P(2,3,3023);
|
|
1233
1234
|
for(var r=0;r<q.length;r++){var u=q[r],v=u.nalus;n.push.apply(n,w(v));var y=bA(v);if(y){null==m&&(m=u.dts);var z=void 0;z=r+1<q.length?(q[r+1].dts||0)-(u.dts||0):1<q.length?(u.dts||0)-(q[r-1].dts||0):9E4*(c.endTime-c.startTime);l.push({data:y.data,size:y.data.byteLength,duration:z,ib:Math.round((u.pts||0)-(u.dts||0)),flags:{kb:0,$a:0,Za:0,Xa:0,Ya:y.xd?2:1,mb:y.xd?0:1}})}}var x=$z(n);if(!x||null==m)throw new P(2,3,3018);b.height=x.height;b.width=x.width;f={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&
|
|
1234
1235
|
0<b.drmInfos.length,timescale:9E4,duration:d,gb:[],oa:new Uint8Array([]),Ba:x.Ba,Ha:x.Ha,Ja:x.Ja,data:{zb:this.g,baseMediaDecodeTime:m,cb:l},stream:b};break;case "hvc":q=[];u=null;v=[];l=g.Hc();if(!l.length)throw new P(2,3,3023);for(y=0;y<l.length;y++){m=l[y];n=m.nalus;v.push.apply(v,w(n));x=!1;var A=[],B=!1;r=t(n);for(z=r.next();!z.done;z=r.next()){var C=z.value;switch(C.type){case 1:case 0:var E=B=!0;break;case 19:case 20:case 21:x=E=B=!0;break;case 32:E=!0;break;case 33:E=!0;break;case 34:E=!0;
|
|
@@ -1323,8 +1324,8 @@ function jB(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundin
|
|
|
1323
1324
|
iB.prototype.setRange=iB.prototype.setRange;function kB(a,b){iB.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.D=U("div");this.D.classList.add("shaka-ad-markers");this.container.insertBefore(this.D,this.container.childNodes[0]);this.H=this.controls.g;this.s=new Cd(function(){var d=c.getValue();c.player.R()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.I=new Cd(function(){lB(c)});this.K=!1;this.i=U("div");this.i.id="shaka-player-ui-thumbnail-container";
|
|
1324
1325
|
this.g=U("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.u=U("div");this.u.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.u);this.container.appendChild(this.i);this.j=this.l=null;this.J=!1;this.m=new Cd(function(){mB(c)});this.C=[];this.eventManager.o(this.localization,"locale-updated",function(){return nB(c)});this.eventManager.o(this.localization,"locale-changed",function(){return nB(c)});this.eventManager.o(this.adManager,"ad-started",
|
|
1325
1326
|
function(){oB(c)||WA(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){oB(c)&&WA(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.C=d.cuepoints;pB(c)});this.eventManager.o(this.player,"unloading",function(){c.C=[];pB(c);c.j&&(c.j.abort(),c.j=null);c.l=null;mB(c)});this.eventManager.o(this.bar,"mousemove",function(d){if(c.player.Zd().length){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;qB(c,d,Math.round(f+
|
|
1326
|
-
(parseFloat(c.bar.max)-f)/e.width*d))}else mB(c)});this.eventManager.o(this.container,"mouseleave",function(){c.m.stop();c.m.T(.25)});this.setValue(this.video.currentTime);this.update();nB(this);this.ad&&WA(this.container,!1)}pa(kB,iB);p=kB.prototype;p.release=function(){this.s&&(this.s.stop(),this.s=null,this.I.stop(),this.I=null);iB.prototype.release.call(this)};p.onChangeStart=function(){this.K=!this.video.paused;this.controls.
|
|
1327
|
-
p.onChange=function(){if(this.video.duration)if(this.update(),this.s.T(.125),this.player.Zd().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());qB(this,(d-a)/((b-a)/c.width),d)}else mB(this)};p.onChangeEnd=function(){this.s.Pa();this.controls.
|
|
1327
|
+
(parseFloat(c.bar.max)-f)/e.width*d))}else mB(c)});this.eventManager.o(this.container,"mouseleave",function(){c.m.stop();c.m.T(.25)});this.setValue(this.video.currentTime);this.update();nB(this);this.ad&&WA(this.container,!1)}pa(kB,iB);p=kB.prototype;p.release=function(){this.s&&(this.s.stop(),this.s=null,this.I.stop(),this.I=null);iB.prototype.release.call(this)};p.onChangeStart=function(){this.K=!this.video.paused;this.controls.ig(!0);this.video.pause();this.m.stop();this.J=!0};
|
|
1328
|
+
p.onChange=function(){if(this.video.duration)if(this.update(),this.s.T(.125),this.player.Zd().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());qB(this,(d-a)/((b-a)/c.width),d)}else mB(this)};p.onChangeEnd=function(){this.s.Pa();this.controls.ig(!1);this.K&&this.video.play();this.J&&(this.J=!1,this.m.stop(),this.m.T(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
1328
1329
|
p.update=function(){var a=this.H.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Fa(),g=f.end-f.start;this.setRange(f.start,f.end);oB(this)?(WA(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.H.showUnbufferedStart?
|
|
1329
1330
|
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):WA(this.container,!1)};
|
|
1330
1331
|
function lB(a){if(a.C.length){for(var b=a.player.Fa(),c=b.end-b.start,d=["to right"],e=[],f=a.H.seekBarColors.adBreaks,g=!1,h=t(a.C),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=t(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|
|
@@ -1338,21 +1339,21 @@ function rB(a){var b=a.player.Zd();if(!b.length)return null;for(var c={},d=t(["i
|
|
|
1338
1339
|
"mjpg"==f.codecs})||b[0]}function mB(a){a.i.style.visibility="hidden";a.u.textContent=""}function sB(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}L("shaka.ui.SeekBar",kB);function tB(){}tB.prototype.create=function(a,b){return new kB(a,b)};kB.Factory=tB;function Y(a,b,c,d){ab.call(this);var e=this;this.N=!0;this.g=d;this.C=new Do(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.ua=!0;this.u=this.C.ac();this.s=c;this.D=this.C.Fc();this.sa=a;this.j=b;this.Ua=this.D.Yd();this.l=this.m=null;this.V=!1;this.G=[];this.Vb=[];this.Fb=!1;this.Z=new Cd(function(){e.j.style.cursor="none";e.Fb=!1;uB(e)});this.aa=new Cd(function(){e.h.removeAttribute("shown");e.I.T(2)});this.I=new Cd(function(){for(var f=t(e.G),g=f.next();!g.done;g=f.next())WA(g.value,
|
|
1339
1340
|
!1)});this.Qa=new Cd(function(){e.pc()&&vB(e)});this.J=null;this.H=[];this.za=wB();this.i=new dc;this.configure(this.g);xB(this);this.ha=new Set;yB(this);this.Qa.xa(.125);this.i.o(this.za,"locale-changed",function(f){e.Ua.setLocale(f.locales[0])})}pa(Y,ab);p=Y.prototype;
|
|
1340
1341
|
p.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.s){b.F(2);break}return D(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.Z&&(a.Z.stop(),a.Z=null);a.aa&&(a.aa.stop(),a.aa=null);a.I&&(a.I.stop(),a.I=null);a.Qa&&(a.Qa.stop(),a.Qa=null);zB(a);a.h&&(a.j.removeChild(a.h),a.h=null);if(!a.C){b.F(4);break}return D(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.sa){b.F(6);break}return D(b,a.sa.destroy(),7);case 7:a.sa=
|
|
1341
|
-
null;case 6:a.D=null,a.s=null,a.u=null,a.za=null,a.ha.clear(),ab.prototype.release.call(a),F(b)}})};function zB(a){for(var b=t(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function AB(a,b){BB.set(a,b)}p.
|
|
1342
|
-
p.configure=function(a){this.g=a;this.C.
|
|
1342
|
+
null;case 6:a.D=null,a.s=null,a.u=null,a.za=null,a.ha.clear(),ab.prototype.release.call(a),F(b)}})};function zB(a){for(var b=t(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function AB(a,b){BB.set(a,b)}p.xh=function(a){this.ua=a;yB(this)};p.Fi=function(){uB(this)};
|
|
1343
|
+
p.configure=function(a){this.g=a;this.C.Ag(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Cb&&(this.Cb=null);this.Wa&&(this.Wa=null);this.h?($k(this.h),zB(this)):(CB(this),DB(this));this.j.classList.add("shaka-video-container");this.s.classList.add("shaka-video");EB(this);this.g.addBigPlayButton&&FB(this);this.g.customContextMenu&&(this.Wa=new eB(this.U,this),this.H.push(this.Wa));this.$||GB(this);this.Eb=U("div");this.Eb.classList.add("shaka-server-side-ad-container");
|
|
1343
1344
|
this.h.appendChild(this.Eb);HB(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,w(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));IB(this);this.Vb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));uB(this);a=t(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.o(b,"click",c);this.i.o(b,"dblclick",
|
|
1344
|
-
c)}};p.
|
|
1345
|
-
p.
|
|
1345
|
+
c)}};p.eg=function(a){(this.N=a)?(this.j.setAttribute("shaka-controls","true"),this.s.tabIndex=-1,this.s.controls=!1):this.j.removeAttribute("shaka-controls");uB(this)};p.dh=function(a){this.s.controls=a;this.s.tabIndex=a?0:-1;a&&this.eg(!1)};p.getAd=function(){return this.m};p.Kh=function(){return this.C};p.Yh=function(){return this.za};p.ni=function(){return this.j};p.ac=function(){return this.u};p.Xh=function(){return this.s};p.Fc=function(){return this.D};p.Wh=function(){return this.sa};
|
|
1346
|
+
p.Ph=function(){return this.h};p.ei=function(){return this.Eb};p.Mh=function(){return this.M};p.Nh=function(){return this.g};p.Ci=function(){return this.V};p.ig=function(a){this.V=a};p.ti=function(){return this.ua};p.Kg=function(){return this.l?this.l.getValue():this.u.currentTime};p.fh=function(a){this.J=a};p.Td=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};p.Ic=function(){this.I.Pa()};
|
|
1346
1347
|
p.ke=function(){return document.fullscreenEnabled||this.s.webkitSupportsFullscreen?!0:!1};p.Kc=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.s;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
1347
1348
|
function JB(a){var b,c,d;return K(function(e){switch(e.g){case 1:ta(e,2);if(!document.fullscreenEnabled){b=a.s;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.F(4);break}if(!document.pictureInPictureElement){e.F(5);break}return D(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,D(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.F(4);break}ta(e,9);return D(e,screen.orientation.lock("landscape"),11);case 11:va(e,
|
|
1348
|
-
4,2);break;case 9:wa(e,2);case 4:va(e,0);break;case 2:d=wa(e),a.dispatchEvent(new O("error",(new Map).set("detail",d))),F(e)}})}function KB(a){var b;return K(function(c){if(!document.fullscreenEnabled)return b=a.s,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.F(0);screen.orientation&&screen.orientation.unlock();return D(c,document.exitFullscreen(),0)})}p.
|
|
1349
|
+
4,2);break;case 9:wa(e,2);case 4:va(e,0);break;case 2:d=wa(e),a.dispatchEvent(new O("error",(new Map).set("detail",d))),F(e)}})}function KB(a){var b;return K(function(c){if(!document.fullscreenEnabled)return b=a.s,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.F(0);screen.orientation&&screen.orientation.unlock();return D(c,document.exitFullscreen(),0)})}p.ng=function(){var a=this;return K(function(b){return a.Kc()?D(b,KB(a),0):D(b,JB(a),0)})};
|
|
1349
1350
|
p.Ff=function(){return this.C.Aa()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.s.disablePictureInPicture:!1};p.le=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
|
|
1350
1351
|
p.Ie=function(){var a=this,b,c;return K(function(d){if(1==d.g)return ta(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?D(d,LB(a),5):document.pictureInPictureElement?D(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.s,D(d,b.requestPictureInPicture(),5));if(2!=d.g)return va(d,0);c=wa(d);a.dispatchEvent(new O("error",(new Map).set("detail",c)));F(d)})};
|
|
1351
1352
|
function LB(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.j;c=b.getBoundingClientRect();return D(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;MB(d);e=b.parentNode||document.body;f=a.j.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n width: 100% !important; max-height: 100%}");
|
|
1352
1353
|
d.document.head.append(g);d.document.body.append(b);a.i.ka(d,"pagehide",function(){f.replaceWith(b)});F(h)})}
|
|
1353
|
-
function MB(a){var b=[].concat(w(document.styleSheets)).map(function(d){try{return[].concat(w(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}p.
|
|
1354
|
-
p.
|
|
1355
|
-
function CB(a){a.h=U("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.o(a.h,"touchstart",function(b){a.u.duration&&(a.pc()?a.J=Date.now():(NB(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.o(a.h,"click",function(){OB(a)});a.i.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.ke()&&a.
|
|
1354
|
+
function MB(a){var b=[].concat(w(document.styleSheets)).map(function(d){try{return[].concat(w(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}p.jh=function(){WA(this.K,!0);WA(this.M,!0);this.h.setAttribute("ad-active","true")};
|
|
1355
|
+
p.Mg=function(){WA(this.K,!1);WA(this.M,!1);this.h.removeAttribute("ad-active")};function cB(a){a.N&&a.u.duration&&(a.D.ld(),a.u.paused&&!a.V?a.u.play():a.u.pause())}function bB(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
|
|
1356
|
+
function CB(a){a.h=U("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.o(a.h,"touchstart",function(b){a.u.duration&&(a.pc()?a.J=Date.now():(NB(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.o(a.h,"click",function(){OB(a)});a.i.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.ke()&&a.ng()})}
|
|
1356
1357
|
function FB(a){var b=U("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Cb=new dB(b,a);a.H.push(a.Cb)}function EB(a){var b=U("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function PB(a){a.K=U("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();WA(a.K,b);a.L.appendChild(a.K);b=new ZA(a.K,a);a.H.push(b);b=new YA(a.K,a);a.H.push(b)}
|
|
1357
1358
|
function GB(a){a.$=U("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=U("div");b.classList.add("shaka-spinner");a.$.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");b.setAttribute("fill",
|
|
1358
1359
|
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
|
|
@@ -1360,7 +1361,7 @@ function HB(a){a.L=U("div");a.L.classList.add("shaka-bottom-controls");a.L.class
|
|
|
1360
1361
|
(c=BB.get(c).create(a.U,a),a.H.push(c)):Sa("Unrecognized control panel element requested:",c)}function IB(a){if(a.g.addSeekBar)a.l=QB.create(a.L,a),a.H.push(a.l);else{a=t(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function DB(a){a.M=U("div");a.M.classList.add("shaka-client-side-ad-container");WA(a.M,!1);a.i.o(a.M,"click",function(){OB(a)});a.j.appendChild(a.M)}
|
|
1361
1362
|
function xB(a){a.i.o(a.D,"buffering",function(){a.N&&WA(a.$,a.D.wd())});a.N&&WA(a.$,a.D.wd());a.i.o(window,"keydown",function(b){RB(a,b)});a.i.o(window,"click",function(){return a.Ic()});a.i.o(a,"submenuopen",function(){a.Ic()});a.i.o(a.u,"play",function(){uB(a)});a.i.o(a.u,"pause",function(){uB(a)});a.i.o(a.j,"mousemove",function(b){NB(a,b)});a.i.o(a.j,"touchmove",function(b){NB(a,b)},{passive:!0});a.i.o(a.j,"touchend",function(b){NB(a,b)},{passive:!0});a.i.o(a.j,"mouseleave",function(){a.J||a.Z.Pa()});
|
|
1362
1363
|
a.i.o(a.C,"caststatuschanged",function(){yB(a)});a.i.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&NB(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),SB(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),
|
|
1363
|
-
SB(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),SB(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),SB(a,a.l.getValue()+f));break;case "Home":a.l&&SB(a,a.D.Fa().start);break;case "End":a.l&&SB(a,a.D.Fa().end);break;case " ":e&&TB(a)}}});a.i.o(a.j,"keyup",function(b){a.ha.delete(b.key)});a.i.o(a.Ua,"ad-started",function(b){a.m=b.ad;a.
|
|
1364
|
+
SB(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),SB(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),SB(a,a.l.getValue()+f));break;case "Home":a.l&&SB(a,a.D.Fa().start);break;case "End":a.l&&SB(a,a.D.Fa().end);break;case " ":e&&TB(a)}}});a.i.o(a.j,"keyup",function(b){a.ha.delete(b.key)});a.i.o(a.Ua,"ad-started",function(b){a.m=b.ad;a.jh()});a.i.o(a.Ua,"ad-stopped",function(){a.m=null;a.Mg()});screen.orientation&&a.i.o(screen.orientation,"change",
|
|
1364
1365
|
function(){return K(function(b){return D(b,UB(a),0)})})}function UB(a){return K(function(b){return a.u&&0!=a.u.readyState&&!a.C.Aa()&&a.g.enableFullscreenOnRotation&&a.ke()?screen.orientation.type.includes("landscape")&&!a.Kc()?D(b,JB(a),0):screen.orientation.type.includes("portrait")&&a.Kc()?D(b,KB(a),0):b.F(0):b.return()})}
|
|
1365
1366
|
function NB(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),uB(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.Fb=!0,a.I.stop(),a.pc()||(vB(a),uB(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.Z.T(3))}function VB(a){return window.matchMedia("hover: hover").matches?a.Vb.some(function(b){return b.matches(":hover")}):!1}
|
|
1366
1367
|
function uB(a){var b=a.m?a.m.isPaused():!1,c=a.u.paused&&!a.V,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.Fb||d||VB(a)?(vB(a),a.h.setAttribute("shown","true"),a.aa.stop()):a.aa.T(a.g.fadeDelay)}function OB(a){a.N&&(a.Td()?a.I.Pa():a.g.singleClickForPlayAndPause&&TB(a))}function TB(a){a.m&&a.m.isLinear()?bB(a):cB(a)}
|
|
@@ -1426,19 +1427,19 @@ a.wa("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1426
1427
|
["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.wa("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
|
|
1427
1428
|
["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
|
|
1428
1429
|
["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],
|
|
1429
|
-
["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.
|
|
1430
|
-
Y.prototype.togglePiP=Y.prototype.Ie;Y.prototype.isPiPEnabled=Y.prototype.le;Y.prototype.isPiPAllowed=Y.prototype.Ff;Y.prototype.toggleFullScreen=Y.prototype.
|
|
1431
|
-
Y.prototype.setSeeking=Y.prototype.
|
|
1432
|
-
Y.prototype.getCastProxy=Y.prototype.
|
|
1433
|
-
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);YB(this);this.eventManager.o(this.localization,"locale-updated",function(){ZB(c)});this.eventManager.o(this.localization,"locale-changed",function(){ZB(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&WA(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){WA(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){WA(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.
|
|
1430
|
+
["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.zg(navigator.languages||[]);return a}L("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.pc;Y.prototype.hideAdUI=Y.prototype.Mg;Y.prototype.showAdUI=Y.prototype.jh;
|
|
1431
|
+
Y.prototype.togglePiP=Y.prototype.Ie;Y.prototype.isPiPEnabled=Y.prototype.le;Y.prototype.isPiPAllowed=Y.prototype.Ff;Y.prototype.toggleFullScreen=Y.prototype.ng;Y.prototype.isFullScreenEnabled=Y.prototype.Kc;Y.prototype.isFullScreenSupported=Y.prototype.ke;Y.prototype.hideSettingsMenus=Y.prototype.Ic;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Td;Y.prototype.setLastTouchEventTime=Y.prototype.fh;Y.prototype.getDisplayTime=Y.prototype.Kg;Y.prototype.isCastAllowed=Y.prototype.ti;
|
|
1432
|
+
Y.prototype.setSeeking=Y.prototype.ig;Y.prototype.isSeeking=Y.prototype.Ci;Y.prototype.getConfig=Y.prototype.Nh;Y.prototype.getClientSideAdContainer=Y.prototype.Mh;Y.prototype.getServerSideAdContainer=Y.prototype.ei;Y.prototype.getControlsContainer=Y.prototype.Ph;Y.prototype.getLocalPlayer=Y.prototype.Wh;Y.prototype.getPlayer=Y.prototype.Fc;Y.prototype.getLocalVideo=Y.prototype.Xh;Y.prototype.getVideo=Y.prototype.ac;Y.prototype.getVideoContainer=Y.prototype.ni;Y.prototype.getLocalization=Y.prototype.Yh;
|
|
1433
|
+
Y.prototype.getCastProxy=Y.prototype.Kh;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.dh;Y.prototype.setEnabledShakaControls=Y.prototype.eg;Y.prototype.configure=Y.prototype.configure;Y.prototype.loadComplete=Y.prototype.Fi;Y.prototype.allowCast=Y.prototype.xh;Y.registerSeekBar=function(a){QB=a};Y.registerElement=AB;Y.prototype.destroy=Y.prototype.destroy;var BB=new Map,QB=new tB;function XB(a,b){RA.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=Zk();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=U("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
|
|
1434
|
+
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);YB(this);this.eventManager.o(this.localization,"locale-updated",function(){ZB(c)});this.eventManager.o(this.localization,"locale-changed",function(){ZB(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&WA(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){WA(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){WA(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.fh(Date.now());
|
|
1434
1435
|
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){$B(c)});ZB(this);this.ad&&this.ad.isLinear()&&WA(this.g,!1)}pa(XB,RA);XB.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];RA.prototype.release.call(this)};function aC(a,b){bC.set(a,b)}
|
|
1435
1436
|
function YB(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,bC.get(c)?(c=bC.get(c),a.i.push(c.create(a.h,a.controls))):Sa("Unrecognized overflow menu element requested:",c)}function $B(a){if(a.controls.Td())a.controls.Ic();else{WA(a.h,!0);uB(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};db(a.h.childNodes,b)&&eb(a.h.childNodes,b)[0].focus()}}function ZB(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1436
1437
|
L("shaka.ui.OverflowMenu",XB);XB.registerElement=aC;function cC(){}cC.prototype.create=function(a,b){return new XB(a,b)};AB("overflow_menu",new cC);var bC=new Map;function dC(a,b){RA.call(this,a,b);var c=this;this.g=Zk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=U("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");a.appendChild(this.j);
|
|
1437
1438
|
this.i=U("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);eC(this);fC(this);this.eventManager.o(this.localization,"locale-updated",function(){eC(c)});this.eventManager.o(this.localization,"locale-changed",function(){eC(c)});this.eventManager.o(this.g,"click",function(){c.controls.ac().webkitShowPlaybackTargetPicker()});a=this.controls.ac();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1438
1439
|
c.player.ae()==an;WA(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){fC(c)})}pa(dC,RA);function fC(a){var b=a.controls.ac();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function eC(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}L("shaka.ui.AirPlayButton",dC);function gC(){}gC.prototype.create=function(a,b){return new dC(a,b)};aC("airplay",new gC);
|
|
1439
|
-
AB("airplay",new gC);function hC(a,b,c){this.i=a;this.j=b;this.h=iC(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Ef()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.
|
|
1440
|
-
p.Ef=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Pd()&&1<navigator.maxTouchPoints};p.getConfiguration=function(){var a=iC(this);Cl(a,this.h,iC(this),{},"");return a};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Dl(a,b));Cl(this.h,a,iC(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};p.
|
|
1441
|
-
p.
|
|
1440
|
+
AB("airplay",new gC);function hC(a,b,c){this.i=a;this.j=b;this.h=iC(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Ef()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.jg(b);b.ui=this;c.ui=this}p=hC.prototype;p.destroy=function(){var a=this;return K(function(b){if(1==b.g)return a.g?D(b,a.g.destroy(),2):b.F(2);if(4!=b.g)return a.g=null,a.i?D(b,a.i.destroy(),4):b.F(4);a.i=null;F(b)})};
|
|
1441
|
+
p.Ef=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Pd()&&1<navigator.maxTouchPoints};p.getConfiguration=function(){var a=iC(this);Cl(a,this.h,iC(this),{},"");return a};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Dl(a,b));Cl(this.h,a,iC(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};p.Oh=function(){return this.g};
|
|
1442
|
+
p.hj=function(a){this.g.eg(a)};
|
|
1442
1443
|
function iC(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
|
|
1443
1444
|
"picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},
|
|
1444
1445
|
trackLabelFormat:jC,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0};"remote"in HTMLMediaElement.prototype?b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");
|
|
@@ -1446,8 +1447,8 @@ a.Ef()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.fil
|
|
|
1446
1447
|
function kC(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,y,z,x,A,B;return K(function(C){switch(C.g){case 1:Zw();if(!gm())return lC("shaka-ui-load-failed",mC),C.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){C.F(2);break}if(b.length&&!a.length){d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
|
|
1447
1448
|
h.replaceChild(g,f);g.appendChild(f);k=null;l=t(c);for(m=l.next();!m.done;m=l.next())if(n=m.value,n.parentElement==g){k=n;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));nC(g,f,k)}C.F(2);break}q=t(a);r=q.next();case 4:if(r.done){C.F(2);break}u=r.value;if(u.ui){C.F(5);break}v=null;y=t(b);for(e=y.next();!e.done;e=y.next())if(z=e.value,z.parentElement==u){v=z;break}v||(v=document.createElement("video"),v.setAttribute("playsinline",""),u.appendChild(v));
|
|
1448
1449
|
x=null;A=t(c);for(m=A.next();!m.done;m=A.next())if(B=m.value,B.parentElement==u){x=B;break}x||(x=document.createElement("canvas"),x.classList.add("shaka-canvas-container"),u.appendChild(x));ta(C,7);return D(C,nC(u,v,x),9);case 9:va(C,5);break;case 7:return wa(C),lC("shaka-ui-load-failed",oC),C.return();case 5:r=q.next();C.F(4);break;case 2:lC("shaka-ui-loaded"),F(C)}})}function lC(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
1449
|
-
function nC(a,b,c){var d,e,f,g,h,k,l,m,n;return K(function(q){switch(q.g){case 1:d=new V;e=new hC(d,a,b);d.
|
|
1450
|
-
e.g.
|
|
1450
|
+
function nC(a,b,c){var d,e,f,g,h,k,l,m,n;return K(function(q){switch(q.g){case 1:d=new V;e=new hC(d,a,b);d.wg(c);f="";g=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(f=a.dataset.shakaPlayerCastReceiverId,g="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(f=b.dataset.shakaPlayerCastReceiverId,g="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);f.length&&e.configure({castReceiverAppId:f,castAndroidReceiverCompatible:g});b.controls&&
|
|
1451
|
+
e.g.dh(!0);if(h=b.getAttribute("src"))k=document.createElement("source"),k.setAttribute("src",h),b.appendChild(k),b.removeAttribute("src");l=t(b.querySelectorAll("source"));m=l.next();case 2:if(m.done){q.F(4);break}n=m.value;ta(q,5);return D(q,e.g.Fc().load(n.getAttribute("src")),7);case 7:q.F(4);break;case 5:wa(q);case 3:m=l.next();q.F(2);break;case 4:return D(q,d.zc(b),0)}})}L("shaka.ui.Overlay",hC);hC.prototype.setEnabled=hC.prototype.hj;hC.prototype.getControls=hC.prototype.Oh;
|
|
1451
1452
|
hC.prototype.configure=hC.prototype.configure;hC.prototype.getConfiguration=hC.prototype.getConfiguration;hC.prototype.isMobile=hC.prototype.Ef;hC.prototype.destroy=hC.prototype.destroy;var jC=0;hC.TrackLabelFormat={LANGUAGE:jC,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var mC=0,oC=1;hC.FailReasonCode={NO_BROWSER_SUPPORT:mC,PLAYER_FAILED_TO_LOAD:oC};"complete"==document.readyState?K(function(a){if(1==a.g)return D(a,Promise.resolve(),2);kC();F(a)}):window.addEventListener("load",kC);function pC(a,b,c,d,e,f,g,h){function k(H){var G="";5<=H&&(G=" "+f.resolve("SURROUND"));return G}function l(H,G,I,J){H=[H,G];h&&null!=J&&H.push(J);I&&3==g&&H.push(I);return H.join(": ")}function m(H){return"variant"==H.type?H.audioRoles?H.audioRoles.join(", "):void 0:H.roles.join(", ")}var n=a.find(function(H){return 1==H.active}),q=SA(b);$k(b);b.appendChild(q);q=new Map;for(var r=t(a),u=r.next();!u.done;u=r.next())u=u.value,q.has(u.language)||q.set(u.language,new Set),q.get(u.language).add(m(u));
|
|
1452
1453
|
q=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";r={};a=t(a);for(u=a.next();!u.done;r={sb:r.sb},u=a.next()){r.sb=u.value;u=r.sb.language;var v=r.sb.forced,y=f.resolve("SUBTITLE_FORCED"),z=m(r.sb),x=r.sb.label,A=r.sb.channelsCount,B=l(u,z,x,A);if(!q.has(B)){q.add(B);var C=Zk();C.addEventListener("click",function(H){return function(){c(H.sb)}}(r));var E=U("span");C.appendChild(E);E.textContent=qC(u,f);switch(g){case jC:h&&(E.textContent+=k(A));v&&(E.textContent+=" ("+y+")");break;case 1:h&&
|
|
1453
1454
|
(E.textContent+=k(A));z?E.textContent=z:(Sa("Track #"+r.sb.id+" does not have a role, but the UI is configured to only show role."),E.textContent="?");v&&(E.textContent+=" ("+y+")");break;case 2:h&&(E.textContent+=k(A));z&&(E.textContent+=": "+z);v&&(E.textContent+=" ("+y+")");break;case 3:x?E.textContent=x:(Sa("Track #"+r.sb.id+" does not have a label, but the UI is configured to only show labels."),E.textContent="?")}d&&B==n&&(C.appendChild(VA()),E.classList.add("shaka-chosen-item"),C.ariaSelected=
|
|
@@ -1459,10 +1460,10 @@ function(){xC(c)});wC(this);xC(this)}pa(vC,rC);
|
|
|
1459
1460
|
function xC(a){var b=a.player.jb();pC(b,a.menu,function(c){c.channelsCount&&a.controls.g.showAudioChannelCountVariants?a.player.Ee(c.language,c.roles[0],c.channelsCount):a.player.Ee(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);UA(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
|
|
1460
1461
|
function wC(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}L("shaka.ui.AudioLanguageSelection",vC);function yC(){}yC.prototype.create=function(a,b){return new vC(a,b)};aC("language",new yC);AB("language",new yC);function zC(a,b){RA.call(this,a,b);var c=this;this.h=this.controls.C;this.g=Zk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=U("span");a.appendChild(this.l);this.j=U("span");this.j.classList.add("shaka-current-selection-span");
|
|
1461
1462
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);AC(this);BC(this);this.eventManager.o(this.localization,"locale-updated",function(){AC(c)});this.eventManager.o(this.localization,"locale-changed",function(){AC(c)});this.eventManager.o(this.g,"click",function(){CC(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){BC(c)})}pa(zC,RA);
|
|
1462
|
-
function CC(a){var b;K(function(c){if(1==c.g){if(a.h.Aa())return a.h.
|
|
1463
|
+
function CC(a){var b;K(function(c){if(1==c.g){if(a.h.Aa())return a.h.kh(),c.F(0);ta(c,3);a.g.disabled=!0;return D(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=wa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));F(c)})}function BC(a){var b=a.h.Ze()&&a.controls.ua,c=a.h.Aa();WA(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");DC(a)}
|
|
1463
1464
|
function DC(a){a.j.textContent=a.h.Aa()?a.h.Ce():a.localization.resolve("OFF")}function AC(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");DC(a)}L("shaka.ui.CastButton",zC);function EC(){}EC.prototype.create=function(a,b){return new zC(a,b)};aC("cast",new EC);AB("cast",new EC);function FC(a,b){RA.call(this,a,b);var c=this;this.g=Zk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);GC(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){GC(c)});this.eventManager.o(this.localization,"locale-changed",function(){GC(c)});
|
|
1464
1465
|
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Kb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Jd(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(FC,RA);function GC(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}L("shaka.ui.FastForwardButton",FC);function HC(){}HC.prototype.create=function(a,b){return new FC(a,b)};AB("fast_forward",new HC);function IC(a,b){RA.call(this,a,b);var c=this;this.h=this.controls.s;this.g=Zk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");JC(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);KC(this);this.eventManager.o(this.localization,"locale-updated",function(){KC(c)});this.eventManager.o(this.localization,"locale-changed",function(){KC(c)});this.eventManager.o(this.g,"click",function(){return K(function(d){return D(d,
|
|
1465
|
-
c.controls.
|
|
1466
|
+
c.controls.ng(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.Kc()?"fullscreen_exit":"fullscreen";KC(c)});this.eventManager.o(this.h,"loadedmetadata",function(){JC(c)});this.eventManager.o(this.h,"loadeddata",function(){JC(c)})}pa(IC,RA);function JC(a){a.controls.ke()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function KC(a){a.g.ariaLabel=a.localization.resolve(a.controls.Kc()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1466
1467
|
L("shaka.ui.FullscreenButton",IC);function LC(){}LC.prototype.create=function(a,b){return new IC(a,b)};AB("fullscreen",new LC);function MC(a,b){RA.call(this,a,b);var c=this;this.g=Zk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=U("span");this.l.classList.add("shaka-current-selection-span");
|
|
1467
1468
|
a.appendChild(this.l);this.g.appendChild(a);NC(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){NC(c)});this.eventManager.o(this.localization,"locale-changed",function(){NC(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Pa();c.h.xa(1)});this.m=this.video.loop;this.h=new Cd(function(){c.m!=c.video.loop&&(NC(c),c.m=c.video.loop)});this.h.xa(1)}pa(MC,RA);
|
|
1468
1469
|
MC.prototype.release=function(){this.h.stop();this.h=null;RA.prototype.release.call(this)};function NC(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}L("shaka.ui.LoopButton",MC);function OC(){}OC.prototype.create=function(a,b){return new MC(a,b)};aC("loop",new OC);AB("loop",new OC);gB("loop",new OC);function PC(a,b){RA.call(this,a,b);var c=this;this.g=Zk();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);QC(this);RC(this);this.eventManager.o(this.localization,"locale-updated",function(){QC(c)});this.eventManager.o(this.localization,"locale-changed",function(){QC(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
|
|
@@ -1475,7 +1476,7 @@ function UC(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var
|
|
|
1475
1476
|
function YC(){}YC.prototype.create=function(a,b){return new TC(a,b)};aC("picture_in_picture",new YC);AB("picture_in_picture",new YC);gB("picture_in_picture",new YC);function ZC(a,b){rC.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){$C(c)});this.eventManager.o(this.localization,"locale-changed",function(){$C(c)});this.eventManager.o(this.player,"loaded",function(){aD(c,c.player.Kb())});this.eventManager.o(this.player,"ratechange",function(){aD(c,
|
|
1476
1477
|
c.player.Kb())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));$C(this);bD(this);aD(this,this.player.Kb())}pa(ZC,rC);function $C(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
|
|
1477
1478
|
function aD(a,b){var c=TA(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(VA()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
1478
|
-
"x")}function bD(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={Yc:b.Yc},d=c.next()){b.Yc=d.value;d=Zk();var e=U("span");e.textContent=b.Yc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.Yc);a.video.defaultPlaybackRate=a.g.get(f.Yc)}}(b));a.menu.appendChild(d)}UA(a.menu)}L("shaka.ui.PlaybackRateSelection",ZC);function cD(){}cD.prototype.create=function(a,b){return new ZC(a,b)};aC("playback_rate",new cD);AB("playback_rate",new cD);function dD(a,b){RA.call(this,a,b);var c=this;this.g=Zk();this.g.classList.add("shaka-current-time");eD(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.R()&&(c.video.currentTime=c.player.Fa().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.V,e=c.controls.
|
|
1479
|
+
"x")}function bD(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={Yc:b.Yc},d=c.next()){b.Yc=d.value;d=Zk();var e=U("span");e.textContent=b.Yc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.Yc);a.video.defaultPlaybackRate=a.g.get(f.Yc)}}(b));a.menu.appendChild(d)}UA(a.menu)}L("shaka.ui.PlaybackRateSelection",ZC);function cD(){}cD.prototype.create=function(a,b){return new ZC(a,b)};aC("playback_rate",new cD);AB("playback_rate",new cD);function dD(a,b){RA.call(this,a,b);var c=this;this.g=Zk();this.g.classList.add("shaka-current-time");eD(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.R()&&(c.video.currentTime=c.player.Fa().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.V,e=c.controls.Kg(),f=c.player.Fa(),g=f.end-f.start;c.player.R()?(e=Math.max(0,Math.floor(f.end-e)),g=3600<=g,1<=e||d?(eD(c,"- "+XA(e,g)),c.g.disabled=!1):(eD(c,c.localization.resolve("LIVE")),
|
|
1479
1480
|
c.g.disabled=!0)):(d=3600<=g,e=XA(Math.max(0,e-f.start),d),g&&(e+=" / "+XA(g,d)),eD(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.R()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(dD,RA);function eD(a,b){b!=a.g.textContent&&(a.g.textContent=b)}L("shaka.ui.PresentationTimeTracker",dD);function fD(){}fD.prototype.create=function(a,b){return new dD(a,b)};AB("time_and_duration",new fD);function gD(a,b){RA.call(this,a,b);var c=this;this.g=Zk();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=U("i");this.i.classList.add("material-icons-round");a="cast";(b=Rd())&&13<=b&&(a="airplay");this.i.textContent=a;this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=U("span");a.appendChild(this.l);this.j=U("span");this.j.classList.add("shaka-current-selection-span");
|
|
1480
1481
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;hD(this);WA(this.g,!1);!this.video.remote||this.video.disableRemotePlayback?this.g.classList.add("shaka-hidden"):(this.eventManager.o(this.localization,"locale-updated",function(){hD(c)}),this.eventManager.o(this.localization,"locale-changed",function(){hD(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){iD(c)}),this.eventManager.o(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.o(this.video.remote,
|
|
1481
1482
|
"connect",function(){iD(c)}),this.eventManager.o(this.video.remote,"connecting",function(){iD(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){iD(c)}),this.eventManager.o(this.player,"loaded",function(){iD(c)}),iD(this))}pa(gD,RA);gD.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});RA.prototype.release.call(this)};
|
|
@@ -1502,7 +1503,7 @@ CD.prototype.create=function(a,b){return new zD(a,b)};aC("statistics",new CD);gB
|
|
|
1502
1503
|
"texttrackvisibility",function(){HD(c);GD(c)});this.eventManager.o(this.player,"textchanged",function(){GD(c)});this.eventManager.o(this.player,"trackschanged",function(){ID(c)});HD(this);FD(this);GD(this);ID(this)}pa(DD,rC);function ED(a){var b=Zk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(VA());a.g=U("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1503
1504
|
function HD(a){a.player.qc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
|
|
1504
1505
|
function GD(a){var b=a.player.$b();pC(b,a.menu,function(c){return JD(a,c)},a.player.qc(),a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=Zk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.He(!1);GD(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.qc()||(b.ariaSelected="true",b.appendChild(VA()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
|
|
1505
|
-
a.button.setAttribute("shaka-status",a.currentSelection.textContent);UA(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function JD(a,b){return K(function(c){a.player.
|
|
1506
|
+
a.button.setAttribute("shaka-status",a.currentSelection.textContent);UA(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function JD(a,b){return K(function(c){a.player.ag(b);return D(c,a.player.He(!0),0)})}
|
|
1506
1507
|
function FD(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}function ID(a){var b=0<a.player.$b().length;WA(a.button,b);GD(a)}L("shaka.ui.TextSelection",DD);function KD(){}KD.prototype.create=function(a,b){return new DD(a,b)};aC("captions",new KD);AB("captions",new KD);function LD(a,b){iB.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return MD(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return ND(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return ND(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return MD(c)});this.eventManager.o(this.localization,"locale-updated",function(){return OD(c)});
|
|
1507
1508
|
this.eventManager.o(this.localization,"locale-changed",function(){return OD(c)});MD(this);OD(this);if(this.ad)this.onChange()}pa(LD,iB);LD.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.muted=0==this.video.volume?!0:!1)};function MD(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);PD(a)}function ND(a){var b=a.ad.getVolume();a.setValue(100*b);PD(a)}
|
|
1508
1509
|
function PD(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function OD(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}L("shaka.ui.VolumeBar",LD);function QD(){}QD.prototype.create=function(a,b){return new LD(a,b)};AB("volume",new QD);}).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})();
|