shaka-player 3.3.15 → 3.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/locales.js +31 -31
- package/dist/shaka-player.compiled.debug.js +66 -64
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +194 -194
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +80 -78
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +196 -195
- package/dist/shaka-player.ui.map +3 -3
- package/lib/player.js +7 -1
- package/lib/text/ui_text_displayer.js +24 -4
- package/lib/text/web_vtt_generator.js +21 -9
- package/lib/util/dom_utils.js +3 -1
- package/lib/util/stream_utils.js +6 -0
- package/lib/util/timer.js +17 -0
- package/package.json +1 -1
- package/test/player_integration.js +27 -0
- package/test/player_unit.js +4 -2
- package/test/text/ui_text_displayer_unit.js +70 -0
|
@@ -26,8 +26,8 @@ ha("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!
|
|
|
26
26
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
|
|
27
27
|
b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.L(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.C()){var h=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C=
|
|
28
28
|
function(){if(this.o)return!1;var g=fa.CustomEvent,h=fa.Event,k=fa.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=fa.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
29
|
-
b.prototype.I=function(g){var h=this.j();g.
|
|
30
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).
|
|
29
|
+
b.prototype.I=function(g){var h=this.j();g.zc(h.resolve,h.reject)};b.prototype.L=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,q){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.zc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.zc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
30
|
+
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).zc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).zc(n(p.length-1),m),k=h.next();
|
|
31
31
|
while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
32
32
|
ha("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ja(k,g)){var l=new c;da(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
33
33
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
|
|
@@ -59,7 +59,7 @@ function tb(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b
|
|
|
59
59
|
ib.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:lb};var mb="center",ub={LEFT:"left",RIGHT:"right",CENTER:mb,START:"start",END:"end"};ib.textAlign=ub;var qb="after",vb={BEFORE:"before",CENTER:"center",AFTER:qb};ib.displayAlign=vb;var jb="ltr";ib.direction={HORIZONTAL_LEFT_TO_RIGHT:jb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var nb="horizontal-tb";ib.writingMode={HORIZONTAL_TOP_TO_BOTTOM:nb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ob=0;
|
|
60
60
|
ib.lineInterpretation={LINE_NUMBER:ob,PERCENTAGE:1};var pb="start",wb={CENTER:"center",START:pb,END:"end"};ib.lineAlign=wb;var xb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ib.defaultTextColor=xb;var yb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ib.defaultTextBackgroundColor=yb;var rb=400;ib.fontWeight={NORMAL:rb,BOLD:700};
|
|
61
61
|
var sb="normal",zb={NORMAL:sb,ITALIC:"italic",OBLIQUE:"oblique"};ib.fontStyle=zb;ib.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function kb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ab;this.scroll=Bb}M("shaka.text.CueRegion",kb);var Ab=1;kb.units={PX:0,PERCENTAGE:Ab,LINES:2};var Bb="";kb.scrollMode={NONE:Bb,UP:"up"};function Cb(){}function Db(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Eb(a)==Eb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Fb(a),d=Fb(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Eb(a){return a instanceof ArrayBuffer?a:a.buffer}function Gb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
62
|
-
function Fb(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,Uint8Array)}function Ib(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,DataView)}function Hb(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(Eb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Cb);Cb.toDataView=Ib;Cb.toUint8=Fb;Cb.toArrayBuffer=Gb;Cb.equal=Db;function Jb(a,b){this.g=a;this.h=b}Jb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Kb(a,b){var c=new Jb(4,0),d=Lb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Mb(a,b,c,d){Ua([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Nb(a,b,c,d){Ta([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Lb=null;function Ob(a,b){return a.concat(b)}function Pb(){}function
|
|
62
|
+
function Fb(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,Uint8Array)}function Ib(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,DataView)}function Hb(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(Eb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Cb);Cb.toDataView=Ib;Cb.toUint8=Fb;Cb.toArrayBuffer=Gb;Cb.equal=Db;function Jb(a,b){this.g=a;this.h=b}Jb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Kb(a,b){var c=new Jb(4,0),d=Lb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Mb(a,b,c,d){Ua([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Nb(a,b,c,d){Ta([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Lb=null;function Ob(a,b){return a.concat(b)}function Pb(){}function Qb(a){return null!=a}function Sb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Kb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Kb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Tb(){}M("shaka.dependencies",Tb);Tb.has=function(a){return Ub.has(a)};Tb.add=function(a,b){if(!Vb[a])throw Error(a+" is not supported");Ub.set(a,function(){return b})};var Vb={muxjs:"muxjs"};Tb.Allowed=Vb;var Ub=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c){var d=Ha.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",N);N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
63
63
|
N.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
|
|
64
64
|
TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,
|
|
65
65
|
WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,
|
|
@@ -77,16 +77,16 @@ var Wb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
77
77
|
Copyright 2006 The Closure Library Authors
|
|
78
78
|
SPDX-License-Identifier: Apache-2.0
|
|
79
79
|
*/
|
|
80
|
-
function Xb(a){var b;a instanceof Xb?(Yb(this,a.Fa),this.rb=a.rb,this.
|
|
81
|
-
r.toString=function(){var a=[],b=this.Fa;b&&a.push(cc(b,dc,!0),":");if(b=this.
|
|
82
|
-
r.resolve=function(a){var b=this.clone();"data"===b.Fa&&(b=new Xb);var c=!!a.Fa;c?Yb(b,a.Fa):c=!!a.rb;c?b.rb=a.rb:c=!!a.
|
|
83
|
-
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.wa=d:c=""!==a.g.toString();c?$b(b,a.g.clone()):c=!!a.fb;c&&(b.fb=a.fb);return b};r.clone=function(){return new Xb(this)};function Yb(a,b,c){a.Fa=c?ac(b,!0):b;a.Fa&&(a.Fa=a.Fa.replace(/:$/,""))}function Zb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.
|
|
80
|
+
function Xb(a){var b;a instanceof Xb?(Yb(this,a.Fa),this.rb=a.rb,this.Ha=a.Ha,Zb(this,a.Jb),this.wa=a.wa,$b(this,a.g.clone()),this.fb=a.fb):a&&(b=String(a).match(Wb))?(Yb(this,b[1]||"",!0),this.rb=ac(b[2]||""),this.Ha=ac(b[3]||"",!0),Zb(this,b[4]),this.wa=ac(b[5]||"",!0),$b(this,b[6]||"",!0),this.fb=ac(b[7]||"")):this.g=new bc(null)}r=Xb.prototype;r.Fa="";r.rb="";r.Ha="";r.Jb=null;r.wa="";r.fb="";
|
|
81
|
+
r.toString=function(){var a=[],b=this.Fa;b&&a.push(cc(b,dc,!0),":");if(b=this.Ha){a.push("//");var c=this.rb;c&&a.push(cc(c,dc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Jb;null!=b&&a.push(":",String(b))}if(b=this.wa)this.Ha&&"/"!=b.charAt(0)&&a.push("/"),a.push(cc(b,"/"==b.charAt(0)?ec:fc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.fb)&&a.push("#",cc(b,gc));return a.join("")};
|
|
82
|
+
r.resolve=function(a){var b=this.clone();"data"===b.Fa&&(b=new Xb);var c=!!a.Fa;c?Yb(b,a.Fa):c=!!a.rb;c?b.rb=a.rb:c=!!a.Ha;c?b.Ha=a.Ha:c=null!=a.Jb;var d=a.wa;if(c)Zb(b,a.Jb);else if(c=!!a.wa){if("/"!=d.charAt(0))if(this.Ha&&!this.wa)d="/"+d;else{var e=b.wa.lastIndexOf("/");-1!=e&&(d=b.wa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
83
|
+
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.wa=d:c=""!==a.g.toString();c?$b(b,a.g.clone()):c=!!a.fb;c&&(b.fb=a.fb);return b};r.clone=function(){return new Xb(this)};function Yb(a,b,c){a.Fa=c?ac(b,!0):b;a.Fa&&(a.Fa=a.Fa.replace(/:$/,""))}function Zb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Jb=b}else a.Jb=null}function $b(a,b,c){b instanceof bc?a.g=b:(c||(b=cc(b,hc)),a.g=new bc(b))}
|
|
84
84
|
function ac(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function cc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,ic),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function ic(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var dc=/[#\/\?@]/g,fc=/[#\?:]/g,ec=/[#\?]/g,hc=/[#\?@]/g,gc=/#/g;function bc(a){this.g=a||null}
|
|
85
|
-
function jc(a){if(!a.na&&(a.na={},a.
|
|
86
|
-
r.set=function(a,b){jc(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new bc;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.
|
|
85
|
+
function jc(a){if(!a.na&&(a.na={},a.Bc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=bc.prototype;r.na=null;r.Bc=null;r.add=function(a,b){jc(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.Bc++;return this};
|
|
86
|
+
r.set=function(a,b){jc(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new bc;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Bc=this.Bc}return a};function kc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Xb(d)});return a.map(function(d){return new Xb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ob,[]).map(function(d){return d.toString()})}function lc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
87
87
|
function mc(a,b){if(1==b.length)return b[0];var c=nc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function nc(a,b){for(var c=t(oc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==pc?"":null}
|
|
88
|
-
var pc="text",qc={Na:"video",cb:"audio",Z:pc,
|
|
89
|
-
O.prototype.tickNow=O.prototype.
|
|
88
|
+
var pc="text",qc={Na:"video",cb:"audio",Z:pc,Tb:"image",ig:"application"},oc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function rc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}rc.prototype.resolve=function(){};rc.prototype.reject=function(){};function sc(a){this.h=a;this.g=void 0}sc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function tc(a){this.h=a;this.g=null}tc.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};tc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Nb=function(){this.stop();this.h();return this};O.prototype.S=function(a){var b=this;this.stop();this.g=(new tc(function(){b.h()})).S(a);return this};O.prototype.Da=function(a){var b=this;this.stop();this.g=(new tc(function(){b.g.S(a);b.h()})).S(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Da;O.prototype.tickAfter=O.prototype.S;
|
|
89
|
+
O.prototype.tickNow=O.prototype.Nb;function uc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function vc(a){return""!=wc().canPlayType(a)}function xc(){return yc("Xbox One")}function zc(){return yc("Tizen")}function Ac(){return yc("Web0S")}function Bc(){return yc("CrKey")}function Cc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!zc()&&!yc("PC=EOS")&&!yc("VirginMedia")&&!Dc()&&!yc("AFT")}function Dc(){return yc("PlayStation 4")}
|
|
90
90
|
function Fc(){if(!Cc())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 yc(a){return(navigator.userAgent||"").includes(a)}function wc(){if(Gc)return Gc;Hc||(Hc=new O(function(){Gc=null}));(Gc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Gc=document.createElement("video"));Hc.S(1);return Gc}var Hc=null,Gc=null;function Ic(){}
|
|
91
91
|
function Jc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Dc())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==
|
|
92
92
|
(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}
|
|
@@ -121,8 +121,8 @@ function Gd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Id
|
|
|
121
121
|
function Md(a){var b="",c=Infinity;Ad(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Hd(a){var b="";a.video&&(b=cd(a.video.codecs));var c="";a.audio&&(c=cd(a.audio.codecs));return b+"-"+c}function Nd(a,b,c){a.variants=a.variants.filter(function(d){return Od(d,b,c)})}
|
|
122
122
|
function Od(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
|
|
123
123
|
function Pd(a,b){return L(function(c){if(1==c.g)return u(c,Qd(b,0<b.offlineSessionIds.length),2);Rd(a,b);Sd(b);Td(b);A(c)})}
|
|
124
|
-
function Qd(a,b){return L(function(c){if(1==c.g)return u(c,Ud(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Vd(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=mc("video",g);f=Vd(f);g=mc("audio",g);g=Wd(g);
|
|
125
|
-
if(xc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(Xd(d)),!1;(e=d.decodingInfos.some(function(
|
|
124
|
+
function Qd(a,b){return L(function(c){if(1==c.g)return u(c,Ud(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Vd(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=mc("video",g);f=Vd(f);g=mc("audio",g);g=Wd(g);var h=bd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;f=[f,g].join()}g=bd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(g))return!1;e.codecs=f}if(f=d.audio){g=Wd(f.codecs);h=bd(f.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;
|
|
125
|
+
f.codecs=g}if(xc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(Xd(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||Za(Xd(d));return e});A(c)})}
|
|
126
126
|
function Ud(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,w){var x;return L(function(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(w),4);if(2!=D.g)return x=D.h,y.decodingInfos.push(x),va(D,0);E(D);JSON.stringify(w);A(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Yd(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,f.push(g(l,q));return u(v,Promise.all(f),
|
|
127
127
|
0)})}
|
|
128
128
|
function Yd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=mc("video",g);f=Vd(f);g=mc("audio",g);g=bd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Vd(f);f=bd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
@@ -157,7 +157,7 @@ function Ee(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,
|
|
|
157
157
|
function Ke(a){return new Fe(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Fe.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
158
158
|
Fe.prototype.$=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Le(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new rc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Fe(f,function(){return d()})};
|
|
159
159
|
function Le(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",Fe);Fe.prototype.chain=Fe.prototype.$;Fe.prototype["finally"]=Fe.prototype["finally"];Fe.all=Ke;Fe.prototype.abort=Fe.prototype.abort;Fe.notAbortable=Je;Fe.completed=Ie;Fe.aborted=He;Fe.failed=Ge;function Q(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
160
|
-
function Me(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",Q);function Ne(){this.ea=new zd;this.
|
|
160
|
+
function Me(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",Q);function Ne(){this.ea=new zd;this.Ec=this}Ne.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};Ne.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};Ne.prototype.dispatchEvent=function(a){if(!this.ea)return!0;var b=this.ea.get(a.type)||[],c=this.ea.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Ec;a.currentTarget=this.Ec;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
161
161
|
Ne.prototype.release=function(){this.ea=null};function Oe(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Pe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Qe(){this.g=[]}function Re(a,b){a.g.push(b["finally"](function(){fb(a.g,b)}))}Qe.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Se(a,b,c){Ne.call(this);this.i=!1;this.m=new Qe;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}qa(Se,Ne);r=Se.prototype;r.Vd=function(a){this.o=a};function Te(a,b,c,d){c=c||Ue;var e=Ve[a];if(!e||c>=e.priority)Ve[a]={priority:c,Mf:b,Nf:void 0===d?!1:d}}r.Of=function(a){this.g.add(a)};r.dg=function(a){this.g["delete"](a)};r.Ue=function(){this.g.clear()};r.Pf=function(a){this.h.add(a)};r.eg=function(a){this.h["delete"](a)};r.Ve=function(){this.h.clear()};
|
|
162
162
|
function We(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Ne.prototype.release.call(this);return this.m.destroy()};
|
|
163
163
|
r.request=function(a,b){var c=this,d=new Xe;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new Ye(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Oe(b.retryParameters):De();b.uris=Oe(b.uris);e=Ze(this,a,b);var f=e.$(function(){return $e(c,a,b,new Ce(b.retryParameters,!1),0,null,d)}),g=f.$(function(n){return af(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
@@ -168,10 +168,10 @@ if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){
|
|
|
168
168
|
c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new Q("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,$e(a,b,c,d,e,x,g)}throw x;})}
|
|
169
169
|
function af(a,b,c){var d=Ie(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={hd:e.hd},f=a.next())e.hd=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.hd(b,h)}}(e));return d.$(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Se);Se.prototype.request=Se.prototype.request;Se.prototype.destroy=Se.prototype.destroy;Se.makeRequest=We;
|
|
170
170
|
Se.defaultRetryParameters=function(){return De()};Se.prototype.clearAllResponseFilters=Se.prototype.Ve;Se.prototype.unregisterResponseFilter=Se.prototype.eg;Se.prototype.registerResponseFilter=Se.prototype.Pf;Se.prototype.clearAllRequestFilters=Se.prototype.Ue;Se.prototype.unregisterRequestFilter=Se.prototype.dg;Se.prototype.registerRequestFilter=Se.prototype.Of;Se.unregisterScheme=function(a){delete Ve[a]};Se.registerScheme=Te;Se.prototype.setForceHTTPS=Se.prototype.Vd;function Xe(){this.g=0}
|
|
171
|
-
Se.NumBytesRemainingClass=Xe;function Ye(a,b,c){Fe.call(this,a,b);this.h=c}qa(Ye,Fe);Se.PendingRequest=Ye;var bf=1;Se.RequestType={MANIFEST:0,SEGMENT:bf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Ue=3;Se.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ue};var Ve={};function cf(a){this.g=!1;this.h=new rc;this.i=a}cf.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 df(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function ef(){this.g=new zd}r=ef.prototype;r.release=function(){this.Sa();this.g=null};r.A=function(a,b,c,d){this.g&&(a=new ff(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.
|
|
172
|
-
r.Sa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.
|
|
173
|
-
ff.prototype.
|
|
174
|
-
function hf(a){var b=jf;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}jf=b}return b||!1}var jf=void 0;function kf(){}function lf(a){a=Mc(a);return(new Xb(a)).
|
|
171
|
+
Se.NumBytesRemainingClass=Xe;function Ye(a,b,c){Fe.call(this,a,b);this.h=c}qa(Ye,Fe);Se.PendingRequest=Ye;var bf=1;Se.RequestType={MANIFEST:0,SEGMENT:bf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Ue=3;Se.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ue};var Ve={};function cf(a){this.g=!1;this.h=new rc;this.i=a}cf.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 df(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function ef(){this.g=new zd}r=ef.prototype;r.release=function(){this.Sa();this.g=null};r.A=function(a,b,c,d){this.g&&(a=new ff(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.qc(a,b,e);c(g)}var f=this;this.A(a,b,e,d)};r.qc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.qc(),this.g.remove(b,e))}};
|
|
172
|
+
r.Sa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.qc();this.g.g={}}};M("shaka.util.EventManager",ef);ef.prototype.removeAll=ef.prototype.Sa;ef.prototype.unlisten=ef.prototype.qc;ef.prototype.listenOnce=ef.prototype.oa;ef.prototype.listen=ef.prototype.A;ef.prototype.release=ef.prototype.release;function ff(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
173
|
+
ff.prototype.qc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gf(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 hf(a)?b:b.capture||!1}
|
|
174
|
+
function hf(a){var b=jf;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}jf=b}return b||!1}var jf=void 0;function kf(){}function lf(a){a=Mc(a);return(new Xb(a)).Ha}function mf(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Oc(b,!0):e=b;a=Mc(a);a=Oc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",kf);kf.initDataTransform=mf;kf.defaultGetContentId=lf;function nf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function of(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function pf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function qf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function rf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function sf(a,b){var c=tf(a,b);return 1!=c.length?null:c[0]}function uf(a,b,c){a=vf(a,b,c);return 1!=a.length?null:a[0]}function tf(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function wf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
175
175
|
function vf(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function xf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function yf(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function zf(a){return Array.from(a.childNodes).every(Af)?a.textContent.trim():null}
|
|
176
176
|
function Af(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Bf(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Cf(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
|
|
177
177
|
function Df(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}
|
|
@@ -185,9 +185,9 @@ Ud(b,a.L,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.ca=!0,w["re
|
|
|
185
185
|
r.Wb=function(a){var b=this,c,d;return L(function(e){if(1==e.g){if(!b.s)return b.o.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),e["return"]();b.l=a;b.o.oa(b.l,"play",function(){for(var f=t(b.I),g=f.next();!g.done;g=f.next())cg(b,g.value);b.N=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.A(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Tf(b)});c=b.l.setMediaKeys(b.s);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
|
|
186
186
|
c,2)}df(b.j);dg(b);b.g.initData.length||b.C.length||(d=function(f){return eg(b,f.initDataType,Fb(f.initData))},b.o.A(b.l,"encrypted",d));A(e)})};
|
|
187
187
|
function fg(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=We([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.nb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=E(g),new N(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
|
|
188
|
-
C(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=E(g),new N(2,6,6004,f.message);}})}function gg(a,b){var c,d,e;return L(function(f){if(1==f.g)return u(f,hg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.
|
|
188
|
+
C(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=E(g),new N(2,6,6004,f.message);}})}function gg(a,b){var c,d,e;return L(function(f){if(1==f.g)return u(f,hg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ka=new rc,d.push(e.Ka);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);A(f)})}
|
|
189
189
|
function dg(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,eg(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())hg(a,d.value);b.length||a.C.length||a.u.resolve();return a.u}function eg(a,b,c){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&!yc("Tizen 2"))return;ig(a,b,c,a.g.sessionType)}function jg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
|
|
190
|
-
function kg(a){a=a.i.keys();a=nf(a,function(b){return b.sessionId});return Array.from(a)}r.
|
|
190
|
+
function kg(a){a=a.i.keys();a=nf(a,function(b){return b.sessionId});return Array.from(a)}r.cc=function(){var a=Infinity,b=this.i.keys();b=t(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};r.Gc=function(){return qf(this.da)};
|
|
191
191
|
function Yf(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=lg(a,c,d);w.B(2);break}return u(w,mg(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new N(2,6,6001);df(a.j);C(w,4);a.F.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.F.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.F.add(q.contentType.toLowerCase());if(c.length){var x=
|
|
192
192
|
f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],F=[],G=[],H=new Set;ng(D,z,F,B,G,H);var I=a.L?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||I,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};D=t(D);for(z=D.next();!z.done;z=
|
|
193
193
|
D.next())z=z.value,z.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(x.persistentStateRequired=z.persistentStateRequired);D=x}else D=f.keySystem,x=b.get(f.keySystem),z=[],B=[],F=[],G=[],H=new Set,ng(x.drmInfos,z,F,B,G,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
|
|
@@ -198,14 +198,14 @@ function mg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w;return L(function(x){switch(x
|
|
|
198
198
|
x.h,x["return"](c);case 6:E(x);case 7:df(a.j);case 3:h=g.next();x.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){x.B(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();x.B(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(w!=p){x.B(13);break}C(x,15);return u(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x["return"](c);case 15:E(x);case 16:df(a.j);case 13:h=q.next();x.B(12);break;case 11:return x["return"](c)}})}
|
|
199
199
|
function Zf(a){a=pf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Tc(f),h=Tc(e);g={kty:"oct",kid:Rc(g,!1),k:Rc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(Nc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
200
200
|
serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
201
|
-
function hg(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.A(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(k):cg(a,k)});a.o.A(c,"keystatuseschange",function(k){return og(a,k)});e={initData:null,loaded:!1,Kd:Infinity,
|
|
201
|
+
function hg(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.A(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(k):cg(a,k)});a.o.A(c,"keystatuseschange",function(k){return og(a,k)});e={initData:null,loaded:!1,Kd:Infinity,Ka:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=h.h;df(a.j);
|
|
202
202
|
if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;pg(a)&&a.u.resolve();return h["return"](c);case 2:g=E(h),df(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
|
|
203
|
-
function ig(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.A(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(f):cg(a,f)});a.o.A(e,"keystatuseschange",function(f){return og(a,f)});a.i.set(e,{initData:c,loaded:!1,Kd:Infinity,
|
|
203
|
+
function ig(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.A(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(f):cg(a,f)});a.o.A(e,"keystatuseschange",function(f){return og(a,f)});a.i.set(e,{initData:c,loaded:!1,Kd:Infinity,Ka:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Rc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
|
|
204
204
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new N(2,6,6006,f.message,f,h))}})}function qg(a,b,c){"skd"==b&&(b=c.serverCertificate,c=lf(a),a=mf(a,c,b));return a}
|
|
205
205
|
function cg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;L(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&Rc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=We([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,jg(a.g.keySystem)&&rg(g),h=Date.now(),C(w,2),l=a.D.nb.request(2,g),u(w,
|
|
206
|
-
l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=E(w),n=new N(2,6,6007,m),a.m(n),d&&d.
|
|
206
|
+
l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=E(w),n=new N(2,6,6007,m),a.m(n),d&&d.Ka&&d.Ka.reject(n),w["return"]();case 3:if(a.j.g)return w["return"]();a.G+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Rc(k.data);C(w,5);return u(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return p=E(w),q=new N(2,6,6008,p.message),a.m(q),d&&d.Ka&&d.Ka.reject(q),w["return"]();case 6:if(a.j.g)return w["return"]();v=new Q("drmsessionupdate");a.D.onEvent(v);d&&(d.Ka&&d.Ka.resolve(),y=new O(function(){d.loaded=
|
|
207
207
|
!0;pg(a)&&a.u.resolve()}),y.S(sg));A(w)}})}function rg(a){var b=Kc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=Mf(b,"PlayReadyKeyMessage");for(var c=t(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=Sc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
208
|
-
function og(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(jg(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||Dc())){k=Ib(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Uc(h).slice(0,32);a.ka.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.
|
|
208
|
+
function og(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(jg(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||Dc())){k=Ib(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Uc(h).slice(0,32);a.ka.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ka&&(a.i["delete"](c),
|
|
209
209
|
c.close()["catch"](function(){}));pg(a)&&(a.u.resolve(),a.V.S(tg))}function Qf(a){var b=a.ka,c=a.da;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 N(2,6,6014));a.D.Pc(qf(c))}
|
|
210
210
|
function ug(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
|
|
211
211
|
c],f=new Map,g=function(l){var m,n,p;return L(function(q){switch(q.g){case 1:return C(q,2),u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,yc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:E(q),f.set(l,null),A(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](qf(f))})}
|
|
@@ -215,16 +215,16 @@ function xg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a)
|
|
|
215
215
|
e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
|
|
216
216
|
initData:f.Ea,keyIds:g});break}}return c}function ag(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Rf(a){a.i.forEach(function(b,c){var d=b.Kd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Kd=e)})}function pg(a){a=a.i.values();return of(a,function(b){return b.loaded})}
|
|
217
217
|
function $f(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
|
|
218
|
-
function ng(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={ra:g.ra},h=a.next()){g.ra=h.value;b.includes(g.ra.licenseServerUri)||b.push(g.ra.licenseServerUri);d.includes(g.ra.serverCertificateUri)||d.push(g.ra.serverCertificateUri);g.ra.serverCertificate&&(c.some(function(m){return function(n){return Db(n,m.ra.serverCertificate)}}(g))||c.push(g.ra.serverCertificate));if(g.ra.initData){h={};for(var k=t(g.ra.initData),l=k.next();!l.done;h={
|
|
219
|
-
m.
|
|
218
|
+
function ng(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={ra:g.ra},h=a.next()){g.ra=h.value;b.includes(g.ra.licenseServerUri)||b.push(g.ra.licenseServerUri);d.includes(g.ra.serverCertificateUri)||d.push(g.ra.serverCertificateUri);g.ra.serverCertificate&&(c.some(function(m){return function(n){return Db(n,m.ra.serverCertificate)}}(g))||c.push(g.ra.serverCertificate));if(g.ra.initData){h={};for(var k=t(g.ra.initData),l=k.next();!l.done;h={tc:h.tc},l=k.next())h.tc=l.value,e.some(function(m){return function(n){var p=
|
|
219
|
+
m.tc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.tc)}if(g.ra.keyIds)for(h=t(g.ra.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
220
220
|
function bg(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
|
|
221
221
|
(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var wg=1,sg=5,tg=.5,yg=new sc(function(){return Gb(new Uint8Array([0]))});function zg(){}function Ag(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){if(d&&(e=Bg[d.toLowerCase()]))return k["return"](e);if(f=Cg(a))if(g=Dg[f])return k["return"](g);return d?k.B(2):u(k,Eg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Bg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
|
|
222
222
|
function Eg(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=We([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function Cg(a){a=(new Xb(a)).wa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",zg);zg.unregisterParserByMime=function(a){delete Bg[a]};zg.registerParserByMime=function(a,b){Bg[a]=b};
|
|
223
|
-
zg.registerParserByExtension=function(a,b){Dg[a]=b};var Bg={},Dg={};function Fg(a,b){this.O=Ib(a);this.h=b==Gg;this.g=0}r=Fg.prototype;r.ma=function(){return this.g<this.O.byteLength};r.X=function(){return this.g};r.gf=function(){return this.O.byteLength};r.Y=function(){try{var a=this.O.getUint8(this.g);this.g+=1;return a}catch(b){throw Hg();}};r.
|
|
224
|
-
r.we=function(){try{var a=this.O.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Hg();}};r.
|
|
225
|
-
r.skip=function(a){if(this.g+a>this.O.byteLength)throw Hg();this.g+=a};r.ye=function(a){if(this.g<a)throw Hg();this.g-=a};r.seek=function(a){if(0>a||a>this.O.byteLength)throw Hg();this.g=a};r.
|
|
226
|
-
Fg.prototype.skip=Fg.prototype.skip;Fg.prototype.readBytes=Fg.prototype.Za;Fg.prototype.readUint64=Fg.prototype.
|
|
227
|
-
r.Rc=function(a,b,c,d){var e=b.X();if(d&&e+8>b.O.byteLength)this.g=!0;else{var f=b.M(),g=b.M(),h=!1;switch(f){case 0:f=b.O.byteLength-e;break;case 1:if(d&&b.X()+8>b.O.byteLength){this.g=!0;return}f=b.
|
|
223
|
+
zg.registerParserByExtension=function(a,b){Dg[a]=b};var Bg={},Dg={};function Fg(a,b){this.O=Ib(a);this.h=b==Gg;this.g=0}r=Fg.prototype;r.ma=function(){return this.g<this.O.byteLength};r.X=function(){return this.g};r.gf=function(){return this.O.byteLength};r.Y=function(){try{var a=this.O.getUint8(this.g);this.g+=1;return a}catch(b){throw Hg();}};r.Kb=function(){try{var a=this.O.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Hg();}};r.M=function(){try{var a=this.O.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Hg();}};
|
|
224
|
+
r.we=function(){try{var a=this.O.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Hg();}};r.Lb=function(){try{if(this.h){var a=this.O.getUint32(this.g,!0);var b=this.O.getUint32(this.g+4,!0)}else b=this.O.getUint32(this.g,!1),a=this.O.getUint32(this.g+4,!1)}catch(c){throw Hg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Za=function(a){if(this.g+a>this.O.byteLength)throw Hg();var b=Fb(this.O,this.g,a);this.g+=a;return b};
|
|
225
|
+
r.skip=function(a){if(this.g+a>this.O.byteLength)throw Hg();this.g+=a};r.ye=function(a){if(this.g<a)throw Hg();this.g-=a};r.seek=function(a){if(0>a||a>this.O.byteLength)throw Hg();this.g=a};r.kc=function(){for(var a=this.g;this.ma()&&0!=this.O.getUint8(this.g);)this.g+=1;a=Fb(this.O,a,this.g-a);this.g+=1;return Jc(a)};function Hg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",Fg);Fg.prototype.readTerminatedString=Fg.prototype.kc;Fg.prototype.seek=Fg.prototype.seek;Fg.prototype.rewind=Fg.prototype.ye;
|
|
226
|
+
Fg.prototype.skip=Fg.prototype.skip;Fg.prototype.readBytes=Fg.prototype.Za;Fg.prototype.readUint64=Fg.prototype.Lb;Fg.prototype.readInt32=Fg.prototype.we;Fg.prototype.readUint32=Fg.prototype.M;Fg.prototype.readUint16=Fg.prototype.Kb;Fg.prototype.readUint8=Fg.prototype.Y;Fg.prototype.getLength=Fg.prototype.gf;Fg.prototype.getPosition=Fg.prototype.X;Fg.prototype.hasMoreData=Fg.prototype.ma;var Gg=1;Fg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Gg};function Ig(){this.i=[];this.h=[];this.g=!1}r=Ig.prototype;r.box=function(a,b){var c=Jg(a);this.i[c]=Kg;this.h[c]=b;return this};r.P=function(a,b){var c=Jg(a);this.i[c]=Lg;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Fg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Rc(0,a,b,c)};
|
|
227
|
+
r.Rc=function(a,b,c,d){var e=b.X();if(d&&e+8>b.O.byteLength)this.g=!0;else{var f=b.M(),g=b.M(),h=!1;switch(f){case 0:f=b.O.byteLength-e;break;case 1:if(d&&b.X()+8>b.O.byteLength){this.g=!0;return}f=b.Lb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Lg){if(d&&b.X()+4>b.O.byteLength){this.g=!0;return}m=b.M();l=m>>>24;m&=16777215}g=e+f;c&&g>b.O.byteLength&&(g=b.O.byteLength);d&&g>b.O.byteLength?this.g=!0:(d=g-b.X(),b=0<d?b.Za(d):new Uint8Array(0),b=new Fg(b,0),k({parser:this,partialOkay:c||
|
|
228
228
|
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.X(),b.O.byteLength-b.X()))}};function Mg(a){for(var b=Ng(a);a.reader.ma()&&!a.parser.g;)a.parser.Rc(a.start+b,a.reader,a.partialOkay)}function Og(a){for(var b=Ng(a),c=a.reader.M(),d=0;d<c&&(a.parser.Rc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Pg(a){return function(b){a(b.reader.Za(b.reader.O.byteLength-b.reader.X()))}}
|
|
229
229
|
function Jg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Qg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Ng(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Ig);Ig.headerSize=Ng;Ig.typeToString=Qg;Ig.allData=Pg;Ig.sampleDescription=Og;Ig.children=Mg;Ig.prototype.parseNext=Ig.prototype.Rc;Ig.prototype.parse=Ig.prototype.parse;Ig.prototype.stop=Ig.prototype.stop;
|
|
230
230
|
Ig.prototype.fullBox=Ig.prototype.P;Ig.prototype.box=Ig.prototype.box;var Kg=0,Lg=1;function Rg(a){function b(){d=!0}function c(l){f.push(l);Mg(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new Ig).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).P("stsd",function(l){e=l;f.push(l);Og(l)}).P("encv",b).P("enca",b).P("hev1",function(l){g.push({box:l,ob:1701733238})}).P("hvc1",function(l){g.push({box:l,ob:1701733238})}).P("avc1",function(l){g.push({box:l,ob:1701733238})}).P("avc3",function(l){g.push({box:l,ob:1701733238})}).P("ac-3",function(l){g.push({box:l,ob:1701733217})}).P("ec-3",
|
|
@@ -251,13 +251,13 @@ d=1===(d&1);if(c.h!==qh){f=c.g;if(c.h===ph&&e!==f.g){var k=1+e-f.h;lh(f,k,1+f.g-
|
|
|
251
251
|
0,h-1),bh(e,e.g,15-e.g),c.j=d,e=g);break;case 46:bh(c.l,0,15);break;case 47:e=null,c.h!==qh&&(e=ah(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,rh(c),c.j=d}d=e;break a}d=null}else e=b.Oa,ch(c.g,dh,b.Aa),ch(c.g,dh,e);return d}
|
|
252
252
|
function Vh(a,b){var c=[];try{for(;b.ma();){var d=Ih(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Ih(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Jh(e));for(var g=a.j.get(e),h=b.X();b.X()-h<f;){e=b;var k=Ih(e),l=k.value,m=k.pts;if(16===l){var n=Ih(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Bh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.C-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Ch(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,y=1;16>y;y++,
|
|
253
253
|
v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=zh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Ch(q,p,g.i));q.i[q.h]=zh();q.g=0;break;case 12:q.isVisible()&&(e=Ch(q,p,g.i)),yh(q),p=q,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Kh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Ah(g.g,"\u266a"):Ah(g.g,
|
|
254
|
-
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Ah(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Qh.has(e)){var x=Qh.get(e);Ah(g.g,x)}else Ah(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Ah(g.g,"_"):Ah(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Wh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Xh(a,b){var c=null,d=null,e=a.M();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:e,he:c,Xe:d}}function Yh(a,b){return{pd:1==b?a.
|
|
254
|
+
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Ah(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Qh.has(e)){var x=Qh.get(e);Ah(g.g,x)}else Ah(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Ah(g.g,"_"):Ah(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Wh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Xh(a,b){var c=null,d=null,e=a.M();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:e,he:c,Xe:d}}function Yh(a,b){return{pd:1==b?a.Lb():a.M()}}function Zh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.M()}}
|
|
255
255
|
function $h(a,b,c){var d=a.M(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Rd:null,sampleSize:null,Tc:null};c&256&&(g.Rd=a.M());c&512&&(g.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(g.Tc=0==b?a.M():a.we());e.push(g)}return{Rg:d,ze:e}};function ai(){this.i=new Map;this.h=this.g=0}
|
|
256
256
|
ai.prototype.init=function(a){var b=this,c=[],d=[];(new Ig).box("moov",Mg).box("mvex",Mg).P("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.M();f=f.M();b.g=e;b.h=f}).box("trak",Mg).P("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.M();c.push(e)}).box("mdia",Mg).P("mdhd",function(e){e=Zh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
257
257
|
ai.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Ig).box("moof",Mg).box("traf",Mg).P("trun",function(k){f=$h(k.reader,k.version,k.flags).ze}).P("tfhd",function(k){k=Xh(k.reader,k.flags);d=k.he||b.g;e=k.Xe||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).P("tfdt",function(k){g=Yh(k.reader,k.version).pd}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,y=p;for(q.length&&(y=q[0].sampleSize||p);k.ma();){var w=k.M();if(6==
|
|
258
258
|
(k.Y()&31)){var x=0;q.length>v&&(x=q[v].Tc||0);x=(l+x)/m;for(var D=[],z,B=k.Za(w-1),F=z=0;F<B.length;)2==z&&3==B[F]?(z=0,B=[].concat(ja(B)),B.splice(F,1),B=new Uint8Array(B)):0==B[F]?z++:z=0,F++;z=B;for(F=0;F<z.length;){for(B=0;255==z[F];)B+=255,F++;B+=z[F++];for(var G=0;255==z[F];)G+=255,F++;G+=z[F++];4==B&&D.push(z.subarray(F,F+G));F+=G}D=t(D);for(z=D.next();!z.done;z=D.next())c.push({Lf:z.value,pts:x})}else try{k.skip(w-1)}catch(H){break}y-=w+4;0==y&&(l=q.length>v?l+(q[v].Rd||n):l+n,v++,y=q.length>
|
|
259
259
|
v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function bi(){this.h=new ai;this.g=new Rh}bi.prototype.init=function(a){this.h.init(a)};
|
|
260
|
-
function ci(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Lf);if(0<f.length&&(d=a.g,e=e.pts,f=new Fg(f,0),181===f.Y()&&49===f.
|
|
260
|
+
function ci(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Lf);if(0<f.length&&(d=a.g,e=e.pts,f=new Fg(f,0),181===f.Y()&&49===f.Kb()&&1195456820===f.M()&&3===f.Y())){var g=f.Y();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Y(),l=(k&4)>>2,m=f.Y(),n=f.Y();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Aa:m,Oa:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Th(a.g)}
|
|
261
261
|
;function di(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ei(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function fi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(gi(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
|
|
262
262
|
function hi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=gi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function gi(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 ii(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.I={};this.G={};this.g=null;this.L=d||function(){};this.i={};this.o=new ef;this.s={};this.u=b;this.D=new rc;this.m=mi(this,this.D);this.C=new cf(function(){return ni(e)});this.F=""}function mi(a,b){var c=new MediaSource;a.o.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.F);b.resolve()});a.F=oi(c);a.j.src=a.F;return c}r=ii.prototype;r.destroy=function(){return this.C.destroy()};
|
|
263
263
|
function ni(a){var b,c,d,e,f,g,h,k;return L(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"](Pb)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.s={};a.u=null;a.i=
|
|
@@ -269,87 +269,87 @@ function wi(a,b,c,d,e,f){var g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g){g=q
|
|
|
269
269
|
m,e));l.captions&&l.captions.length&&(n=a.h[g.Na].timestampOffset,p=ld(l.captions),od(a.g,p,d,e,n));q=l.data;q=xi(a,q,d,b);return u(v,yi(a,b,function(){a.h[b].appendBuffer(q)}),0)})}function zi(a,b){var c=ui(a,"video")||0;kd(a.g,b,c)}function Ai(a){a.g&&kd(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return L(function(f){e=qc;return a==e.Z?u(f,d.g.remove(b,c),0):u(f,yi(d,a,function(){c<=b?qi(d,a):d.h[a].remove(b,c)}),0)})};
|
|
270
270
|
function Bi(a,b){var c;return L(function(d){c=qc;return b==c.Z?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,yi(a,b,function(){var e=a.m.duration;0>=e?qi(a,b):a.h[b].remove(0,e)}),0)})}r.flush=function(a){var b=this,c;return L(function(d){c=qc;return a==c.Z?d["return"]():u(d,yi(b,a,function(){b.j.currentTime-=.001;qi(b,a)}),0)})};
|
|
271
271
|
function Ci(a,b,c,d,e){var f;return L(function(g){f=qc;return b==f.Z?(a.g.u=c,jd(a.g,d,e),g["return"]()):u(g,Promise.all([yi(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;qi(a,b)}),yi(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;qi(a,b)}),yi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;qi(a,b)})]),0)})}
|
|
272
|
-
r.endOfStream=function(a){var b=this;return L(function(c){return u(c,Di(b,function(){ri(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.
|
|
273
|
-
function Di(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:df(a.C);c=[];d={};for(e in a.h)d.
|
|
274
|
-
function Fi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),Ei(a,b)}}function xi(a,b,c,d){var e=a.G[d];null==c&&e&&(zc()||xc())&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=Rg(b));return b}var oi=window.URL.createObjectURL;function Gi(a,b,c,d){this.sa=a;this.pa=b;this.ha=c;this.Dd=void 0===d?null:d}Gi.prototype.
|
|
275
|
-
function Ii(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.pa=d;this.ha=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=Ii.prototype;r.sa=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.ef=function(){return this.endTime};r.
|
|
276
|
-
r.xf=function(){return this.i};M("shaka.media.SegmentReference",Ii);Ii.prototype.getTileDuration=Ii.prototype.xf;Ii.prototype.getTilesLayout=Ii.prototype.yf;Ii.prototype.getEndByte=Ii.prototype.
|
|
277
|
-
r.
|
|
278
|
-
r.T=function(){return Infinity==this.i&&!this.s};r.mb=function(){return Infinity!=this.i&&!this.s};r.Qa=function(){return Math.max(this.u,this.hb()-this.m)};r.Fe=function(a){this.u=a};r.hb=function(){return this.T()||this.mb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.
|
|
279
|
-
r.Pa=function(){return Math.max(0,this.hb()-(this.T()||this.mb()?this.Sc:0))};r.Ie=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.De=function(a){this.D=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.De;S.prototype.usingPresentationStartTime=S.prototype.Ie;S.prototype.getSeekRangeEnd=S.prototype.Pa;S.prototype.getSeekRangeStart=S.prototype.
|
|
280
|
-
S.prototype.setUserSeekStart=S.prototype.Fe;S.prototype.getSegmentAvailabilityStart=S.prototype.Qa;S.prototype.isInProgress=S.prototype.mb;S.prototype.isLive=S.prototype.T;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.Hd;S.prototype.notifyMinSegmentStartTime=S.prototype.Id;S.prototype.lockStartTime=S.prototype.Bd;S.prototype.notifySegments=S.prototype.
|
|
281
|
-
S.prototype.setSegmentAvailabilityDuration=S.prototype.Yd;S.prototype.setStatic=S.prototype.
|
|
272
|
+
r.endOfStream=function(a){var b=this;return L(function(c){return u(c,Di(b,function(){ri(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ja=function(a){var b=this;return L(function(c){return u(c,Di(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function qi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ei(a,b))}function yi(a,b,c){df(a.C);c={start:c,p:new rc};a.i[b].push(c);1==a.i[b].length&&Fi(a,b);return c.p}
|
|
273
|
+
function Di(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:df(a.C);c=[];d={};for(e in a.h)d.Rb=new rc,f={start:function(l){return function(){return l.Rb.resolve()}}(d),p:d.Rb},a.i[e].push(f),c.push(d.Rb),1==a.i[e].length&&f.start(),d={Rb:d.Rb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)Ei(a,h)}A(k)}})}function Ei(a,b){a.i[b].shift();Fi(a,b)}
|
|
274
|
+
function Fi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),Ei(a,b)}}function xi(a,b,c,d){var e=a.G[d];null==c&&e&&(zc()||xc())&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=Rg(b));return b}var oi=window.URL.createObjectURL;function Gi(a,b,c,d){this.sa=a;this.pa=b;this.ha=c;this.Dd=void 0===d?null:d}Gi.prototype.fc=function(){return this.pa};Gi.prototype.bc=function(){return this.ha};function Hi(a,b){return a&&b?a.fc()==b.fc()&&a.bc()==b.bc()&&hb(a.sa(),b.sa()):a==b}M("shaka.media.InitSegmentReference",Gi);Gi.prototype.getEndByte=Gi.prototype.bc;Gi.prototype.getStartByte=Gi.prototype.fc;
|
|
275
|
+
function Ii(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.pa=d;this.ha=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=Ii.prototype;r.sa=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.ef=function(){return this.endTime};r.fc=function(){return this.pa};r.bc=function(){return this.ha};r.yf=function(){return this.tilesLayout};
|
|
276
|
+
r.xf=function(){return this.i};M("shaka.media.SegmentReference",Ii);Ii.prototype.getTileDuration=Ii.prototype.xf;Ii.prototype.getTilesLayout=Ii.prototype.yf;Ii.prototype.getEndByte=Ii.prototype.bc;Ii.prototype.getStartByte=Ii.prototype.fc;Ii.prototype.getEndTime=Ii.prototype.ef;Ii.prototype.getStartTime=Ii.prototype.getStartTime;Ii.prototype.getUris=Ii.prototype.sa;function S(a,b,c){this.l=a;this.Sc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0;this.F=!1}r=S.prototype;r.getDuration=function(){return this.i};r.lf=function(){return this.g};r.Ja=function(a){this.i=a};r.rf=function(){return this.l};r.Ee=function(a){this.o=a};r.pc=function(a){this.s=a};r.Yd=function(a){this.m=a};r.$f=function(a){this.Sc=a};r.df=function(){return this.Sc};
|
|
277
|
+
r.Hb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Id(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.C&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.Bd=function(){this.F=!0};r.Id=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Hd=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
|
|
278
|
+
r.T=function(){return Infinity==this.i&&!this.s};r.mb=function(){return Infinity!=this.i&&!this.s};r.Qa=function(){return Math.max(this.u,this.hb()-this.m)};r.Fe=function(a){this.u=a};r.hb=function(){return this.T()||this.mb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.ec=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.hb()-this.m+a,this.Pa()))};r.Db=function(){return this.ec(0)};
|
|
279
|
+
r.Pa=function(){return Math.max(0,this.hb()-(this.T()||this.mb()?this.Sc:0))};r.Ie=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.De=function(a){this.D=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.De;S.prototype.usingPresentationStartTime=S.prototype.Ie;S.prototype.getSeekRangeEnd=S.prototype.Pa;S.prototype.getSeekRangeStart=S.prototype.Db;S.prototype.getSafeSeekRangeStart=S.prototype.ec;S.prototype.getSegmentAvailabilityEnd=S.prototype.hb;
|
|
280
|
+
S.prototype.setUserSeekStart=S.prototype.Fe;S.prototype.getSegmentAvailabilityStart=S.prototype.Qa;S.prototype.isInProgress=S.prototype.mb;S.prototype.isLive=S.prototype.T;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.Hd;S.prototype.notifyMinSegmentStartTime=S.prototype.Id;S.prototype.lockStartTime=S.prototype.Bd;S.prototype.notifySegments=S.prototype.Hb;S.prototype.getDelay=S.prototype.df;S.prototype.setDelay=S.prototype.$f;
|
|
281
|
+
S.prototype.setSegmentAvailabilityDuration=S.prototype.Yd;S.prototype.setStatic=S.prototype.pc;S.prototype.setClockOffset=S.prototype.Ee;S.prototype.getPresentationStartTime=S.prototype.rf;S.prototype.setDuration=S.prototype.Ja;S.prototype.getMaxSegmentDuration=S.prototype.lf;S.prototype.getDuration=S.prototype.getDuration;function Ji(a,b){this.j=a;this.m=Ki(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}Ji.prototype.release=function(){this.j=null;this.i=function(){}};function Li(a,b){a.i=b}function Mi(a){this.g=a}function Ki(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(gi(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 Ni(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.l=c;this.u=e;this.i=new ef;this.s=!1;this.D=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.A(a,"waiting",function(){return Oi(f)});this.m=(new O(function(){Oi(f)})).Da(.25)}Ni.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.u=null};Ni.prototype.Ld=function(){this.o=!0;Oi(this)};
|
|
282
282
|
function Oi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.D&&(a.j=!1,a.D=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Ki(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=hi(b,g,a.l.gapDetectionThreshold);if(!(null==
|
|
283
283
|
c||0==c&&!a.o||(d=b.start(c),d>=a.C.Pa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new Q("largegap",g),g.cancelable=!0,a.u(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Pi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Qi.value().get(b),c.oa(a,b,d))}var Qi=new sc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ri(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new ef;this.i=new Si(a);Pi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ti(d,d.j)})}Ri.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 Ui(a){return a.m?a.g.currentTime:a.j}function Vi(a,b){0<a.g.readyState?Wi(a.i,b):Pi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ti(a,a.j)})}
|
|
284
284
|
function Ti(a,b){.001>Math.abs(a.g.currentTime-b)?Xi(a):(a.h.oa(a.g,"seeking",function(){Xi(a)}),Wi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Xi(a){a.m=!0;a.h.A(a.g,"seeking",function(){return a.l()})}function Si(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Si.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
285
|
-
function Wi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Da(.1)};function Yi(a){this.g=a;this.j=!1;this.h=null;this.i=new ef}r=Yi.prototype;r.nd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.oa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Pi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.od=function(a){this.h=this.j?this.h:a};r.
|
|
286
|
-
function Zi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.u=b.minBufferTime||0;this.l=c;this.s=e;this.o=null;this.j=new Ni(a,b.presentationTimeline,c,$i(a,c),f);this.h=new Ri(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=Ui(g.h);h=aj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.o||g.o<k-1)){g.o=k;Vi(g.h,h);h=void 0;break a}g.s();h=void 0}return h},bj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ui(g.h),k=g.g.
|
|
287
|
-
3);h<k&&(h=aj(g,h),g.i.currentTime=h)}})}r=Zi.prototype;r.nd=function(){this.m.Da(.25)};r.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.s=function(){}};r.od=function(a){Vi(this.h,a)};r.
|
|
288
|
-
function bj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.
|
|
289
|
-
function cj(a,b){var c=a.g.
|
|
285
|
+
function Wi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Da(.1)};function Yi(a){this.g=a;this.j=!1;this.h=null;this.i=new ef}r=Yi.prototype;r.nd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.oa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Pi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.od=function(a){this.h=this.j?this.h:a};r.xc=function(){return(this.j?this.g.currentTime:this.h)||0};r.ue=function(){};
|
|
286
|
+
function Zi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.u=b.minBufferTime||0;this.l=c;this.s=e;this.o=null;this.j=new Ni(a,b.presentationTimeline,c,$i(a,c),f);this.h=new Ri(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=Ui(g.h);h=aj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.o||g.o<k-1)){g.o=k;Vi(g.h,h);h=void 0;break a}g.s();h=void 0}return h},bj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ui(g.h),k=g.g.Db(),l=g.g.Pa();3>l-k&&(k=l-
|
|
287
|
+
3);h<k&&(h=aj(g,h),g.i.currentTime=h)}})}r=Zi.prototype;r.nd=function(){this.m.Da(.25)};r.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.s=function(){}};r.od=function(a){Vi(this.h,a)};r.xc=function(){var a=Ui(this.h);return 0<this.i.readyState&&!this.i.paused?cj(this,a):a};
|
|
288
|
+
function bj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Db():a.g.Pa():0>b&&(b=a.g.Pa()+b);return dj(a,cj(a,b))}r.ue=function(){this.j.Ld()};function dj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function aj(a,b){var c=Math.max(a.u,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Db(),f=a.g.Pa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ec(c),k=a.g.ec(d);c=a.g.ec(c+d);return b>=g?dj(a,b):b>f?f:b<e?ei(a.i.buffered,k)?k:c:b>=h||ei(a.i.buffered,b)?b:c}
|
|
289
|
+
function cj(a,b){var c=a.g.Db();if(b<c)return c;c=a.g.Pa();return b>c?c:b}function $i(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Ji(new Mi(a),b.stallThreshold);Li(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function T(a){this.K=a;this.g=null;this.h=0;this.i=!1}r=T.prototype;r.destroy=function(){Kb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};r.release=function(){this.i||(this.K=[],this.g&&this.g.stop(),this.g=null)};r.Ff=function(){this.i=!0};
|
|
290
290
|
r.find=function(a){for(var b=this.K.length-1,c=b;0<=c;--c){var d=this.K[c],e=c<b?this.K[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.K.length&&a<this.K[0].startTime?this.h:null};r.get=function(a){if(0==this.K.length)return null;a-=this.h;return 0>a||a>=this.K.length?null:this.K[a]};r.offset=function(a){if(!this.i)for(var b=t(this.K),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
|
|
291
|
-
r.
|
|
291
|
+
r.Fb=function(a){!this.i&&a.length&&(this.K=this.K.filter(function(b){return b.startTime<a[0].startTime}),this.K.push.apply(this.K,ja(a)))};r.Gb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.K.length||d.endTime>c.K[0].startTime)});this.Fb(a);this.eb(b)};r.eb=function(a){if(!this.i){var b=this.K.length;this.K=this.K.filter(function(c){return c.endTime>a});this.h+=b-this.K.length}};
|
|
292
292
|
r.Xa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.K.length;)if(this.K[this.K.length-1].startTime>=b)this.K.pop();else break;for(;this.K.length;)if(this.K[0].endTime<=a)this.K.shift(),c||this.h++;else break;0!=this.K.length&&(a=this.K[this.K.length-1],this.K[this.K.length-1]=new Ii(a.startTime,b,a.j,a.pa,a.ha,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
|
|
293
293
|
r.Uc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.K.push.apply(c.K,ja(d)):(c.g.stop(),c.g=null)}),this.g.Da(a))};T.prototype[Symbol.iterator]=function(){return this.gb(0)};T.prototype.gb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new ej(this,b,d)};
|
|
294
|
-
function fj(a,b,c){return new T([new Ii(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",T);T.forSingleSegment=fj;T.prototype.getIteratorForTime=T.prototype.gb;T.prototype.updateEvery=T.prototype.Uc;T.prototype.fit=T.prototype.Xa;T.prototype.evict=T.prototype.eb;T.prototype.mergeAndEvict=T.prototype.
|
|
294
|
+
function fj(a,b,c){return new T([new Ii(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",T);T.forSingleSegment=fj;T.prototype.getIteratorForTime=T.prototype.gb;T.prototype.updateEvery=T.prototype.Uc;T.prototype.fit=T.prototype.Xa;T.prototype.evict=T.prototype.eb;T.prototype.mergeAndEvict=T.prototype.Gb;T.prototype.merge=T.prototype.Fb;T.prototype.offset=T.prototype.offset;T.prototype.get=T.prototype.get;T.prototype.find=T.prototype.find;T.prototype.markImmutable=T.prototype.Ff;
|
|
295
295
|
T.prototype.release=T.prototype.release;T.prototype.destroy=T.prototype.destroy;function ej(a,b,c){this.i=a;this.h=b;this.g=c}ej.prototype.seek=function(a){Kb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.gb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
|
|
296
296
|
ej.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.sa().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};ej.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.sa().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",ej);ej.prototype.next=ej.prototype.next;ej.prototype.current=ej.prototype.current;
|
|
297
297
|
ej.prototype.seek=ej.prototype.seek;function gj(){T.call(this,[]);this.j=[]}qa(gj,T);r=gj.prototype;r.clone=function(){var a=new gj;a.j=this.j.slice();return a};r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.K.length}return null};
|
|
298
|
-
r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.K.length}return null};r.offset=function(){};r.
|
|
299
|
-
gj.prototype.offset=gj.prototype.offset;gj.prototype.get=gj.prototype.get;gj.prototype.find=gj.prototype.find;gj.prototype.release=gj.prototype.release;function hj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Jc();this.h=new O(function(){b.g.te(.25*b.i)})}hj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};hj.prototype.set=function(a){this.i=a;ij(this)};hj.prototype.Fc=function(){return this.g.Fc()};function ij(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Jc()!=b&&a.g.Xd(b);return}catch(c){}a.h.Da(.25);0!=a.g.Jc()&&a.g.Xd(0)};function jj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){kj(b,!1)})).Da(.25)}jj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function kj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function lj(a){Ne.call(this);this.g=new Map;this.h=a}qa(lj,Ne);lj.prototype.release=function(){this.g.clear();Ne.prototype.release.call(this)};function mj(a,b){var c=a.g.get(b);c||(c={
|
|
300
|
-
lj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.
|
|
301
|
-
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.fe=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function oj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.
|
|
298
|
+
r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.K.length}return null};r.offset=function(){};r.Fb=function(){};r.eb=function(){};r.Gb=function(){};r.Xa=function(){};r.Uc=function(){};M("shaka.media.MetaSegmentIndex",gj);gj.prototype.updateEvery=gj.prototype.Uc;gj.prototype.fit=gj.prototype.Xa;gj.prototype.mergeAndEvict=gj.prototype.Gb;gj.prototype.evict=gj.prototype.eb;gj.prototype.merge=gj.prototype.Fb;
|
|
299
|
+
gj.prototype.offset=gj.prototype.offset;gj.prototype.get=gj.prototype.get;gj.prototype.find=gj.prototype.find;gj.prototype.release=gj.prototype.release;function hj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Jc();this.h=new O(function(){b.g.te(.25*b.i)})}hj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};hj.prototype.set=function(a){this.i=a;ij(this)};hj.prototype.Fc=function(){return this.g.Fc()};function ij(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Jc()!=b&&a.g.Xd(b);return}catch(c){}a.h.Da(.25);0!=a.g.Jc()&&a.g.Xd(0)};function jj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){kj(b,!1)})).Da(.25)}jj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function kj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function lj(a){Ne.call(this);this.g=new Map;this.h=a}qa(lj,Ne);lj.prototype.release=function(){this.g.clear();Ne.prototype.release.call(this)};function mj(a,b){var c=a.g.get(b);c||(c={jc:[],fe:null,contentType:b},a.g.set(b,c));return c}function nj(a,b,c){var d=mj(a,b.contentType);oj(a,d);a={Dd:b,position:c};d=d.jc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
300
|
+
lj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.jc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Dd;break a}}d=null}if(e=d)e=c.fe,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
301
|
+
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.fe=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function oj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.jc;b.jc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.jc=[]};function pj(a){Ne.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Da(2)}qa(pj,Ne);pj.prototype.release=function(){this.g.clear();this.h.stop();Ne.prototype.release.call(this)};function qj(a){Ne.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{ub:null,sb:rj,lb:function(c,d){return sj(b,"enter",c,d)}},{ub:tj,sb:rj,lb:function(c,d){return sj(b,"enter",c,d)}},{ub:uj,sb:rj,lb:function(c,d){return sj(b,"enter",c,d)}},{ub:rj,sb:tj,lb:function(c,d){return sj(b,"exit",c,d)}},{ub:rj,sb:uj,lb:function(c,d){return sj(b,"exit",c,d)}},{ub:tj,sb:uj,lb:function(c,d){return sj(b,"skip",c,d)}},{ub:uj,sb:tj,lb:function(c,d){return sj(b,"skip",c,d)}}];this.h=new ef;this.h.A(this.i,"regionremove",
|
|
302
302
|
function(c){b.g["delete"](c.region)})}qa(qj,Ne);qj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Ne.prototype.release.call(this)};qj.prototype.j=function(a,b){for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?tj:a>d.endTime?uj:rj;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.ub==e&&h.sb==f&&h.lb(d,b)}};
|
|
303
303
|
function sj(a,b,c,d){b=new Q(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=We(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.h=null;this.u=1;this.o=this.l=null;this.j=new Map;this.C=!1;this.D=null;this.s=!1;this.i=new cf(function(){return xj(c)})}wj.prototype.destroy=function(){return this.i.destroy()};function xj(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,yj(e),b.push(zj(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.h=null;A(f)})}
|
|
304
304
|
wj.prototype.configure=function(a){this.h=a;this.D=new Ce({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)};wj.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,Aj(a),2);df(a.i);a.C=!0;A(b)})};
|
|
305
305
|
function Bj(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=qc,C(k,2),u(k,Bi(a.g.R,c.Z),4);case 4:va(k,3);break;case 2:if(d=E(k),a.g)a.g.onError(d);case 3:e=ad(b.mimeType,b.codecs);pi(a.g.R,e);f=a.g.R.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=Cj(b),a.j.set(c.Z,h),Dj(a,h,0);A(k)}})}function Ej(a){var b=a.j.get(pc);b&&(yj(b),zj(b)["catch"](function(){}),a.j["delete"](pc));a.o=null}
|
|
306
306
|
function Fj(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.qb&&(Gj(a,e,!1,0,!1),c.qb=d)}else if(d=c.qb)c.qb=null,Gj(a,d,!0,0,!1)}}function Hj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.C&&(b.video&&Gj(a,b.video,c,d,e),b.audio&&Gj(a,b.audio,c,d,e))}function Ij(a,b){a.o=b;a.C&&Gj(a,b,!0,0,!1)}
|
|
307
|
-
function Gj(a,b,c,d,e){var f=a.j.get(b.type);f||b.type!=pc?f&&(f.qb&&(b.trickModeVideo?(f.qb=b,b=b.trickModeVideo):f.qb=null),f.stream!=b||e)&&(b.type==pc&&pi(a.g.R,ad(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ba=null,c&&(f.Zb?f.Xc=!0:f.ta?(f.ab=!0,f.
|
|
307
|
+
function Gj(a,b,c,d,e){var f=a.j.get(b.type);f||b.type!=pc?f&&(f.qb&&(b.trickModeVideo?(f.qb=b,b=b.trickModeVideo):f.qb=null),f.stream!=b||e)&&(b.type==pc&&pi(a.g.R,ad(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ba=null,c&&(f.Zb?f.Xc=!0:f.ta?(f.ab=!0,f.Ac=d,f.Xc=!0):(yj(f),Jj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Kj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):Bj(a,b)}
|
|
308
308
|
function Kj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.va)return e["return"]();c=b.stream;d=b.va;return c.segmentIndex?e.B(2):u(e,c.createSegmentIndex(),2)}if(b.va!=d||b.stream!=c)return e["return"]();var f=a.g.Ic();var g=ui(a.g.R,b.type),h=b.stream.segmentIndex.find(b.Ba?b.Ba.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ha?k.ha-k.pa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.ha?k.ha-k.pa:null)||0),k=a.g.getBandwidthEstimate(),
|
|
309
|
-
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.va.h.g>h?!0:!1):f=!1;f&&b.va.abort();A(e)})}function Lj(a,b){b.Zb||b.ab||(b.ta?(b.ab=!0,b.
|
|
310
|
-
function Aj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=qc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.cb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Na,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Z,a.o),d.add(a.o));e=a.g.R;f=a.h.forceTransmuxTS;return u(n,e.init(c,f),2)}df(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.R.
|
|
311
|
-
(m=Cj(l),a.j.set(k,m),Dj(a,m,0));A(n)})}function Cj(a){return{stream:a,type:a.type,ba:null,Ba:null,Mc:null,zd:null,yd:null,xd:null,qb:null,endOfStream:!1,ta:!1,
|
|
312
|
-
function Mj(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:df(a.i);if(b.ta||null==b.
|
|
313
|
-
E(h),u(h,Oj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.j.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.B(0);break}return u(h,a.g.R.endOfStream(),10);case 10:df(a.i),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.
|
|
309
|
+
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.va.h.g>h?!0:!1):f=!1;f&&b.va.abort();A(e)})}function Lj(a,b){b.Zb||b.ab||(b.ta?(b.ab=!0,b.Ac=0):null==si(a.g.R,b.type)?null==b.La&&Dj(a,b,0):(yj(b),Jj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
|
|
310
|
+
function Aj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=qc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.cb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Na,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Z,a.o),d.add(a.o));e=a.g.R;f=a.h.forceTransmuxTS;return u(n,e.init(c,f),2)}df(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.R.Ja(p):a.g.R.Ja(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||
|
|
311
|
+
(m=Cj(l),a.j.set(k,m),Dj(a,m,0));A(n)})}function Cj(a){return{stream:a,type:a.type,ba:null,Ba:null,Mc:null,zd:null,yd:null,xd:null,qb:null,endOfStream:!1,ta:!1,La:null,ab:!1,Ac:0,Xc:!1,Zb:!1,Pd:!1,hc:!1,va:null}}
|
|
312
|
+
function Mj(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:df(a.i);if(b.ta||null==b.La||b.Zb)return h["return"]();b.La=null;if(!b.ab){h.B(2);break}return u(h,Jj(a,b,b.Xc,b.Ac),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.ta||b.La||Dj(a,b,0),h["return"]();case 4:C(h,6);d=Nj(a,b);null!=d&&(Dj(a,b,d),b.hc=!1);va(h,7);break;case 6:return e=
|
|
313
|
+
E(h),u(h,Oj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.j.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.B(0);break}return u(h,a.g.R.endOfStream(),10);case 10:df(a.i),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ja(g),A(h)}})}
|
|
314
314
|
function Nj(a,b){if(Pj(b))return zi(a.g.R,b.stream.originalId||""),null;b.type==pc&&Ai(a.g.R);var c=a.g.Ic(),d=b.Ba?b.Ba.endTime:c,e=vi(a.g.R,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=ui(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.j.get(pc))&&Pj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Qj(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;
|
|
315
315
|
f=Infinity;g=Array.from(a.j.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Pj(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.Ba?h.Ba.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Rj(a,b,c,e)["catch"](function(){});return null}
|
|
316
316
|
function Qj(a,b,c,d){if(b.ba)return b.ba.current();if(b.Ba||d)return b.ba=b.stream.segmentIndex.gb(b.Ba?b.Ba.endTime:d),b.ba&&b.ba.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.gb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.gb(c),e=b.ba&&b.ba.next().value);return e}
|
|
317
317
|
function Rj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y,w,x,D;return L(function(z){switch(z.g){case 1:return e=qc,f=b.stream,g=b.ba,b.ta=!0,C(z,2),u(z,Sj(a,b,d),4);case 4:df(a.i);if(a.s)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),q=p=!1,v=function(B){var F,G,H;return L(function(I){if(p)return I["return"]();q=!0;df(a.i);if(a.s)return I["return"]();n=Tj(n,B);F=!1;G=0;(new Ig).box("mdat",function(J){G=
|
|
318
318
|
J.size+J.start;F=!0}).parse(n,!1,!0);if(!F)return I.B(0);H=n.subarray(0,G);n=n.subarray(G);return u(I,Uj(a,b,c,f,d,H),0)})},u(z,Vj(a,b,d,v),9);l=Vj(a,b,d);return u(z,l,7);case 7:return m=z.h,df(a.i),a.s?z["return"]():b.ab?(b.ta=!1,Dj(a,b,0),z["return"]()):u(z,Uj(a,b,c,f,d,m),6);case 9:y=z.h;if(q){z.B(6);break}p=!0;df(a.i);return a.s?z["return"]():b.ab?(b.ta=!1,Dj(a,b,0),z["return"]()):u(z,Uj(a,b,c,f,d,y),6);case 6:df(a.i);if(a.s)return z["return"]();b.Ba=d;g.next();b.ta=!1;b.Pd=!1;w=a.g.R.Ya();x=
|
|
319
|
-
w[b.type];$a(JSON.stringify(x));b.ab||a.g.Ld();Dj(a,b,0);va(z,0);break;case 2:D=E(z);df(a.i,D);if(a.s)return z["return"]();b.ta=!1;if(7001==D.code)b.ta=!1,yj(b),Dj(a,b,0),z.B(0);else if(b.type==e.Z&&a.h.ignoreTextStreamFailures)a.j["delete"](e.Z),z.B(0);else if(3017==D.code)Wj(a,b,D),z.B(0);else return b.
|
|
320
|
-
function Wj(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.Pd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.
|
|
319
|
+
w[b.type];$a(JSON.stringify(x));b.ab||a.g.Ld();Dj(a,b,0);va(z,0);break;case 2:D=E(z);df(a.i,D);if(a.s)return z["return"]();b.ta=!1;if(7001==D.code)b.ta=!1,yj(b),Dj(a,b,0),z.B(0);else if(b.type==e.Z&&a.h.ignoreTextStreamFailures)a.j["delete"](e.Z),z.B(0);else if(3017==D.code)Wj(a,b,D),z.B(0);else return b.hc=!0,D.severity=2,u(z,Oj(a,D),0)}})}function Tj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
320
|
+
function Wj(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.Pd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.hc=!0;a.s=!0;a.g.onError(c);return}b.Pd=!0}Dj(a,b,4)}
|
|
321
321
|
function Sj(a,b,c){var d,e,f,g,h,k,l;return L(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.zd||e!=b.yd||f!=b.xd)h=function(){var n;return L(function(p){if(1==p.g)return C(p,2),b.yd=e,b.xd=f,b.zd=g,u(p,Ci(a.g.R,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=E(p);b.yd=null;b.xd=null;b.zd=null;throw n;})},d.push(h());!Hi(c.g,b.Mc)&&(b.Mc=c.g)&&(k=Vj(a,b,c.g),l=function(){var n,p,q;return L(function(v){switch(v.g){case 1:return C(v,2),u(v,k,4);
|
|
322
322
|
case 4:return n=v.h,df(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,wi(a.g.R,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw q=E(v),b.Mc=null,q;}})},a.g.Jf(c.startTime,c.g),d.push(l()));return u(m,Promise.all(d),0)})}
|
|
323
|
-
function Uj(a,b,c,d,e,f){var g;return L(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new Ig).P("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.
|
|
324
|
-
m=k.reader.
|
|
323
|
+
function Uj(a,b,c,d,e,f){var g;return L(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new Ig).P("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.kc();var n=k.reader.kc();var p=k.reader.M();var q=k.reader.M();var v=k.reader.M();var y=k.reader.M();var w=e.startTime+q/p}else p=k.reader.M(),w=k.reader.Lb()/p+e.timestampOffset,q=w-e.startTime,v=k.reader.M(),y=k.reader.M(),
|
|
324
|
+
m=k.reader.kc(),n=k.reader.kc();k=k.reader.Za(k.reader.O.byteLength-k.reader.X());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Kf():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:q,eventDuration:v,id:y,messageData:k}),l=new Q(Xj,l),a.g.onEvent(l))}).parse(f),u(h,Yj(a,b,c),2);if(3!=h.g)return df(a.i),u(h,wi(a.g.R,b.type,f,e.startTime,e.endTime,g),3);df(a.i);A(h)})}
|
|
325
325
|
function Yj(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=si(a.g.R,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.R.remove(b.type,e,e+g),2)}df(a.i);A(h)})}function Pj(a){return a&&a.type==pc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
326
326
|
function Vj(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=bf,f=vj(c.sa(),c.pa,c.ha,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Gi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.nb.request(e,f),b.va=h,u(l,h.promise,2);k=l.h;b.va=null;return l["return"](k.data)})}
|
|
327
|
-
function Jj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.ab=!1,b.Xc=!1,b.
|
|
328
|
-
function Dj(a,b,c){var d=b.type;if(d!=pc||a.j.has(d))b.
|
|
329
|
-
function ek(a,b){var c={
|
|
330
|
-
function bk(a){return L(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.kb)var c=!1;else{a.g&&(a.g.
|
|
331
|
-
function fk(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.nf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.Ze(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.
|
|
327
|
+
function Jj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.ab=!1,b.Xc=!1,b.Ac=0,b.Zb=!0,b.Ba=null,b.Mc=null,b.ba=null,d?(e=a.g.Ic(),f=a.g.R.getDuration(),u(g,a.g.R.remove(b.type,e+d,f),3)):u(g,Bi(a.g.R,b.type),4);if(3!=g.g)return df(a.i),c?u(g,a.g.R.flush(b.type),3):g.B(3);df(a.i);b.Zb=!1;b.endOfStream=!1;b.ta||b.La||Dj(a,b,0);A(g)})}
|
|
328
|
+
function Dj(a,b,c){var d=b.type;if(d!=pc||a.j.has(d))b.La=(new tc(function(){var e;return L(function(f){if(1==f.g)return C(f,2),u(f,Mj(a,b),4);if(2!=f.g)return va(f,0);e=E(f);if(a.g)a.g.onError(e);A(f)})})).S(c)}function yj(a){null!=a.La&&(a.La.stop(),a.La=null)}function zj(a){return L(function(b){return a.va?u(b,a.va.abort(),0):b.B(0)})}function Oj(a,b){return L(function(c){if(1==c.g)return u(c,Ee(a.D),2);df(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);A(c)})};function Zj(a,b){var c=ak(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return bk(d)});this.s=new cf(function(){return ck(d)})}Zj.prototype.destroy=function(){return this.s.destroy()};function ck(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),dk(a),u(e,a.u,2);a.g&&a.g.Ia.pb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ia.pb();a.g=null;a.m=[];a.j=null;A(e)})}
|
|
329
|
+
function ek(a,b){var c={Ib:function(){},Oc:function(){},pb:function(){},onError:function(){},Qc:function(){},Qg:function(){}};a.m.push({create:b,Ia:c});a.h&&a.h.abort();dk(a);return c}
|
|
330
|
+
function bk(a){return L(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.kb)var c=!1;else{a.g&&(a.g.Ia.pb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ia.Ib(),a.g={node:d.node,payload:d.payload,kb:d.kb,Ia:c.Ia}):c.Ia.Qc();c=!0}c?c=Promise.resolve():a.g?c=fk(a):(a.j.If(a.i),a.o=new rc,c=a.o);b=u(b,c,1)}return b})}
|
|
331
|
+
function fk(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.nf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.Ze(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ia.Oc(),a.g=null);va(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.Ia.pb();else a.g.Ia.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function dk(a){a.o&&(a.o.resolve(),a.o=null)};function gk(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=gk.prototype;r.remove=function(a,b){if(!this.g)return!1;hk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
332
332
|
r.append=function(a){function b(h,k){for(var l=t(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},"");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak||h.spacer?(h.spacer&&Kb("shaka.extern.Cue",
|
|
333
333
|
"Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(c).join(""):l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={vb:f.vb},g=d.next())f.vb=g.value,a.some(function(h){return function(k){return k.startTime==h.vb.startTime&&k.endTime==h.vb.endTime&&k.text==h.vb.payload?!0:!1}}(f))||(g=ik(f.vb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
|
|
334
334
|
k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-e.indexOf(k)});a=t(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};r.destroy=function(){this.g&&(hk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
335
335
|
function ik(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
336
336
|
function hk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",gk);gk.prototype.setTextVisibility=gk.prototype.setTextVisibility;gk.prototype.isTextVisible=gk.prototype.isTextVisible;gk.prototype.destroy=gk.prototype.destroy;gk.prototype.append=gk.prototype.append;gk.prototype.remove=gk.prototype.remove;function jk(){}function kk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",jk);jk.removeAllChildren=kk;function lk(a,b){var c=this;this.j=!1;this.i=[];this.C=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.u=(new O(function(){mk(c)})).Da(.25);this.h=new Map;this.s=new ef;this.s.A(document,"fullscreenchange",function(){mk(c,!0)});this.l=null;"ResizeObserver"in
|
|
337
|
-
window&&(this.l=new ResizeObserver(function(){mk(c,!0)}),this.l.observe(this.g));this.o=new Map}r=lk.prototype;r.append=function(a){var b=[].concat(ja(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={
|
|
337
|
+
window&&(this.l=new ResizeObserver(function(){mk(c,!0)}),this.l.observe(this.g));this.o=new Map}r=lk.prototype;r.append=function(a){var b=[].concat(ja(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={rc:c.rc},d=a.next())c.rc=d.value,b.some(function(e){return function(f){return tb(f,e.rc)}}(c))||this.i.push(c.rc);mk(this)};
|
|
338
338
|
r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=null);this.l&&(this.l.disconnect(),this.l=null)};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});mk(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
|
|
339
339
|
function nk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
340
|
-
function ok(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Je:null;l&&(g.push(l.qd),l.
|
|
341
|
-
q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.
|
|
342
|
-
function pk(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Kb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&qk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,
|
|
343
|
-
e.style.height=c.height+g
|
|
344
|
-
Je:e,
|
|
340
|
+
function ok(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Je:null;l&&(g.push(l.qd),l.lc&&g.push(l.lc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l?nk(a,n)||(f=!0):(pk(a,k,e),l=a.h.get(k),n=l.Je,f=!0));0<k.nestedCues.length&&n&&ok(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=
|
|
341
|
+
q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.lc?(c.appendChild(d.lc),d.lc.appendChild(d.qd)):c.appendChild(d.qd)}}function mk(a,b){if(a.g){var c=a.C.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=t(a.o.values()),e=d.next();!e.done;e=d.next())kk(e.value);kk(a.g);a.h.clear();a.o.clear()}if(a.j){d=new Map;e=t(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));ok(a,a.i,a.g,c,[])}}}
|
|
342
|
+
function pk(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Kb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&qk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Ab?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Ab?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=document.createElement("span"),h=c.heightUnits==
|
|
343
|
+
Ab?"%":"px",k=c.widthUnits==Ab?"%":"px",l=c.viewportAnchorUnits==Ab?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(e,g);c=g}e=f;d&&(e=
|
|
344
|
+
document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{qd:f,Je:e,lc:c})}
|
|
345
345
|
function qk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=rk(c.linePadding,c,a.m);f.paddingRight=rk(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
|
|
346
346
|
"contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=sk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?
|
|
347
347
|
"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=rk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==nb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pb?f.left=c.line+
|
|
348
348
|
"%":"end"==c.lineAlign&&(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==pb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==nb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&
|
|
349
349
|
f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==nb?f.width=c.size+"%":f.height=c.size+"%")}function rk(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}
|
|
350
|
-
function sk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",lk);lk.prototype.setTextVisibility=lk.prototype.setTextVisibility;lk.prototype.isTextVisible=lk.prototype.isTextVisible;lk.prototype.remove=lk.prototype.remove;lk.prototype.destroy=lk.prototype.destroy;lk.prototype.append=lk.prototype.append;function tk(a,b){function c(
|
|
351
|
-
""
|
|
352
|
-
break;case "right":
|
|
350
|
+
function sk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",lk);lk.prototype.setTextVisibility=lk.prototype.setTextVisibility;lk.prototype.isTextVisible=lk.prototype.isTextVisible;lk.prototype.remove=lk.prototype.remove;lk.prototype.destroy=lk.prototype.destroy;lk.prototype.append=lk.prototype.append;function tk(a,b){function c(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next())if(n=n.value,n.isContainer)c(n.nestedCues,l);else{var p=n.clone();p.nestedCues=[];p.payload=e(n);l.push(p)}return l}function d(k){for(var l=k,m=t(b),n=m.next();!n.done;n=m.next())n=n.value,n.end&&n.start<k&&(l+=n.end-n.start);k=Math.floor(l/3600);m=Math.floor(l/60%60);n=Math.floor(l%60);l=Math.floor(1E3*l%1E3);return(10>k?"0":"")+k+":"+(10>m?"0":"")+m+":"+(10>n?"0":"")+n+"."+(100>l?10>l?"00":"0":"")+l}function e(k){var l=
|
|
351
|
+
[],m=700<=k.fontWeight,n="italic"==k.fontStyle,p=k.textDecoration.includes("underline");m&&l.push("b");n&&l.push("i");p&&l.push("u");m=l.reduce(function(q,v){return q+"<"+v+">"},"");l=l.reduceRight(function(q,v){return q+"</"+v+">"},"");return k.lineBreak||k.spacer?(k.spacer&&Kb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):k.nestedCues.length?k.nestedCues.map(e).join(""):m+k.payload+l}var f=c(a,[]),g="WEBVTT\n\n";f=t(f);for(var h=f.next();!h.done;h=f.next())h=h.value,g+=d(h.startTime)+
|
|
352
|
+
" --\x3e "+d(h.endTime)+function(k){var l=[];switch(k.textAlign){case "left":l.push("align:left");break;case "right":l.push("align:right");break;case mb:l.push("align:middle");break;case "start":l.push("align:start");break;case "end":l.push("align:end")}switch(k.writingMode){case "vertical-lr":l.push("vertical:lr");break;case "vertical-rl":l.push("vertical:rl")}return l.length?" "+l.join(" "):""}(h)+"\n",g+=h.payload+"\n\n";return g}M("shaka.text.WebVttGenerator",function(){});function uk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function vk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?wk:xk};d.ot=yk(c);var e=d.ot===zk||d.ot===Ak||d.ot===Bk||d.ot===Ck;e&&(d.bl=Dk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==Ck&&(d.tb=Ek(a,d.ot)/1E3);Fk(a,b,d)}}catch(f){Va("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
|
|
353
353
|
function Gk(a,b,c){try{if(!a.g.enabled)return b;var d=Hk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Bk;break a;case "application/x-mpegurl":e=Ik;break a}e=void 0}d.ot=e;d.su=!0;var f=Jk(d);return Kk(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Lk(a,b){try{if(!a.g.enabled)return b;var c=Hk(a);c.ot=Mk;c.su=!0;var d=Jk(c);return Kk(b,d)}catch(e){return Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
|
|
354
354
|
function Hk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function Fk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Hk(a));c.pr=a.h.Hc();var e=c.ot===zk||c.ot===Bk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Nk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Jk(c);f&&(b.uris=b.uris.map(function(g){return Kk(g,f)}))}}}
|
|
355
355
|
function yk(a){var b=a.type;if(a.init)return Ok;if("video"==b)return a.codecs.includes(",")?Bk:zk;if("audio"==b)return Ak;if("text"==b)return"application/mp4"===a.mimeType?Ck:Mk}function Dk(a,b){var c=a.h.Ya()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
|
|
@@ -369,73 +369,73 @@ maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:In
|
|
|
369
369
|
function Wk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Qk(a,b,c||Uk(),d,"")}
|
|
370
370
|
function Vk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=yd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return rd(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
|
|
371
371
|
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=pc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",Tk);Tk.mergeConfigObjects=Wk;function Xk(){this.g=null;this.h=[]}function Yk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Zk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
|
|
372
|
-
function $k(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function al(){this.i=this.h=null;this.g=[]}function bl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function cl(){this.u=this.C=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.I=this.L=this.N=this.l=this.o=NaN;this.g=new Xk;this.h=new al};function U(a,b){Ne.call(this);var c=this;this.l=dl;this.
|
|
373
|
-
this.
|
|
374
|
-
function(e,f){return Je(hl(c,e,f))});d.set(this.V,function(e){e.J&&(c.
|
|
375
|
-
d.set(this.
|
|
372
|
+
function $k(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function al(){this.i=this.h=null;this.g=[]}function bl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function cl(){this.u=this.C=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.I=this.L=this.N=this.l=this.o=NaN;this.g=new Xk;this.h=new al};function U(a,b){Ne.call(this);var c=this;this.l=dl;this.Cc=this.g=null;this.ka=!1;this.Kc=new ef;this.Ob=new ef;this.o=new ef;this.ud=this.u=this.Ub=this.i=this.Lc=this.I=this.j=this.xa=this.W=this.ya=this.L=this.Dc=this.G=this.yb=this.C=this.N=this.m=this.F=null;this.Jd=1E9;this.h=el(this);this.Gd={width:Infinity,height:Infinity};this.s=null;this.Ma=new ue(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.wb=this.h.preferredTextLanguage;this.Yb=this.h.preferredTextRole;
|
|
373
|
+
this.Xb=this.h.preferForcedSubs;this.Vb=[];this.ac=null;b&&b(this);this.F=fl(this);this.F.Vd(this.h.streaming.forceHTTPS);this.D=null;gl&&(this.D=Sb(gl));this.Kc.A(window,"online",function(){c.Qd()});this.V={name:"detach"};this.ca={name:"attach"};this.fa={name:"unload"};this.Md={name:"manifest-parser"};this.Cd={name:"manifest"};this.xb={name:"media-source"};this.vd={name:"drm-engine"};this.da={name:"load"};this.Nd={name:"src-equals-drm-engine"};this.zb={name:"src-equals"};var d=new Map;d.set(this.ca,
|
|
374
|
+
function(e,f){return Je(hl(c,e,f))});d.set(this.V,function(e){e.J&&(c.Ob.Sa(),e.J=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Je(e)});d.set(this.fa,function(e){return Je(il(c,e))});d.set(this.xb,function(e){e=jl(c,e);return Je(e)});d.set(this.Md,function(e,f){var g=kl(c,e,f);return Je(g)});d.set(this.Cd,function(e){return ll(c,e)});d.set(this.vd,function(e){e=ml(c,e);return Je(e)});d.set(this.da,function(e,f){return Je(nl(c,e,f))});d.set(this.Nd,function(e,f){var g=ol(c,e,f);return Je(g)});
|
|
375
|
+
d.set(this.zb,function(e,f){return pl(c,e,f)});this.Ga=new Zj(this.V,{nf:function(e,f,g,h){var k=null;e==c.V&&(k=g==c.V?c.V:c.ca);e==c.ca&&(k=g==c.V||f.J!=h.J?c.V:g==c.ca?c.ca:g==c.xb||g==c.da?c.xb:g==c.zb?c.Nd:null);e==c.xb&&(k=g==c.da&&f.J==h.J?c.Md:c.fa);e==c.Md&&(k=ql(c.da,c.Cd,c.fa,g,f,h));e==c.Cd&&(k=ql(c.da,c.vd,c.fa,g,f,h));e==c.vd&&(k=ql(c.da,c.da,c.fa,g,f,h));e==c.Nd&&(k=g==c.zb&&f.J==h.J?c.zb:c.fa);if(e==c.da||e==c.zb)k=c.fa;e==c.fa&&(k=h.J&&f.J==h.J?c.ca:c.V);return k},Ze:function(e,f,
|
|
376
376
|
g){c.dispatchEvent(rl(sl,(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,il(c,e),2):f["return"](e.J?c.ca:c.V)})},If:function(e){c.dispatchEvent(rl(tl,(new Map).set("state",e.name)))}});a&&this.Wb(a,!0)}qa(U,Ne);function rl(a,b){return new Q(a,b)}r=U.prototype;
|
|
377
|
-
r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==ul)return c["return"]();a.l=ul;b=ek(a.
|
|
378
|
-
a.W=null;if(!a.F){c.B(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:Ne.prototype.release.call(a),A(c)}})};r.Wb=function(a,b){b=void 0===b?!0:b;if(this.l==ul)return Promise.reject(vl());var c=ak();c.J=a;uc()||(b=!1);var d=b?this.
|
|
379
|
-
r.be=function(a){var b=this;a=void 0===a?!0:a;if(this.l==ul)return Promise.reject(vl());uc()||(a=!1);var c=ak(),d=ek(this.
|
|
380
|
-
r.load=function(a,b,c){var d=this;this.
|
|
381
|
-
g.onError=function(l){return k(l)}})};function yl(a,b){if(!uc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Cg(d),c=Bl[c]);if(c){if(""==(b.J||wc()).canPlayType(c))return!1;if(!uc()||!(c in Bg||Cg(d)in Dg)||a.h.streaming.preferNativeHls)return!0;if(Cc())return a.h.streaming.useNativeHlsOnSafari}return!1}function hl(a,b,c){null==b.J&&(b.J=c.J,a.
|
|
382
|
-
function il(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=ul&&(a.l=dl),c=a.
|
|
383
|
-
8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.C&&(a.C.release(),a.C=null);if(!a.N){n.B(9);break}return u(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.J||!b.J.src){n.B(11);break}return u(n,new Promise(function(p){return(new O(p)).S(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.m){n.B(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.
|
|
384
|
-
for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new cl;a.wd=null;Fl(a);A(n)}})}
|
|
377
|
+
r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==ul)return c["return"]();a.l=ul;b=ek(a.Ga,function(){return{node:a.V,payload:ak(),kb:!1}});return u(c,new Promise(function(d){b.Ib=function(){};b.Oc=function(){d()};b.pb=function(){d()};b.onError=function(){d()};b.Qc=function(){d()}}),2);case 2:return u(c,a.Ga.destroy(),3);case 3:a.Kc&&(a.Kc.release(),a.Kc=null);a.Ob&&(a.Ob.release(),a.Ob=null);a.o&&(a.o.release(),a.o=null);a.ud=null;a.u=null;a.h=null;a.s=null;a.Cc=null;
|
|
378
|
+
a.W=null;if(!a.F){c.B(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:Ne.prototype.release.call(a),A(c)}})};r.Wb=function(a,b){b=void 0===b?!0:b;if(this.l==ul)return Promise.reject(vl());var c=ak();c.J=a;uc()||(b=!1);var d=b?this.xb:this.ca,e=ek(this.Ga,function(){return{node:d,payload:c,kb:!1}});e.Ib=function(){};return wl(e)};r.detach=function(){var a=this;if(this.l==ul)return Promise.reject(vl());var b=ek(this.Ga,function(){return{node:a.V,payload:ak(),kb:!1}});b.Ib=function(){};return wl(b)};
|
|
379
|
+
r.be=function(a){var b=this;a=void 0===a?!0:a;if(this.l==ul)return Promise.reject(vl());uc()||(a=!1);var c=ak(),d=ek(this.Ga,function(e){var f=e.J&&a?b.xb:e.J?b.ca:b.V;c.J=e.J;return{node:f,payload:c,kb:!1}});d.Ib=function(){};return wl(d)};r.hg=function(a){this.ac=a};
|
|
380
|
+
r.load=function(a,b,c){var d=this;this.ac=null;if(this.l==ul)return Promise.reject(vl());this.dispatchEvent(rl(xl));var e=ak();e.uri=a;e.Zd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=yl(this,e)?this.zb:this.da,g=ek(this.Ga,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,kb:!0}});this.s=new cl;this.W=zl(this);g.Ib=function(){};return new Promise(function(h,k){g.Qc=function(){return k(new N(2,7,7002))};g.Oc=function(){h();d.dispatchEvent(rl(Al))};g.pb=function(){return k(vl())};
|
|
381
|
+
g.onError=function(l){return k(l)}})};function yl(a,b){if(!uc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Cg(d),c=Bl[c]);if(c){if(""==(b.J||wc()).canPlayType(c))return!1;if(!uc()||!(c in Bg||Cg(d)in Dg)||a.h.streaming.preferNativeHls)return!0;if(Cc())return a.h.streaming.useNativeHlsOnSafari}return!1}function hl(a,b,c){null==b.J&&(b.J=c.J,a.Ob.A(b.J,"error",function(){var d=Cl(a);d&&Dl(a,d)}));a.g=b.J;return Promise.resolve()}
|
|
382
|
+
function il(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=ul&&(a.l=dl),c=a.Vb.map(function(p){return p()}),a.Vb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(rl(El));b.mimeType=null;b.startTime=null;b.uri=null;a.ya&&(a.ya.release(),a.ya=null);b.J&&a.o.Sa();a.yb&&(a.yb.release(),a.yb=null);a.Dc&&(a.Dc.stop(),a.Dc=null);if(!a.I){n.B(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.Lc=null;case 3:if(!a.u){n.B(5);break}return u(n,a.u.stop(),5);case 5:if(!a.j){n.B(7);
|
|
383
|
+
break}return u(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.C&&(a.C.release(),a.C=null);if(!a.N){n.B(9);break}return u(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.J||!b.J.src){n.B(11);break}return u(n,new Promise(function(p){return(new O(p)).S(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.m){n.B(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Ub=
|
|
384
|
+
null;a.L=null;if(a.i){d=t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new cl;a.wd=null;Fl(a);A(n)}})}
|
|
385
385
|
function jl(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new bi,d=a.h.textDisplayFactory,e=Sb(d),a.wd=d,f=Gl(b.J,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,q=t(m.frames),v=q.next();!v.done;v=q.next())Hl(a,n,p,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(m,n)}}),u(g,f.D,2);a.N=f;A(g)})}
|
|
386
|
-
function kl(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.
|
|
387
|
-
function ll(a,b){var c=b.uri,d=a.F;a.
|
|
386
|
+
function kl(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Ub=d,f=a,u(h,Ag(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Lc=h.h;a.I=Sb(a.Lc);g=Oe(a.h.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.I.configure(g);A(h)})}
|
|
387
|
+
function ll(a,b){var c=b.uri,d=a.F;a.ya=new pj(function(){return a.mc()});a.ya.addEventListener("regionadd",function(g){g=g.region;Il(a,Jl,g);if(a.D)a.D.onDashTimedMetadata(g)});a.xa=null;a.h.streaming.observeQualityChanges&&(a.xa=new lj(function(){return a.Ya()}),a.xa.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
|
|
388
388
|
mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(rl(Kl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.o=h.format,Fk(k,g,{ot:Ik,su:!k.i}))}catch(l){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){vk(a.W,g,h)},filter:function(g){return Ll(a,g)},makeTextStreamsForClosedCaptions:function(g){return Ml(a,g)},
|
|
389
|
-
onTimelineRegionAdded:function(g){var h=a.
|
|
389
|
+
onTimelineRegionAdded:function(g){var h=a.ya;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new Q("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Dl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
|
|
390
390
|
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Fe(function(){var g,h,k,l;return L(function(m){if(1==m.g)return g=a,u(m,a.I.start(c,e),2);g.i=m.h;h=rl(Nl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);Ol(a.i);k=Date.now()/1E3;l=k-f;a.s.F=l;A(m)})}(),function(){return a.I.stop()})}
|
|
391
391
|
function ml(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Pl(a,{nb:a.F,onError:function(f){Dl(a,f)},Pc:function(f){Ql(a,f)},onExpirationUpdated:function(f,g){Rl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Sl&&d&&(d=!1,a.s.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Wf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Wb(b.J),3):u(e,Ll(a,a.i),0)})}
|
|
392
|
-
function nl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.
|
|
393
|
-
(a.ud=h,a.u=Sb(h),"function"!=typeof a.u.playbackRateChanged&&(Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.h.abr));a.
|
|
394
|
-
x?!1:x,void 0===D?0:D)});a.C=Xl(a,b.startTime);a.
|
|
395
|
-
dm(a)?a.u.chooseVariant():null;Wl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.B(3);break}n=a.C.
|
|
392
|
+
function nl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.ac&&(b.startTime=a.ac,a.ac=null);d=b.J;e=b.uri;a.Ub=e;a.G=new hj({Jc:function(){return d.playbackRate},Fc:function(){return d.defaultPlaybackRate},Xd:function(w){d.playbackRate=w},te:function(w){d.currentTime+=w}});f=function(){return Tl(a)};g=function(){return Ul(a)};a.o.A(d,"playing",f);a.o.A(d,"pause",f);a.o.A(d,"ended",f);a.o.A(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.ud==h||
|
|
393
|
+
(a.ud=h,a.u=Sb(h),"function"!=typeof a.u.playbackRateChanged&&(Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.h.abr));a.Ma=new ue(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.wb=a.h.preferredTextLanguage;a.Yb=a.h.preferredTextRole;a.Xb=a.h.preferForcedSubs;Vl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(w,x,D){a.j&&w!=a.j.l&&Wl(a,w,!0,void 0===
|
|
394
|
+
x?!1:x,void 0===D?0:D)});a.C=Xl(a,b.startTime);a.yb=Yl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Zl(a,k);Bd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=$l(a);a.j.configure(a.h.streaming);a.l=am;d.textTracks&&a.o.A(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "chapters":bm(a,w)}});a.dispatchEvent(rl(cm));l=null;if(m=a.jb().find(function(w){return w.active})){y.B(2);break}l=
|
|
395
|
+
dm(a)?a.u.chooseVariant():null;Wl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.B(3);break}n=a.C.xc();return u(y,em(l,n),4);case 4:p=y.h,a.C.od(p);case 3:fm(a,null,$d(l));case 2:return a.C.nd(),q=a.ib().find(function(w){return w.active}),q||((v=je(a.i.textStreams,a.wb,a.Yb,a.Xb)[0]||null)&&bl(a.s.h,v,!0),l&&(v?(l.audio&&gm(a,l.audio,v)&&(a.ka=!0),a.ka&&a.N.l.setTextVisibility(!0),hm(a)):a.ka=!1),v&&(a.h.streaming.alwaysStreamText||a.td())&&Ij(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&
|
|
396
396
|
(a.u.enable(),im(a)),Rd(a.j?a.j.l:null,a.i),jm(a.i),km(a),dm(a),a.i.variants.some(function(w){return w.primary}),a.o.oa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Zd}),A(y)}})}
|
|
397
397
|
function ol(a,b,c){var d,e,f,g,h,k,l;return L(function(m){return 1==m.g?(d=qc,e=Date.now()/1E3,f=!0,a.m=Pl(a,{nb:a.F,onError:function(n){Dl(a,n)},Pc:function(n){Ql(a,n)},onExpirationUpdated:function(n,p){Rl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Sl&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Cg(g),k=Bl[h],"application/x-mpegurl"==k&&Cc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
|
|
398
398
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?ed(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,u(m,Wf(a.m,[l],[]),2)):u(m,a.m.Wb(b.J),
|
|
399
399
|
0)})}
|
|
400
|
-
function pl(a,b,c){function d(){return Tl(a)}b.uri=c.uri;b.startTime=c.startTime;a.
|
|
400
|
+
function pl(a,b,c){function d(){return Tl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ub=b.uri;var e=b.J;a.C=new Yi(e);var f=!1;a.Vb.push(function(){f=!0});null!=b.startTime&&a.C.od(b.startTime);a.G=new hj({Jc:function(){return e.playbackRate},Fc:function(){return e.defaultPlaybackRate},Xd:function(k){e.playbackRate=k},te:function(k){e.currentTime+=k}});Zl(a,a.h.streaming.rebufferingGoal);a.o.A(e,"playing",d);a.o.A(e,"pause",d);a.o.A(e,"ended",d);a.o.A(e,"ratechange",function(){return Ul(a)});"none"!=e.preload&&
|
|
401
401
|
a.o.oa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Zd});e.audioTracks&&(a.o.A(e.audioTracks,"addtrack",function(){return km(a)}),a.o.A(e.audioTracks,"removetrack",function(){return km(a)}),a.o.A(e.audioTracks,"change",function(){return km(a)}));e.textTracks&&(a.o.A(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":lm(a,k);break;case "chapters":bm(a,k);break;default:km(a)}}),a.o.A(e.textTracks,"removetrack",function(){return km(a)}),a.o.A(e.textTracks,
|
|
402
402
|
"change",function(){return km(a)}));var g=Cg(b.uri);e.src=Gk(a.W,b.uri,Bl[g]);(zc()||Ac())&&e.load();a.l=mm;a.dispatchEvent(rl(cm));var h=new rc;Pi(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.C.nd();h.resolve()});Pi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return L(function(l){if(1==l.g)return nm(a),k=om(a),k.find(function(m){return"disabled"!=m.mode})?l.B(2):u(l,new Promise(function(m){a.o.oa(e.textTracks,"change",m);(new O(m)).S(1)}),2);if(f)return l["return"]();pm(a);A(l)})});
|
|
403
403
|
e.error?h.reject(Cl(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.o.oa(e,"error",function(){h.reject(Cl(a))});return new Fe(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
|
|
404
404
|
function nm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Sd(b);var c=a.h.preferredVariantRole;""!=c&&a.Sd(b,c)}}function pm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Td(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Td(b,d,c)}}
|
|
405
|
-
function lm(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.A(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Hl(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=qm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).
|
|
406
|
-
function Hl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(rl(rm,b))}function bm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).
|
|
405
|
+
function lm(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.A(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Hl(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=qm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Nb().S(.5);a.Vb.push(function(){c.stop()})}}
|
|
406
|
+
function Hl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(rl(rm,b))}function bm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Nb().S(.5);a.Vb.push(function(){c.stop()})}}function Ol(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 Pl(a,b){return new Pf(b,a.h.drm.updateExpirationTime)}
|
|
407
407
|
function fl(a){return new Se(function(b,c){a.u&&a.u.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(rl(sm,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(rl(tm,b))})}
|
|
408
|
-
function Xl(a,b){return new Zi(a.g,a.i,a.h.streaming,b,function(){a.
|
|
409
|
-
g.next())Nh(h.value)}}a.L&&um(a)},function(c){return a.dispatchEvent(c)})}function Yl(a){var b=new qj(a.
|
|
408
|
+
function Xl(a,b){return new Zi(a.g,a.i,a.h.streaming,b,function(){a.yb&&kj(a.yb,!0);if(a.j){var c=a.j;if(c.g)for(var d=c.g.Ic(),e=c.h.smallGapLimit,f=t(c.j.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.j.get(g);h.ba=null;var k=c.g.R;g==pc?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=ti(k,g),k=ei(k,d,e));if(!k&&((null!=ui(c.g.R,g)||h.ta)&&Lj(c,h),h.va&&(h.va.abort(),h.va=null),g===pc))for(g=c.g.R.u.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Sh(g),g=t(g.j.values()),h=g.next();!h.done;h=
|
|
409
|
+
g.next())Nh(h.value)}}a.L&&um(a)},function(c){return a.dispatchEvent(c)})}function Yl(a){var b=new qj(a.ya);b.addEventListener("enter",function(d){Il(a,vm,d.region)});b.addEventListener("exit",function(d){Il(a,wm,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Il(a,vm,e),Il(a,wm,e))});var c=new jj(a.g);c.g.add(b);a.xa&&c.g.add(a.xa);return c}function Zl(a,b){a.L=new ye;a.L.g=Ae;Be(a.L,b,Math.min(.5,b/2));Fl(a);a.Dc=(new O(function(){um(a)})).Da(.25)}
|
|
410
410
|
function um(a){switch(a.l){case mm:if(a.g.ended)var b=!0;else{var c=di(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case am:a:if(a.g.ended||ri(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.hb();var d=di(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=fi(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?ze:Ae;c.g=d;b!=d&&Fl(a)}function Gl(a,b,c,d){return new ii(a,b,c,d)}
|
|
411
411
|
function zl(a){return new uk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Ya:function(){return a.Ya()},getCurrentTime:function(){return a.g?a.g.currentTime:0},jb:function(){return a.jb()},Hc:function(){return a.Hc()},T:function(){return a.T()}},a.h.cmcd)}
|
|
412
|
-
function $l(a){return new wj(a.i,{Ic:function(){return a.C.
|
|
412
|
+
function $l(a){return new wj(a.i,{Ic:function(){return a.C.xc()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){vk(a.W,b,c)},R:a.N,nb:a.F,onError:function(b){return Dl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Kf:function(){a.I&&a.I.update&&a.I.update()},Ld:function(){a.C&&a.C.ue();um(a)},Jf:function(b,c){var d=c.Dd;d&&a.xa&&nj(a.xa,d,b)}})}
|
|
413
413
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Rk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
|
|
414
414
|
0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Wk(this.h,a,el(this));xm(this);return c};
|
|
415
415
|
function xm(a){if(a.I){var b=Oe(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{ym(a,a.i)}catch(f){Dl(a,f)}a.u&&dm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||zm(a)}a.F&&a.F.Vd(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.wd!=b)){var c=Sb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.wd=b;a.j&&(b=a.j,(c=b.j.get(pc))&&
|
|
416
416
|
Gj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),im(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Be(a.L,b,Math.min(.5,b/2)));a.i&&Vl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=el(this);Wk(a,this.h,el(this));return a};
|
|
417
|
-
r.bf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.
|
|
417
|
+
r.bf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.mc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.Uf=function(){for(var a in this.h)delete this.h[a];Wk(this.h,el(this),el(this));xm(this)};r.hf=function(){return this.l};r.mf=function(){return this.g};r.dc=function(){return this.F};r.rd=function(){return this.Ub};
|
|
418
418
|
r.le=function(){return this.D?this.D:null};r.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};r.mb=function(){return this.i?this.i.presentationTimeline.mb():!1};r.Cf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
419
|
-
r.
|
|
419
|
+
r.mc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Db(),end:a.Pa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Af=function(){this.T()&&(this.g.currentTime=this.mc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.cc=function(){return this.m?this.m.cc():Infinity};r.Gc=function(){return this.m?this.m.Gc():{}};
|
|
420
420
|
r.sd=function(){return this.L?this.L.g==Ae:!1};r.Hc=function(){return this.g?this.G?this.G.i:1:0};r.cg=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==am&&(this.u.playbackRateChanged(a),Fj(this.j,1<Math.abs(a))))};r.Se=function(){var a=this.G.Fc();this.l==mm&&this.G.set(a);this.l==am&&(this.G.set(a),this.u.playbackRateChanged(a),Fj(this.j,!1))};
|
|
421
421
|
r.jb=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,he(e)){var f=$d(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ge(g)}):[]};
|
|
422
422
|
r.ib=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ae(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?om(this).map(function(f){return ee(f)}):[]};r.ff=function(){return this.i?this.i.imageStreams.map(function(a){return be(a)}):[]};
|
|
423
423
|
r.wf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,z,B;return L(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.B(3):u(F,d.createSegmentIndex(),3):F["return"](null):F.B(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;
|
|
424
424
|
v=m*n;y=f.l-f.startTime;w=f.i||y/v;x=f.startTime;z=D=0;1<v&&(B=Math.floor((b-f.startTime)/w),x=f.startTime+B*w,D=B%m*p,z=Math.floor(B/m)*q);return F["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:z,startTime:x,duration:w,uris:f.sa(),width:p})}return F["return"](null)})};
|
|
425
|
-
r.Be=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(bl(this.s.h,b,!1),Ij(this.j,b),Am(this),this.
|
|
426
|
-
r.Ce=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&he(d)&&(Wl(this,d,!1,b,c),this.
|
|
425
|
+
r.Be=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(bl(this.s.h,b,!1),Ij(this.j,b),Am(this),this.wb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=om(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ce(c)==a.id?c.mode=this.ka?"showing":"hidden":c.mode="disabled";Am(this)}};
|
|
426
|
+
r.Ce=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&he(d)&&(Wl(this,d,!1,b,c),this.Ma=new te(d),dm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
427
427
|
ce(c)==a.id){Bm(this,c);break}};r.af=function(){return Cm(this.jb())};r.vf=function(){return Cm(this.ib())};r.$e=function(){return Array.from(Dm(this.jb()))};r.uf=function(){return Array.from(Dm(this.ib()))};
|
|
428
|
-
r.Sd=function(a,b){if(this.i&&this.C){this.
|
|
428
|
+
r.Sd=function(a,b){if(this.i&&this.C){this.Ma=new ue(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Ma.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=$d(f),this.Ce(c,!0)):zm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=rd(a);f=d=null;e=
|
|
429
429
|
t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ge(g);rd(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Bm(this,f):d&&Bm(this,d)}};
|
|
430
|
-
r.Td=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.
|
|
431
|
-
r.Vf=function(a){if(this.i&&this.C){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.
|
|
430
|
+
r.Td=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.wb=a,this.Yb=b||"",this.Xb=c,(a=je(this.i.textStreams,this.wb,this.Yb,this.Xb)[0]||null)&&a!=this.j.o&&(bl(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.td()))Ij(this.j,a),Am(this)}else{var d=rd(a);(a=this.ib().find(function(e){return rd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Be(a)}};
|
|
431
|
+
r.Vf=function(a){if(this.i&&this.C){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ma=new ue(b.language,"",0,a),zm(this))}};r.td=function(){var a=this.ka;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?om(this).some(function(b){return"showing"==b.mode}):a};r.me=function(){return this.g&&this.g.src&&this.g.textTracks?Em(this).map(function(a){return ee(a)}):[]};
|
|
432
432
|
r.cf=function(a){var b=rd(a),c=Em(this).filter(function(h){return rd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
433
433
|
function om(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function qm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Em(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
434
|
-
r.ag=function(a){a=!!a;if(this.ka!=a){this.ka=a;if(this.l==am)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=je(this.i.textStreams,this.
|
|
435
|
-
r.qf=function(){if(!this.T())return null;var a=this.
|
|
434
|
+
r.ag=function(a){a=!!a;if(this.ka!=a){this.ka=a;if(this.l==am)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=je(this.i.textStreams,this.wb,this.Yb,this.Xb),0<a.length&&(Ij(this.j,a[0]),Am(this))):Ej(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=om(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}hm(this)}};
|
|
435
|
+
r.qf=function(){if(!this.T())return null;var a=this.Ga.l,b=0;if(this.C)b=this.C.xc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
436
436
|
r.ne=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Ya=function(){if(this.l==am)return this.N.Ya();var a={total:[],audio:[],video:[],text:[]};this.l==mm&&(a.total=gi(this.g.buffered));return a};
|
|
437
437
|
r.getStats=function(){if(this.l!=am&&this.l!=mm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Tl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?
|
|
438
|
-
b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.L=d;this.s.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.G?c.G:NaN):c=NaN;this.s.s=c;if(this.l==am){if(c=this.j.l)this.s.C=(this.G?this.G.i:1)*c.bandwidth;c&&c.video&&(b=this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.T()&&(c=this.ne().valueOf()+1E3*this.
|
|
438
|
+
b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.L=d;this.s.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.G?c.G:NaN):c=NaN;this.s.s=c;if(this.l==am){if(c=this.j.l)this.s.C=(this.G?this.G.i:1)*c.bandwidth;c&&c.video&&(b=this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.T()&&(c=this.ne().valueOf()+1E3*this.mc().end,this.s.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
|
|
439
439
|
(this.s.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.s.u=c}this.l==mm&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.s;a=e.o;c=e.l;b=e.C;d=e.L;var f=e.N,g=e.I,h=e.u,k=e.i,l=e.m,m=e.F,n=e.j,p=Zk(e.g,"playing"),q=Zk(e.g,"paused"),v=Zk(e.g,"buffering"),y=e.s,w=e.D,x=e.G,D=$k(e.g),z=[];e=t(e.h.g);for(var B=e.next();!B.done;B=e.next())B=B.value,z.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,
|
|
440
440
|
height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:q,bufferingTime:v,licenseTime:y,liveLatency:w,maxSegmentDuration:x,stateHistory:D,switchHistory:z}};
|
|
441
441
|
r.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Kb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=am&&this.l!=mm)throw new N(1,7,7004);if(!d){var h=Cg(a);d=Fm[h];if(!d)throw new N(1,2,2011,h);}if(this.l==mm){if("text/vtt"!=d)throw new N(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=Lk(this.W,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.ib().find(function(k){return k.language==
|
|
@@ -448,9 +448,9 @@ r.Ne=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:
|
|
|
448
448
|
case 5:throw new N(1,2,2012);}})};function Gm(a,b){var c,d;return L(function(e){switch(e.g){case 1:c=Cg(b);if(d=Fm[c])return e["return"](d);C(e,2);return u(e,Eg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:E(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
|
|
449
449
|
function Hm(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Im(a,b,a.F,a.h.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=Jm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=oi(l),e="text/vtt");m=document.createElement("track");m.src=Lk(a.W,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
|
|
450
450
|
function Im(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=bf;f=We([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&Fk(k,f,{ot:Mk,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function Jm(a,b,c,d){var e=hd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Fb(b),b=c.parseMedia(b,a),tk(b,d);throw new N(2,2,2014,c);}
|
|
451
|
-
r.Wd=function(a,b){this.Gd.width=a;this.Gd.height=b};r.Qd=function(a){if(this.l==am){var b=this.j;a=void 0===a?.1:a;if(b.i.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.
|
|
452
|
-
r.jf=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};r.kf=function(){return this.
|
|
453
|
-
function el(a){var b=Uk();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Qd(d))}};b.textDisplayFactory=function(){return a.
|
|
451
|
+
r.Wd=function(a,b){this.Gd.width=a;this.Gd.height=b};r.Qd=function(a){if(this.l==am){var b=this.j;a=void 0===a?.1:a;if(b.i.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.hc||d.ta||d.La||(d.hc=!1,Dj(b,d,a));b=!0}}else b=!1;return b};
|
|
452
|
+
r.jf=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};r.kf=function(){return this.Lc};
|
|
453
|
+
function el(a){var b=Uk();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Qd(d))}};b.textDisplayFactory=function(){return a.Cc?new lk(a.g,a.Cc):new gk(a.g)};return b}r.Ge=function(a){this.Cc=a};
|
|
454
454
|
function Ml(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new gj;h={id:a.Jd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
455
455
|
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:pc,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 Ll(a,b){return L(function(c){if(1==c.g)return u(c,Km(a,b),2);ym(a,b);A(c)})}
|
|
456
456
|
function Km(a,b){var c;return L(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Pd(c,b),2);jm(b);A(d)})}
|
|
@@ -458,13 +458,13 @@ function ym(a,b){if(a.l!=ul){for(var c=a.h.restrictions,d=a.Gd,e=!1,f=t(b.varian
|
|
|
458
458
|
f.next())g=g.value,eg(a.m,g.initDataType,g.initData);Lm(a,b)}}
|
|
459
459
|
function em(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return L(function(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q["return"](null);n=(m=k.segmentIndex.gb(l))?m.next().value:null;if(!n)return q["return"](null);p=n.startTime;return q["return"](p)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(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)})}
|
|
460
460
|
function Fl(a){var b=a.sd();if(a.s&&a.L&&a.C){var c=a.G;c.j=b;ij(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Tl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(rl(Mm,b))}function Ul(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=rl(Nm),a.dispatchEvent(b))}function Tl(a){if(a.s&&a.L){var b=a.s.g;a.L.g==Ae?Yk(b,"buffering"):a.g.paused?Yk(b,"paused"):a.g.ended?Yk(b,"ended"):Yk(b,"playing")}}
|
|
461
|
-
function dm(a){try{Lm(a,a.i)}catch(c){return Dl(a,c),!1}var b=a.i.variants.filter(function(c){return he(c)});b=a.
|
|
461
|
+
function dm(a){try{Lm(a,a.i)}catch(c){return Dl(a,c),!1}var b=a.i.variants.filter(function(c){return he(c)});b=a.Ma.create(b);a.u.setVariants(Array.from(b.values()));return!0}function zm(a){var b;(b=dm(a)?a.u.chooseVariant():null)&&Wl(a,b,!0,!0,0)}
|
|
462
462
|
function Wl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Hj(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Hj(a.j,b,d,e);d=null;f&&(d=$d(f));b=$d(b);c?fm(a,d,b):Om(a,d,b)}}function Bm(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ge(c);var d=ge(b);Om(a,c,d)}
|
|
463
463
|
function gm(a,b,c){a=rd(a.h.preferredTextLanguage);b=rd(b.language);c=rd(c.language);return qd(c,a)&&!qd(b,c)}function fm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=rl(Pm,b);Qm(a,b)}function km(a){var b=rl(Rm);Qm(a,b)}function Om(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=rl(Sm,b);Qm(a,b)}function Am(a){var b=rl(Tm);Qm(a,b)}function hm(a){var b=rl(Um);Qm(a,b)}function im(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Qm(a,rl(Vm,b))}
|
|
464
464
|
function Dl(a,b){if(a.l!=ul){var c=rl(Wm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Il(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(rl(b,c))}
|
|
465
465
|
function Cl(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
|
|
466
466
|
function Ql(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Xm.includes(l)}h!=f.allowedByKeySystem&&
|
|
467
|
-
(e=!0)}}}if(!e||dm(a))(d=a.j.l)&&!d.allowedByKeySystem&&zm(a),e&&km(a)}}function Rl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=rl(Ym);a.dispatchEvent(b)}function Vl(a,b,c){0<b&&(a.T()||a.Fe(b));b=a.getDuration();c<b&&(a.T()||a.
|
|
467
|
+
(e=!0)}}}if(!e||dm(a))(d=a.j.l)&&!d.allowedByKeySystem&&zm(a),e&&km(a)}}function Rl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=rl(Ym);a.dispatchEvent(b)}function Vl(a,b,c){0<b&&(a.T()||a.Fe(b));b=a.getDuration();c<b&&(a.T()||a.Ja(c))}
|
|
468
468
|
function Lm(a,b){var c=a.m?a.m.Gc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var q=c[d?"00":p];q?Xm.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
|
|
469
469
|
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function jm(a){if(!a.variants.some(he))throw new N(2,4,4032);}function Qm(a,b){L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=ul&&a.dispatchEvent(b);A(c)})}function Dm(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(rd(c.language)):b.add("und");return b}
|
|
470
470
|
function Cm(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=rd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
|
|
@@ -472,7 +472,7 @@ h.push({language:l,role:n,label:p})}});return h}function vl(){return new N(2,7,7
|
|
|
472
472
|
U.prototype.getManifestParserFactory=U.prototype.kf;U.prototype.getManifest=U.prototype.jf;U.prototype.retryStreaming=U.prototype.Qd;U.prototype.setMaxHardwareResolution=U.prototype.Wd;U.prototype.addChaptersTrack=U.prototype.Ne;U.prototype.addTextTrackAsync=U.prototype.Oe;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ya;U.prototype.getPresentationStartTimeAsDate=U.prototype.ne;
|
|
473
473
|
U.prototype.getPlayheadTimeAsDate=U.prototype.qf;U.prototype.setTextTrackVisibility=U.prototype.ag;U.prototype.getChapters=U.prototype.cf;U.prototype.getChaptersTracks=U.prototype.me;U.prototype.isTextTrackVisible=U.prototype.td;U.prototype.selectVariantsByLabel=U.prototype.Vf;U.prototype.selectTextLanguage=U.prototype.Td;U.prototype.selectAudioLanguage=U.prototype.Sd;U.prototype.getTextLanguages=U.prototype.uf;U.prototype.getAudioLanguages=U.prototype.$e;U.prototype.getTextLanguagesAndRoles=U.prototype.vf;
|
|
474
474
|
U.prototype.getAudioLanguagesAndRoles=U.prototype.af;U.prototype.selectVariantTrack=U.prototype.Ce;U.prototype.selectTextTrack=U.prototype.Be;U.prototype.getThumbnails=U.prototype.wf;U.prototype.getImageTracks=U.prototype.ff;U.prototype.getTextTracks=U.prototype.ib;U.prototype.getVariantTracks=U.prototype.jb;U.prototype.cancelTrickPlay=U.prototype.Se;U.prototype.trickPlay=U.prototype.cg;U.prototype.getPlaybackRate=U.prototype.Hc;U.prototype.isBuffering=U.prototype.sd;U.prototype.getKeyStatuses=U.prototype.Gc;
|
|
475
|
-
U.prototype.getExpiration=U.prototype.
|
|
475
|
+
U.prototype.getExpiration=U.prototype.cc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Af;U.prototype.seekRange=U.prototype.mc;U.prototype.isAudioOnly=U.prototype.Cf;U.prototype.isInProgress=U.prototype.mb;U.prototype.isLive=U.prototype.T;U.prototype.getAdManager=U.prototype.le;U.prototype.getAssetUri=U.prototype.rd;U.prototype.getNetworkingEngine=U.prototype.dc;U.prototype.getMediaElement=U.prototype.mf;
|
|
476
476
|
U.prototype.getLoadMode=U.prototype.hf;U.prototype.resetConfiguration=U.prototype.Uf;U.prototype.getBufferFullness=U.prototype.bf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.hg;U.prototype.unload=U.prototype.be;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Wb;
|
|
477
477
|
U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?u(h,ug(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(uc()){for(var l in Bg)k[l]=!0;for(var m in Dg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=uc()?!!Bg[n]:vc(n);for(var p in l)k[p]=
|
|
478
478
|
uc()?!!Dg[p]:vc(l[p]);c=k;k={};p=t('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
|
|
@@ -480,13 +480,13 @@ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=uc()?gd(l)?!0:MediaSource.isTyp
|
|
|
480
480
|
U.isBrowserSupported=function(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||yc("Trident/"))return!1;var a=Fc();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:uc()?!0:vc("application/x-mpegurl")};U.setAdManagerFactory=function(a){gl=a};
|
|
481
481
|
U.registerSupportPlugin=function(a,b){Zm[a]=b};U.prototype.destroy=U.prototype.destroy;
|
|
482
482
|
var Vm="abrstatuschanged",Pm="adaptation",Mm="buffering",tm="downloadfailed",sm="downloadheadersreceived",Sl="drmsessionupdate",Xj="emsg",Wm="error",Ym="expirationupdated",Al="loaded",xl="loading",Nl="manifestparsed",Kl="mediaqualitychanged",rm="metadata",sl="onstatechange",tl="onstateidle",Nm="ratechange",cm="streaming",Tm="textchanged",Um="texttrackvisibility",Jl="timelineregionadded",vm="timelineregionenter",wm="timelineregionexit",Rm="trackschanged",El="unloading",Sm="variantchanged",$m={jg:Vm,
|
|
483
|
-
kg:Pm,lg:Mm,ng:tm,og:sm,pg:Sl,rg:Xj,Error:Wm,sg:Ym,ug:"largegap",vg:Al,wg:xl,xg:Nl,yg:Kl,Metadata:rm,Ag:sl,Bg:tl,Cg:Nm,Eg:"sessiondata",Fg:cm,Gg:Tm,Hg:Um,Ig:Jl,Jg:vm,Kg:wm,Lg:Rm,Mg:El,Ng:Sm},ul=0,dl=1,am=2,mm=3;U.LoadMode={DESTROYED:ul,NOT_LOADED:dl,MEDIA_SOURCE:am,SRC_EQUALS:mm};U.version="v3.3.
|
|
483
|
+
kg:Pm,lg:Mm,ng:tm,og:sm,pg:Sl,rg:Xj,Error:Wm,sg:Ym,ug:"largegap",vg:Al,wg:xl,xg:Nl,yg:Kl,Metadata:rm,Ag:sl,Bg:tl,Cg:Nm,Eg:"sessiondata",Fg:cm,Gg:Tm,Hg:Um,Ig:Jl,Jg:vm,Kg:wm,Lg:Rm,Mg:El,Ng:Sm},ul=0,dl=1,am=2,mm=3;U.LoadMode={DESTROYED:ul,NOT_LOADED:dl,MEDIA_SOURCE:am,SRC_EQUALS:mm};U.version="v3.3.16";var an=["3","3"];Lb=new function(a){this.g=a;this.i=Mb;this.h=Nb}(new Jb(Number(an[0]),Number(an[1])));
|
|
484
484
|
var Xm=["output-restricted","internal-error"],Zm={},gl=null,Bl={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"},Fm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
485
485
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function bn(){this.h=[];this.j=this.i=this.g=0};function V(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new ef;this.j.A(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.A(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
486
486
|
r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
|
|
487
487
|
r.isLinear=function(){return this.h.isLinear()};r.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};
|
|
488
488
|
M("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;
|
|
489
|
-
V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function cn(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new ef;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.
|
|
489
|
+
V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function cn(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new ef;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.16");this.g=null;this.h.oa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){dn(e,f)});this.h.A(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
490
490
|
function(f){en(e,f)});this.i.onended=function(){e.m.contentComplete()}}cn.prototype.stop=function(){this.g&&this.g.stop();this.o&&kk(this.o)};cn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function en(a,b){b.getError();fn(a,null);a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
491
491
|
function dn(a,b){a.l(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",d)))}gn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
492
492
|
a.h.A(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.i.addEventListener("play",function(){a.g.start()},{once:!0})}catch(f){fn(a,null)}}
|
|
@@ -507,8 +507,8 @@ f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}jn.prototyp
|
|
|
507
507
|
function kn(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.F||a.h.A(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function X(){Ne.call(this);this.g=this.i=null;this.h=new bn;this.j=navigator.language}qa(X,Ne);r=X.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new cn(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)})};
|
|
508
508
|
r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Ne.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new bn};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
|
|
509
509
|
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new jn(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)})};
|
|
510
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&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="v3.3.
|
|
511
|
-
(c.F=!0),c.j=new rc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(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="v3.3.
|
|
510
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&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="v3.3.16";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
511
|
+
(c.F=!0),c.j=new rc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(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="v3.3.16";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
|
|
512
512
|
r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.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)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",X);
|
|
513
513
|
X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
|
|
514
514
|
X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
|
|
@@ -521,28 +521,28 @@ var on="ended play playing pause pausing ratechange seeked seeking timeupdate vo
|
|
|
521
521
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},tn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},un={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},vn=[["getConfiguration","configure"]],wn=[["isTextTrackVisible","setTextTrackVisibility"]],xn="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
522
522
|
yn=["attach","detach","load","unload"];function zn(a,b,c,d,e,f){var g=this;this.G=a;this.j=new O(b);this.V=c;this.u=!1;this.s=d;this.F=e;this.L=f;this.h=this.m=!1;this.N="";this.o=null;this.C=function(){return An(g)};this.D=function(h,k){var l=mn(k);switch(l.type){case "event":var m=l.targetName;l=Me(l.event);g.s(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.u&&(g.V(),g.u=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new N(l.severity,l.category,l.code);
|
|
523
523
|
for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;Bn.add(this)}r=zn.prototype;r.destroy=function(){Bn["delete"](this);Cn(this);Ln&&Mn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.C=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.ua=function(){return this.h};r.Od=function(){return this.N};
|
|
524
|
-
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.
|
|
524
|
+
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Nb();var a=new chrome.cast.SessionRequest(this.G);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Bn),d=c.next();!d.done;d=c.next())Nn(d.value,b)},function(b){for(var c=t(Bn),d=c.next();!d.done;d=c.next())d=d.value,On="available"==b,d.j.Nb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});On&&this.j.S(Pn);(a=Ln)&&a.status!=chrome.cast.SessionStatus.STOPPED?Nn(this,
|
|
525
525
|
a):Ln=null}else window.__onGCastApiAvailable!==Qn&&(Rn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Qn)};r.Ud=function(a){this.o=a;this.h&&Sn(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!On)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new rc;chrome.cast.requestSession(function(d){return Tn(b,a,d)},function(d){return Un(b,d)});return u(c,b.l,0)})};
|
|
526
|
-
function Vn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return Tn(a,b,c)},function(c){return Un(a,c)})}}r.
|
|
526
|
+
function Vn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return Tn(a,b,c)},function(c){return Un(a,c)})}}r.Bb=function(){if(this.h){Cn(this);if(Ln){Mn(this);try{Ln.stop(function(){},function(){})}catch(a){}Ln=null}An(this)}};
|
|
527
527
|
r.get=function(a,b){var c=this;if("video"==a){if(rn.includes(b))return function(){return c.xe.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))}}else if("player"==a){if(un[b]&&!this.get("player","isLive")())return function(){};if(xn.includes(b))return function(){return c.xe.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if(yn.includes(b))return function(){return c.Rf.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if(sn[b]||tn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
528
528
|
r.set=function(a,b,c){this.g[a][b]=c;Sn(this,{type:"set",targetName:a,property:b,value:c})};function Tn(a,b,c){Ln=c;c.addUpdateListener(a.C);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);An(a);Sn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Un(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
|
|
529
529
|
r.xe=function(a,b){Sn(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.Rf=function(a,b){var c=Ha.apply(2,arguments),d=new rc,e=this.I.toString();this.I++;this.i[e]=d;try{Sn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Nn(a,b){var c=a.L();a.l=new rc;a.u=!0;Tn(a,c,b)}function Mn(a){var b=Ln;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
|
|
530
|
-
function An(a){var b=Ln?"connected"==Ln.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Cn(a)}a.h=b;a.N=b?Ln.receiver.friendlyName:"";a.j.
|
|
530
|
+
function An(a){var b=Ln?"connected"==Ln.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Cn(a)}a.h=b;a.N=b?Ln.receiver.friendlyName:"";a.j.Nb()}function Cn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function Sn(a,b){var c=ln(b),d=Ln;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Xa)}catch(e){throw c=new N(2,8,8005,e),d=new Q("error",(new Map).set("detail",c)),a.s("player",d),a.Bb(),c;}}var Pn=.02,On=!1,Ln=null,Rn=null,Bn=new Set;
|
|
531
531
|
function Qn(a){Rn?window.__onGCastApiAvailable=Rn:delete window.__onGCastApiAvailable;Rn=null;if(a)for(var b=t(Bn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Wn(a,b,c){Ne.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.u=new Map;this.g=new zn(c,function(){return Xn(d)},function(){return Yn(d)},function(e,f){return Zn(d,e,f)},function(){return $n(d)},function(){return ao(d)});bo(this)}qa(Wn,Ne);r=Wn.prototype;
|
|
532
|
-
r.destroy=function(a){a&&this.g.
|
|
533
|
-
r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=ao(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.be(),0):c["return"]()})};r.Ud=function(a){this.g.Ud(a)};r.bg=function(){Vn(this.g)};r.
|
|
534
|
-
r.Te=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.C)return c["return"]();b.C=a;b.g.
|
|
535
|
-
function bo(a){a.g.init();a.m=new ef;for(var b=t(on),c=b.next();!c.done;c=b.next())a.m.A(a.i,c.value,function(f){a.g.ua()||(f=Me(f),a.j.dispatchEvent(f))});for(var d in $m)a.m.A(a.h,$m[d],function(f){a.g.ua()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.
|
|
536
|
-
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return fo(a,f)}})});go(a);a.j=new Ne;a.j.
|
|
532
|
+
r.destroy=function(a){a&&this.g.Bb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Ne.prototype.release.call(this);return Promise.all(a)};r.zf=function(){return this.l};r.pf=function(){return this.s};r.Qe=function(){return this.g.m&&On};r.ua=function(){return this.g.ua()};r.Od=function(){return this.g.Od()};
|
|
533
|
+
r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=ao(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.be(),0):c["return"]()})};r.Ud=function(a){this.g.Ud(a)};r.bg=function(){Vn(this.g)};r.Bb=function(){this.g.Bb()};
|
|
534
|
+
r.Te=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.C)return c["return"]();b.C=a;b.g.Bb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new zn(a,function(){return Xn(b)},function(){return Yn(b)},function(d,e){return Zn(b,d,e)},function(){return $n(b)},function(){return ao(b)});b.g.init();A(c)})};
|
|
535
|
+
function bo(a){a.g.init();a.m=new ef;for(var b=t(on),c=b.next();!c.done;c=b.next())a.m.A(a.i,c.value,function(f){a.g.ua()||(f=Me(f),a.j.dispatchEvent(f))});for(var d in $m)a.m.A(a.h,$m[d],function(f){a.g.ua()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Pb=e,Object.defineProperty(a.l,b.Pb,{configurable:!1,enumerable:!0,get:function(f){return function(){return co(a,f.Pb)}}(b),set:function(f){return function(g){var h=f.Pb;a.g.ua()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Pb:b.Pb};a.s={};eo(a,
|
|
536
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return fo(a,f)}})});go(a);a.j=new Ne;a.j.Ec=a.l;a.o=new Ne;a.o.Ec=a.s}function go(a){var b=new Map;eo(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
|
|
537
537
|
function eo(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
|
|
538
538
|
function ao(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.rd(),startTime:null};a.i.pause();for(var c=t(qn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(vn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(wn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Xn(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
|
|
539
539
|
function Yn(a){var b=new Q(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
540
540
|
function $n(a){for(var b=t(vn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(qn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(qn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(wn);for(k=
|
|
541
541
|
h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new Q(Wm,h);a.h.dispatchEvent(h)})}
|
|
542
542
|
function co(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ua()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ua()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
|
|
543
|
-
function fo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.
|
|
543
|
+
function fo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.dc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.le()};
|
|
544
544
|
if("setVideoContainer"==b)return function(c){return a.h.Ge(c)};if(a.g.ua()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ua()&&0==Object.keys(a.g.g.video).length&&(sn[b]||tn[b])||!a.g.ua()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
545
|
-
function Zn(a,b,c){a.g.ua()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}M("shaka.cast.CastProxy",Wn);Wn.prototype.changeReceiverId=Wn.prototype.Te;Wn.prototype.forceDisconnect=Wn.prototype.
|
|
545
|
+
function Zn(a,b,c){a.g.ua()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}M("shaka.cast.CastProxy",Wn);Wn.prototype.changeReceiverId=Wn.prototype.Te;Wn.prototype.forceDisconnect=Wn.prototype.Bb;Wn.prototype.suggestDisconnect=Wn.prototype.bg;Wn.prototype.setAppData=Wn.prototype.Ud;Wn.prototype.cast=Wn.prototype.cast;Wn.prototype.receiverName=Wn.prototype.Od;Wn.prototype.isCasting=Wn.prototype.ua;Wn.prototype.canCast=Wn.prototype.Qe;Wn.prototype.getPlayer=Wn.prototype.pf;
|
|
546
546
|
Wn.prototype.getVideo=Wn.prototype.zf;Wn.prototype.destroy=Wn.prototype.destroy;function ho(a,b,c,d){Ne.call(this);var e=this;this.g=a;this.h=b;this.j=new ef;this.I={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.C=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){io(e)});jo(this)}qa(ho,Ne);r=ho.prototype;r.isConnected=function(){return this.F};r.Df=function(){return this.o};r.Yf=function(a){this.i=a};r.We=function(){this.i=null};
|
|
547
547
|
r.Zf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Xf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Wf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
548
548
|
r.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.I=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Ne.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();A(d)})};
|
|
@@ -560,7 +560,7 @@ function mo(a,b){var c=mn(b.data);switch(c.type){case "PLAY":a.g.play();so(a);br
|
|
|
560
560
|
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||so(a);break;case "LOAD":a.m=0;a.C=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.L(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&vo(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");lo(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:lo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
561
561
|
function wo(a,b,c,d){a.h&&lo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function lo(a,b,c,d){a.F&&(a=ln(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function so(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?xo:a.h.sd()?yo:a.g.paused?zo:Ao,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);lo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
562
562
|
M("shaka.cast.CastReceiver",ho);ho.prototype.destroy=ho.prototype.destroy;ho.prototype.setContentArtist=ho.prototype.Wf;ho.prototype.setContentImage=ho.prototype.Xf;ho.prototype.setContentTitle=ho.prototype.Zf;ho.prototype.clearContentMetadata=ho.prototype.We;ho.prototype.setContentMetadata=ho.prototype.Yf;ho.prototype.isIdle=ho.prototype.Df;ho.prototype.isConnected=ho.prototype.isConnected;var uo=.5,qo=5,xo="IDLE",Ao="PLAYING",yo="BUFFERING",zo="PAUSED";function Bo(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ig).box("moov",Mg).P("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.O,-12,c.size);b.data.push(d);b.g.push(Uc(c.reader.Za(16)));if(0<c.version){d=c.reader.M();for(var e=0;e<d;e++){var f=Uc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
|
|
563
|
-
function Co(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Ib(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Do(a){if(!a)return a;var b=new Bo(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={
|
|
563
|
+
function Co(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Ib(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Do(a){if(!a)return a;var b=new Bo(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={sc:c.sc},d=b.next())c.sc=d.value,a.some(function(e){return function(f){return Db(f,e.sc)}}(c))||a.push(c.sc);return Vc.apply(Pc,ja(a))};function Eo(a,b,c){var d=Fo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Ae?(e=h.init||e,!1):!0}),f.length&&(a=Go(e,f,c),0==a.length&&(a=[lc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(lc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
|
|
564
564
|
t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ge:g,Og:e,drmInfos:a,ke:!0}}function Ho(a,b,c,d){var e=Eo(a,c,d);if(b.ke){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.ke=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.ge||b.ge}
|
|
565
565
|
function Io(a){var b=0,c=Ib(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
566
566
|
function Jo(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Ko(a){a=uf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Sc(a.textContent);a=Io(a).filter(function(b){return b.type===Lo})[0];if(!a)return"";a=Kc(a.value,!0);return(a=Mf(a,"WRMHEADER"))?Jo(a):""}
|
|
@@ -570,42 +570,42 @@ function No(a){var b=a.getAttribute("schemeIdUri"),c=xf(a,"urn:mpeg:cenc:2013","
|
|
|
570
570
|
var Lo=1,Mo=(new Map).set("com.widevine.alpha",function(a){return(a=uf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Ko).set("com.microsoft.playready.recommendation",Ko).set("com.microsoft.playready.software",Ko).set("com.microsoft.playready.hardware",Ko);function Oo(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
|
|
571
571
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
572
572
|
function Po(a,b){var c=Qo(a,b,"timescale"),d=1;c&&(d=If(c)||1);var e=Qo(a,b,"duration");c=If(e||"");"image"==a.H.contentType&&(c=Kf(e||""));c&&(c/=d);var f=Qo(a,b,"startNumber");e=Number(Qo(a,b,"presentationTimeOffset"))||0;var g=Jf(f||"");if(null==f||null==g)g=1;var h=Ro(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.U.duration||Infinity;h=tf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Bf(p,"t",Jf),y=Bf(p,"d",Jf);p=Bf(p,"r",Ff);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
|
|
573
|
-
p||0;if(0>p)if(q){q=Bf(q,"t",Jf);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,fg:v}),v=m}f=l}return{timescale:d,ja:c,
|
|
574
|
-
function Ro(a,b,c){return[b(a.H),b(a.ga),b(a.aa)].filter(
|
|
573
|
+
p||0;if(0>p)if(q){q=Bf(q,"t",Jf);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,fg:v}),v=m}f=l}return{timescale:d,ja:c,Mb:g,Ta:e/d||0,ce:e,timeline:f}}function Qo(a,b,c){return[b(a.H),b(a.ga),b(a.aa)].filter(Qb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
574
|
+
function Ro(a,b,c){return[b(a.H),b(a.ga),b(a.aa)].filter(Qb).map(function(d){return sf(d,c)}).reduce(function(d,e){return d||e})}
|
|
575
575
|
function So(a,b,c,d,e,f){for(var g=xf(a,"http://www.w3.org/1999/xlink","href"),h=xf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Ge(new N(2,4,4028));if("onLoad"!=h)return Ge(new N(2,4,4027));var m=kc([d],[g]);return e.request(0,We(m,b)).$(function(n){n=Of(n.data,a.tagName);if(!n)return Ge(new N(2,4,4001,g));
|
|
576
576
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return To(a,b,c,m[0],e,f+1)})}
|
|
577
577
|
function To(a,b,c,d,e,f){f=void 0===f?0:f;if(xf(a,"http://www.w3.org/1999/xlink","href")){var g=So(a,b,c,d,e,f);c&&(g=g.$(void 0,function(){return To(a,b,c,d,e,f)}));return g}g=[];for(var h=t(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"==xf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(To(k,b,c,d,e,f)));return Ke(g).$(function(){return a})};function Uo(a,b,c,d,e,f,g){var h,k=(new Ig).P("sidx",function(l){h=Vo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
|
|
578
|
-
function Vo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.
|
|
578
|
+
function Vo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Lb(),m=g.reader.Lb();g.reader.skip(2);var n=g.reader.Kb();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.M(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.M();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new Ii(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Wo(a){this.h=Ib(a);this.g=new Fg(this.h,0)}Wo.prototype.ma=function(){return this.g.ma()};
|
|
579
579
|
function Xo(a){var b=Yo(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Yo(a);a:{d=t(Zo);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.X();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.X()+b<=a.h.byteLength?b:a.h.byteLength-a.g.X();d=Ib(a.h,a.g.X(),b);a.g.skip(b);return new $o(c,d)}
|
|
580
580
|
function Yo(a){var b=a.g.X(),c=a.g.Y();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var Zo=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function $o(a,b){this.id=a;this.g=b}
|
|
581
581
|
function ap(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function bp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Wo(a.g);for(var n=null,p=null;a.ma();){var q=Xo(a);if(187==q.id){var v=cp(q);v&&(q=c*v.gg,v=b+v.Qf,null!=n&&m.push(new Ii(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new Ii(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
582
582
|
function cp(a){var b=new Wo(a.g);a=Xo(b);if(179!=a.id)throw new N(2,3,3013);a=ap(a);b=Xo(b);if(183!=b.id)throw new N(2,3,3012);b=new Wo(b.g);for(var c=0;b.ma();){var d=Xo(b);if(241==d.id){c=ap(d);break}}return{gg:a,Qf:c}};function dp(a,b){var c=Ro(a,b,"Initialization");if(!c)return null;var d=a.H.za,e=c.getAttribute("sourceURL");e&&(d=kc(a.H.za,[e]));e=0;var f=null;if(c=Bf(c,"range",Ef))e=c.start,f=c.end;return new Gi(function(){return d},e,f,ep(a))}
|
|
583
|
-
function fp(a,b){var c=Number(Qo(a,gp,"presentationTimeOffset"))||0,d=Qo(a,gp,"timescale"),e=1;d&&(e=If(d)||1);var f=c/e||0,g=dp(a,gp);hp(a,g);var h=Pe(a);return{
|
|
583
|
+
function fp(a,b){var c=Number(Qo(a,gp,"presentationTimeOffset"))||0,d=Qo(a,gp,"timescale"),e=1;d&&(e=If(d)||1);var f=c/e||0,g=dp(a,gp);hp(a,g);var h=Pe(a);return{Cb:function(){var k=Ro(h,gp,"RepresentationIndex"),l=h.H.za;k&&(k=k.getAttribute("sourceURL"))&&(l=kc(h.H.za,[k]));k=ip(h);return jp(h,b,g,l,k.start,k.end,f)}}}
|
|
584
584
|
function jp(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,w,x,D,z,B,F;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Wa||!a.U.re,l=a.U.start,m=a.U.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.sa(),c.pa,c.ha):null],p=null,u(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;D=null;z=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var H=Uo(w,e,d,c,z,B,F);else{H=new Wo(x);if(440786851!=Xo(H).id)throw new N(2,3,3008);var I=Xo(H);if(408125543!=I.id)throw new N(2,3,3009);H=I.g.byteOffset;
|
|
585
|
-
I=new Wo(I.g);for(var J=null;I.ma();){var K=Xo(I);if(357149030==K.id){J=K;break}}if(!J)throw new N(2,3,3010);J=new Wo(J.g);K=1E6;for(I=null;J.ma();){var P=Xo(J);if(2807729==P.id)K=ap(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=K/1E9;I*=J;K=Xo(new Wo(w));if(475249515!=K.id)throw new N(2,3,3007);H=bp(K,H,J,I,d,c,z,B,F)}D=H;h.
|
|
586
|
-
function gp(a){return a.
|
|
587
|
-
function ep(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Nc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function lp(a,b){var c=dp(a,mp),d=np(a);if(!d.ja&&!d.timeline&&1<d.
|
|
588
|
-
Infinity,c);f&&(f.segmentIndex=e);return{
|
|
589
|
-
function op(a,b,c,d,e){var f=d.
|
|
590
|
-
function pp(a){return[a.H.$a,a.ga.$a,a.aa.$a].filter(
|
|
591
|
-
Infinity,p=Infinity!=n;l?(p&&(new T(m)).Xa(c,n,!0),l.
|
|
592
|
-
function tp(a){var b=a.
|
|
593
|
-
function up(a,b,c,d,e){function f(J){var K=(J-q)*p,P=K+b.Ta,R=K+l;K=R+p;var ba=Math.min(K,h());R=new Ii(R,ba,function(){var aa=Oo(y,x,J,w,P*v);return kc(D,[aa])},0,null,d,z,l,h());R.l=K;return R}function g(){var J=[Math.max(k.Qa(),l),Math.min(k.hb(),h())].map(function(K){return K-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(K){return K+q})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.U.start,m=a.aa.id,n=a.U.duration,p=b.ja,q=b.
|
|
585
|
+
I=new Wo(I.g);for(var J=null;I.ma();){var K=Xo(I);if(357149030==K.id){J=K;break}}if(!J)throw new N(2,3,3010);J=new Wo(J.g);K=1E6;for(I=null;J.ma();){var P=Xo(J);if(2807729==P.id)K=ap(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=K/1E9;I*=J;K=Xo(new Wo(w));if(475249515!=K.id)throw new N(2,3,3007);H=bp(K,H,J,I,d,c,z,B,F)}D=H;h.Hb(D);q=new T(D);k&&q.Xa(B,F,!0);return G["return"](q)})}
|
|
586
|
+
function gp(a){return a.nc}function ip(a){var b=Ro(a,gp,"RepresentationIndex");a=Qo(a,gp,"indexRange");a=Ef(a||"");b&&(a=Bf(b,"range",Ef,a));return a}function hp(a,b){kp(a,b);if(!ip(a))throw new N(2,4,4002);}function kp(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=pc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
|
|
587
|
+
function ep(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Nc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function lp(a,b){var c=dp(a,mp),d=np(a);if(!d.ja&&!d.timeline&&1<d.Eb.length)throw new N(2,4,4002);if(!d.ja&&!a.U.duration&&!d.timeline&&1==d.Eb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=op(a.U.start,a.U.duration,a.H.za,d,c);c=!e;e?e.Gb(g,a.presentationTimeline.Qa()):e=new T(g);a.presentationTimeline.Hb(g);a.Wa&&a.U.re||e.Xa(a.U.start,a.U.duration?a.U.start+a.U.duration:
|
|
588
|
+
Infinity,c);f&&(f.segmentIndex=e);return{Cb:function(){e&&0!=e.K.length||e.Fb(g);return Promise.resolve(e)}}}function mp(a){return a.$a}function np(a){var b=pp(a);a=Po(a,mp);var c=a.Mb;0==c&&(c=1);var d=0;a.ja?d=a.ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ja:a.ja,startTime:d,Mb:c,Ta:a.Ta,timeline:a.timeline,Eb:b}}
|
|
589
|
+
function op(a,b,c,d,e){var f=d.Eb.length;d.timeline&&d.timeline.length!=d.Eb.length&&(f=Math.min(d.timeline.length,d.Eb.length));for(var g=a-d.Ta,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={cd:m.cd},n++){var p=d.Eb[n];m.cd=kc(c,[p.Hf]);var q=void 0;q=null!=d.ja?l+d.ja:d.timeline?d.timeline[n].end:l+b;k.push(new Ii(a+l,a+q,function(v){return function(){return v.cd}}(m),p.start,p.end,e,g,a,h));l=q}return k}
|
|
590
|
+
function pp(a){return[a.H.$a,a.ga.$a,a.aa.$a].filter(Qb).map(function(b){return tf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.pe&&(a.pe=!0);var c=b.getAttribute("media");b=Bf(b,"mediaRange",Ef,{start:0,end:null});return{Hf:c,start:b.start,end:b.end}})};function qp(a,b,c,d,e,f){var g=rp(a),h=sp(a);tp(h);var k=Pe(a);if(h.ic)return kp(a,g),{Cb:function(){var q=Oo(h.ic,k.H.id,null,k.bandwidth||null,null);q=kc(k.H.za,[q]);return jp(k,b,g,q,0,null,h.Ta)}};if(h.ja)return d||"image"===a.ga.contentType||(a.presentationTimeline.Hd(h.ja),a.presentationTimeline.Id(a.U.start)),{Cb:function(){return up(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=vp(k,h,g);c=a.U.start;var n=a.U.duration?a.U.start+a.U.duration:
|
|
591
|
+
Infinity,p=Infinity!=n;l?(p&&(new T(m)).Xa(c,n,!0),l.Gb(m,a.presentationTimeline.Qa())):l=new T(m);a.presentationTimeline.Hb(m);p&&l.Xa(c,n);d&&a.Wa&&(d.segmentIndex=l);return{Cb:function(){l&&0!=l.K.length||l.Fb(m);return Promise.resolve(l)}}}function wp(a){return a.oc}function sp(a){var b=Po(a,wp),c=Qo(a,wp,"media");a=Qo(a,wp,"index");return{ja:b.ja,timescale:b.timescale,Mb:b.Mb,Ta:b.Ta,ce:b.ce,timeline:b.timeline,Fd:c,ic:a}}
|
|
592
|
+
function tp(a){var b=a.ic?1:0;b+=a.timeline?1:0;b+=a.ja?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.ic&&(a.timeline=null),a.ja=null);if(!a.ic&&!a.Fd)throw new N(2,4,4002);}
|
|
593
|
+
function up(a,b,c,d,e){function f(J){var K=(J-q)*p,P=K+b.Ta,R=K+l;K=R+p;var ba=Math.min(K,h());R=new Ii(R,ba,function(){var aa=Oo(y,x,J,w,P*v);return kc(D,[aa])},0,null,d,z,l,h());R.l=K;return R}function g(){var J=[Math.max(k.Qa(),l),Math.min(k.hb(),h())].map(function(K){return K-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(K){return K+q})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.U.start,m=a.aa.id,n=a.U.duration,p=b.ja,q=b.Mb,v=b.timescale,
|
|
594
594
|
y=b.Fd,w=a.bandwidth||null,x=a.H.id,D=a.H.za,z=l-b.Ta,B=g();a=a.Wa?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var G=f(F);c.push(G)}var H=new T(c);c=k.hb()<h();F=k.T();if(c||F){var I=Math.max(a,B+1);H.Uc(p,function(){var J=k.Qa();H.eb(J);var K=t(g());K.next();K=K.next().value;for(var P=[];I<=K;){var R=f(I);P.push(R);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
|
|
595
|
-
function vp(a,b,c){var d=a.U.start,e=a.U.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={bd:h.bd,fd:h.fd,jd:h.jd,Zc:h.Zc,ld:h.ld,$c:h.$c},k++){var l=b.timeline[k],m=l.start,n=l.fg;l=l.end;h.jd=k+b.
|
|
595
|
+
function vp(a,b,c){var d=a.U.start,e=a.U.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={bd:h.bd,fd:h.fd,jd:h.jd,Zc:h.Zc,ld:h.ld,$c:h.$c},k++){var l=b.timeline[k],m=l.start,n=l.fg;l=l.end;h.jd=k+b.Mb;h.ld=n+b.ce;h.fd=a.H.id;h.Zc=a.bandwidth||null;h.bd=b.Fd;h.$c=a.H.za;g.push(new Ii(d+m,d+l,function(p){return function(){var q=Oo(p.bd,p.fd,p.jd,p.Zc||null,p.ld);return kc(p.$c,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
596
596
|
function rp(a){var b=Qo(a,wp,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.za;return new Gi(function(){var f=Oo(b,c,null,d,null);return kc(e,[f])},0,null,ep(a))};function xp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}xp.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
|
|
597
|
-
function yp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da;return L(function(Fa){switch(Fa.g){case 1:d=qc;zp(b);Ap(b);Bp(b);Cp(b);if(!c&&1==b.length){e=b[0];a.g=e.
|
|
598
|
-
p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(Dp(d.Z));y=t(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Dp(d.
|
|
597
|
+
function yp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da;return L(function(Fa){switch(Fa.g){case 1:d=qc;zp(b);Ap(b);Bp(b);Cp(b);if(!c&&1==b.length){e=b[0];a.g=e.yc;a.h=e.Wc;a.j=e.textStreams;a.i=e.imageStreams;Fa.B(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Fa["return"]();k=b.map(function(xa){return xa.yc});l=b.map(function(xa){return xa.Wc});m=b.map(function(xa){return xa.textStreams});n=b.map(function(xa){return xa.imageStreams});
|
|
598
|
+
p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(Dp(d.Z));y=t(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Dp(d.Tb));return u(Fa,Ep(a.g,k,f,Fp,Gp),3);case 3:return u(Fa,Ep(a.h,l,f,Fp,Gp),4);case 4:return u(Fa,Ep(a.j,m,f,Fp,Gp),5);case 5:return u(Fa,Ep(a.i,n,f,Fp,Gp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(J=t(a.g),K=J.next();!K.done;K=J.next())for(P=K.value,R=t(a.h),ba=R.next();!ba.done;ba=R.next())aa=ba.value,Y=xg(P.drmInfos,aa.drmInfos),P.drmInfos.length&&aa.drmInfos.length&&
|
|
599
599
|
!Y.length||(Da=D++,z.push({id:Da,language:P.language,primary:P.primary,audio:P,video:aa,bandwidth:(P.bandwidth||0)+(aa.bandwidth||0),drmInfos:Y,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),F=t(B),G=F.next();!G.done;G=F.next())H=G.value,I=D++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.cb?H:null,video:H.type==d.Na?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
600
|
-
a.l=z;A(Fa)}})}function zp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.
|
|
600
|
+
a.l=z;A(Fa)}})}function zp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.yc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&gb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.yc=c}}
|
|
601
601
|
function Bp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&gb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
602
602
|
function Ap(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Wc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&gb(e.roles,h.roles)&&rf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Wc=c}}
|
|
603
603
|
function Cp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
|
|
604
|
-
function Hp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,z,B,F,G,H,I,J,K,P;return L(function(R){switch(R.g){case 1:b=qc;if(1==a.length)return R["return"](a[0]);c=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.cb})});d=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Na})});e=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Z})});f=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.
|
|
605
|
-
h.value,k.push(Ip(b.Z));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Ip(b.
|
|
604
|
+
function Hp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,z,B,F,G,H,I,J,K,P;return L(function(R){switch(R.g){case 1:b=qc;if(1==a.length)return R["return"](a[0]);c=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.cb})});d=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Na})});e=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Z})});f=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Tb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=
|
|
605
|
+
h.value,k.push(Ip(b.Z));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Ip(b.Tb));return u(R,Ep([],c,0,Jp,Kp),2);case 2:return p=R.h,u(R,Ep([],d,0,Jp,Kp),3);case 3:return q=R.h,u(R,Ep([],e,0,Jp,Kp),4);case 4:return v=R.h,u(R,Ep([],f,0,Jp,Kp),5);case 5:y=R.h;w=0;if(q.length&&p.length)for(F=t(p),G=F.next();!G.done;G=F.next())for(H=G.value,I=t(q),J=I.next();!J.done;J=I.next())K=J.value,P=w++,K.variantIds.push(P),H.variantIds.push(P);else for(x=q.concat(p),D=t(x),z=D.next();!z.done;z=D.next())B=
|
|
606
606
|
z.value,B.variantIds=[w++];return R["return"](q.concat(p).concat(v).concat(y))}})}
|
|
607
607
|
function Ep(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,w,x,D,z,B,F,G,H,I,J;return L(function(K){switch(K.g){case 1:f=qc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){K.B(4);break}m=l.value;return u(K,Lp(m,b,c,e,g),5);case 5:n=K.h;if(!n)throw new N(2,4,4037);l=k.next();K.B(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,y=t(v),w=y.next();!w.done;w=y.next())x=w.value,(D=Mp(x,b,d,e,g))&&a.push(D);z=t(g);for(q=z.next();!q.done;q=
|
|
608
|
-
z.next())for(B=q.value,F={},G=t(B),w=G.next();!w.done;F={Va:F.Va},w=G.next())if(F.Va=w.value,H=F.Va.type==f.Z&&!F.Va.language,I=F.Va.type==f.
|
|
608
|
+
z.next())for(B=q.value,F={},G=t(B),w=G.next();!w.done;F={Va:F.Va},w=G.next())if(F.Va=w.value,H=F.Va.type==f.Z&&!F.Va.language,I=F.Va.type==f.Tb&&!F.Va.tilesLayout,!H&&!I&&(J=a.some(function(P){return function(R){return R.mimeType==P.Va.mimeType&&cd(R.codecs)==cd(P.Va.codecs)}}(F))))throw new N(2,4,4037);return K["return"](a)}})}
|
|
609
609
|
function Lp(a,b,c,d,e){return L(function(f){if(1==f.g)return Np(b,a),a.matchedStreams?a.segmentIndex?u(f,Op(a,c),2):f.B(2):f["return"](!1);Pp(a,c,d,e);return f["return"](!0)})}
|
|
610
610
|
function Op(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof gj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);A(l)})}
|
|
611
611
|
function Mp(a,b,c,d,e){var f=c(a);Np(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return L(function(g){if(f.segmentIndex)return g.B(0);f.segmentIndex=new gj;return u(g,Op(f,0),0)})});if(!f.matchedStreams)return null;Pp(f,0,d,e);return f}function Pp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==vd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
|
|
@@ -626,32 +626,32 @@ function Xp(a,b,c){if(b==a&&a!=c)return Zp;if(c==a&&a!=b)return Yp;if(b>a){if(c<
|
|
|
626
626
|
r.stop=function(){for(var a=t(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.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return C(c,2),u(c,dq(a),4);if(2!=c.g)return va(c,0);b=E(c);if(!a.h||!b)return c["return"]();a.h.onError(b);A(c)})};r.onExpirationUpdated=function(){};
|
|
627
627
|
function dq(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=We(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Re(a.o,e),u(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 u(k,fq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
|
|
628
628
|
function fq(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=Of(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](gq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=To(d,a.g.retryParameters,f,c,a.h.networkingEngine);Re(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](gq(a,h,c))})}
|
|
629
|
-
function gq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa;return L(function(Ia){switch(Ia.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=tf(b,"Location").map(zf).filter(
|
|
630
|
-
"timeShiftBufferDepth",Df);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=Bf(b,"suggestedPresentationDelay",Df));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=Bf(b,"maxSegmentDuration",Df));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,F=t(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.eb(B.Qa());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=w?w:I,B=new S(q,J,a.g.dash.autoCorrectDrift);B.
|
|
631
|
-
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Yd(v);P=b.getAttribute("profiles")||"";R={Wa:"static"!=z,presentationTimeline:B,aa:null,U:null,ga:null,H:null,bandwidth:0,pe:!1,
|
|
629
|
+
function gq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa;return L(function(Ia){switch(Ia.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=tf(b,"Location").map(zf).filter(Qb);0<f.length&&(g=kc(e,f),e=a.m=g);h=tf(b,"BaseURL");k=h.map(zf);l=kc(e,k);m=0;h&&h.length&&(m=Bf(h[0],"availabilityTimeOffset",Kf)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Bf(b,"minBufferTime",Df)||0);a.F=Bf(b,"minimumUpdatePeriod",Df,-1);q=Bf(b,"availabilityStartTime",Cf);v=Bf(b,
|
|
630
|
+
"timeShiftBufferDepth",Df);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=Bf(b,"suggestedPresentationDelay",Df));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=Bf(b,"maxSegmentDuration",Df));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,F=t(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.eb(B.Qa());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=w?w:I,B=new S(q,J,a.g.dash.autoCorrectDrift);B.pc("static"==z);(K=B.T())&&
|
|
631
|
+
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Yd(v);P=b.getAttribute("profiles")||"";R={Wa:"static"!=z,presentationTimeline:B,aa:null,U:null,ga:null,H:null,bandwidth:0,pe:!1,Ab:m,profiles:P.split(",")};ba=hq(a,R,l,b);aa=ba.duration;Y=ba.periods;"static"!=z&&ba.ie||B.Ja(aa||Infinity);a.u&&!a.C&&(Da=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?B.De(a.u):a.u&&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.");
|
|
632
632
|
B.Hd(D||1);return u(Ia,yp(a.j,Y,R.Wa),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);Ia.B(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.Ie()){Ia.B(4);break}Fa=tf(b,"UTCTiming");return u(Ia,iq(a,l,Fa),5);case 5:xa=Ia.h;if(!a.h)return Ia["return"]();B.Ee(xa);case 4:B.Bd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ia)}})}
|
|
633
633
|
function hq(a,b,c,d){var e=Bf(d,"mediaPresentationDuration",Df),f=[],g=0;d=tf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Bf(k,"start",Df,g),n=k.id,p=Bf(k,"duration",Df),q=null;if(l){var v=Bf(l,"start",Df);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=jq(a,b,c,{start:m,duration:q,node:k,re:null==q||!l});f.push(g);b.aa.id&&q&&(a.N[b.aa.id]=q);if(null==q){g=
|
|
634
634
|
null;break}g=m+q}}a.L=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,ie:!1}:{periods:f,duration:g,ie:!0}}
|
|
635
|
-
function jq(a,b,c,d){b.aa=kq(d.node,null,c);b.U=d;b.aa.
|
|
636
|
-
}d=c.filter(function(m){return!m.ae});c=c.filter(function(m){return m.ae});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ae.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={
|
|
637
|
-
[]:nq(d,pc);c=a.g.disableThumbnails?[]:nq(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.aa.id,
|
|
635
|
+
function jq(a,b,c,d){b.aa=kq(d.node,null,c);b.U=d;b.aa.Ab=b.Ab;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=tf(d.node,"EventStream");c=b.presentationTimeline.Qa();e=t(e);for(var f=e.next();!f.done;f=e.next())lq(a,d.start,d.duration,f.value,c);c=tf(d.node,"AdaptationSet").map(function(m){return mq(a,b,m)}).filter(Qb);if(b.Wa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Tf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
|
|
636
|
+
}d=c.filter(function(m){return!m.ae});c=c.filter(function(m){return m.ae});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ae.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={wc:h.wc},l=k.next())h.wc=l.value,h.wc.trickModeVideo=e.streams.find(function(m){return function(n){return cd(m.wc.codecs)==cd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:nq(d,"audio");g=a.g.disableVideo?[]:nq(d,"video");f=a.g.disableText?
|
|
637
|
+
[]:nq(d,pc);c=a.g.disableThumbnails?[]:nq(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.aa.id,yc:d,Wc:e,textStreams:g,imageStreams:f}}
|
|
638
638
|
function nq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
639
|
-
function mq(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ga=kq(c,b.aa,null);var e=!1,f=tf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(
|
|
639
|
+
function mq(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ga=kq(c,b.aa,null);var e=!1,f=tf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Qb),h=void 0,k=b.ga.contentType==pc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
640
640
|
l}}var n;m=tf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=tf(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
|
|
641
641
|
10)));m=tf(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var y=t(q),w=y.next();!w.done;w=y.next()){var x=w.value,D=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],D=x[1]||"und"):(w="CC"+p,2==q.length?p+=2:p++,D=x);v.set(w,rd(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
|
|
642
642
|
1,null!=q)for(q=t(q.split(";")),w=q.next();!w.done;w=q.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,x=w),v.set(y,rd(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=tf(c,"ContentProtection");var z=Eo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=rd(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=tf(c,"Label"))&&l.length&&
|
|
643
643
|
(l=l[0],l.textContent&&(F=l.textContent));l=tf(c,"Representation");c=l.map(function(G){if(G=oq(a,b,z,h,B,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ga.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ga.contentType||"application"==b.ga.contentType)for(b.ga.contentType=pq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ga.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
644
|
-
m.value,p=t(z.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ja(q.keyIds),ja(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(
|
|
645
|
-
function oq(a,b,c,d,e,f,g,h,k,l){b.H=kq(l,b.ga,null);a.u=Math.min(a.u,b.H.
|
|
644
|
+
m.value,p=t(z.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ja(q.keyIds),ja(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Qb);return{id:b.ga.id||"__fake__"+a.G++,contentType:b.ga.contentType,language:B,Pg:e,streams:c,drmInfos:z.drmInfos,ae:f,Tf:k}}
|
|
645
|
+
function oq(a,b,c,d,e,f,g,h,k,l){b.H=kq(l,b.ga,null);a.u=Math.min(a.u,b.H.Ab);if(!qq(b.H))return null;var m=b.U.start;b.bandwidth=Bf(l,"bandwidth",If)||0;var n=b.H.contentType,p=n==pc||"application"==n;n="image"==n;try{var q=function(H,I,J){return rq(a,H,I,J)};if(b.H.nc)var v=fp(b,q);else if(b.H.$a)v=lp(b,a.l);else if(b.H.oc)v=qp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.H.za,w=b.U.duration||0;v={Cb:function(){return Promise.resolve(fj(m,w,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
|
|
646
646
|
throw H;}q=tf(l,"ContentProtection");q=Ho(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var x=!1;tf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=tf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
647
|
-
(z=l.getAttribute("value")),!z))return null;var B;l=b.H.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var F=b.H.id?b.aa.id+","+b.H.id:"",G={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,I,J;return L(function(K){if(1==K.g){I=(H=F&&b.Wa&&a.l[F])?a.l[F]:G;if(I.segmentIndex)return K.B(0);J=I;return u(K,v.
|
|
647
|
+
(z=l.getAttribute("value")),!z))return null;var B;l=b.H.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var F=b.H.id?b.aa.id+","+b.H.id:"",G={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,I,J;return L(function(K){if(1==K.g){I=(H=F&&b.Wa&&a.l[F])?a.l[F]:G;if(I.segmentIndex)return K.B(0);J=I;return u(K,v.Cb(),3)}J.segmentIndex=K.h;A(K)})},closeSegmentIndex:function(){G.segmentIndex&&
|
|
648
648
|
(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ga.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Nc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:x,closedCaptions:k,
|
|
649
649
|
hdr:B,tilesLayout:z,matchedStreams:[]};F&&b.Wa&&!a.l[F]&&(a.l[F]=G);return G}function cq(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,dq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=E(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();eq(a,b);A(d)}})}function eq(a,b){0>a.F||a.D.S(Math.max(3,a.F-b,Qa(a.I)))}
|
|
650
|
-
function kq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Nc:null,audioSamplingRate:null,
|
|
651
|
-
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=tf(a,"AudioChannelConfiguration");m=sq(m)||b.Nc;p=Bf(a,"audioSamplingRate",Jf)||b.audioSamplingRate;f||(f=pq(g,h));var q=sf(a,"SegmentBase"),v=sf(a,"SegmentTemplate"),y=q?Bf(q,"availabilityTimeOffset",Kf)||0:0,w=v?Bf(v,"availabilityTimeOffset",Kf)||0:0;d=d&&d.length?Bf(d[0],"availabilityTimeOffset",Kf)||0:0;d=b.
|
|
652
|
-
"height",Jf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Nc:m,audioSamplingRate:p,
|
|
650
|
+
function kq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Nc:null,audioSamplingRate:null,Ab:0};c=c||b.za;var d=tf(a,"BaseURL"),e=d.map(zf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Bf(a,"frameRate",Lf)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=tf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
|
|
651
|
+
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=tf(a,"AudioChannelConfiguration");m=sq(m)||b.Nc;p=Bf(a,"audioSamplingRate",Jf)||b.audioSamplingRate;f||(f=pq(g,h));var q=sf(a,"SegmentBase"),v=sf(a,"SegmentTemplate"),y=q?Bf(q,"availabilityTimeOffset",Kf)||0:0,w=v?Bf(v,"availabilityTimeOffset",Kf)||0:0;d=d&&d.length?Bf(d[0],"availabilityTimeOffset",Kf)||0:0;d=b.Ab+d+y+w;return{za:kc(c,e),nc:q||b.nc,$a:sf(a,"SegmentList")||b.$a,oc:v||b.oc,width:Bf(a,"width",Jf)||b.width,height:Bf(a,
|
|
652
|
+
"height",Jf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Nc:m,audioSamplingRate:p,Ab:d}}
|
|
653
653
|
function sq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
654
|
-
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function qq(a){var b=a.
|
|
654
|
+
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function qq(a){var b=a.nc?1:0;b+=a.$a?1:0;b+=a.oc?1:0;if(0==b)return a.contentType==pc||"application"==a.contentType?!0:!1;1!=b&&(a.nc&&(a.$a=null),a.oc=null);return!0}
|
|
655
655
|
function tq(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(1==m.g)return e=kc(b,[c]),f=We(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Re(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Jc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
|
|
656
656
|
function iq(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;C(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
|
|
657
657
|
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return u(n,tq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,tq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
|
|
@@ -663,15 +663,15 @@ function Iq(a,b,c){b=Jc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
|
|
|
663
663
|
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Jq(a,m),Kq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=kc([d],[m.trim()])[0],h&&g.push(h),e.push(new xq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new xq("",g,k)));return new uq(c,b,f,e)}f.push(h);
|
|
664
664
|
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new yq("URI",k)),e=!0)}}return new uq(c,b,f)}function Jq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Dq(f);var h;(h=Fq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Fq(f,k);)d.push(new yq(h[1],h[2]||h[3])),Eq(f)}return new vq(c,e,d,g)}
|
|
665
665
|
var Kq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Lq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Mq(){}function Nq(a){try{var b=Oq(a);return Ie({uri:a,ve:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ge(c)}}function Oq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Sc(a):e=Nc(a);return{data:e,contentType:c}}
|
|
666
|
-
M("shaka.net.DataUriPlugin",Mq);Mq.parse=Nq;Te("data",Nq);function Pq(){var a=this;this.g=this.i=null;this.
|
|
666
|
+
M("shaka.net.DataUriPlugin",Mq);Mq.parse=Nq;Te("data",Nq);function Pq(){var a=this;this.g=this.i=null;this.Ga=1;this.o=new Map;this.u=new Map;this.ya=new Set;this.h=new Map;this.j=null;this.N="";this.da=new Hq;this.xa=0;this.C=new O(function(){Qq(a)});this.m=Rq;this.D=null;this.fa=0;this.G=Infinity;this.ca=this.ka=0;this.F=new Qe;this.W=[];this.L=new Map;this.Ma=!1;this.s=new Map;this.V=null;this.ea=new Map;this.I=new Map;this.l=!1}r=Pq.prototype;r.configure=function(a){this.g=a};
|
|
667
667
|
r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),u(f,Sq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,u(f,Tq(c,d.data),3);e=c.xa;0<e&&c.C.S(e);return f["return"](c.D)})};r.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.F&&(a.push(this.F.destroy()),this.F=null);this.g=this.i=null;this.ya.clear();this.D=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
|
|
668
668
|
r.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==Rq)return e["return"]();b=[];a.V=null;c=Array.from(a.h.values());return c.length?u(e,Uq(a,c[0]),2):e.B(2)}for(d=1;d<c.length;d++)b.push(Uq(a,c[d]));return u(e,Promise.all(b),0)})};
|
|
669
|
-
function Uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return c=Vq,d=b.Me,e=new Xb(d),a.l&&b.Re&&$b(e,new bc("_HLS_skip=YES")),u(y,Sq(a,e.toString()),2);if(3!=y.g){f=y.h;g=Iq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=zq(g.g,"EXT-X-DEFINE");k=Wq(a,h);l=b.stream;return u(y,Xq(a,b.Vc,g,l.type,l.mimeType,b.Ed,k,b.Ye,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.
|
|
670
|
-
1];if(v=Bq(g.g,"EXT-X-ENDLIST"))Yq(a,c.Le),a.j.
|
|
671
|
-
function Tq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa,Ia,
|
|
669
|
+
function Uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return c=Vq,d=b.Me,e=new Xb(d),a.l&&b.Re&&$b(e,new bc("_HLS_skip=YES")),u(y,Sq(a,e.toString()),2);if(3!=y.g){f=y.h;g=Iq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=zq(g.g,"EXT-X-DEFINE");k=Wq(a,h);l=b.stream;return u(y,Xq(a,b.Vc,g,l.type,l.mimeType,b.Ed,k,b.Ye,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.Gb(m,a.j.Qa());m.length&&(n=Cq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Ed.get(n),l.segmentIndex.eb(p));q=m[m.length-
|
|
670
|
+
1];if(v=Bq(g.g,"EXT-X-ENDLIST"))Yq(a,c.Le),a.j.Ja(q.endTime);A(y)})}r.onExpirationUpdated=function(){};
|
|
671
|
+
function Tq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa,Ia,Rb,nd;return L(function(Ya){switch(Ya.g){case 1:c=Iq(a.da,b,a.N);if(0!=c.type)throw new N(2,4,4022);d=zq(c.g,"EXT-X-DEFINE");Zq(a,d);e=zq(c.g,"EXT-X-MEDIA");f=zq(c.g,"EXT-X-STREAM-INF");g=zq(c.g,"EXT-X-IMAGE-STREAM-INF");$q(a,f);h=zq(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),q=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
|
|
672
672
|
kc([a.N],[p])[0]),q&&y.set("language",q),v&&y.set("value",v),w=new Q("sessiondata",y),a.i)a.i.onEvent(w);return u(Ya,ar(a,e),2);case 2:return br(a,e),u(Ya,cr(a,f),3);case 3:return x=Ya.h,u(Ya,dr(a,e),4);case 4:return D=Ya.h,u(Ya,er(a,g),5);case 5:z=Ya.h;if(!a.i)throw new N(2,7,7001);if(a.Ma&&0==x.length)throw new N(2,4,4034);F=B=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())I=H.value,B=Math.min(B,I.se),"text"!=I.stream.type&&(F=Math.min(F,I.Gf-I.se));a.m!=Rq?(a.j=new S(0,a.g.defaultPresentationDelay?
|
|
673
|
-
a.g.defaultPresentationDelay:a.ca?a.ca:3*a.fa),a.j.
|
|
674
|
-
xa.value)&&ba.push(Ia);return u(Ya,Promise.all(ba.map(function(Gf){return L(function(Ec){return u(Ec,Gf.createSegmentIndex(),0)})})),6);case 6:
|
|
673
|
+
a.g.defaultPresentationDelay:a.ca?a.ca:3*a.fa),a.j.pc(!1)):(a.j=new S(null,0),a.j.pc(!0));if(a.m!=Rq)a.xa=a.G,J=Vq,a.m==J.Ke&&(K=a.j.Sc,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.j.Yd(K));else for(a.j.Ja(F),a.j.offset(-B),P=t(a.h.values()),H=P.next();!H.done;H=P.next())R=H.value,R.stream.segmentIndex.offset(-B),R.stream.segmentIndex.Xa(0,F);a.W=[];ba=[];aa=t(x);for(Y=aa.next();!Y.done;Y=aa.next())for(Da=Y.value,Fa=t([Da.video,Da.audio]),xa=Fa.next();!xa.done;xa=Fa.next())(Ia=
|
|
674
|
+
xa.value)&&ba.push(Ia);return u(Ya,Promise.all(ba.map(function(Gf){return L(function(Ec){return u(Ec,Gf.createSegmentIndex(),0)})})),6);case 6:Rb=t(ba);for(xa=Rb.next();!xa.done;xa=Rb.next())nd=xa.value,a.W.push(nd.segmentIndex.K);fr(a);a.j.Bd();a.D={presentationTimeline:a.j,variants:x,textStreams:D,imageStreams:z,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.D);A(Ya)}})}
|
|
675
675
|
function Zq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}function Wq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}
|
|
676
676
|
function $q(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=gr(a,e);if(g){var h=nc(pc,e);a.s.set(g,h);fb(e,h)}f&&(g=nc("audio",e),g||(g=a.g.hls.defaultAudioCodec),a.s.set(f,g));d&&(f=nc("video",e),f||(f=a.g.hls.defaultVideoCodec),a.s.set(d,f))}}
|
|
677
677
|
function dr(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g)return c=Aq(b,"SUBTITLES"),d=c.map(function(y){var w,x,D;return L(function(z){if(1==z.g){if(w=a.g.disableText)return z["return"](null);C(z,2);return u(z,hr(a,y),4)}if(2!=z.g)return x=z.h,z["return"](x.stream);D=E(z);if(a.g.hls.ignoreTextStreamFailures)return z["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=wq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
|
|
@@ -679,7 +679,7 @@ t(m),p=n.next();!p.done;p=n.next())q=p.value,q.stream.codecs=l;return v["return"
|
|
|
679
679
|
function er(a,b){var c,d;return L(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return L(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);C(l,2);return u(l,ir(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
|
|
680
680
|
function ar(a,b){var c;return L(function(d){if(1==d.g)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?u(d,hr(a,b[0]),2):d.B(2);c=b.slice(1).map(function(e){return hr(a,e)});return u(d,Promise.all(c),0)})}
|
|
681
681
|
function cr(a,b){var c,d,e;return L(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(wq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(y,jr(a,g,k),2);if(v=y.h){for(var w=y["return"],x=v.audio,D=v.video,z=t(D),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
|
|
682
|
-
void 0,B.frameRate=Number(h)||void 0,B.hdr=q||void 0;z=a.g.disableAudio;if(!x.length||z)x=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];x=t(x);for(B=x.next();!B.done;B=x.next()){B=B.value;for(var F=t(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=B?B.stream:null;var I=H?H.stream:null,J=B?B.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Vc:"")+" - "+(B?B.Vc:"");G&&I&&J.length&&K.length&&!(0<xg(J,K).length)||a.ya.has(H)||(G={id:a.
|
|
682
|
+
void 0,B.frameRate=Number(h)||void 0,B.hdr=q||void 0;z=a.g.disableAudio;if(!x.length||z)x=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];x=t(x);for(B=x.next();!B.done;B=x.next()){B=B.value;for(var F=t(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=B?B.stream:null;var I=H?H.stream:null,J=B?B.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Vc:"")+" - "+(B?B.Vc:"");G&&I&&J.length&&K.length&&!(0<xg(J,K).length)||a.ya.has(H)||(G={id:a.Ga++,language:G?G.language:"und",primary:!!G&&G.primary||
|
|
683
683
|
!!I&&I.primary,audio:G,video:I,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(G),a.ya.add(H))}}y=w.call(y,z)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Ob,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
|
|
684
684
|
function jr(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w;return L(function(x){if(1==x.g)return d=qc,e=gr(a,b),f=Z(b,"AUDIO"),g=Z(b,"VIDEO"),k=(h=f||g)&&a.u.has(h)?a.u.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=wq(b,"URI"),q=l.audio.find(function(D){return D&&D.Vc==p}),v=nc(d.Na,e),(y=nc(d.cb,e))&&!v?m=d.cb:!k.length&&y&&v?(m=d.Na,e=[[v,y].join()]):l.audio.length&&q?(m=d.cb,n=!0):m=l.video.length&&!l.audio.length?d.cb:d.Na,n?x.B(2):u(x,kr(a,b,e,m,c),3);2!=x.g&&(w=x.h);if(w)l[w.stream.type]=[w];else if(null===
|
|
685
685
|
w)return x["return"](null);lr(l);return x["return"](l)})}function gr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=dd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function mr(a){a=Z(a,"LANGUAGE")||"und";return rd(a)}
|
|
@@ -689,15 +689,15 @@ v="YES"==q;return u(w,or(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=w.h;a.u.has(c)?a.u.get
|
|
|
689
689
|
function ir(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(p){if(1==p.g){c=nr(wq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=mr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,or(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
|
|
690
690
|
Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
|
|
691
691
|
function kr(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g){f=nr(wq(b,"URI"),a.o);if(a.h.has(f))return l["return"](a.h.get(f));var m=Z(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.L.get(m):null;h=mc(d,c);return u(l,or(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
|
|
692
|
-
function or(a,b,c,d,e,f,g,h,k,l,m,n,p){var q,v,y,w,x,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa,Ia,
|
|
693
|
-
P=wq(K,"METHOD"),"NONE"!=P){F=!0;if("AES-128"==P)return a.Ma=!0,cb["return"](null);R=wq(K,"KEYFORMAT");if(aa=(ba=pr[R])?ba(K):null){if(aa.keyIds)for(Y=t(aa.keyIds),Da=Y.next();!Da.done;Da=Y.next())Fa=Da.value,H.add(Fa);G.push(aa)}}if(F&&!G.length)throw new N(2,4,4026);xa=zq(y.g,"EXT-X-DEFINE");Ia=Wq(a,xa);qr(a,y);return u(cb,rr(a,d,c,y,Ia),3);case 3:return
|
|
694
|
-
E(cb);if(4035==ji.code)return Ua("Skipping unsupported HLS stream",
|
|
692
|
+
function or(a,b,c,d,e,f,g,h,k,l,m,n,p){var q,v,y,w,x,D,z,B,F,G,H,I,J,K,P,R,ba,aa,Y,Da,Fa,xa,Ia,Rb,nd,Ya,Gf,Ec,ji,Dn,En,Fn,Gn,ki,li,Hf,Hn,In,Jn,Kn;return L(function(cb){switch(cb.g){case 1:return q=kc([a.N],[b])[0],u(cb,Sq(a,q),2);case 2:v=cb.h;q=v.uri;y=Iq(a.da,v.data,q);if(1!=y.type)throw new N(2,4,4017);w=[];if(y.segments)for(x=t(y.segments),D=x.next();!D.done;D=x.next())z=D.value,B=zq(z.g,"EXT-X-KEY"),w.push.apply(w,ja(B));F=!1;G=[];H=new Set;I=t(w);for(J=I.next();!J.done;J=I.next())if(K=J.value,
|
|
693
|
+
P=wq(K,"METHOD"),"NONE"!=P){F=!0;if("AES-128"==P)return a.Ma=!0,cb["return"](null);R=wq(K,"KEYFORMAT");if(aa=(ba=pr[R])?ba(K):null){if(aa.keyIds)for(Y=t(aa.keyIds),Da=Y.next();!Da.done;Da=Y.next())Fa=Da.value,H.add(Fa);G.push(aa)}}if(F&&!G.length)throw new N(2,4,4026);xa=zq(y.g,"EXT-X-DEFINE");Ia=Wq(a,xa);qr(a,y);return u(cb,rr(a,d,c,y,Ia),3);case 3:return Rb=cb.h,sr.includes(Rb)&&(c=""),nd=new Map,Ya=new Map,Gf=a.l,C(cb,4),u(cb,Xq(a,b,y,d,Rb,nd,Ia,Ya,c,p),6);case 6:Ec=cb.h;va(cb,5);break;case 4:ji=
|
|
694
|
+
E(cb);if(4035==ji.code)return Ua("Skipping unsupported HLS stream",Rb,b),cb["return"](null);throw ji;case 5:Gf!=a.l&&qr(a,y);Dn=Ec[0].startTime;En=Ec[Ec.length-1].endTime;Fn=new T(Ec);Gn=d==pc?"subtitle":void 0;ki=[];if(l)for(li=t(l.split(",")),Hf=li.next();!Hf.done;Hf=li.next())Hn=Hf.value,ki.push(Hn);Jn=(In=Bq(y.g,"EXT-X-SERVER-CONTROL"))?null!=In.getAttribute("CAN-SKIP-UNTIL"):!1;Kn={id:a.Ga++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Fn,mimeType:Rb,codecs:c,
|
|
695
695
|
kind:Gn,encrypted:F,drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:ki,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return cb["return"]({stream:Kn,Vc:b,Me:q,se:Dn,Gf:En,Ed:nd,Ye:Ya,Re:Jn})}})}
|
|
696
696
|
function qr(a,b){var c=Bq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Bq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Yq(a,Rq);else{c?Yq(a,tr):Yq(a,ur);d=Bq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Bq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ka=Number(wq(c,"PART-TARGET")),a.G=Math.min(a.ka,a.G),c=Bq(b.g,"EXT-X-SERVER-CONTROL"),a.ca=c?Number(wq(c,"PART-HOLD-BACK")):0):a.G=Math.min(d,a.G);a.fa=Math.max(d,a.fa)}}
|
|
697
697
|
function vr(a,b,c,d){c=Bq(c,"EXT-X-MAP");if(!c)return null;var e=wq(c,"URI");d=nr(kc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=wr(d,c),a.ea.set(b,c));return a.ea.get(b)}function wr(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Gi(function(){return[a]},c,d)}
|
|
698
698
|
function xr(a,b,c,d,e,f,g,h,k){var l=d.g,m=nr(d.h,g),n=Bq(l,"EXTINF"),p=g=0,q=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},w=0;w<d.i.length;y={dd:y.dd},w++){var x=d.i[w],D=0==w?c:v[v.length-1],z=0==w?e:D.endTime,B=Number(Z(x,"DURATION"))||a.ka;if(B){B=z+B;var F=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?F=(D=Z(x,"BYTERANGE-START"))?Number(D):0:(F=Z(x,"BYTERANGE"),D=t(yr(D,F)),F=D.next().value,G=D.next().value);if(x=Z(x,"URI"))y.dd=kc([h],
|
|
699
699
|
[x])[0],v.push(new Ii(z,B,function(H){return function(){return[H.dd]}}(y),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Bq(l,"EXT-X-BYTERANGE"))?(q=t(yr(c,a.value)),p=q.next().value,q=q.next().value):v.length&&(p=v[0].pa,q=v[v.length-1].ha);c="";a=null;"image"==k&&(c="1x1",k=Bq(l,"EXT-X-TILES"))&&(c=wq(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(a=Number(k)));return new Ii(e,g,function(){return m.length?[m]:[]},p,q,b,f,0,Infinity,v,c,a)}
|
|
700
|
-
function yr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ha+1,d=c+d-1);return[c,d]}function fr(a){if(a.j){for(var b=t(a.W),c=b.next();!c.done;c=b.next())a.j.
|
|
700
|
+
function yr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ha+1,d=c+d-1);return[c,d]}function fr(a){if(a.j){for(var b=t(a.W),c=b.next();!c.done;c=b.next())a.j.Hb(c.value);a.W=[]}}
|
|
701
701
|
function Xq(a,b,c,d,e,f,g,h,k,l){var m,n,p,q,v,y,w,x,D,z,B,F,G,H,I,J,K,P,R,ba,aa;return L(function(Y){switch(Y.g){case 1:m=c.segments;p=Cq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(q=Bq(c.g,"EXT-X-SKIP"))?Number(Z(q,"SKIPPED-SEGMENTS")):0;y=p+v;if(a.m!=Rq&&f.has(y)){w=f.get(y);Y.B(2);break}if(null!=a.V){Y.B(3);break}n=vr(a,c.h,m[0].g,g);x=a;return u(Y,zr(a,b,n,e,y,!1,m[0],g,d,k,l),4);case 4:x.V=Y.h;case 3:w=a.V;case 2:D=m[0].h;D.split("/").pop();z=Cq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(z)||
|
|
702
702
|
h.set(z,y),v))for(B=h;B.has(z+1)&&B.get(z+1)<y;)z++;F=a.I.get(z)||0;G=[];H=0;case 5:if(!(H<m.length)){Y.B(7);break}I=m[H];J=G[G.length-1];K=0==H?w:J.endTime;y=p+v+H;f.set(y,K);n=vr(a,c.h,I.g,g);P=Bq(I.g,"EXT-X-DISCONTINUITY");if(!P){Y.B(8);break}z++;h.set(z,y);return u(Y,Ar(a,z,b,n,e,y,I,g,K,d,k,l),9);case 9:F=Y.h;case 8:!a.l&&(R=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ba=Bq(I.g,"EXTINF");a.l||ba?(aa=xr(a,n,J,I,K,F,g,c.h,d))&&G.push(aa):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.");
|
|
703
703
|
H++;Y.B(5);break;case 7:return Y["return"](G)}})}function Ar(a,b,c,d,e,f,g,h,k,l,m,n){var p,q;return L(function(v){if(1==v.g)return p=0,a.I.has(b)?(p=a.I.get(b),v.B(2)):u(v,zr(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(q=v.h,p=k-q,a.I.set(b,p));return v["return"](p)})}
|
|
@@ -706,10 +706,10 @@ Cr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=E(p);if(7001==m.code)th
|
|
|
706
706
|
function zr(a,b,c,d,e,f,g,h,k,l,m){var n,p,q,v,y,w,x,D;return L(function(z){switch(z.g){case 1:n=xr(a,c,null,g,0,0,h,"",k);if(a.D&&!f&&(p=a.h.get(b),q=p.Ed.get(e),void 0!=q))return z["return"](q);d=d.toLowerCase();if(sr.includes(d))throw Ua("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Ua("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){z.B(2);break}v=[Br(a,n,k,d,l,m)];c&&v.push(Br(a,c,k,d,l,m));return u(z,
|
|
707
707
|
Promise.all(v),3);case 3:return y=z.h,w=y[0],x=y[1]||y[0],z["return"](Dr(b,w.uri,w.data,x.data));case 2:if("video/mp2t"!=d){z.B(4);break}return u(z,Br(a,n,k,d,l,m),5);case 5:return D=z.h,z["return"](Er(b,D.uri,D.data));case 4:throw new N(2,4,4030,b);}})}
|
|
708
708
|
function Dr(a,b,c,d){var e=0;(new Ig).box("moov",Mg).box("trak",Mg).box("mdia",Mg).P("mdhd",function(h){e=Zh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new N(2,4,4030,a,b);var f=0,g=!1;(new Ig).box("moof",Mg).box("traf",Mg).P("tfdt",function(h){f=Yh(h.reader,h.version).pd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
|
|
709
|
-
function Er(a,b,c){function d(){f.seek(g+188);h=f.Y();71!=h&&(f.seek(g+192),h=f.Y());71!=h&&(f.seek(g+204),h=f.Y());71!=h&&e();f.ye(1)}function e(){throw new N(2,4,4030,a,b);}var f=new Fg(c,0),g=0,h=0;for(c=Math.min(f.O.byteLength-188,940);;){g=f.X();h=f.Y();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.
|
|
710
|
-
f.
|
|
711
|
-
function rr(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y;return L(function(w){if(1==w.g){f=qc;g=bf;h=nr(d.segments[0].h,e);k=new Xb(h);l=k.wa.split(".").pop();m=Fr[b];if(n=m[l])return w["return"](n);if(b==f.Z)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.
|
|
712
|
-
function Sq(a,b){var c=We([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Cr(a,c,0)}function Qq(a){var b,c;L(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.xa,a.C.S(b),va(d,0);c=E(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.C.S(.1);A(d)})}function Yq(a,b){a.m=b;a.j&&a.j.
|
|
709
|
+
function Er(a,b,c){function d(){f.seek(g+188);h=f.Y();71!=h&&(f.seek(g+192),h=f.Y());71!=h&&(f.seek(g+204),h=f.Y());71!=h&&e();f.ye(1)}function e(){throw new N(2,4,4030,a,b);}var f=new Fg(c,0),g=0,h=0;for(c=Math.min(f.O.byteLength-188,940);;){g=f.X();h=f.Y();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Kb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.Y()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.Y(),f.skip(k)),1!=f.M()>>8)d();else{f.skip(3);c=f.Y()>>6;0!=c&&1!=c||e();0==f.Y()&&e();c=f.Y();k=f.Kb();var l=
|
|
710
|
+
f.Kb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function nr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
|
|
711
|
+
function rr(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y;return L(function(w){if(1==w.g){f=qc;g=bf;h=nr(d.segments[0].h,e);k=new Xb(h);l=k.wa.split(".").pop();m=Fr[b];if(n=m[l])return w["return"](n);if(b==f.Z)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.Tb&&(!c||"jpeg"==c))return w["return"]("image/jpeg");p=We([h],a.g.retryParameters);p.method="HEAD";return u(w,Cr(a,p,g),2)}q=w.h;v=q.headers["content-type"];return v?w["return"](v.split(";")[0]):(y=m.mp4,w["return"](y))})}
|
|
712
|
+
function Sq(a,b){var c=We([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Cr(a,c,0)}function Qq(a){var b,c;L(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.xa,a.C.S(b),va(d,0);c=E(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.C.S(.1);A(d)})}function Yq(a,b){a.m=b;a.j&&a.j.pc(a.m==Rq);a.m!=Rq||a.C.stop()}
|
|
713
713
|
function Cr(a,b,c){if(!a.F)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);Re(a.F,b);return b.promise}M("shaka.hls.HlsParser",Pq);
|
|
714
714
|
var sr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Fr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
715
715
|
vtt:"text/vtt",webvtt:"txt/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},pr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=wq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=wq(a,"URI");b=Oq(b);b=Fb(b.data);b=lc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
|
|
@@ -725,9 +725,9 @@ function cs(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=bf,d=a.o.re
|
|
|
725
725
|
function fs(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();A(g)})}})}es.prototype.store=function(){return this.h};es.prototype.promise=function(){return this.g};function gs(a){this.h=a;this.g=[]}gs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function hs(a,b){return is(a,b,"readwrite")}function is(a,b,c){c=a.h.transaction([b],c);var d=new es(c,b);a.g.push(d);d.promise().then(function(){fb(a.g,d)},function(){fb(a.g,d)});return d};function js(a,b,c){this.h=new gs(a);this.i=b;this.g=c}r=js.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return ks(this.i)};r.removeSegments=function(a,b){return ls(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,ms(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.ee(e)}))})};r.addManifests=function(){return ks(this.g)};
|
|
726
726
|
r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function ns(a,b,c){a=hs(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=hs(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return ls(this,this.g,a,b)};
|
|
727
727
|
r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,ms(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.$b(e)})))})};r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=is(a.h,a.g,"readonly"),c=new Map,u(d,fs(b,function(e,f){var g;return L(function(h){if(1==h.g)return u(h,a.$b(f),2);g=h.h;c.set(e,g);A(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.ee=function(a){return a};r.$b=function(a){return Promise.resolve(a)};
|
|
728
|
-
function ks(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=hs(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={
|
|
729
|
-
function ls(a,b,c,d){a=hs(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={
|
|
730
|
-
function ms(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=is(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={
|
|
728
|
+
function ks(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=hs(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={vc:g.vc},k=h.next())l=k.value,g.vc=e.add(l),g.vc.onsuccess=function(n){return function(){f.push(n.vc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
|
|
729
|
+
function ls(a,b,c,d){a=hs(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={uc:e.uc},f=c.next())e.uc=f.value,b["delete"](e.uc).onsuccess=function(g){return function(){return d(g.uc)}}(e);return a.promise()}
|
|
730
|
+
function ms(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=is(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Sb:h.Sb,Qb:h.Qb},l=k.next())h.Qb=l.value,h.Sb=e.get(h.Qb),h.Sb.onsuccess=function(n){return function(){void 0==n.Sb.result&&g.push(n.Qb);f[n.Qb]=n.Sb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function os(a){this.g=new gs(a)}os.prototype.destroy=function(){return this.g.destroy()};os.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=is(a.g,"session-ids","readonly"),c=[],u(d,fs(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};os.prototype.add=function(a){var b=hs(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
731
731
|
os.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=hs(b.g,"session-ids"),u(d,fs(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function ps(){this.g=new Map}ps.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};ps.prototype.init=function(){var a=this;qs.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
732
732
|
function rs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ca:d,la:f},la:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function ss(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ca:d,la:f},e)})})}
|
|
733
733
|
function ts(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function us(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function vs(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
@@ -749,11 +749,11 @@ r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2
|
|
|
749
749
|
r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Hs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
|
|
750
750
|
function Hs(){var a=new rc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}xs("idb",function(){return Bc()||xc()||!window.indexedDB?null:new Gs});function Is(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Is.prototype.Ca=function(){return this.i};Is.prototype.la=function(){return this.h};Is.prototype.key=function(){return this.l};Is.prototype.toString=function(){return this.j};
|
|
751
751
|
function Js(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Is(b,c,d,Number(a[4])):null};function Ks(a,b){this.h=a;this.g=b}
|
|
752
|
-
function Ls(a,b){var c=new S(null,0);c.
|
|
752
|
+
function Ls(a,b){var c=new S(null,0);c.Ja(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ms(a,d,e,c);e=b.streams.filter(function(l){return l.type==pc}).map(function(l){return Ns(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ns(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
753
753
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f}}
|
|
754
754
|
function Ms(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
|
|
755
755
|
e.value,g=Ns(a,e,d),h=t(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=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Ns(a,e,d),g=t(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}
|
|
756
|
-
function Ns(a,b,c){var d=b.segments.map(function(e){return Os(a,e)});c.
|
|
756
|
+
function Ns(a,b,c){var d=b.segments.map(function(e){return Os(a,e)});c.Hb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new T(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,
|
|
757
757
|
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Os(a,b){var c=new Is("segment",a.h,a.g,b.dataKey);return new Ii(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ps(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
758
758
|
function Ps(a,b){var c=new Is("segment",a.h,a.g,b);return new Gi(function(){return[c.toString()]},0,null)};function Qs(){this.g=null}r=Qs.prototype;r.configure=function(){};
|
|
759
759
|
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=Js(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new ps;ua(m);return u(m,e.init(),4);case 4:return u(m,ts(e,d.Ca(),d.la()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ks(d.Ca(),d.la()),l=Ls(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
@@ -763,9 +763,9 @@ function Ts(a,b){var c=new ps;return Ie(void 0).$(function(){return c.init()}).$
|
|
|
763
763
|
function Ws(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new Pf({nb:b,onError:function(){},Pc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,Xf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return C(f,6),u(f,fg(d),8);case 8:va(f,7);break;case 6:return E(f),u(f,d.destroy(),
|
|
764
764
|
9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return C(h,2),u(h,gg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);E(h);A(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
765
765
|
function Vs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&gb(a.audioCapabilities,b.audioCapabilities,c)&&gb(a.videoCapabilities,b.videoCapabilities,c)};function Xs(a,b,c){var d=b.presentationTimeline.getDuration();b=Ys(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Zs(a,b){var c=Ls(new Ks(a.Ca(),a.la()),b),d=b.appMetadata||{};c=Ys(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
766
|
-
function Ys(a){var b=[],c=ie(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push($d(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ae(c.value));return b};function $s(){this.g={}}function at(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function bt(a,b){a.g[b.id]=b.bandwidth||2048}function ct(a,b){var c=a.g[b];null==c&&(c=0);return c};function dt(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.
|
|
766
|
+
function Ys(a){var b=[],c=ie(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push($d(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ae(c.value));return b};function $s(){this.g={}}function at(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function bt(a,b){a.g[b.id]=b.bandwidth||2048}function ct(a,b){var c=a.g[b];null==c&&(c=0);return c};function dt(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.dc()):(this.h=Uk(),this.g=new Se);this.i=[];this.j=[];var c=!a;this.l=new cf(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return $r(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return u(k,b.g.destroy(),4);
|
|
767
767
|
case 4:b.h=null,b.g=null,A(k)}})})}function et(){if(uc())a:{var a=t(qs.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=dt.prototype;r.destroy=function(){return this.l.destroy()};
|
|
768
|
-
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Rk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Wk(this.h,a)};r.getConfiguration=function(){var a=Uk();Wk(a,this.h,Uk());return a};r.
|
|
768
|
+
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Rk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Wk(this.h,a)};r.getConfiguration=function(){var a=Uk();Wk(a,this.h,Uk());return a};r.dc=function(){return this.g};
|
|
769
769
|
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Zr(this.g);this.j.push(f);b=ft(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return u(k,Ag(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Sb(h))})},e,f);var g=new Fe(b,function(){return $r(f)});g["finally"](function(){fb(d.j,f)});g.then=function(h){Kb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
|
|
770
770
|
return g.promise.then(h)};return gt(this,g)};r.tf=function(){Kb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
|
|
771
771
|
function ft(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,w,x,D,z;return L(function(B){switch(B.g){case 1:return ht(),h=g=null,k=new ps,n=m=l=null,C(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,it(a,b,g,e),6);case 6:p=B.h;jt(a);q=!p.presentationTimeline.T()&&!p.presentationTimeline.mb();if(!q)throw new N(2,9,9005,b);return u(B,kt(a,p,function(F){n=n||F},e),7);case 7:h=B.h;jt(a);if(n)throw n;return u(B,lt(p,e),8);case 8:return u(B,k.init(),9);case 9:return jt(a),u(B,rs(k),10);case 10:return l=B.h,jt(a),v=mt(h,
|
|
@@ -779,8 +779,8 @@ function lt(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,z,B,F,G,H,I,J,K,P,R,ba,aa
|
|
|
779
779
|
d.push(ae(q));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(be(w));return u(Y,b.offline.trackSelectionCallback(d),3);case 3:x=Y.h;D=a.presentationTimeline.getDuration();z=0;B=t(x);for(F=B.next();!F.done;F=B.next())G=F.value,H=G.bandwidth*D/8,z+=H;C(Y,4);return u(Y,b.offline.downloadSizeCallback(z),6);case 6:I=Y.h;if(!I)throw new N(2,9,9014);va(Y,5);break;case 4:J=E(Y);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:K=new Set;P=new Set;R=new Set;ba=t(x);for(F=ba.next();!F.done;F=
|
|
780
780
|
ba.next())aa=F.value,"variant"==aa.type&&K.add(aa.id),"text"==aa.type&&P.add(aa.id),"image"==aa.type&&R.add(aa.id);a.variants=a.variants.filter(function(Da){return K.has(Da.id)});a.textStreams=a.textStreams.filter(function(Da){return P.has(Da.id)});a.imageStreams=a.imageStreams.filter(function(Da){return R.has(Da.id)});tt(a);A(Y)}})}
|
|
781
781
|
function mt(a,b,c,d,e,f){var g=Xs(c,b,d),h=e.offline.progressCallback;as(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&eg(a,"cenc",q)});var k=qt(b)&&!rt(b),l=null;k&&(l=ut.get(a.g.keySystem));for(var m=new $s,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())bt(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())at(m,n.value);m=vt(f,m,b);f=m.streams;m=m.$d;p=a.g;n=e.offline.usePersistentLicense;
|
|
782
|
-
p&&n&&(p.initData=[]);return{Ef:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.
|
|
783
|
-
function rt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function pt(a,b,c,d){b.expiration=c.
|
|
782
|
+
p&&n&&(p.initData=[]);return{Ef:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cc(),streams:f,sessionIds:n?kg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},$d:m}}function qt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
783
|
+
function rt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function pt(a,b,c,d){b.expiration=c.cc();c=kg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(qt(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return wt(this,xt(this,a))};
|
|
784
784
|
function xt(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:ht();c=Js(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new ps;ua(k);return u(k,e.init(),4);case 4:return u(k,ts(e,d.Ca(),d.la()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([yt(a,h,e),zt(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
785
785
|
function At(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:ad(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ad(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function yt(a,b,c){return L(function(d){return u(d,Bt(a.g,a.h.drm,c,b),0)})}
|
|
786
786
|
function zt(a,b,c){function d(){}var e=Ct(c);Zs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Sf=function(){return wt(this,Dt(this))};
|
|
@@ -796,7 +796,7 @@ function Ct(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next(
|
|
|
796
796
|
function Bt(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=vs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:At(d,!1),videoCapabilities:At(d,!0)}});return u(h,Us(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
797
797
|
function Ft(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
798
798
|
function tt(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",dt);dt.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new ps,ua(b),u(b,ws(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):ya(b,0)})};dt.prototype.list=dt.prototype.list;
|
|
799
|
-
dt.prototype.removeEmeSessions=dt.prototype.Sf;dt.prototype.remove=dt.prototype.remove;dt.prototype.getStoreInProgress=dt.prototype.tf;dt.prototype.store=dt.prototype.store;dt.prototype.getNetworkingEngine=dt.prototype.
|
|
799
|
+
dt.prototype.removeEmeSessions=dt.prototype.Sf;dt.prototype.remove=dt.prototype.remove;dt.prototype.getStoreInProgress=dt.prototype.tf;dt.prototype.store=dt.prototype.store;dt.prototype.getNetworkingEngine=dt.prototype.dc;dt.prototype.getConfiguration=dt.prototype.getConfiguration;dt.prototype.configure=dt.prototype.configure;dt.prototype.destroy=dt.prototype.destroy;dt.support=et;
|
|
800
800
|
var ut=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
|
|
801
801
|
Zm.offline=et;function It(){}function Jt(a,b){for(var c={priority:b||0,Pe:a},d=0;d<Kt.length;d++)if(Kt[d].priority<c.priority){Kt.splice(d,0,c);return}Kt.push(c)}M("shaka.polyfill",It);It.register=Jt;It.installAll=function(){for(var a=t(Kt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Pe()}catch(c){Ua("Error installing polyfill!",c)}}};var Kt=[];function Lt(){}function Mt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Nt(b.value)}function Nt(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}It.Aria=Lt;Lt.install=Mt;Jt(Mt);function Ot(){}function Pt(){Qt()}It.EncryptionScheme=Ot;Ot.install=Pt;Jt(Pt,-2);function Rt(){}
|
|
802
802
|
function St(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
@@ -885,7 +885,7 @@ function kw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exe
|
|
|
885
885
|
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=ow(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ob,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function ow(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
|
|
886
886
|
function hw(a){a=Fq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",gw);gw.prototype.parseMedia=gw.prototype.parseMedia;gw.prototype.parseInit=gw.prototype.parseInit;hd["text/vtt"]=function(){return new gw};hd['text/vtt; codecs="vtt"']=function(){return new gw};hd['text/vtt; codecs="wvtt"']=function(){return new gw};function pw(){this.g=null}pw.prototype.parseInit=function(a){var b=this,c=!1;(new Ig).box("moov",Mg).box("trak",Mg).box("mdia",Mg).P("mdhd",function(d){d=Zh(d.reader,d.version);b.g=d.timescale}).box("minf",Mg).box("stbl",Mg).P("stsd",Og).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
|
|
887
887
|
pw.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Ig).box("moof",Mg).box("traf",Mg).P("tfdt",function(B){g=!0;c=Yh(B.reader,B.version).pd}).P("tfhd",function(B){l=Xh(B.reader,B.flags).he}).P("trun",function(B){h=!0;d=$h(B.reader,B.version,B.flags).ze}).box("mdat",Pg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new Fg(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.Rd||l,y=q.Tc?
|
|
888
|
-
c+q.Tc:m;m=y+(v||0);var w=0;do{var x=n.M();w+=x;var D=n.M(),z=null;"vttc"==Qg(D)?8<x&&(z=n.Za(x-8)):n.skip(x-8);v&&z&&(x=qw(z,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(x))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(
|
|
888
|
+
c+q.Tc:m;m=y+(v||0);var w=0;do{var x=n.M();w+=x;var D=n.M(),z=null;"vttc"==Qg(D)?8<x&&(z=n.Za(x-8)):n.skip(x-8);v&&z&&(x=qw(z,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(x))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(Qb)};function qw(a,b,c){var d,e,f;(new Ig).box("payl",Pg(function(g){d=Jc(g)})).box("iden",Pg(function(g){e=Jc(g)})).box("sttg",Pg(function(g){f=Jc(g)})).parse(a);return d?rw(d,e,f,b,c):null}
|
|
889
889
|
function rw(a,b,c,d,e){d=new ib(d,e,"");jw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Dq(c),b=Gq(a);b;)kw(d,b,[]),Eq(a),b=Gq(a);return d}M("shaka.text.Mp4VttParser",pw);pw.prototype.parseMedia=pw.prototype.parseMedia;pw.prototype.parseInit=pw.prototype.parseInit;hd['application/mp4; codecs="wvtt"']=function(){return new pw};function sw(){}sw.prototype.parseInit=function(){};sw.prototype.parseMedia=function(a){var b=Jc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Dq(c[0]),e=tw(d),f=Fq(d,/,/g);d=tw(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ib(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
890
890
|
function tw(a){a=Fq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",sw);sw.prototype.parseMedia=sw.prototype.parseMedia;sw.prototype.parseInit=sw.prototype.parseInit;hd["text/x-subviewer"]=function(){return new sw};function uw(){this.g=new gw}uw.prototype.parseInit=function(){};uw.prototype.parseMedia=function(a,b){var c=Jc(a);c=vw(c);c=Fb(Nc(c));return this.g.parseMedia(c,b)};function vw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",uw);uw.srt2webvtt=vw;uw.prototype.parseMedia=uw.prototype.parseMedia;
|
|
891
891
|
uw.prototype.parseInit=uw.prototype.parseInit;hd["text/srt"]=function(){return new uw};function ww(){}ww.prototype.parseInit=function(){};
|