shaka-player 4.2.13 → 4.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-and-test.yaml +11 -18
- package/.github/workflows/compute-incremental-coverage.py +3 -0
- package/.github/workflows/selenium-lab-tests.yaml +45 -10
- package/CHANGELOG.md +11 -0
- package/demo/common/assets.js +12 -12
- package/demo/main.js +5 -0
- package/dist/demo.compiled.debug.js +13 -13
- package/dist/demo.compiled.debug.map +2 -2
- package/dist/demo.compiled.js +13 -13
- package/dist/demo.compiled.map +2 -2
- package/dist/locales.js +33 -33
- package/dist/receiver.compiled.debug.js +8 -8
- package/dist/receiver.compiled.debug.map +1 -1
- package/dist/receiver.compiled.js +8 -8
- package/dist/receiver.compiled.map +1 -1
- package/dist/shaka-player.compiled.d.ts +2 -2
- package/dist/shaka-player.compiled.debug.d.ts +2 -2
- package/dist/shaka-player.compiled.debug.js +29 -26
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +76 -76
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.d.ts +2 -2
- package/dist/shaka-player.ui.debug.d.ts +2 -2
- package/dist/shaka-player.ui.debug.js +36 -33
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +65 -65
- package/dist/shaka-player.ui.map +2 -2
- package/externs/shaka/manifest.js +5 -1
- package/externs/shaka/offline.js +5 -1
- package/karma.conf.js +2 -0
- package/lib/ads/client_side_ad_manager.js +14 -2
- package/lib/dash/dash_parser.js +1 -0
- package/lib/hls/hls_parser.js +1 -0
- package/lib/media/media_source_engine.js +6 -5
- package/lib/media/streaming_engine.js +2 -2
- package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
- package/lib/offline/manifest_converter.js +1 -0
- package/lib/offline/storage.js +1 -0
- package/lib/player.js +4 -1
- package/lib/util/periods.js +2 -0
- package/lib/util/platform.js +8 -0
- package/package.json +2 -2
- package/test/media/adaptation_set_unit.js +1 -0
- package/test/media/media_source_engine_unit.js +1 -1
- package/test/offline/manifest_convert_unit.js +5 -0
- package/test/player_integration.js +4 -1
- package/test/test/util/manifest_generator.js +2 -0
- package/test/test/util/offline_utils.js +1 -0
- package/test/test/util/streaming_engine_util.js +3 -0
- package/test/test/util/ui_utils.js +5 -1
- package/ui/externs/ui.js +2 -2
- package/ui/seek_bar.js +7 -1
package/dist/shaka-player.ui.js
CHANGED
|
@@ -31,10 +31,10 @@ while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProp
|
|
|
31
31
|
ha("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ga(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
32
32
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(p){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ga(k,
|
|
33
33
|
g)&&Ga(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ga(k,g)&&Ga(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
34
|
-
ha("Map",function(a){function b(){var h={};return h.pb=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.pb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ga(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,
|
|
35
|
-
list:m,index:-1,
|
|
36
|
-
"t"!=m.value[1]||!l.next().done?!1:!0}catch(p){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.
|
|
37
|
-
h.
|
|
34
|
+
ha("Map",function(a){function b(){var h={};return h.pb=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.pb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ga(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,ya:p}}return{id:l,
|
|
35
|
+
list:m,index:-1,ya:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
|
|
36
|
+
"t"!=m.value[1]||!l.next().done?!1:!0}catch(p){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ya?l.ya.value=k:(l.ya={next:this.g,pb:this.g.pb,head:this.g,key:h,value:k},l.list.push(l.ya),this.g.pb.next=l.ya,this.g.pb=l.ya,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.ya&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ya.pb.next=h.ya.next,h.ya.next.pb=h.ya.pb,
|
|
37
|
+
h.ya.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.pb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ya};e.prototype.get=function(h){return(h=d(this,h).ya)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
|
|
38
38
|
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});function Ha(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ha("Array.prototype.keys",function(a){return a?a:function(){return Ha(this,function(b){return b})}});
|
|
39
39
|
ha("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
40
40
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
|
|
@@ -55,8 +55,8 @@ function L(a,b){a=a.split(".");var c=Pa;a[0]in c||"undefined"==typeof c.execScri
|
|
|
55
55
|
function N(a,b){if(b)if(b instanceof Map)for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
56
56
|
function Qa(a){var b=new N(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}N.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};N.prototype.stopImmediatePropagation=function(){this.g=!0};N.prototype.stopPropagation=function(){};L("shaka.util.FakeEvent",N);
|
|
57
57
|
var Ra={Mh:"abrstatuschanged",Nh:"adaptation",Oh:"buffering",Rh:"downloadfailed",Sh:"downloadheadersreceived",Th:"drmsessionupdate",$h:"emsg",Error:"error",ai:"expirationupdated",di:"gapjumped",ii:"loaded",ji:"loading",oi:"manifestparsed",pi:"mediaqualitychanged",Metadata:"metadata",wi:"onstatechange",xi:"onstateidle",Hi:"ratechange",Ni:"sessiondata",Oi:"stalldetected",Pi:"streaming",Qi:"textchanged",Ri:"texttrackvisibility",Si:"timelineregionadded",Ti:"timelineregionenter",Ui:"timelineregionexit",
|
|
58
|
-
Vi:"trackschanged",$i:"unloading",bj:"variantchanged"};function Sa(){}function Ta(){}function Ua(){}function Wa(a){var b=Fa.apply(1,arguments);Xa.has(a)||(Xa.add(a),Ua.apply(Sa,ja(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;window.console&&(Ua=function(){return console.warn.apply(console,ja(Fa.apply(0,arguments)))},Ta=function(){console.error.apply(console,ja(Fa.apply(0,arguments)))});function bb(){this.g={}}q=bb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function cb(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function db(){this.
|
|
59
|
-
db.prototype.release=function(){this.
|
|
58
|
+
Vi:"trackschanged",$i:"unloading",bj:"variantchanged"};function Sa(){}function Ta(){}function Ua(){}function Wa(a){var b=Fa.apply(1,arguments);Xa.has(a)||(Xa.add(a),Ua.apply(Sa,ja(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;window.console&&(Ua=function(){return console.warn.apply(console,ja(Fa.apply(0,arguments)))},Ta=function(){console.error.apply(console,ja(Fa.apply(0,arguments)))});function bb(){this.g={}}q=bb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function cb(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function db(){this.wa=new bb;this.wd=this}db.prototype.addEventListener=function(a,b){this.wa&&this.wa.push(a,b)};db.prototype.removeEventListener=function(a,b){this.wa&&this.wa.remove(a,b)};db.prototype.dispatchEvent=function(a){if(!this.wa)return!0;var b=this.wa.get(a.type)||[],c=this.wa.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.wd;a.currentTarget=this.wd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
59
|
+
db.prototype.release=function(){this.wa=null};function eb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function fb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function gb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function hb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
|
|
60
60
|
@license
|
|
61
61
|
Copyright 2008 The Closure Library Authors
|
|
62
62
|
SPDX-License-Identifier: Apache-2.0
|
|
@@ -96,8 +96,8 @@ q.nf=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a
|
|
|
96
96
|
q.ka=function(a,b,c){a=Kb(a);void 0===c&&(c=Vb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Vb||d.set(f,e)});this.h.set(a,d);Ub(this);this.dispatchEvent(new N("locale-updated"));return this};q.qh=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new N("unknown-localization",a));return""};
|
|
97
97
|
function Ub(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Yb:f.Yb},h=g.next()){f.Yb=h.value;e.add(f.Yb);e.add(Pb(f.Yb));h=hb(b.keys(),function(l){return function(m){return Ob(m,l.Yb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Pb(m)==l.Yb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
|
|
98
98
|
c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Wb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new N("missing-localizations",d)))}function Wb(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}L("shaka.ui.Localization",Tb);Tb.prototype.resolve=Tb.prototype.resolve;
|
|
99
|
-
Tb.prototype.resolveDictionary=Tb.prototype.qh;Tb.prototype.insert=Tb.prototype.ka;Tb.prototype.changeLocale=Tb.prototype.nf;Tb.prototype.release=Tb.prototype.release;var Vb=1;Tb.ConflictResolution={USE_OLD:0,USE_NEW:Vb};Tb.UNKNOWN_LOCALES="unknown-locales";Tb.UNKNOWN_LOCALIZATION="unknown-localization";Tb.MISSING_LOCALIZATIONS="missing-localizations";Tb.LOCALE_CHANGED="locale-changed";Tb.LOCALE_UPDATED="locale-updated";var Xb={
|
|
100
|
-
|
|
99
|
+
Tb.prototype.resolveDictionary=Tb.prototype.qh;Tb.prototype.insert=Tb.prototype.ka;Tb.prototype.changeLocale=Tb.prototype.nf;Tb.prototype.release=Tb.prototype.release;var Vb=1;Tb.ConflictResolution={USE_OLD:0,USE_NEW:Vb};Tb.UNKNOWN_LOCALES="unknown-locales";Tb.UNKNOWN_LOCALIZATION="unknown-localization";Tb.MISSING_LOCALIZATIONS="missing-localizations";Tb.LOCALE_CHANGED="locale-changed";Tb.LOCALE_UPDATED="locale-updated";var Xb={Ei:"REPLAY",ei:"LANGUAGE",Gh:"AD_DURATION",gi:"LOOP",Ii:"SEEK",Uh:"ENTER_LOOP_MODE",Ih:"AIRPLAY",aj:"VOLUME",Yf:"SUBTITLE_FORCED",Ji:"SKIP_AD",Ci:"PLAYBACK_RATE",Yi:"UNMUTE",Ki:"SKIP_TO_LIVE",ef:"LIVE",Kh:"AUTO_QUALITY",Mi:"STATISTICS",Fi:"RESOLUTION",Gi:"REWIND",ni:"MUTE",mi:"MULTIPLE_LANGUAGES",zi:"PAUSE",BACK:"BACK",Vh:"ENTER_PICTURE_IN_PICTURE",ri:"NOT_APPLICABLE",Di:"QUALITY",Zh:"EXIT_PICTURE_IN_PICTURE",si:"OFF",bi:"FAST_FORWARD",Bi:"PLAY",Xi:"UNDETERMINED_LANGUAGE",Hh:"AD_TIME",Ph:"CAPTIONS",
|
|
100
|
+
AD_PROGRESS:"AD_PROGRESS",ti:"ON",Ai:"PICTURE_IN_PICTURE",li:"MORE_SETTINGS",Zi:"UNRECOGNIZED_LANGUAGE",Qh:"CAST",Xh:"EXIT_FULL_SCREEN",Yh:"EXIT_LOOP_MODE",ci:"FULL_SCREEN"};function Yb(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Yb.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 Zb(a){return a.h/(1-Math.pow(a.g,a.i))};function $b(){this.h=new Yb(2);this.j=new Yb(5);this.g=0;this.i=128E3;this.l=16E3}$b.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)};$b.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)}};$b.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Zb(this.h),Zb(this.j))};function ac(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function bc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function cc(a,b,c){c||(c=ac);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Rd:d.Rd},e=a.next()){d.Rd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Rd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
101
101
|
function dc(a,b,c){c||(c=ac);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function ec(a,b,c){this.startTime=a;this.direction=fc;this.endTime=b;this.payload=c;this.region=new gc;this.position=null;this.positionAlign=ic;this.size=0;this.textAlign=jc;this.writingMode=kc;this.lineInterpretation=lc;this.line=null;this.lineHeight="";this.lineAlign=mc;this.displayAlign=nc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=oc;this.fontStyle=pc;this.linePadding=this.letterSpacing=
|
|
102
102
|
this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}ec.prototype.clone=function(){var a=new ec(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
103
103
|
function qc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!dc(a.nestedCues,b.nestedCues,qc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!dc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}L("shaka.text.Cue",ec);var ic="auto";
|
|
@@ -105,7 +105,7 @@ ec.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ic};v
|
|
|
105
105
|
ec.lineInterpretation={LINE_NUMBER:lc,PERCENTAGE:1};var mc="start",tc={CENTER:"center",START:mc,END:"end"};ec.lineAlign=tc;var uc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ec.defaultTextColor=uc;var wc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ec.defaultTextBackgroundColor=wc;var oc=400;ec.fontWeight={NORMAL:oc,BOLD:700};
|
|
106
106
|
var pc="normal",xc={NORMAL:pc,ITALIC:"italic",OBLIQUE:"oblique"};ec.fontStyle=xc;ec.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function gc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=yc;this.scroll=zc}L("shaka.text.CueRegion",gc);var yc=1;gc.units={PX:0,PERCENTAGE:yc,LINES:2};var zc="";gc.scrollMode={NONE:zc,UP:"up"};function Ac(){}function Bc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Cc(a)==Cc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Dc(a);b=Dc(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Cc(a){return a instanceof ArrayBuffer?a:a.buffer}function Ec(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
107
107
|
function Dc(a,b,c){c=void 0===c?Infinity:c;return Fc(a,void 0===b?0:b,c,Uint8Array)}function Gc(a,b,c){c=void 0===c?Infinity:c;return Fc(a,void 0===b?0:b,c,DataView)}function Fc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Cc(a),b,Math.min(b+Math.max(c,0),e)-b)}L("shaka.util.BufferUtils",Ac);Ac.toDataView=Gc;Ac.toUint8=Dc;Ac.toArrayBuffer=Ec;Ac.equal=Bc;function Hc(){}L("shaka.dependencies",Hc);Hc.has=function(a){return Ic.has(a)};Hc.add=function(a,b){if(!Jc[a])throw Error(a+" is not supported");Ic.set(a,function(){return b})};var Jc={muxjs:"muxjs"};Hc.Allowed=Jc;var Ic=new Map([["muxjs",function(){return window.muxjs}]]);function Kc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Kc.prototype.resolve=function(){};Kc.prototype.reject=function(){};function Lc(a){this.h=a;this.g=void 0}Lc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Mc(a){this.h=a;this.g=null}Mc.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Mc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.Aa=function(){this.stop();this.h();return this};P.prototype.S=function(a){var b=this;this.stop();this.g=(new Mc(function(){b.h()})).S(a);return this};P.prototype.na=function(a){var b=this;this.stop();this.g=(new Mc(function(){b.g.S(a);b.h()})).S(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};L("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.na;P.prototype.tickAfter=P.prototype.S;
|
|
108
|
-
P.prototype.tickNow=P.prototype.Aa;function Nc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Oc(a){return""!=Pc().canPlayType(a)}function Qc(){return Rc("Xbox One")}function Sc(){return Rc("Tizen")}function Vc(){return Rc("Web0S")&&Rc("Chrome/38.0.2125.122 Safari/537.36")}function Wc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Sc()&&!Rc("PC=EOS")&&!Rc("VirginMedia")&&!Xc()&&!Rc("AFT")}function Xc(){return Rc("PlayStation 4")}
|
|
108
|
+
P.prototype.tickNow=P.prototype.Aa;function Nc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Oc(a){return""!=Pc().canPlayType(a)}function Qc(){return Rc("Xbox One")}function Sc(){return Rc("Tizen")}function Vc(){return Rc("Web0S")&&Rc("Chrome/38.0.2125.122 Safari/537.36")}function Wc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Sc()&&!Rc("PC=EOS")&&!Rc("VirginMedia")&&!Rc("SOPOpenBrowser")&&!Xc()&&!Rc("AFT")}function Xc(){return Rc("PlayStation 4")}
|
|
109
109
|
function Yc(){if(!Wc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Rc(a){return(navigator.userAgent||"").includes(a)}function Pc(){if(Zc)return Zc;$c||($c=new P(function(){Zc=null}));(Zc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Zc=document.createElement("video"));$c.S(1);return Zc}var $c=null,Zc=null;function ad(){}
|
|
110
110
|
function bd(a){if(!a)return"";a=Dc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Xc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ta('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
111
111
|
(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}
|
|
@@ -180,8 +180,8 @@ if(!p)return w;var D=c.retryParameters.connectionTimeout;D&&(n=new P(function(){
|
|
|
180
180
|
c.uris[e],b));if(w instanceof O){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new N("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,tf(a,b,c,d,e,w,g)}throw w;})}
|
|
181
181
|
function uf(a,b,c){var d=cf(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Yd:e.Yd},f=a.next())e.Yd=f.value,d=d.oa(function(g){return function(){var h=c.response;h.data&&(h.data=Ec(h.data));return g.Yd(b,h)}}(e));return d.oa(function(){return c},function(g){var h=2;if(g instanceof O){if(7001==g.code)throw g;h=g.severity}throw new O(h,1,1007,g);})}L("shaka.net.NetworkingEngine",lf);lf.prototype.request=lf.prototype.request;lf.prototype.destroy=lf.prototype.destroy;lf.makeRequest=pf;
|
|
182
182
|
lf.defaultRetryParameters=function(){return Ye()};lf.prototype.clearAllResponseFilters=lf.prototype.hg;lf.prototype.unregisterResponseFilter=lf.prototype.Ch;lf.prototype.registerResponseFilter=lf.prototype.kh;lf.prototype.clearAllRequestFilters=lf.prototype.gg;lf.prototype.unregisterRequestFilter=lf.prototype.Bh;lf.prototype.registerRequestFilter=lf.prototype.jh;lf.unregisterScheme=function(a){delete of[a]};lf.registerScheme=mf;lf.prototype.setForceHTTPS=lf.prototype.Ke;function qf(){this.g=0}
|
|
183
|
-
lf.NumBytesRemainingClass=qf;function rf(a,b,c){$e.call(this,a,b);this.h=c}u(rf,$e);lf.PendingRequest=rf;var vf=1;lf.RequestType={MANIFEST:0,SEGMENT:vf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var nf=3;lf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:nf};var of={};function wf(a){this.g=!1;this.h=new Kc;this.i=a}wf.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 xf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function yf(){this.g=new bb}q=yf.prototype;q.release=function(){this.Sb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new zf(a,b,c,d),this.g.push(b,a))};q.
|
|
184
|
-
q.Sb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.sc();this.g.g={}}};L("shaka.util.EventManager",yf);yf.prototype.removeAll=yf.prototype.Sb;yf.prototype.unlisten=yf.prototype.sc;yf.prototype.listenOnce=yf.prototype.
|
|
183
|
+
lf.NumBytesRemainingClass=qf;function rf(a,b,c){$e.call(this,a,b);this.h=c}u(rf,$e);lf.PendingRequest=rf;var vf=1;lf.RequestType={MANIFEST:0,SEGMENT:vf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var nf=3;lf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:nf};var of={};function wf(a){this.g=!1;this.h=new Kc;this.i=a}wf.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 xf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function yf(){this.g=new bb}q=yf.prototype;q.release=function(){this.Sb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new zf(a,b,c,d),this.g.push(b,a))};q.va=function(a,b,c,d){function e(g){f.sc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.sc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.sc(),this.g.remove(b,e))}};
|
|
184
|
+
q.Sb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.sc();this.g.g={}}};L("shaka.util.EventManager",yf);yf.prototype.removeAll=yf.prototype.Sb;yf.prototype.unlisten=yf.prototype.sc;yf.prototype.listenOnce=yf.prototype.va;yf.prototype.listen=yf.prototype.o;yf.prototype.release=yf.prototype.release;function zf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Af(a,d);this.target.addEventListener(b,c,this.g)}
|
|
185
185
|
zf.prototype.sc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Af(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 Bf(a)?b:b.capture||!1}
|
|
186
186
|
function Bf(a){var b=Cf;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}Cf=b}return b||!1}var Cf=void 0;function Df(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Ef(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Ff(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Gf(a,b){this.W=Gc(a);this.h=b==Hf;this.g=0}q=Gf.prototype;q.Ea=function(){return this.g<this.W.byteLength};q.qa=function(){return this.g};q.Ag=function(){return this.W.byteLength};q.qb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw If();}};q.ze=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw If();}};q.R=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw If();}};
|
|
187
187
|
q.Jf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw If();}};q.qc=function(){try{if(this.h){var a=this.W.getUint32(this.g,!0);var b=this.W.getUint32(this.g+4,!0)}else b=this.W.getUint32(this.g,!1),a=this.W.getUint32(this.g+4,!1)}catch(c){throw If();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.W.byteLength)throw If();var b=Dc(this.W,this.g,a);this.g+=a;return b};
|
|
@@ -197,19 +197,19 @@ function bg(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
|
|
|
197
197
|
function eg(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
198
198
|
function fg(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function gg(a){a=Number(a);return 0===a%1?a:null}function hg(a){a=Number(a);return 0===a%1&&0<a?a:null}function ig(a){a=Number(a);return 0===a%1&&0<=a?a:null}function jg(a){a=Number(a);return isNaN(a)?null:a}function kg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
199
199
|
function lg(a,b){var c=new DOMParser,d=mg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function ng(a,b){try{var c=bd(a);return lg(c,b)}catch(d){return null}}
|
|
200
|
-
var mg=new Lc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function og(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.ea=this.aa=!1;this.J=0;this.g=null;this.B=new yf;this.i=new Map;this.F=[];this.s=new Kc;this.h=null;this.m=function(d){c.s.reject(d);a.onError(d)};this.ha=new Map;this.
|
|
200
|
+
var mg=new Lc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function og(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.ea=this.aa=!1;this.J=0;this.g=null;this.B=new yf;this.i=new Map;this.F=[];this.s=new Kc;this.h=null;this.m=function(d){c.s.reject(d);a.onError(d)};this.ha=new Map;this.wa=new Map;this.Z=new P(function(){return pg(c)});this.P=!1;this.N=[];this.T=!1;this.ba=(new P(function(){qg(c)})).na(b);this.s.catch(function(){});this.j=new wf(function(){return rg(c)});this.$=!1;this.K=this.H=null}q=og.prototype;
|
|
201
201
|
q.destroy=function(){return this.j.destroy()};function rg(a){return K(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.s.reject(),a.ba.stop(),a.ba=null,a.Z.stop(),a.Z=null,A(b,sg(a),2);case 2:if(!a.l){b.D(3);break}F(b,4);return A(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:I(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.C=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.$=!1,a.H=null,B(b)}})}q.configure=function(a){this.h=a};
|
|
202
202
|
function vg(a,b,c){a.ea=!0;a.F=[];a.P=c;return wg(a,b)}function xg(a,b,c){a.F=c;a.P=0<c.length;return wg(a,b)}
|
|
203
203
|
function yg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return zg(a,g,[])}
|
|
204
204
|
function wg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D;return K(function(z){if(1==z.g){if(c=Ag(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(C){return C.video&&C.video.drmInfos.length||C.audio&&C.audio.drmInfos.length?!0:!1});g||(h=Df(a.h.servers),Bg(b,h));k=new Set;l=r(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,p=Cg(m),n=r(p),t=n.next();!t.done;t=n.next())y=t.value,k.add(y);x=r(k);for(t=x.next();!t.done;t=
|
|
205
205
|
x.next())v=t.value,Dg(v,Df(a.h.servers),Df(a.h.advanced||{}),a.h.keySystemsMapping);return A(z,fe(b,a.P,a.$),2)}w=g||Object.keys(a.h.servers).length;if(!w)return a.aa=!0,z.return(Promise.resolve());D=zg(a,void 0,b);return z.return(g?D:D.catch(function(){}))})}
|
|
206
206
|
function Eg(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.H){c.D(2);break}return A(c,a.H,3);case 3:return xf(a.j),c.return();case 2:return F(c,4),a.H=a.l.setMediaKeys(a.C),A(c,a.H,6);case 6:va(c,5);break;case 4:b=I(c),a.m(new O(2,6,6003,b.message));case 5:xf(a.j),B(c)}})}function Fg(a,b){return K(function(c){if(1==c.g)return A(c,Eg(a),2);Gg(a,b.initDataType,Dc(b.initData));B(c)})}
|
|
207
|
-
q.Cc=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.C)return b.B.
|
|
207
|
+
q.Cc=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.C)return b.B.va(a,"encrypted",function(){b.m(new O(2,6,6010))}),c.return();b.l=a;b.B.va(b.l,"play",function(){for(var d=r(b.N),e=d.next();!e.done;e=d.next())Hg(b,e.value);b.T=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.B.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return sg(b)});b.K=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.K||"com.apple.fps"!==b.g.keySystem||
|
|
208
208
|
b.F.length?A(c,Eg(b),2):c.D(2)}Ig(b);b.K||b.F.length||b.h.parseInbandPsshEnabled||b.B.o(b.l,"encrypted",function(d){return Fg(b,d)});B(c)})};
|
|
209
209
|
function Jg(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.C||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=pf([a.g.serverCertificateUri],a.h.retryParameters);F(g,3);c=a.G.Pb.request(5,b);return A(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Dc(d.data);va(g,4);break;case 3:throw e=I(g),new O(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
210
210
|
F(g,6);return A(g,a.C.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=I(g),new O(2,6,6004,f.message);}})}function Kg(a,b){var c,d,e;return K(function(f){if(1==f.g)return A(f,Lg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.eb=new Kc,d.push(e.eb);d.push(c.remove());return A(f,Promise.all(d),3)}a.i.delete(c);B(f)})}
|
|
211
211
|
function Ig(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Gg(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())Lg(a,d.value);b.length||a.F.length||a.s.resolve();return a.s}function Gg(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Bc(c,e.value.initData)&&!Rc("Tizen 2"))return;0<a.i.size&&Mg(a)&&(a.s.resolve(),a.s=new Kc,a.s.catch(function(){}));Ng(a,b,c,a.g.sessionType)}}
|
|
212
|
-
function Og(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Pg(a){a=a.i.keys();a=eb(a,function(b){return b.sessionId});return Array.from(a)}q.Hc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.pd=function(){return Ef(this.
|
|
212
|
+
function Og(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Pg(a){a=a.i.keys();a=eb(a,function(b){return b.sessionId});return Array.from(a)}q.Hc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.pd=function(){return Ef(this.wa)};
|
|
213
213
|
function zg(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){switch(v.g){case 1:d=new Map;if(c.length){e=Qg(a,c,d);v.D(2);break}return A(v,Rg(a,b),3);case 3:e=v.h;case 2:f=e;if(!f)throw new O(2,6,6001);xf(a.j);F(v,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.I.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.I.add(t.contentType.toLowerCase());if(c.length){var w=
|
|
214
214
|
f.keySystem;var D=d.get(f.keySystem);var z=[],C=[],G=[],E=[],H=new Set;Sg(D,z,G,C,E,H);var J=a.P?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:C[0],initData:E,keyIds:H};D=r(D);for(z=D.next();!z.done;z=
|
|
215
215
|
D.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),z=[],C=[],G=[],E=[],H=new Set,Sg(w.drmInfos,z,G,C,E,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
|
|
@@ -229,7 +229,7 @@ Og(a.g.keySystem)&&Ug(g),h=Date.now(),F(v,2),l=a.G.Pb.request(2,g),A(v,l.promise
|
|
|
229
229
|
d&&(d.eb&&d.eb.resolve(),x=new P(function(){d.loaded=!0;Mg(a)&&a.s.resolve()}),x.S(Vg));B(v)}})}
|
|
230
230
|
function Ug(a){var b=cd(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=lg(b,"PlayReadyKeyMessage");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=kd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
231
231
|
function Tg(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Og(a.g.keySystem)&&16==g.byteLength&&(navigator.userAgent.match(/Edge?\//)||Xc())){h=Gc(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=md(g).slice(0,32);a.ha.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.eb&&(a.i.delete(b),
|
|
232
|
-
b.close().catch(function(){}));Mg(a)&&(a.s.resolve(),a.Z.S(Wg))}function pg(a){var b=a.ha,c=a.
|
|
232
|
+
b.close().catch(function(){}));Mg(a)&&(a.s.resolve(),a.Z.S(Wg))}function pg(a){var b=a.ha,c=a.wa;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new O(2,6,6014));a.G.Bd(Ef(c))}
|
|
233
233
|
function Xg(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,p,
|
|
234
234
|
n;return K(function(t){switch(t.g){case 1:F(t,2);if("org.w3.clearkey"===l&&Yc())throw Error("Unsupported keySystem");return A(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,Rc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),A(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:I(t),f.set(l,null),B(t)}})},h=a.map(function(l){return g(l)}),A(k,Promise.all(h),2)):k.return(Ef(f))})}
|
|
235
235
|
function Yg(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).S(Zg)}),F(c,2),A(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);I(c);B(c)})}
|
|
@@ -279,14 +279,14 @@ q.Kc=function(){return this.Va};q.Gc=function(){return this.Da};q.Qg=function(){
|
|
|
279
279
|
q.Re=function(a){null==this.g?Ta("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};L("shaka.media.SegmentReference",yi);yi.prototype.syncAgainst=yi.prototype.Re;yi.prototype.offset=yi.prototype.offset;yi.prototype.isPreload=yi.prototype.Wg;yi.prototype.markAsPreload=yi.prototype.Gf;yi.prototype.markAsUnavailable=yi.prototype.$g;yi.prototype.getStatus=yi.prototype.fc;yi.prototype.getTileDuration=yi.prototype.Pg;yi.prototype.getTilesLayout=yi.prototype.Qg;
|
|
280
280
|
yi.prototype.getEndByte=yi.prototype.Gc;yi.prototype.getStartByte=yi.prototype.Kc;yi.prototype.getEndTime=yi.prototype.yg;yi.prototype.getStartTime=yi.prototype.getStartTime;yi.prototype.getUris=yi.prototype.Ra;var zi=0,Ai=1;yi.Status={Lh:zi,Wi:Ai,ki:2};function Bi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function Ci(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Di(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
|
|
281
281
|
function Ei(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(Fi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}function Gi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Fi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
|
|
282
|
-
function Fi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Hi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.N={};this.K={};this.g=null;this.H=!1;this.T=d||function(){};this.i={};this.B=new yf;this.s={};this.F=b;this.I=new Kc;this.J="";this.l=Ii(this,this.I);this.G=new wf(function(){return Ji(e)});this.C=!1;this.P=new Kc}function Ii(a,b){var c=new MediaSource;a.B.
|
|
282
|
+
function Fi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Hi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.N={};this.K={};this.g=null;this.H=!1;this.T=d||function(){};this.i={};this.B=new yf;this.s={};this.F=b;this.I=new Kc;this.J="";this.l=Ii(this,this.I);this.G=new wf(function(){return Ji(e)});this.C=!1;this.P=new Kc}function Ii(a,b){var c=new MediaSource;a.B.va(c,"sourceopen",function(){URL.revokeObjectURL(a.J);b.resolve()});a.J=Ki(c);a.j.src=a.J;return c}q=Hi.prototype;q.destroy=function(){return this.G.destroy()};
|
|
283
283
|
function Ji(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p.catch(yb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.s)b.push(a.s[k].destroy());return A(l,Promise.all(b),2)}a.B&&(a.B.release(),a.B=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.s={};a.F=null;a.i={};
|
|
284
284
|
B(l)})}
|
|
285
|
-
q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return K(function(p){if(1==p.g)return e=Hb,A(p,d.I,2);d.C=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ga:f.Ga},h=g.next())f.Ga=h.value,k=a.get(f.Ga),l=ud(k.mimeType,k.codecs),f.Ga==e.ia?Li(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!pd(l,f.Ga)||(d.s[f.Ga]=new od,l=rd(f.Ga,l)),m=d.l.addSourceBuffer(l),d.B.o(m,"error",function(n){return function(){d.i[n.Ga][0].p.reject(new O(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.B.o(m,
|
|
286
|
-
function(n){return function(){return Mi(d,n.Ga)}}(f)),d.h[f.Ga]=m,d.N[f.Ga]=l,d.i[f.Ga]=[],d.K[f.Ga]=!!k.drmInfos.length);B(p)})};function Li(a,b,c){a.g||(a.g=new zd(a.m));var
|
|
285
|
+
q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return K(function(p){if(1==p.g)return e=Hb,A(p,d.I,2);d.C=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ga:f.Ga},h=g.next())f.Ga=h.value,k=a.get(f.Ga),l=ud(k.mimeType,k.codecs),f.Ga==e.ia?Li(d,l,c,k.external):(!b&&MediaSource.isTypeSupported(l)||!pd(l,f.Ga)||(d.s[f.Ga]=new od,l=rd(f.Ga,l)),m=d.l.addSourceBuffer(l),d.B.o(m,"error",function(n){return function(){d.i[n.Ga][0].p.reject(new O(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.B.o(m,
|
|
286
|
+
"updateend",function(n){return function(){return Mi(d,n.Ga)}}(f)),d.h[f.Ga]=m,d.N[f.Ga]=l,d.i[f.Ga]=[],d.K[f.Ga]=!!k.drmInfos.length);B(p)})};function Li(a,b,c,d){a.g||(a.g=new zd(a.m));var e=a.g;a=d||a.H;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Bd[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Ua('Text parsers should have a "setSequenceMode" method!'),e.C=a)}function Ni(a){return a.l?"ended"==a.l.readyState:!0}function Oi(a,b){return b==Gb?a.g.g:Bi(Pi(a,b))}
|
|
287
287
|
function Qi(a,b){return b==Gb?a.g.h:Ci(Pi(a,b))}function Ri(a,b,c){if(b==Gb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Pi(a,b);return Ei(a,c)}q.kb=function(){var a={total:Fi(this.j.buffered),audio:Fi(Pi(this,"audio")),video:Fi(Pi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Pi(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
288
|
-
function Si(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,y,x,v,w,D,z,C,G,E,H;return K(function(J){switch(J.g){case 1:h=Hb;if(b!=h.ia){J.D(2);break}if(!a.C){J.D(3);break}return A(J,a.P,4);case 4:k=J.h,a.g.B=k;case 3:return A(J,Cd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return J.return();case 2:if(!a.s[b]){e&&(a.g||Li(a,"application/cea-608",a.C),d?(l=vi(a.F,c),l.length&&(m=a.h[h.La].timestampOffset,Hd(a.g,l,d.startTime,d.endTime,m))):a.F.init(c));J.D(6);break}f&&
|
|
289
|
-
a.s[b].g.resetCaptions();return A(J,sd(a.s[b],c),7);case 7:p=J.h,a.g||Li(a,"application/cea-608",a.C),p.metadata&&(n=a.h[b].timestampOffset,a.T(p.metadata,n,d?d.endTime:null)),p.captions&&p.captions.length&&(t=a.h[h.La].timestampOffset,y=Fd(p.captions),Hd(a.g,y,d?d.startTime:null,d?d.endTime:null,t)),c=p.data;case 6:c=Ti(a,c,d?d.startTime:null,b);x=a.h[b];v=Ui;if(!a.C||x.mode==v||!d){J.D(8);break}w=a.l.duration;D=b==h.La||!(h.La in a.h);if(!D){J.D(9);break}z=[x.appendWindowStart,x.appendWindowEnd];
|
|
288
|
+
function Si(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,y,x,v,w,D,z,C,G,E,H;return K(function(J){switch(J.g){case 1:h=Hb;if(b!=h.ia){J.D(2);break}if(!a.C){J.D(3);break}return A(J,a.P,4);case 4:k=J.h,a.g.B=k;case 3:return A(J,Cd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return J.return();case 2:if(!a.s[b]){e&&(a.g||Li(a,"application/cea-608",a.C,!1),d?(l=vi(a.F,c),l.length&&(m=a.h[h.La].timestampOffset,Hd(a.g,l,d.startTime,d.endTime,m))):a.F.init(c));J.D(6);break}f&&
|
|
289
|
+
a.s[b].g.resetCaptions();return A(J,sd(a.s[b],c),7);case 7:p=J.h,a.g||Li(a,"application/cea-608",a.C,!1),p.metadata&&(n=a.h[b].timestampOffset,a.T(p.metadata,n,d?d.endTime:null)),p.captions&&p.captions.length&&(t=a.h[h.La].timestampOffset,y=Fd(p.captions),Hd(a.g,y,d?d.startTime:null,d?d.endTime:null,t)),c=p.data;case 6:c=Ti(a,c,d?d.startTime:null,b);x=a.h[b];v=Ui;if(!a.C||x.mode==v||!d){J.D(8);break}w=a.l.duration;D=b==h.La||!(h.La in a.h);if(!D){J.D(9);break}z=[x.appendWindowStart,x.appendWindowEnd];
|
|
290
290
|
x.appendWindowStart=0;x.appendWindowEnd=Infinity;C=x.timestampOffset;x.timestampOffset=0;return A(J,Vi(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return A(J,Vi(a,b,function(){return Wi(a,b)}),11);case 11:return x.timestampOffset=C,x.appendWindowStart=z[0],x.appendWindowEnd=z[1],G=Bi(Pi(a,b)),E=(d.startTime||0)-(G||0),a.P.resolve(E),A(J,Vi(a,b,function(){return Xi(a,b,0,w)}),12);case 12:if(b!=h.La){J.D(9);break}return A(J,Vi(a,b,function(){a.j.currentTime-=.001;Mi(a,b)}),9);case 9:return x.mode=
|
|
291
291
|
v,A(J,a.Ua(w),8);case 8:return d&&a.C&&b!=h.ia&&(f||g)&&(H=d.startTime,Vi(a,b,function(){return Wi(a,b)}),Vi(a,b,function(){return Yi(a,b,H)})),A(J,Vi(a,b,function(){a.h[b].appendBuffer(c)}),16);case 16:B(J)}})}function Zi(a,b){var c=Qi(a,"video")||0;Ed(a.g,b,c)}function $i(a){a.g&&Ed(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return K(function(f){e=Hb;return a==e.ia?A(f,d.g.remove(b,c),0):A(f,Vi(d,a,function(){return Xi(d,a,b,c)}),0)})};
|
|
292
292
|
function aj(a,b){var c;return K(function(d){c=Hb;return b==c.ia?a.g?A(d,a.g.remove(0,Infinity),0):d.return():A(d,Vi(a,b,function(){return Xi(a,b,0,a.l.duration)}),0)})}q.flush=function(a){var b=this,c;return K(function(d){c=Hb;return a==c.ia?d.return():A(d,Vi(b,a,function(){b.j.currentTime-=.001;Mi(b,a)}),0)})};
|
|
@@ -302,9 +302,9 @@ q.mb=function(){return Math.max(0,this.Jb()-(this.U()||this.Mb()?this.Ed:0))};q.
|
|
|
302
302
|
R.prototype.setUserSeekStart=R.prototype.Qf;R.prototype.getSegmentAvailabilityStart=R.prototype.ob;R.prototype.isInProgress=R.prototype.Mb;R.prototype.isLive=R.prototype.U;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.ue;R.prototype.notifyMinSegmentStartTime=R.prototype.ve;R.prototype.lockStartTime=R.prototype.pe;R.prototype.notifySegments=R.prototype.mc;R.prototype.getDelay=R.prototype.xg;R.prototype.setDelay=R.prototype.yh;
|
|
303
303
|
R.prototype.setSegmentAvailabilityDuration=R.prototype.Oe;R.prototype.setStatic=R.prototype.Zc;R.prototype.setClockOffset=R.prototype.Nf;R.prototype.getPresentationStartTime=R.prototype.Kg;R.prototype.setDuration=R.prototype.Ua;R.prototype.getMaxSegmentDuration=R.prototype.Gg;R.prototype.getDuration=R.prototype.getDuration;function hj(a,b,c){this.l=c;this.j=a;this.B=ij(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}hj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function jj(a,b){a.i=b}function kj(a){this.g=a}function ij(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Fi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function lj(a,b,c,d,e){var f=this;this.B=e;this.g=a;this.C=b;this.H=c;this.l=new yf;this.j=!1;this.G=a.readyState;this.F=this.i=0;this.h=d;this.s=!1;this.l.o(a,"waiting",function(){return mj(f)});this.m=(new P(function(){mj(f)})).na(.25)}lj.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.C=this.B=null};lj.prototype.xe=function(){this.s=!0;mj(this)};
|
|
304
304
|
function mj(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.G&&(a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=ij(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.B!=d)b.m=f,b.g=e,b.B=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.l(new N("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Gi(c,b,a.H.gapDetectionThreshold),null==
|
|
305
|
-
d||0==d&&!a.s||(e=c.start(d),e>=a.C.mb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.F++,a.B(new N("gapjumped")))))}}};function nj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=oj.value().get(b),c.
|
|
306
|
-
function rj(a,b){.001>Math.abs(a.g.currentTime-b)?vj(a):(a.h.
|
|
307
|
-
function uj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.na(.1)};function wj(a){this.g=a;this.j=!1;this.h=null;this.i=new yf}q=wj.prototype;q.ce=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.
|
|
305
|
+
d||0==d&&!a.s||(e=c.start(d),e>=a.C.mb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.F++,a.B(new N("gapjumped")))))}}};function nj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=oj.value().get(b),c.va(a,b,d))}var oj=new Lc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function pj(a,b,c,d){var e=this;this.g=a;this.l=b;this.s=c;this.j=d;this.m=!1;this.h=new yf;this.i=new qj(a);nj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){rj(e,e.j)})}pj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function sj(a){return a.m?a.g.currentTime:a.j}function tj(a,b){0<a.g.readyState?uj(a.i,b):nj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){rj(a,a.j)})}
|
|
306
|
+
function rj(a,b){.001>Math.abs(a.g.currentTime-b)?vj(a):(a.h.va(a.g,"seeking",function(){vj(a)}),uj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function vj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()});a.s(a.g.currentTime)}function qj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}qj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
307
|
+
function uj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.na(.1)};function wj(a){this.g=a;this.j=!1;this.h=null;this.i=new yf}q=wj.prototype;q.ce=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.va(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;nj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.ee=function(a){this.h=this.j?this.h:a};q.gd=function(){return(this.j?this.g.currentTime:this.h)||0};q.df=function(){return 0};
|
|
308
308
|
q.cf=function(){return 0};q.If=function(){};
|
|
309
309
|
function xj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.B=null;this.s=yj(a,c,f);this.j=new lj(a,b.presentationTimeline,c,this.s,f);this.h=new pj(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=sj(g.h);h=zj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;tj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},Aj(this,d));this.m=new P(function(){if(0!=g.i.readyState&&
|
|
310
310
|
!g.i.paused){var h=sj(g.h),k=g.g.ec(),l=g.g.mb();3>l-k&&(k=l-3);h<k&&(h=zj(g,h),g.i.currentTime=h)}})}q=xj.prototype;q.ce=function(){this.m.na(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};q.ee=function(a){tj(this.h,a)};q.gd=function(){var a=sj(this.h);return 0<this.i.readyState&&!this.i.paused?Bj(this,a):a};q.df=function(){return this.s?this.s.s:0};
|
|
@@ -325,9 +325,9 @@ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].
|
|
|
325
325
|
"regionremove",function(d){c.g.delete(d.region)})}u(Qj,db);Qj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;db.prototype.release.call(this)};Qj.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Tj:a>d.endTime?Uj:Rj;this.g.set(d,f);for(var g=r(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Wb==e&&h.Vb==f&&h.Lb(d,b)}}};
|
|
326
326
|
function Sj(a,b,c,d){b=new N(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Tj=1,Rj=2,Uj=3;function Vj(a,b,c,d,e){a=pf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Wj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.C=1;this.s=this.l=null;this.G=0;this.i=new Map;this.F=!1;this.H=null;this.B=!1;this.h=new wf(function(){return Xj(c)})}q=Wj.prototype;q.destroy=function(){return this.h.destroy()};function Xj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Yj(e),b.push(Zj(e));return A(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;B(f)})}
|
|
327
327
|
q.configure=function(a){this.j=a;this.H=new Xe({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};q.start=function(){var a=this;return K(function(b){if(1==b.g)return A(b,ak(a),2);xf(a.h);a.F=!0;B(b)})};
|
|
328
|
-
function bk(a,b){var c,d,e,f,g,h,k;K(function(l){switch(l.g){case 1:return c=Hb,a.G++,d=a.G,F(l,2),A(l,aj(a.g.V,c.ia),4);case 4:va(l,3);break;case 2:if(e=I(l),a.g)a.g.onError(e);case 3:f=ud(b.mimeType,b.codecs),Li(a.g.V,f,a.m.sequenceMode),g=a.g.V.m,(h=g.isTextVisible()||a.j.alwaysStreamText)&&a.G==d&&(k=ck(b),a.i.set(c.ia,k),dk(a,k,0)),B(l)}})}function ek(a){var b=a.i.get(Gb);b&&(Yj(b),Zj(b).catch(function(){}),a.i.delete(Gb));a.s=null}
|
|
328
|
+
function bk(a,b){var c,d,e,f,g,h,k;K(function(l){switch(l.g){case 1:return c=Hb,a.G++,d=a.G,F(l,2),A(l,aj(a.g.V,c.ia),4);case 4:va(l,3);break;case 2:if(e=I(l),a.g)a.g.onError(e);case 3:f=ud(b.mimeType,b.codecs),Li(a.g.V,f,a.m.sequenceMode,b.external),g=a.g.V.m,(h=g.isTextVisible()||a.j.alwaysStreamText)&&a.G==d&&(k=ck(b),a.i.set(c.ia,k),dk(a,k,0)),B(l)}})}function ek(a){var b=a.i.get(Gb);b&&(Yj(b),Zj(b).catch(function(){}),a.i.delete(Gb));a.s=null}
|
|
329
329
|
function fk(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Tb&&(gk(a,b,!1,0,!1),c.Tb=d);else if(d=c.Tb)c.Tb=null,gk(a,d,!0,0,!1)}}function hk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.F&&(b.video&&gk(a,b.video,c,d,e,f),b.audio&&gk(a,b.audio,c,d,e,f))}function ik(a,b){a.s=b;a.F&&gk(a,b,!0,0,!1)}
|
|
330
|
-
function gk(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Gb?g&&(g.Tb&&(b.trickModeVideo?(g.Tb=b,b=b.trickModeVideo):g.Tb=null),g.stream!=b||e)&&(b.type==Gb&&Li(a.g.V,ud(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ma=null,g.gf=!!f,c&&(g.Dc?g.Nd=!0:g.Ja?(g.Eb=!0,g.ld=d,g.Nd=!0):(Yj(g),jk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),kk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):bk(a,b)}
|
|
330
|
+
function gk(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Gb?g&&(g.Tb&&(b.trickModeVideo?(g.Tb=b,b=b.trickModeVideo):g.Tb=null),g.stream!=b||e)&&(b.type==Gb&&Li(a.g.V,ud(b.mimeType,b.codecs),a.m.sequenceMode,b.external),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ma=null,g.gf=!!f,c&&(g.Dc?g.Nd=!0:g.Ja?(g.Eb=!0,g.ld=d,g.Nd=!0):(Yj(g),jk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),kk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):bk(a,b)}
|
|
331
331
|
function kk(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.Ma)return e.return();c=b.stream;d=b.Ma;return c.segmentIndex?e.D(2):A(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e.return();var f=a.g.qd();var g=Qi(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ia?b.Ia.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Da?k.Da-k.Va:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.Da?k.Da-k.Va:null)||0),k=a.g.getBandwidthEstimate(),
|
|
332
332
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();B(e)})}
|
|
333
333
|
q.Wc=function(){if(this.g)for(var a=this.g.qd(),b=r(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.ma&&(e=c.ma.current());if(!e||e.startTime>a||e.endTime<a)c.ma=null;e=this.g.V;d==Gb?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Pi(e,d),e=Di(e,a));if(!e){(null!=Qi(this.g.V,d)||c.Ja)&&lk(this,c);c.Ma&&(c.Ma.abort(),c.Ma=null);if(d===Gb)for(d=this.g.V.F.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,ii(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())di(e.value);
|
|
@@ -424,14 +424,14 @@ function Sl(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y;return K(function(x){switch(x.g){
|
|
|
424
424
|
(a.ye=h,a.B=h(),"function"!=typeof a.B.setMediaElement&&(Ge(),a.B.setMediaElement=function(){}),a.B.configure(a.h.abr));a.Ba=new Pe(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Oa=a.h.preferredTextLanguage;a.Fc=a.h.preferredTextRole;a.wb=a.h.preferForcedSubs;sm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(v,w,D){a.j&&v!=a.j.l&&tm(a,v,!0,void 0===w?!1:w,void 0===D?0:D)});a.B.setMediaElement(d);a.F=um(a,b.startTime);a.$a=vm(a,
|
|
425
425
|
b.Jd);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);wm(a,k);Ld(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=xm(a);a.j.configure(a.h.streaming);a.l=ym;d.textTracks&&a.C.o(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":zm(a,v)}});a.dispatchEvent(Wl("streaming"));l=null;if(m=a.Sa().find(function(v){return v.active})){x.D(2);break}l=Xl(a);tm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.D(2);
|
|
426
426
|
break}p=a.F.gd();return A(x,Am(l,p),4);case 4:n=x.h,a.F.ee(n);case 2:return a.F.ce(),t=a.Ab().find(function(v){return v.active}),t||((y=ye(a.i.textStreams,a.Oa,a.Fc,a.wb)[0]||null)&&Gl(a.s.h,y,!0),l&&(y?(l.audio&&Bm(a,l.audio,y)&&(a.aa=!0),a.aa&&a.K.m.setTextVisibility(!0),Cm(a)):a.aa=!1),y&&(a.h.streaming.alwaysStreamText||a.Ob())&&ik(a.j,y)),A(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),Dm(a)),ce(a.j?a.j.l:null,a.i),Em(a.i),Fm(a),Gm(a),a.i.variants.some(function(v){return v.primary}),
|
|
427
|
-
a.C.
|
|
427
|
+
a.C.va(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Jd}),B(x)}})}
|
|
428
428
|
function Tl(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=Hb,e=Date.now()/1E3,f=!0,a.m=nm(a,{Pb:a.H,onError:function(p){fm(a,p)},Bd:function(p){om(a,p)},onExpirationUpdated:function(p,n){pm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=eh(g),k=dm[h],"application/x-mpegurl"==k&&Wc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
|
|
429
|
-
primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?yd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,
|
|
430
|
-
a.m.$=!0,A(m,xg(a.m,[l],[]),2)):A(m,a.m.Cc(b.O),0)})}
|
|
429
|
+
primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?yd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,
|
|
430
|
+
decodingInfos:[]},a.m.$=!0,A(m,xg(a.m,[l],[]),2)):A(m,a.m.Cc(b.O),0)})}
|
|
431
431
|
function Ul(a,b,c){function d(){return qm(a)}b.uri=c.uri;b.startTime=c.startTime;a.hb=b.uri;var e=b.O;a.F=new wj(e);var f=!1;a.ib.push(function(){f=!0});null!=b.startTime&&a.F.ee(b.startTime);a.I=new Hj({rd:function(){return e.playbackRate},od:function(){return e.defaultPlaybackRate},Me:function(k){e.playbackRate=k},Hf:function(k){e.currentTime+=k}});wm(a,a.h.streaming.rebufferingGoal);a.C.o(e,"playing",d);a.C.o(e,"pause",d);a.C.o(e,"ended",d);a.C.o(e,"ratechange",function(){return rm(a)});"none"!=
|
|
432
|
-
e.preload&&a.C.
|
|
433
|
-
"change",function(){return Fm(a)}));var g=eh(b.uri);e.src=il(a.T,b.uri,dm[g]);(Sc()||Rc("Web0S"))&&e.load();a.l=Im;a.dispatchEvent(Wl("streaming"));var h=new Kc;nj(e,HTMLMediaElement.HAVE_METADATA,a.C,function(){a.F.ce();h.resolve()});nj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.C,function(){var k;return K(function(l){if(1==l.g)return Jm(a),k=Km(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.aa=!0),l.D(2)):A(l,new Promise(function(m){a.C.
|
|
434
|
-
2);if(f)return l.return();Lm(a);B(l)})});e.error?h.reject(em(a)):"none"==e.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.C.
|
|
432
|
+
e.preload&&a.C.va(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Jd});e.audioTracks&&(a.C.o(e.audioTracks,"addtrack",function(){return Fm(a)}),a.C.o(e.audioTracks,"removetrack",function(){return Fm(a)}),a.C.o(e.audioTracks,"change",function(){return Fm(a)}));e.textTracks&&(a.C.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Hm(a,k);break;case "chapters":zm(a,k);break;default:Fm(a)}}),a.C.o(e.textTracks,"removetrack",function(){return Fm(a)}),a.C.o(e.textTracks,
|
|
433
|
+
"change",function(){return Fm(a)}));var g=eh(b.uri);e.src=il(a.T,b.uri,dm[g]);(Sc()||Rc("Web0S"))&&e.load();a.l=Im;a.dispatchEvent(Wl("streaming"));var h=new Kc;nj(e,HTMLMediaElement.HAVE_METADATA,a.C,function(){a.F.ce();h.resolve()});nj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.C,function(){var k;return K(function(l){if(1==l.g)return Jm(a),k=Km(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.aa=!0),l.D(2)):A(l,new Promise(function(m){a.C.va(e.textTracks,"change",m);(new P(m)).S(1)}),
|
|
434
|
+
2);if(f)return l.return();Lm(a);B(l)})});e.error?h.reject(em(a)):"none"==e.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.C.va(e,"error",function(){h.reject(em(a))});return new $e(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})}
|
|
435
435
|
function Jm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Id(b);var c=a.h.preferredVariantRole;""!=c&&a.Id(b,c)}}function Lm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Fe(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Fe(b,d,c)}}
|
|
436
436
|
function Hm(a,b){if("metadata"==b.kind){b.mode="hidden";a.C.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,im(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new P(function(){var d=Mm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Aa().S(.5);a.ib.push(function(){c.stop()})}}
|
|
437
437
|
function im(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Wl("metadata",b))}function zm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).Aa().S(.5);a.ib.push(function(){c.stop()})}}function mm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function nm(a,b){return new og(b,a.h.drm.updateExpirationTime)}
|
|
@@ -472,8 +472,8 @@ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.s.P=this.F.cf()
|
|
|
472
472
|
id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:y,pauseTime:x,bufferingTime:v,licenseTime:w,liveLatency:D,maxSegmentDuration:z,stateHistory:C,switchHistory:G}};
|
|
473
473
|
q.cg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,y,x,v,w,D;return K(function(z){switch(z.g){case 1:if(h.l!=ym&&h.l!=Im)throw new O(1,7,7004);if(d){z.D(2);break}return A(z,Wm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(C){}if(h.l!=Im){z.D(4);break}g&&(c="forced");return A(z,Xm(h,a,b,c,d,f||"",k),5);case 5:l=h.Ab();if(m=l.find(function(C){return C.language==b&&C.label==(f||"")&&C.kind==c}))return Fm(h),z.return(m);throw new O(1,2,2012);case 4:p=
|
|
474
474
|
Hb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new O(1,4,4033);if(!k.length){z.D(6);break}return A(z,Ym(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,y=Zm(h,t,d,k),x=new Blob([y],{type:"text/vtt"}),a=Ki(x),d="text/vtt";case 6:v={id:h.Xf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Fj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ia,primary:!1,trickModeVideo:null,
|
|
475
|
-
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=ud(v.mimeType,v.codecs);D=Ad(w);if(!D)throw new O(2,2,2014,d);h.i.textStreams.push(v);Fm(h);return z.return(pe(v))}})};
|
|
476
|
-
q.ag=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=ym&&d.l!=Im)throw new O(1,7,7004);if(c){k.D(2);break}return A(k,Wm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return A(k,Xm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.yf();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return A(k,new Promise(function(l,m){d.C.
|
|
475
|
+
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!0};w=ud(v.mimeType,v.codecs);D=Ad(w);if(!D)throw new O(2,2,2014,d);h.i.textStreams.push(v);Fm(h);return z.return(pe(v))}})};
|
|
476
|
+
q.ag=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=ym&&d.l!=Im)throw new O(1,7,7004);if(c){k.D(2);break}return A(k,Wm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return A(k,Xm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.yf();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return A(k,new Promise(function(l,m){d.C.va(f,"load",l);d.C.va(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return k.return(h);
|
|
477
477
|
case 5:throw new O(1,2,2012);}})};function Wm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=eh(b);if(d=$m[c])return e.return(d);F(e,2);return A(e,gh(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:I(e);case 3:if(d)return e.return(d);throw new O(1,2,2011,c);}})}
|
|
478
478
|
function Xm(a,b,c,d,e,f,g){var h,k,l,m;return K(function(p){if(1==p.g)return"text/vtt"!=e||g.length?A(p,Ym(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=Zm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ki(l),e="text/vtt");m=document.createElement("track");var n=a.T,t=b;try{if(n.g.enabled){var y=jl(n);y.ot=pl;y.su=!0;var x=ll(y);var v=ml(t,x)}else v=t}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),v=t}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
479
479
|
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function Ym(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=vf;f=pf([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&hl(k,f,{ot:pl,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return A(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
@@ -481,7 +481,7 @@ function Zm(a,b,c,d){var e=Bd[c];if(e)return c=e(),a={periodStart:0,segmentStart
|
|
|
481
481
|
q.Eg=function(){Ua("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Fg=function(){return this.Fd};
|
|
482
482
|
function Jl(a){var b=yl();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Be(d))}};b.textDisplayFactory=function(){return a.td?new Ok(a.g,a.td):new Ik(a.g)};return b}q.Qe=function(a){this.td=a};
|
|
483
483
|
function lm(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Gj;h={id:a.Xf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
484
|
-
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function km(a,b){return K(function(c){if(1==c.g)return A(c,an(a,b),2);Pm(a,b);B(c)})}
|
|
484
|
+
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1};b.textStreams.push(h);c.add(g)}}function km(a,b){return K(function(c){if(1==c.g)return A(c,an(a,b),2);Pm(a,b);B(c)})}
|
|
485
485
|
function an(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,A(d,ae(c,b),2);Em(b);B(d)})}
|
|
486
486
|
function Pm(a,b){if(a.l!=Yl){$d(b.variants,a.h.restrictions,a.Lc)&&a.j&&Fm(a);var c=a.m?a.m.g:null;if(c&&a.m.C)for(var d=r(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=r(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,Gg(a.m,g.initDataType,g.initData)}}bn(a,b)}}
|
|
487
487
|
function Am(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return K(function(t){if(1==t.g)return k?A(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.cc(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},A(h,e(c,b),2);if(3!=h.g)return f=h.h,A(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
|
|
@@ -505,7 +505,7 @@ T.prototype.getExpiration=T.prototype.Hc;T.prototype.drmInfo=T.prototype.drmInfo
|
|
|
505
505
|
T.prototype.getLoadMode=T.prototype.ie;T.prototype.resetConfiguration=T.prototype.ph;T.prototype.getBufferFullness=T.prototype.pg;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.Fh;T.prototype.unload=T.prototype.Xe;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.Cc;
|
|
506
506
|
T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?A(h,Xg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Nc()){for(var l in dh)k[l]=!0;for(var m in fh)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=Nc()?!!dh[p]:Oc(p);for(var n in l)k[n]=
|
|
507
507
|
Nc()?!!fh[n]:Oc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(ja(gj));
|
|
508
|
-
k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Nc()?Ad(l)?!0:MediaSource.isTypeSupported(l)||pd(l):Oc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=gn;for(g in f)e[g]=f[g]();return h.return(e)})};T.isBrowserSupported=Zl;T.setAdManagerFactory=function(a){Ll=a};T.registerSupportPlugin=function(a,b){gn[a]=b};T.prototype.destroy=T.prototype.destroy;var Yl=0,Il=1,ym=2,Im=3;T.LoadMode={DESTROYED:Yl,NOT_LOADED:Il,MEDIA_SOURCE:ym,SRC_EQUALS:Im};T.version="v4.2.
|
|
508
|
+
k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Nc()?Ad(l)?!0:MediaSource.isTypeSupported(l)||pd(l):Oc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=gn;for(g in f)e[g]=f[g]();return h.return(e)})};T.isBrowserSupported=Zl;T.setAdManagerFactory=function(a){Ll=a};T.registerSupportPlugin=function(a,b){gn[a]=b};T.prototype.destroy=T.prototype.destroy;var Yl=0,Il=1,ym=2,Im=3;T.LoadMode={DESTROYED:Yl,NOT_LOADED:Il,MEDIA_SOURCE:ym,SRC_EQUALS:Im};T.version="v4.2.14";
|
|
509
509
|
var hn=["4","2"];He=new function(a){this.g=a;this.i=Ie;this.h=Je}(new Fe(Number(hn[0]),Number(hn[1])));
|
|
510
510
|
var fn=["output-restricted","internal-error"],gn={},Ll=null,dm={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},$m={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
511
511
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function jn(){this.h=[];this.j=this.i=this.g=0};function kn(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new yf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=kn.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
@@ -513,11 +513,11 @@ q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSki
|
|
|
513
513
|
q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
514
514
|
q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};L("shaka.ads.ClientSideAd",kn);kn.prototype.release=kn.prototype.release;kn.prototype.getPositionInSequence=kn.prototype.getPositionInSequence;kn.prototype.getSequenceLength=kn.prototype.getSequenceLength;kn.prototype.setMuted=kn.prototype.setMuted;kn.prototype.resize=kn.prototype.resize;kn.prototype.isLinear=kn.prototype.isLinear;kn.prototype.isMuted=kn.prototype.isMuted;
|
|
515
515
|
kn.prototype.setVolume=kn.prototype.setVolume;kn.prototype.getVolume=kn.prototype.getVolume;kn.prototype.play=kn.prototype.play;kn.prototype.pause=kn.prototype.pause;kn.prototype.skip=kn.prototype.skip;kn.prototype.canSkipNow=kn.prototype.canSkipNow;kn.prototype.getTimeUntilSkippable=kn.prototype.getTimeUntilSkippable;kn.prototype.isSkippable=kn.prototype.isSkippable;kn.prototype.isPaused=kn.prototype.isPaused;kn.prototype.getRemainingTime=kn.prototype.getRemainingTime;
|
|
516
|
-
kn.prototype.getMinSuggestedDuration=kn.prototype.getMinSuggestedDuration;kn.prototype.getDuration=kn.prototype.getDuration;function ln(a,b,c,d){var e=this;this.s=a;this.i=b;this.B=null;this.
|
|
517
|
-
function(f){nn(e,f)});this.h.o(this.i,"ended",function(){e.m.contentComplete()})}ln.prototype.stop=function(){this.g&&this.g.stop();this.s&&Nk(this.s)};ln.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function nn(a,b){b.getError();on(a,null);a.l(new N("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
518
|
-
function mn(a,b){a.l(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.
|
|
519
|
-
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,qn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,qn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,qn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.h.
|
|
520
|
-
null)}}function qn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
516
|
+
kn.prototype.getMinSuggestedDuration=kn.prototype.getMinSuggestedDuration;kn.prototype.getDuration=kn.prototype.getDuration;function ln(a,b,c,d){var e=this;this.s=a;this.i=b;this.C=!1;this.B=null;this.F=NaN;this.l=d;this.j=null;this.h=new yf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.2.14");this.g=null;this.h.va(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){mn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
517
|
+
function(f){nn(e,f)});this.h.o(this.i,"ended",function(){e.m.contentComplete()});this.h.va(this.i,"play",function(){e.C=!0})}ln.prototype.stop=function(){this.g&&this.g.stop();this.s&&Nk(this.s)};ln.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function nn(a,b){b.getError();on(a,null);a.l(new N("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
518
|
+
function mn(a,b){a.l(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));a.g=b.getAdsManager(a.i);a.l(new N("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new N("ad-cue-points-changed",(new Map).set("cuepoints",b)))}pn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,qn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
|
|
519
|
+
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,qn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,qn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,qn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.C?a.g.start():a.h.va(a.i,"play",
|
|
520
|
+
function(){a.C=!0;a.g.start()})}catch(e){on(a,null)}}function qn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
521
521
|
function pn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new N(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){nn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){rn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){rn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
522
522
|
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){on(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){on(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
523
523
|
a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.o(a.g,
|
|
@@ -533,10 +533,10 @@ var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this
|
|
|
533
533
|
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new N("ad-complete"));e.i(new N("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new N("ad-skipped"));e.i(new N("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
|
|
534
534
|
f;e.i(new N("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}tn.prototype.stop=function(){this.F="";this.s=null;this.G=[]};tn.prototype.release=function(){this.stop();this.h&&this.h.release()};tn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
|
|
535
535
|
function un(a,b){a.i(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function U(){db.call(this);this.g=this.i=null;this.h=new jn;this.j=navigator.language}u(U,db);q=U.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.i&&this.i.release();this.i=new ln(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
536
|
-
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new N("ad-stopped"));this.h=new jn};q.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.
|
|
536
|
+
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new N("ad-stopped"));this.h=new jn};q.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.F=Date.now()/1E3;b.m.requestAds(a)};
|
|
537
537
|
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new tn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
538
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.2.
|
|
539
|
-
(c.H=!0),c.j=new Kc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.2.
|
|
538
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.2.14";c=this.g;c.j?a=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
539
|
+
(c.H=!0),c.j=new Kc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.2.14";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.G};
|
|
540
540
|
q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};L("shaka.ads.AdManager",U);
|
|
541
541
|
U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
|
|
542
542
|
U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";
|
|
@@ -597,8 +597,8 @@ function Mo(a){var b=a.getAttribute("schemeIdUri"),c=Zf(a,"urn:mpeg:cenc:2013","
|
|
|
597
597
|
var Ko=1,Lo=(new Map).set("com.widevine.alpha",function(a){return(a=Wf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Jo).set("com.microsoft.playready.recommendation",Jo).set("com.microsoft.playready.software",Jo).set("com.microsoft.playready.hardware",Jo).set("org.w3.clearkey",function(a){return(a=Wf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function No(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
|
|
598
598
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
599
599
|
function Oo(a,b){var c=Po(a,b,"timescale"),d=1;c&&(d=hg(c)||1);var e=Po(a,b,"duration");c=hg(e||"");"image"==a.M.contentType&&(c=jg(e||""));c&&(c/=d);var f=Po(a,b,"startNumber");e=Number(Po(a,b,"presentationTimeOffset"))||0;var g=ig(f||"");if(null==f||null==g)g=1;f=Qo(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.Y.duration||Infinity;f=Vf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=cg(m,"t",ig),t=cg(m,"d",ig);m=cg(m,"r",gg);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
|
|
600
|
-
m)if(p){p=cg(p,"t",ig);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Dh:n}),n=k}b=h}return{timescale:d,za:c,rc:g,rb:e/d||0,Ye:e,timeline:b}}function Po(a,b,c){return[b(a.M),b(a.
|
|
601
|
-
function Qo(a,b,c){return[b(a.M),b(a.
|
|
600
|
+
m)if(p){p=cg(p,"t",ig);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Dh:n}),n=k}b=h}return{timescale:d,za:c,rc:g,rb:e/d||0,Ye:e,timeline:b}}function Po(a,b,c){return[b(a.M),b(a.xa),b(a.sa)].filter(zb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
601
|
+
function Qo(a,b,c){return[b(a.M),b(a.xa),b(a.sa)].filter(zb).map(function(d){return Uf(d,c)}).reduce(function(d,e){return d||e})}
|
|
602
602
|
function Ro(a,b,c,d,e,f){for(var g=Zf(a,"http://www.w3.org/1999/xlink","href"),h=Zf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return af(new O(2,4,4028));if("onLoad"!=h)return af(new O(2,4,4027));var m=Ab([d],[g]);return e.request(0,pf(m,b)).oa(function(p){p=ng(p.data,a.tagName);if(!p)return af(new O(2,4,4001,g));
|
|
603
603
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return So(a,b,c,m[0],e,f+1)})}
|
|
604
604
|
function So(a,b,c,d,e,f){f=void 0===f?0:f;if(Zf(a,"http://www.w3.org/1999/xlink","href")){var g=Ro(a,b,c,d,e,f);c&&(g=g.oa(void 0,function(){return So(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Zf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(So(k,b,c,d,e,f)));return ef(g).oa(function(){return a})};function To(a,b,c,d,e,f,g){var h,k=(new Jf).X("sidx",function(l){h=Uo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
|
|
@@ -614,7 +614,7 @@ function fp(a){return a.Xc}function jp(a){var b=Qo(a,fp,"RepresentationIndex");a
|
|
|
614
614
|
function dp(a){var b=a.M;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.xd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function mp(a,b){var c=cp(a,np),d=op(a);if(!d.za&&!d.timeline&&1<d.kc.length)throw new O(2,4,4002);if(!d.za&&!a.Y.duration&&!d.timeline&&1==d.kc.length)throw new O(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new O(2,4,4002);var e=null,f=null;a.sa.id&&a.M.id&&(f=b[a.sa.id+","+a.M.id])&&(e=f.segmentIndex);var g=pp(a.Y.start,a.Y.duration,a.M.Pa,d,c);b=!e;e?e.lc(g,a.presentationTimeline.ob()):e=new Dj(g);a.presentationTimeline.mc(g);a.xb&&a.Y.je||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
|
|
615
615
|
Infinity,b);f&&(f.segmentIndex=e);return{bc:function(){e&&0!=e.L.length||e.Sc(g);return Promise.resolve(e)}}}function np(a){return a.Db}function op(a){var b=qp(a);a=Oo(a,np);var c=a.rc;0==c&&(c=1);var d=0;a.za?d=a.za*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{za:a.za,startTime:d,rc:c,rb:a.rb,timeline:a.timeline,kc:b}}
|
|
616
616
|
function pp(a,b,c,d,e){var f=d.kc.length;d.timeline&&d.timeline.length!=d.kc.length&&(f=Math.min(d.timeline.length,d.kc.length));for(var g=a-d.rb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Td:m.Td},p++){var n=d.kc[p];m.Td=Ab(c,[n.bh]);var t=void 0;t=null!=d.za?l+d.za:d.timeline?d.timeline[p].end:l+b;k.push(new yi(a+l,a+t,function(y){return function(){return y.Td}}(m),n.start,n.end,e,g,a,h));l=t}return k}
|
|
617
|
-
function qp(a){return[a.M.Db,a.
|
|
617
|
+
function qp(a){return[a.M.Db,a.xa.Db,a.sa.Db].filter(zb).map(function(b){return Vf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ef&&(a.Ef=!0);var c=b.getAttribute("media");b=cg(b,"mediaRange",fg,{start:0,end:null});return{bh:c,start:b.start,end:b.end}})};function rp(a,b,c,d,e,f){var g=sp(a),h=tp(a);up(h);var k=hf(a);if(h.Oc)return lp(a,g),{bc:function(){var t=No(h.Oc,k.M.id,null,k.bandwidth||null,null);t=Ab(k.M.Pa,[t]);return kp(k,b,g,t,0,null,h.rb)}};if(h.za)return d||"image"===a.xa.contentType||(a.presentationTimeline.ue(h.za),a.presentationTimeline.ve(a.Y.start)),{bc:function(){return vp(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.M.id&&(d=a.sa.id+","+a.M.id,d=c[d])&&(l=d.segmentIndex);var m=wp(k,h,g);c=a.Y.start;var p=a.Y.duration?a.Y.start+a.Y.duration:
|
|
618
618
|
Infinity,n=!(a.xb&&a.Y.je);l?(n&&(new Dj(m)).yb(c,p,!0),l.lc(m,a.presentationTimeline.ob())):l=new Dj(m);a.presentationTimeline.mc(m);n&&l.yb(c,p);d&&a.xb&&(d.segmentIndex=l);return{bc:function(){l&&0!=l.L.length||l.Sc(m);return Promise.resolve(l)}}}function xp(a){return a.Yc}function tp(a){var b=Oo(a,xp),c=Po(a,xp,"media");a=Po(a,xp,"index");return{za:b.za,timescale:b.timescale,rc:b.rc,rb:b.rb,Ye:b.Ye,timeline:b.timeline,re:c,Oc:a}}
|
|
619
619
|
function up(a){var b=a.Oc?1:0;b+=a.timeline?1:0;b+=a.za?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Oc&&(a.timeline=null),a.za=null);if(!a.Oc&&!a.re)throw new O(2,4,4002);}
|
|
620
620
|
function vp(a,b,c,d,e){function f(M){var Q=(M-t)*n,V=Q+b.rb,aa=Q+l;Q=aa+n;var ea=Math.min(Q,h());aa=new yi(aa,ea,function(){var ma=No(x,w,M,v,V*y);return Ab(D,[ma])},0,null,d,z,l,h());aa.j=Q;return aa}function g(){var M=[Math.max(k.ob(),l),Math.min(k.Jb(),h())].map(function(Q){return Q-l});return[Math.ceil(M[0]/n),Math.ceil(M[1]/n)-1].map(function(Q){return Q+t})}function h(){var M=null!=m&&e[m]||p;return M?l+M:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,p=a.Y.duration,n=b.za,t=b.rc,
|
|
@@ -647,15 +647,15 @@ function Up(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(a
|
|
|
647
647
|
d=Yp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Zp)return!0;if(d==$p)return!1;d=Yp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Zp?!0:d==$p?!1:a.bandwidth&&aq(a.bandwidth,b.bandwidth,c.bandwidth)==Zp?!0:!1}
|
|
648
648
|
function Vp(a,b,c){if(a.id==c.id)return!0;var d=Yp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Zp)return!0;if(d==$p)return!1;if(a.frameRate){d=Yp(a.frameRate,b.frameRate,c.frameRate);if(d==Zp)return!0;if(d==$p)return!1}return a.bandwidth&&aq(a.bandwidth,b.bandwidth,c.bandwidth)==Zp?!0:!1}
|
|
649
649
|
function Wp(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
|
|
650
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Xp(a,b,c){return a.id==c.id?!0:Yp(a.width*a.height,b.width*b.height,c.width*c.height)==Zp?!0:!1}function Jp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
651
|
-
function Ep(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
650
|
+
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Xp(a,b,c){return a.id==c.id?!0:Yp(a.width*a.height,b.width*b.height,c.width*c.height)==Zp?!0:!1}function Jp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1}}
|
|
651
|
+
function Ep(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1}}
|
|
652
652
|
function Yp(a,b,c){if(b==a&&a!=c)return $p;if(c==a&&a!=b)return Zp;if(b>a){if(c<=a||c-a<b-a)return Zp;if(c-a>b-a)return $p}else{if(c>a)return $p;if(a-c<a-b)return Zp;if(a-c>a-b)return $p}return bq}function aq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Zp:b<a?$p:bq}var Zp=1,bq=0,$p=-1;function cq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new yp;this.H=0;this.J=new Yb(5);this.G=new P(function(){dq(a)});this.s=new jf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=cq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,A(e,eq(c),2);d=e.h;c.h&&fq(c,d);if(!c.h)throw new O(2,7,7001);return e.return(c.i)})};
|
|
653
653
|
q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.s.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return F(c,2),A(c,eq(a),4);if(2!=c.g)return va(c,0);b=I(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
|
|
654
654
|
function eq(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=pf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),kf(a.s,e),A(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return A(k,gq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
|
|
655
655
|
function gq(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=ng(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(hq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=So(d,a.g.retryParameters,f,c,a.h.networkingEngine);kf(a.s,g);return A(k,g.promise,2)}h=k.h;return k.return(hq(a,h,c))})}
|
|
656
656
|
function hq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,C,G,E,H,J,M,Q,V,aa,ea,ma,Ca,Ia,Ja,Na;return K(function(Oa){switch(Oa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Vf(b,"Location").map(ag).filter(zb);0<f.length&&(g=Ab(e,f),e=a.m=g);h=Vf(b,"BaseURL");k=h.map(ag);l=Ab(e,k);m=0;h&&h.length&&(m=cg(h[0],"availabilityTimeOffset",jg)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=cg(b,"minBufferTime",eg)||0);a.H=cg(b,"minimumUpdatePeriod",eg,-1);t=cg(b,"availabilityStartTime",dg);y=cg(b,
|
|
657
657
|
"timeShiftBufferDepth",eg);x=a.g.dash.ignoreSuggestedPresentationDelay;v=null;x||(v=cg(b,"suggestedPresentationDelay",eg));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=cg(b,"maxSegmentDuration",eg));z=b.getAttribute("type")||"static";if(a.i)for(C=a.i.presentationTimeline,G=r(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.Hb(C.ob());else J=a.g.defaultPresentationDelay||1.5*n,M=null!=v?v:J,C=new R(t,M,a.g.dash.autoCorrectDrift);C.Zc("static"==z);(Q=C.U())&&
|
|
658
|
-
!isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);C.Oe(y);V=b.getAttribute("profiles")||"";aa={xb:"static"!=z,presentationTimeline:C,sa:null,Y:null,
|
|
658
|
+
!isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);C.Oe(y);V=b.getAttribute("profiles")||"";aa={xb:"static"!=z,presentationTimeline:C,sa:null,Y:null,xa:null,M:null,bandwidth:0,Ef:!1,$b:m,profiles:V.split(",")};ea=iq(a,aa,l,b);ma=ea.duration;Ca=ea.periods;"static"!=z&&ea.vf||C.Ua(ma||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?C.Mf(a.C):a.C&&Ua("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
659
659
|
C.ue(D||1);return A(Oa,zp(a.j,Ca,aa.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Oa.D(3);break}a.i={presentationTimeline:C,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!C.Uf()){Oa.D(4);break}Ja=Vf(b,"UTCTiming");return A(Oa,jq(a,l,Ja),5);case 5:Na=Oa.h;if(!a.h)return Oa.return();C.Nf(Na);case 4:C.pe();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),B(Oa)}})}
|
|
660
660
|
function iq(a,b,c,d){var e=cg(d,"mediaPresentationDuration",eg),f=[],g=0;d=Vf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=cg(k,"start",eg,g),p=k.id,n=cg(k,"duration",eg),t=null;if(l){var y=cg(l,"start",eg);null!=y&&(t=y-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=kq(a,b,c,{start:m,duration:t,node:k,je:null==t||!l});f.push(g);b.sa.id&&t&&(a.N[b.sa.id]=t);if(null==t){g=
|
|
661
661
|
null;break}g=m+t}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,vf:!1}:{periods:f,duration:g,vf:!0}}
|
|
@@ -663,16 +663,16 @@ function kq(a,b,c,d){b.sa=lq(d.node,null,c);b.Y=d;b.sa.$b=b.$b;b.sa.id||(b.sa.id
|
|
|
663
663
|
}d=c.filter(function(m){return!m.Ue});c=c.filter(function(m){return m.Ue});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ue.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={fd:h.fd},l=k.next())h.fd=l.value,h.fd.trickModeVideo=e.streams.find(function(m){return function(p){return wd(m.fd.codecs)==wd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:oq(d,"audio");g=a.g.disableVideo?[]:oq(d,"video");f=a.g.disableText?
|
|
664
664
|
[]:oq(d,Gb);c=a.g.disableThumbnails?[]:oq(d,"image");if(!g.length&&!e.length)throw new O(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.sa.id,jd:d,Md:e,textStreams:g,imageStreams:f}}
|
|
665
665
|
function oq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
666
|
-
function nq(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.
|
|
666
|
+
function nq(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.xa=lq(c,b.sa,null);var e=!1,f=Vf(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(zb),h=void 0,k=b.xa.contentType==Gb;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
667
667
|
l}}var p;m=Vf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=t&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=t&&(l=!0)}m=Vf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
|
|
668
668
|
n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),10)));m=Vf(c,"Accessibility");var y=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var x=r(t),v=x.next();!v.done;v=x.next()){var w=v.value,D=v=void 0;w.includes("=")?(w=w.split("="),v=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(v="CC"+n,2==t.length?n+=2:n++,D=w);y.set(v,Kb(D))}}else y.set("CC1",
|
|
669
669
|
"und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=1,null!=t)for(t=r(t.split(";")),v=t.next();!v.done;v=t.next())v=v.value,w=x=void 0,v.includes("=")?(v=v.split("="),x="svc"+v[0],w=v[1].split(",")[0].split(":").pop()):(x="svc"+n,n++,w=v),y.set(x,Kb(w));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Vf(c,"ContentProtection");var z=Do(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),C=Kb(c.getAttribute("lang")||"und"),
|
|
670
|
-
G=c.getAttribute("label");(l=Vf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(G=l.textContent));l=Vf(c,"Representation");c=l.map(function(E){if(E=pq(a,b,z,h,C,G,e,g,y,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.
|
|
671
|
-
b.
|
|
672
|
-
function pq(a,b,c,d,e,f,g,h,k,l){b.M=lq(l,b.
|
|
670
|
+
G=c.getAttribute("label");(l=Vf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(G=l.textContent));l=Vf(c,"Representation");c=l.map(function(E){if(E=pq(a,b,z,h,C,G,e,g,y,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.xa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.xa.contentType||"application"==b.xa.contentType)for(b.xa.contentType=qq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=
|
|
671
|
+
b.xa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ja(t.keyIds),ja(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(zb);return{id:b.xa.id||"__fake__"+a.I++,contentType:b.xa.contentType,language:C,dj:e,streams:c,drmInfos:z.drmInfos,Ue:f,oh:k}}
|
|
672
|
+
function pq(a,b,c,d,e,f,g,h,k,l){b.M=lq(l,b.xa,null);a.C=Math.min(a.C,b.M.$b);if(!rq(b.M))return null;var m=b.Y.start;b.bandwidth=cg(l,"bandwidth",hg)||0;var p=b.M.contentType,n=p==Gb||"application"==p;p="image"==p;try{var t=function(E,H,J){return sq(a,E,H,J)};if(b.M.Xc)var y=ep(b,t);else if(b.M.Db)y=mp(b,a.l);else if(b.M.Yc)y=rp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var x=b.M.Pa,v=b.Y.duration||0;y={bc:function(){return Promise.resolve(Fj(m,v,x))}}}}catch(E){if((n||p)&&4002==E.code)return null;
|
|
673
673
|
throw E;}t=Vf(l,"ContentProtection");t=Go(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Vf(l,"SupplementalProperty").some(function(E){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==E.getAttribute("schemeIdUri")&&"JOC"==E.getAttribute("value")})&&(w=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Vf(l,"EssentialProperty").find(function(E){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(E.getAttribute("schemeIdUri"))}))&&
|
|
674
674
|
(z=l.getAttribute("value")),!z))return null;var C;l=b.M.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(C="PQ");l=b.M.id?b.sa.id+","+b.M.id:"";var G=l&&a.l[l]?a.l[l]:{id:a.I++,originalId:b.M.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType,codecs:b.M.codecs,
|
|
675
|
-
frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.
|
|
675
|
+
frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.xa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.M.xd,audioSamplingRate:b.M.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:C,tilesLayout:z,matchedStreams:[],external:!1};G.createSegmentIndex=function(){var E;return K(function(H){if(1==
|
|
676
676
|
H.g){if(G.segmentIndex)return H.D(0);E=G;return A(H,y.bc(),3)}E.segmentIndex=H.h;B(H)})};l&&b.xb&&!a.l[l]&&(a.l[l]=G);return G}function dq(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,F(d,2),A(d,eq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=I(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();fq(a,b);B(d)}})}function fq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,Zb(a.J)))}
|
|
677
677
|
function lq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,xd:null,audioSamplingRate:null,$b:0};c=c||b.Pa;var d=Vf(a,"BaseURL"),e=d.map(ag),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=cg(a,"frameRate",kg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Vf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
|
|
678
678
|
m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Vf(a,"AudioChannelConfiguration");m=tq(m)||b.xd;n=cg(a,"audioSamplingRate",ig)||b.audioSamplingRate;f||(f=qq(g,h));var t=Uf(a,"SegmentBase"),y=Uf(a,"SegmentTemplate"),x=t?cg(t,"availabilityTimeOffset",jg)||0:0,v=y?cg(y,"availabilityTimeOffset",jg)||0:0;d=d&&d.length?cg(d[0],"availabilityTimeOffset",jg)||0:0;d=b.$b+d+x+v;return{Pa:Ab(c,e),Xc:t||b.Xc,Db:Uf(a,"SegmentList")||b.Db,Yc:y||b.Yc,width:cg(a,"width",ig)||b.width,height:cg(a,
|
|
@@ -690,7 +690,7 @@ function Kq(a,b,c){b=bd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
|
|
|
690
690
|
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Lq(a,m),Mq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==W(m,"TYPE")?null!=W(m,"BYTERANGE-START")?null!=W(m,"BYTERANGE-LENGTH")&&k.push(m):k.push(m):"MAP"==W(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Eq(d,m.trim()),h&&g.push(h),e.push(new yq(m,g,k)),g=[],k=[]);k.length&&
|
|
691
691
|
(h&&g.push(h),e.push(new yq("",g,k)));return new vq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new zq("URI",k)),e=!0)}}return new vq(c,b,f)}function Lq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new O(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Fq(d);var f;(f=Hq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Hq(d,g);)c.push(new zq(f[1],f[2]||f[3])),Gq(d)}return new wq(a,b,c,e)}
|
|
692
692
|
var Mq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Nq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Oq(){}function Pq(a){try{var b=Qq(a);return cf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return af(c)}}
|
|
693
|
-
function Qq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=kd(a):e=fd(a);return{data:e,contentType:c}}L("shaka.net.DataUriPlugin",Oq);Oq.parse=Pq;mf("data",Pq);function Rq(){var a=this;this.g=this.i=null;this.Ba=1;this.s=new Map;this.C=new Map;this.ua=new Set;this.h=new Map;this.j=null;this.N="";this.aa=new Jq;this.ha=0;this.T=!1;this.P=null;this.$=Infinity;this.F=new P(function(){Sq(a)});this.m=Tq;this.J=null;this.ba=0;this.H=Infinity;this.Z=this.ea=0;this.G=new jf;this.I=[];this.K=new Map;this.B=new Map;this.
|
|
693
|
+
function Qq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=kd(a):e=fd(a);return{data:e,contentType:c}}L("shaka.net.DataUriPlugin",Oq);Oq.parse=Pq;mf("data",Pq);function Rq(){var a=this;this.g=this.i=null;this.Ba=1;this.s=new Map;this.C=new Map;this.ua=new Set;this.h=new Map;this.j=null;this.N="";this.aa=new Jq;this.ha=0;this.T=!1;this.P=null;this.$=Infinity;this.F=new P(function(){Sq(a)});this.m=Tq;this.J=null;this.ba=0;this.H=Infinity;this.Z=this.ea=0;this.G=new jf;this.I=[];this.K=new Map;this.B=new Map;this.wa=new Map;this.l=!1}q=Rq.prototype;q.configure=function(a){this.g=a};
|
|
694
694
|
q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,Uq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,A(f,Vq(c,d.data,a),3);e=c.ha;0<e&&c.F.S(e);return f.return(c.J)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.i=null;this.ua.clear();this.J=null;this.h.clear();this.C.clear();this.B.clear();this.s.clear();return Promise.all(a)};
|
|
695
695
|
q.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.m==Tq)return h.return();b=[];c=Array.from(a.h.values());return c.length?A(h,Wq(a,c[0]),2):h.D(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Wq(a,c[d]));return A(h,Promise.all(b),4)}Xq(a);e=c.some(function(k){return 0==k.Bf});e||(f=Yq,Zq(a,f.Zf),g=c.map(function(k){return k.Qc}),a.j.Ua(Math.min.apply(Math,ja(g))),a.i.updateDuration());B(h)})};
|
|
696
696
|
function Wq(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return K(function(y){if(1==y.g)return c=b.$f,d=new jb(c),a.l&&b.fg&&mb(d,new ob("_HLS_skip=YES")),A(y,Uq(a,d.toString()),2);e=y.h;f=Kq(a.aa,e.data,e.uri);if(1!=f.type)throw new O(2,4,4017);g=Aq(f.g,"EXT-X-DEFINE");h=$q(a,g);k=b.stream;l=ar(a,f,k.type,b.Rc,h);a.I.push(l);k.segmentIndex.lc(l,a.j.ob());l.length&&(m=Dq(f.g,"EXT-X-MEDIA-SEQUENCE"),p=b.Rc.get(m),k.segmentIndex.Hb(p));n=l[l.length-1];if(t=Cq(f.g,"EXT-X-ENDLIST"))b.Bf=!0,b.Qc=n.endTime;B(y)})}
|
|
@@ -723,11 +723,11 @@ function ur(a,b,c,d,e,f,g,h,k,l,m,p){var n,t,y;return K(function(x){if(1==x.g)re
|
|
|
723
723
|
function fr(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){var x,v,w,D,z,C,G,E,H,J,M,Q,V,aa,ea,ma,Ca,Ia,Ja,Na,Oa,Tc,Uc,vc,Id,Eb,Jd,hc,Kd,Va,tg,ug,gp,hp;return K(function(Md){if(1==Md.g){if(1!=b.type)throw new O(2,4,4017);x=Aq(b.g,"EXT-X-DEFINE");v=$q(a,x);vr(a,b);return y?Md.D(2):A(Md,wr(a,f,e,b,v),3)}2!=Md.g&&(y=Md.h);w=[];if(b.segments)for(D=r(b.segments),z=D.next();!z.done;z=D.next())C=z.value,G=Aq(C.g,"EXT-X-KEY"),w.push.apply(w,ja(G));H=E=!1;J=[];M=new Set;Q=r(w);for(V=Q.next();!V.done;V=Q.next())if(aa=V.value,
|
|
724
724
|
ea=xq(aa,"METHOD"),"NONE"!=ea)if(E=!0,"AES-128"==ea)H=!0;else if(ma=xq(aa,"KEYFORMAT"),Ia=(Ca=xr[ma])?Ca(aa,y):null){if(Ia.keyIds)for(Ja=r(Ia.keyIds),Na=Ja.next();!Na.done;Na=Ja.next())Oa=Na.value,M.add(Oa);J.push(Ia)}if(E&&!J.length&&!H)throw new O(2,4,4026);gj.includes(y)&&(e="");Tc=new Map;Uc=a.l;vc=ar(a,b,f,Tc,v);Uc!=a.l&&vr(a,b);Id=vc[vc.length-1].endTime;Eb=new Dj(vc);Jd=f==Gb?"subtitle":void 0;hc=[];if(p)for(Kd=r(p.split(",")),Va=Kd.next();!Va.done;Va=Kd.next())tg=Va.value,hc.push(tg);hc.length||
|
|
725
725
|
"subtitle"!==Jd||hc.push("subtitle");gp=(ug=Cq(b.g,"EXT-X-SERVER-CONTROL"))?null!=ug.getAttribute("CAN-SKIP-UNTIL"):!1;hp={id:a.Ba++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Eb,mimeType:y,codecs:e,kind:Jd,encrypted:E,drmInfos:J,keyIds:M,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:hc,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,
|
|
726
|
-
closedCaptions:m,hdr:void 0,tilesLayout:void 0};return Md.return({stream:hp,Ld:c,$f:d,Qc:Id,Rc:Tc,fg:gp,Bf:!1})})}
|
|
726
|
+
closedCaptions:m,hdr:void 0,tilesLayout:void 0,external:!1};return Md.return({stream:hp,Ld:c,$f:d,Qc:Id,Rc:Tc,fg:gp,Bf:!1})})}
|
|
727
727
|
function yr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new O(2,4,4042);var d=0,e=W(b,"IV","");if(e){var f=ld(e.substr(2));if(16!=f.byteLength)throw new O(2,4,4043);}else d=Dq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Eq(c.h,xq(b,"URI"));var g=pf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return K(function(p){if(1==p.g)return A(p,
|
|
728
728
|
zr(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new O(2,4,4044);l={name:"AES-CBC"};m=h;return A(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;B(p)})}};return h}
|
|
729
729
|
function vr(a,b){var c=Cq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Cq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Zq(a,Tq);else{c?Zq(a,Ar):Zq(a,Br);d=Cq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Cq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ea=Number(xq(c,"PART-TARGET")),a.H=Math.min(a.ea,a.H),b=Cq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=b?Number(xq(b,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.ba=Math.max(d,a.ba)}}
|
|
730
|
-
function Cr(a,b,c,d){c=Cq(c,"EXT-X-MAP");if(!c)return null;var e=xq(c,"URI");d=tr(Eq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.
|
|
730
|
+
function Cr(a,b,c,d){c=Cq(c,"EXT-X-MAP");if(!c)return null;var e=xq(c,"URI");d=tr(Eq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.wa.has(b)||(c=Dr(d,c),a.wa.set(b,c));return a.wa.get(b)}function Dr(a,b){var c=0,d=null;if(b=W(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new wi(function(){return[a]},c,d)}
|
|
731
731
|
function Er(a,b,c,d,e,f,g,h,k){var l=d.g,m=tr(d.i,f),p=Cq(l,"EXTINF"),n=0;f=0;var t=null;d.h.length&&!a.l&&Ua("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var x=Cq(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(y=dg(x.value))}x=zi;Cq(l,"EXT-X-GAP")&&(x=2);if(!p){if(0==d.h.length)throw new O(2,4,4024,
|
|
732
732
|
"EXTINF");if(!a.l)return null}var v=[];if(a.l){n={};for(var w=0;w<d.h.length;n={Ud:n.Ud},w++){var D=d.h[w],z=0==w?c:v[v.length-1],C=0==w?e:z.endTime,G=Number(W(D,"DURATION"))||a.ea;if(G){G=C+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(E=W(D,"BYTERANGE-START"))?Number(E):0:(E=W(D,"BYTERANGE"),H=r(Fr(z,E)),E=H.next().value,H=H.next().value);if(z=W(D,"URI"))n.Ud=Eq(g,z),z=zi,"YES"==W(D,"GAP")&&(z=2),C=new yi(C,G,function(J){return function(){return[J.Ud]}}(n),E,H,b,0,0,Infinity,[],"",null,null,
|
|
733
733
|
z),"EXT-X-PRELOAD-HINT"==D.name&&C.Gf(),v.push(C)}}}if(p){a=Number(p.value.split(",")[0]);if(0==a)return null;n=e+a}else n=v[v.length-1].endTime;(a=Cq(l,"EXT-X-BYTERANGE"))?(t=r(Fr(c,a.value)),f=t.next().value,t=t.next().value):v.length&&(f=v[0].Va,t=v[v.length-1].Da);c="";a=null;"image"==h&&(c="1x1",h=Cq(l,"EXT-X-TILES"))&&(c=xq(h,"LAYOUT"),(h=W(h,"DURATION"))&&(a=Number(h)));return new yi(e,n,function(){return m.length?[m]:[]},f,t,b,0,0,Infinity,v,c,a,y,x,k)}
|
|
@@ -764,13 +764,13 @@ function ys(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.va
|
|
|
764
764
|
As.prototype.Ec=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Bs(a.periods[c],e),b.push(f);return A(h,Ip(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})})};
|
|
765
765
|
function Bs(a,b){Cs(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Ds(e,a.startTime,b)})}
|
|
766
766
|
function Ds(a,b,c){var d=a.initSegmentUri?Es(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Es(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
767
|
-
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}}As.prototype.qf=function(a){return{data:a.data}};function Es(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new O(2,9,9004,"Could not parse uri "+a);}
|
|
767
|
+
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}}As.prototype.qf=function(a){return{data:a.data}};function Es(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new O(2,9,9004,"Could not parse uri "+a);}
|
|
768
768
|
function Cs(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
769
769
|
f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Fs(){ls.apply(this,arguments)}u(Fs,ls);
|
|
770
770
|
Fs.prototype.Ec=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(Gs(p,k.startTime,k.startTime+e));f=l;b.push(f)}return A(h,Ip(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
771
771
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
772
772
|
function Gs(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
|
|
773
|
-
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Hs(){ls.apply(this,arguments)}u(Hs,ls);q=Hs.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return ps(this,a,b)};q.Ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Is(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Is.prototype;
|
|
773
|
+
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}};function Hs(){ls.apply(this,arguments)}u(Hs,ls);q=Hs.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return ps(this,a,b)};q.Ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Is(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Is.prototype;
|
|
774
774
|
q.init=function(){var a=this,b=new Kc,c=!1,d=new P(function(){c=!0;b.reject(new O(2,9,9017))});d.S(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new As(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Fs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
775
775
|
new Fs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Hs(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new qs(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new O(2,
|
|
776
776
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return A(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),B(b)}})};
|
|
@@ -783,7 +783,7 @@ g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:
|
|
|
783
783
|
function Os(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
|
|
784
784
|
b.next())for(e=e.value,g=Ps(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Ps(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
|
|
785
785
|
function Ps(a,b,c){var d=b.segments.map(function(e){return Qs(a,e)});c.mc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
|
|
786
|
-
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Qs(a,b){var c=new Ks("segment",a.h,a.g,b.dataKey);return new yi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Rs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
786
|
+
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,external:b.external}}function Qs(a,b){var c=new Ks("segment",a.h,a.g,b.dataKey);return new yi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Rs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
787
787
|
function Rs(a,b){var c=new Ks("segment",a.h,a.g,b);return new wi(function(){return[c.toString()]},0,null)};function Ss(){this.g=null}q=Ss.prototype;q.configure=function(){};
|
|
788
788
|
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=Ls(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new rs;ua(m);return A(m,e.init(),4);case 4:return A(m,vs(e,d.Ta(),d.Ca()),5);case 5:return f=m.h,A(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ms(d.Ta(),d.Ca()),l=Ns(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),A(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
789
789
|
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new rs,F(m,2,3),A(m,e.init(),5);case 5:return A(m,vs(e,d.Ta(),d.Ca()),6);case 6:return f=m.h,A(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return A(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),A(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
|
|
@@ -818,8 +818,8 @@ lt(a),A(l,c.start(b,g),2);if(3!=l.g)return h=l.h,lt(a),k=Ht(h),A(l,Promise.all(e
|
|
|
818
818
|
function mt(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new og({Pb:a.g,onError:c,Bd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),A(f,vg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return A(f,Jg(e),3);case 3:return A(f,Ig(e),4);case 4:return f.return(e)}})}
|
|
819
819
|
function xt(a,b,c,d){var e=new Map,f=Ht(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=It(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Se:Array.from(e.values())}}
|
|
820
820
|
function It(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
|
|
821
|
-
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;Jt(d,c.presentationTimeline.ob(),function(l){var m=Xr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=et(b,d.id)*n;n=$r(a.g,n);f.set(m,new Wr(l,n,k,!1))}l.i&&(p=Xr(l.i),f.has(p)||(n=.5*et(b,d.id),n=$r(a.g,n),f.set(p,new Wr(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,
|
|
822
|
-
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Jt(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 lt(a){if(a.l.g)throw new O(2,9,7001);}function jt(){if(!gt())throw new O(2,9,9E3);}function yt(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c),A(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);bc(a.i,b);return xa(c,0)})}
|
|
821
|
+
tilesLayout:d.tilesLayout,external:d.external},h=e.offline.numberOfParallelDownloads,k=0;Jt(d,c.presentationTimeline.ob(),function(l){var m=Xr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=et(b,d.id)*n;n=$r(a.g,n);f.set(m,new Wr(l,n,k,!1))}l.i&&(p=Xr(l.i),f.has(p)||(n=.5*et(b,d.id),n=$r(a.g,n),f.set(p,new Wr(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,
|
|
822
|
+
timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Jt(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 lt(a){if(a.l.g)throw new O(2,9,7001);}function jt(){if(!gt())throw new O(2,9,9E3);}function yt(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c),A(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);bc(a.i,b);return xa(c,0)})}
|
|
823
823
|
function it(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){bc(a.i,c)})}function Et(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
824
824
|
function Dt(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=xs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Ct(d,!1),videoCapabilities:Ct(d,!0)}});return A(h,Ws(b,a,f),2)}return 3!=h.g?(g=h.h,A(h,e.remove(g),3)):A(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
825
825
|
function Ht(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
@@ -999,9 +999,9 @@ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown"
|
|
|
999
999
|
"mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}u(hx,X);q=hx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};
|
|
1000
1000
|
q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};q.setValue=function(a){this.g||(this.bar.value=a)};
|
|
1001
1001
|
function ix(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}L("shaka.ui.RangeElement",hx);hx.prototype.setValue=hx.prototype.setValue;hx.prototype.getValue=hx.prototype.getValue;hx.prototype.changeTo=hx.prototype.changeTo;hx.prototype.onChangeEnd=hx.prototype.onChangeEnd;hx.prototype.onChange=hx.prototype.onChange;hx.prototype.onChangeStart=hx.prototype.onChangeStart;
|
|
1002
|
-
hx.prototype.setRange=hx.prototype.setRange;function jx(a,b){hx.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new P(function(){c.
|
|
1003
|
-
"locale-changed",function(){return lx(c)});this.eventManager.o(this.adManager,"ad-started",function(){mx(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){mx(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;nx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];nx(c)});this.setValue(this.video.currentTime);this.update();lx(this);
|
|
1004
|
-
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.s.stop(),this.s=null);hx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Ne(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.Aa();this.controls.Ne(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
1002
|
+
hx.prototype.setRange=hx.prototype.setRange;function jx(a,b){hx.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new P(function(){var d=c.getValue();c.player.U()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.s=new P(function(){kx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",
|
|
1003
|
+
function(){return lx(c)});this.eventManager.o(this.localization,"locale-changed",function(){return lx(c)});this.eventManager.o(this.adManager,"ad-started",function(){mx(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){mx(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;nx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];nx(c)});this.setValue(this.video.currentTime);this.update();lx(this);
|
|
1004
|
+
this.ad&&Y(this.container,!1)}u(jx,hx);q=jx.prototype;q.release=function(){this.h&&(this.h.stop(),this.h=null,this.s.stop(),this.s=null);hx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Ne(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.Aa();this.controls.Ne(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
1005
1005
|
q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ka(),g=f.end-f.start;this.setRange(f.start,f.end);mx(this)?(Y(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
|
|
1006
1006
|
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):Y(this.container,!1)};
|
|
1007
1007
|
function kx(a){if(a.i.length){for(var b=a.player.Ka(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|