shaka-player 3.2.16 → 3.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-and-test.yaml +13 -0
- package/AUTHORS +1 -0
- package/CHANGELOG.md +9 -0
- package/CONTRIBUTORS +1 -0
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.debug.js +14 -14
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +139 -139
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +16 -16
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +152 -152
- package/dist/shaka-player.ui.map +2 -2
- package/lib/ads/ad_manager.js +2 -2
- package/lib/media/streaming_engine.js +20 -8
- package/lib/player.js +11 -2
- package/package.json +1 -1
- package/test/player_integration.js +10 -3
- package/test/test/boot.js +29 -11
- package/test/test/util/test_scheme.js +2 -2
|
@@ -32,10 +32,10 @@ while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProp
|
|
|
32
32
|
fa("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(!Ga(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
33
33
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
|
|
34
34
|
Ga(k,g)&&Ga(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ga(k,g)&&Ga(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
35
|
-
fa("Map",function(a){function b(){var h={};return h.
|
|
35
|
+
fa("Map",function(a){function b(){var h={};return h.Qa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Qa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ga(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ga:p}}return{id:l,
|
|
36
36
|
list:m,index:-1,ga:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
|
|
37
|
-
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ga?l.ga.value=k:(l.ga={next:this.g,
|
|
38
|
-
h.ga.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.
|
|
37
|
+
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ga?l.ga.value=k:(l.ga={next:this.g,Qa:this.g.Qa,head:this.g,key:h,value:k},l.list.push(l.ga),this.g.Qa.next=l.ga,this.g.Qa=l.ga,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ga&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ga.Qa.next=h.ga.next,h.ga.next.Qa=h.ga.Qa,
|
|
38
|
+
h.ga.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Qa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ga};e.prototype.get=function(h){return(h=d(this,h).ga)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
|
|
39
39
|
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
|
|
40
40
|
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
41
41
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
|
|
@@ -79,15 +79,15 @@ var Vb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
79
79
|
Copyright 2006 The Closure Library Authors
|
|
80
80
|
SPDX-License-Identifier: Apache-2.0
|
|
81
81
|
*/
|
|
82
|
-
function Wb(a){var b;a instanceof Wb?(Xb(this,a.
|
|
83
|
-
r.toString=function(){var a=[],b=this.
|
|
84
|
-
r.resolve=function(a){var b=this.clone();"data"===b.
|
|
85
|
-
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.
|
|
86
|
-
function $b(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function bc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,hc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function hc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var cc=/[#\/\?@]/g,ec=/[#\?:]/g,dc=/[#\?]/g,gc=/[#\?@]/g,fc=/#/g;function ac(a){this.g=a||null}r=ac.prototype;r.
|
|
87
|
-
r.add=function(a,b){if(!this.
|
|
88
|
-
r.toString=function(){if(this.g)return this.g;if(!this.
|
|
82
|
+
function Wb(a){var b;a instanceof Wb?(Xb(this,a.Ba),this.nb=a.nb,this.Ea=a.Ea,Yb(this,a.Ab),this.va=a.va,Zb(this,a.g.clone()),this.bb=a.bb):a&&(b=String(a).match(Vb))?(Xb(this,b[1]||"",!0),this.nb=$b(b[2]||""),this.Ea=$b(b[3]||"",!0),Yb(this,b[4]),this.va=$b(b[5]||"",!0),Zb(this,b[6]||"",!0),this.bb=$b(b[7]||"")):this.g=new ac(null)}r=Wb.prototype;r.Ba="";r.nb="";r.Ea="";r.Ab=null;r.va="";r.bb="";
|
|
83
|
+
r.toString=function(){var a=[],b=this.Ba;b&&a.push(bc(b,cc,!0),":");if(b=this.Ea){a.push("//");var c=this.nb;c&&a.push(bc(c,cc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ab;null!=b&&a.push(":",String(b))}if(b=this.va)this.Ea&&"/"!=b.charAt(0)&&a.push("/"),a.push(bc(b,"/"==b.charAt(0)?dc:ec,!0));(b=this.g.toString())&&a.push("?",b);(b=this.bb)&&a.push("#",bc(b,fc));return a.join("")};
|
|
84
|
+
r.resolve=function(a){var b=this.clone();"data"===b.Ba&&(b=new Wb);var c=!!a.Ba;c?Xb(b,a.Ba):c=!!a.nb;c?b.nb=a.nb:c=!!a.Ea;c?b.Ea=a.Ea:c=null!=a.Ab;var d=a.va;if(c)Yb(b,a.Ab);else if(c=!!a.va){if("/"!=d.charAt(0))if(this.Ea&&!this.va)d="/"+d;else{var e=b.va.lastIndexOf("/");-1!=e&&(d=b.va.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(""):".."==
|
|
85
|
+
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.va=d:c=""!==a.g.toString();c?Zb(b,a.g.clone()):c=!!a.bb;c&&(b.bb=a.bb);return b};r.clone=function(){return new Wb(this)};function Xb(a,b,c){a.Ba=c?$b(b,!0):b;a.Ba&&(a.Ba=a.Ba.replace(/:$/,""))}function Yb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ab=b}else a.Ab=null}function Zb(a,b,c){b instanceof ac?a.g=b:(c||(b=bc(b,gc)),a.g=new ac(b))}
|
|
86
|
+
function $b(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function bc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,hc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function hc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var cc=/[#\/\?@]/g,ec=/[#\?:]/g,dc=/[#\?]/g,gc=/[#\?@]/g,fc=/#/g;function ac(a){this.g=a||null}r=ac.prototype;r.ta=null;r.tc=null;
|
|
87
|
+
r.add=function(a,b){if(!this.ta&&(this.ta={},this.tc=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.ta.hasOwnProperty(a)&&this.ta[a])||(this.ta[a]=c=[]);c.push(b);this.tc++;return this};
|
|
88
|
+
r.toString=function(){if(this.g)return this.g;if(!this.ta)return"";var a=[],b;for(b in this.ta)for(var c=encodeURIComponent(b),d=this.ta[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 ac;a.g=this.g;if(this.ta){var b={},c;for(c in this.ta)b[c]=this.ta[c].concat();a.ta=b;a.tc=this.tc}return a};function ic(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Wb(d)});return a.map(function(d){return new Wb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ob,[]).map(function(d){return d.toString()})}function jc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
89
89
|
function kc(a,b){if(1==b.length)return b[0];var c=lc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function lc(a,b){for(var c=t(mc[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==nc?"":null}
|
|
90
|
-
var nc="text",oc={
|
|
90
|
+
var nc="text",oc={Ma:"video",Za:"audio",Y:nc,Kb:"image",Wf:"application"},mc={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 pc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}pc.prototype.resolve=function(){};pc.prototype.reject=function(){};function qc(a){this.h=a;this.g=void 0}qc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function rc(a){this.h=a;this.g=null}rc.prototype.R=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};rc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Eb=function(){this.stop();this.h();return this};O.prototype.R=function(a){var b=this;this.stop();this.g=(new rc(function(){b.h()})).R(a);return this};O.prototype.za=function(a){var b=this;this.stop();this.g=(new rc(function(){b.g.R(a);b.h()})).R(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.za;O.prototype.tickAfter=O.prototype.R;
|
|
91
91
|
O.prototype.tickNow=O.prototype.Eb;function sc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function tc(a){return""!=uc().canPlayType(a)}function vc(){return wc("Xbox One")}function xc(){return wc("Tizen")}function yc(){return wc("Web0S")}function zc(){return wc("CrKey")}function Ac(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!xc()&&!wc("PC=EOS")&&!wc("VirginMedia")&&!Bc()&&!wc("AFT")}function Bc(){return wc("PlayStation 4")}
|
|
92
92
|
function Ec(){if(!Ac())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 wc(a){return(navigator.userAgent||"").includes(a)}function uc(){if(Fc)return Fc;Gc||(Gc=new O(function(){Fc=null}));(Fc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Fc=document.createElement("video"));Gc.R(1);return Fc}var Gc=null,Fc=null;function Hc(){}
|
|
93
93
|
function Ic(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Bc())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==
|
|
@@ -143,7 +143,7 @@ function be(a){var b=ce(a);b.active="disabled"!=a.mode;b.type="text";b.originalT
|
|
|
143
143
|
function ce(a){return{id:$d(a),active:!1,type:"",bandwidth:0,language:pd(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}
|
|
144
144
|
function ee(a){return a.allowedByApplication&&a.allowedByKeySystem}function fe(a){return a.filter(function(b){return ee(b)})}
|
|
145
145
|
function Ad(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
|
|
146
|
-
function
|
|
146
|
+
function ge(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=vd(pd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return pd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ie(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Ob,[]);return a.length?
|
|
147
147
|
ie(e,a[0]):e}function ie(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Ud(a){var b=[];a.audio&&b.push(je(a.audio));a.video&&b.push(je(a.video));return b.join(", ")}
|
|
148
148
|
function je(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var ae=0,Fd="smooth",Gd="powerEfficient",Id="bandwidth";function ke(){var a=this;this.l=null;this.j=!1;this.h=new Ra;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.j){a.h=new Ra;var b=a.chooseVariant();b&&a.l(b)}});this.i=[];this.o=1;this.s=!1;this.g=this.m=null}r=ke.prototype;r.stop=function(){this.l=null;this.j=!1;this.i=[];this.o=1;this.m=null};r.init=function(a){this.l=a};
|
|
149
149
|
r.chooseVariant=function(){var a=le(this.g.restrictions,this.i),b=this.h.getBandwidthEstimate(me(this));this.i.length&&!a.length&&(a=le(null,this.i),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.o)?1:Math.abs(this.o),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
|
|
@@ -164,20 +164,20 @@ function Ue(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSit
|
|
|
164
164
|
r.request=function(a,b){var c=this,d=new Ve;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new We(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Me(b.retryParameters):Be();b.uris=Me(b.uris);e=Xe(this,a,b);var f=e.Z(function(){return Ye(c,a,b,new Ae(b.retryParameters,!1),0,null,d)}),g=f.Z(function(n){return Ze(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
165
165
|
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.rf||!c.j||q.fromCache||a!=$e||c.j(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new We(m.promise,function(){return m.abort()},d);Pe(this.l,e);return e};
|
|
166
166
|
function Xe(a,b,c){var d=Ge(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Yc:e.Yc},f=a.next())e.Yc=f.value,d=d.Z(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.Yc(b,c)}}(e));return d.Z(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
|
|
167
|
-
function Ye(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Wb(c.uris[e]),k=h.
|
|
167
|
+
function Ye(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Wb(c.uris[e]),k=h.Ba,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Xb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Te[k])?k.Af:null;if(!m)return Ee(new N(2,1,1E3,h));var n=k.Bf,p=null,q=null,v=!1,y;return He(Ce(d)).Z(function(){if(a.i)return Fe();y=Date.now();var x=m(c.uris[e],c,b,function(C,B,E){p&&p.stop();q&&q.R(D/1E3);a.j&&b==$e&&(a.j(C,B),l=!0,g.g=E)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
|
|
168
168
|
w&&(p=new O(function(){v=!0;x.abort()}),p.R(w/1E3));var D=c.retryParameters.stallTimeout;D&&(q=new O(function(){v=!0;x.abort()}));return x}).Z(function(x){p&&p.stop();q&&q.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);return{response:x,rf:l}},function(x){p&&p.stop();q&&q.stop();if(a.i)return Fe();v&&(x=new N(1,1,1003,c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity){var w=(new Map).set("error",x);w=new P("retry",w);a.dispatchEvent(w);e=(e+1)%c.uris.length;
|
|
169
169
|
return Ye(a,b,c,d,e,x,g)}}throw x;})}function Ze(a,b,c){var d=Ge(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={Zc:e.Zc},f=a.next())e.Zc=f.value,d=d.Z(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.Zc(b,h)}}(e));return d.Z(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",Qe);Qe.prototype.request=Qe.prototype.request;Qe.prototype.destroy=Qe.prototype.destroy;
|
|
170
170
|
Qe.makeRequest=Ue;Qe.defaultRetryParameters=function(){return Be()};Qe.prototype.clearAllResponseFilters=Qe.prototype.Le;Qe.prototype.unregisterResponseFilter=Qe.prototype.Tf;Qe.prototype.registerResponseFilter=Qe.prototype.Df;Qe.prototype.clearAllRequestFilters=Qe.prototype.Ke;Qe.prototype.unregisterRequestFilter=Qe.prototype.Sf;Qe.prototype.registerRequestFilter=Qe.prototype.Cf;Qe.unregisterScheme=function(a){delete Te[a]};Qe.registerScheme=Re;Qe.prototype.setForceHTTPS=Qe.prototype.Md;
|
|
171
|
-
function Ve(){this.g=0}Qe.NumBytesRemainingClass=Ve;function We(a,b,c){De.call(this,a,b);this.h=c}pa(We,De);Qe.PendingRequest=We;var $e=1;Qe.RequestType={MANIFEST:0,SEGMENT:$e,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Se=3;Qe.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Se};var Te={};function af(a){this.g=!1;this.h=new pc;this.i=a}af.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 bf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function cf(){this.g=new wd}r=cf.prototype;r.release=function(){this.
|
|
172
|
-
r.
|
|
171
|
+
function Ve(){this.g=0}Qe.NumBytesRemainingClass=Ve;function We(a,b,c){De.call(this,a,b);this.h=c}pa(We,De);Qe.PendingRequest=We;var $e=1;Qe.RequestType={MANIFEST:0,SEGMENT:$e,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Se=3;Qe.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Se};var Te={};function af(a){this.g=!1;this.h=new pc;this.i=a}af.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 bf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function cf(){this.g=new wd}r=cf.prototype;r.release=function(){this.Ra();this.g=null};r.v=function(a,b,c,d){this.g&&(a=new df(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.ec(a,b,e);c(g)}var f=this;this.v(a,b,e,d)};r.ec=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.ec(),this.g.remove(b,e))}};
|
|
172
|
+
r.Ra=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.ec();this.g.g={}}};M("shaka.util.EventManager",cf);cf.prototype.removeAll=cf.prototype.Ra;cf.prototype.unlisten=cf.prototype.ec;cf.prototype.listenOnce=cf.prototype.oa;cf.prototype.listen=cf.prototype.v;cf.prototype.release=cf.prototype.release;function df(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ef(a,d);this.target.addEventListener(b,c,this.g)}
|
|
173
173
|
df.prototype.ec=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ef(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 ff(a)?b:b.capture||!1}
|
|
174
|
-
function ff(a){var b=gf;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}gf=b}return b||!1}var gf=void 0;function hf(){}function jf(a){a=Lc(a);return(new Wb(a)).
|
|
174
|
+
function ff(a){var b=gf;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}gf=b}return b||!1}var gf=void 0;function hf(){}function jf(a){a=Lc(a);return(new Wb(a)).Ea}function kf(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=Nc(b,!0):e=b;a=Lc(a);a=Nc(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",hf);hf.initDataTransform=kf;hf.defaultGetContentId=jf;function lf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function mf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function nf(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 of(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function pf(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 qf(a,b){var c=rf(a,b);return 1!=c.length?null:c[0]}function sf(a,b,c){a=tf(a,b,c);return 1!=a.length?null:a[0]}function rf(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 uf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
175
175
|
function tf(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 vf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function wf(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 xf(a){return Array.from(a.childNodes).every(yf)?a.textContent.trim():null}
|
|
176
176
|
function yf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Af(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 Bf(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 Cf(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}
|
|
178
178
|
function Df(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Ef(a){a=Number(a);return 0===a%1?a:null}function Ff(a){a=Number(a);return 0===a%1&&0<a?a:null}function Gf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Hf(a){a=Number(a);return isNaN(a)?null:a}function If(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
179
179
|
function Jf(a,b){var c=new DOMParser,d=Kf.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function Lf(a,b){try{var c=Ic(a);return Jf(c,b)}catch(d){return null}}
|
|
180
|
-
var Kf=new qc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Mf(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.D=new Set;this.l=this.s=null;this.ja=this.aa=!1;this.F=0;this.g=null;this.o=new cf;this.i=new Map;this.B=[];this.u=new pc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ka=new Map;this.da=new Map;this.T=new O(function(){return Nf(c)});this.J=!1;this.G=[];this.M=!1;this.ea=(new O(function(){Of(c)})).
|
|
180
|
+
var Kf=new qc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Mf(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.D=new Set;this.l=this.s=null;this.ja=this.aa=!1;this.F=0;this.g=null;this.o=new cf;this.i=new Map;this.B=[];this.u=new pc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ka=new Map;this.da=new Map;this.T=new O(function(){return Nf(c)});this.J=!1;this.G=[];this.M=!1;this.ea=(new O(function(){Of(c)})).za(b);this.u["catch"](function(){});this.j=new af(function(){return Pf(c)});this.V=!1}r=Mf.prototype;r.destroy=function(){return this.j.destroy()};
|
|
181
181
|
function Pf(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.T.stop(),a.T=null,u(b,Qf(a),2);case 2:if(!a.l){b.A(3);break}A(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.D.clear(),a.s=null,a.B=[],a.h=null,a.m=function(){},a.C=null,a.V=!1,z(b)}})}r.configure=function(a){this.h=a};function Rf(a,b,c){a.ja=!0;a.B=[];a.J=c;return Sf(a,b)}
|
|
182
182
|
function Tf(a,b,c){a.B=c;a.J=0<c.length;return Sf(a,b)}function Uf(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Vf(a,g,[])}
|
|
183
183
|
function Sf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(x){if(1==x.g){if(c=Wf(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=nf(a.h.servers),Xf(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Yf(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,Zf(q,nf(a.h.servers),nf(a.h.advanced||{}));return u(x,
|
|
@@ -211,15 +211,15 @@ function rg(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.
|
|
|
211
211
|
c],f=new Map,g=function(l){var m,n,p;return L(function(q){switch(q.g){case 1:return A(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,wc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:F(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](of(f))})}
|
|
212
212
|
function sg(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).R(tg)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);z(c)})}
|
|
213
213
|
function Qf(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return A(g,2),a.ja||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,sg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);z(g)})})),0)})}
|
|
214
|
-
function ug(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={
|
|
214
|
+
function ug(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Aa:f.Aa},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Aa=[];f.Aa=f.Aa.concat(e.initData||[]);f.Aa=f.Aa.concat(h.initData||[]);f.Aa=f.Aa.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Aa.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
|
|
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
|
-
initData:f.
|
|
216
|
+
initData:f.Aa,keyIds:g});break}}return c}function Yf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Of(a){a.i.forEach(function(b,c){var d=b.Dd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Dd=e)})}function mg(a){a=a.i.values();return mf(a,function(b){return b.loaded})}
|
|
217
217
|
function Xf(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
218
|
function kg(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={qa:g.qa},h=a.next()){g.qa=h.value;b.includes(g.qa.licenseServerUri)||b.push(g.qa.licenseServerUri);d.includes(g.qa.serverCertificateUri)||d.push(g.qa.serverCertificateUri);g.qa.serverCertificate&&(c.some(function(m){return function(n){return Db(n,m.qa.serverCertificate)}}(g))||c.push(g.qa.serverCertificate));if(g.qa.initData){h={};for(var k=t(g.qa.initData),l=k.next();!l.done;h={ic:h.ic},l=k.next())h.ic=l.value,e.some(function(m){return function(n){var p=
|
|
219
219
|
m.ic;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.ic)}if(g.qa.keyIds)for(h=t(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
220
220
|
function Zf(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 tg=1,pg=5,qg=.5,vg=new qc(function(){return Gb(new Uint8Array([0]))});function wg(){}function xg(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){if(d&&(e=yg[d.toLowerCase()]))return k["return"](e);if(f=zg(a))if(g=Ag[f])return k["return"](g);return d?k.A(2):u(k,Bg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=yg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
|
|
222
|
-
function Bg(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=Ue([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 zg(a){a=(new Wb(a)).
|
|
222
|
+
function Bg(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=Ue([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 zg(a){a=(new Wb(a)).va.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",wg);wg.unregisterParserByMime=function(a){delete yg[a]};wg.registerParserByMime=function(a,b){yg[a]=b};
|
|
223
223
|
wg.registerParserByExtension=function(a,b){Ag[a]=b};var yg={},Ag={};function Cg(a,b){this.N=Ib(a);this.h=b==Dg;this.g=0}r=Cg.prototype;r.na=function(){return this.g<this.N.byteLength};r.W=function(){return this.g};r.Xe=function(){return this.N.byteLength};r.X=function(){try{var a=this.N.getUint8(this.g);this.g+=1;return a}catch(b){throw Eg();}};r.Bb=function(){try{var a=this.N.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Eg();}};r.L=function(){try{var a=this.N.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Eg();}};
|
|
224
224
|
r.le=function(){try{var a=this.N.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Eg();}};r.Cb=function(){try{if(this.h){var a=this.N.getUint32(this.g,!0);var b=this.N.getUint32(this.g+4,!0)}else b=this.N.getUint32(this.g,!1),a=this.N.getUint32(this.g+4,!1)}catch(c){throw Eg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Wa=function(a){if(this.g+a>this.N.byteLength)throw Eg();var b=Fb(this.N,this.g,a);this.g+=a;return b};
|
|
225
225
|
r.skip=function(a){if(this.g+a>this.N.byteLength)throw Eg();this.g+=a};r.ne=function(a){if(this.g<a)throw Eg();this.g-=a};r.seek=function(a){if(0>a||a>this.N.byteLength)throw Eg();this.g=a};r.Zb=function(){for(var a=this.g;this.na()&&0!=this.N.getUint8(this.g);)this.g+=1;a=Fb(this.N,a,this.g-a);this.g+=1;return Ic(a)};function Eg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",Cg);Cg.prototype.readTerminatedString=Cg.prototype.Zb;Cg.prototype.seek=Cg.prototype.seek;Cg.prototype.rewind=Cg.prototype.ne;
|
|
@@ -245,10 +245,10 @@ b.skip(1),d=Fh(b).value,b.skip(1),a.g&&(a.g.C=d&3);else if(152<=c&&159>=c){c=(c&
|
|
|
245
245
|
function Jh(a,b,c){var d=null;b=t(Ih(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=zh(f,c,a.i));a.h[e]=null}return d}function Kh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Lh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Mh[a<<2|b<<1|c]}
|
|
246
246
|
var Nh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Mh="black blue green cyan red magenta yellow white".split(" ");function Oh(){this.h=[];this.g=[];this.i=new Ch;this.l=0;this.s=new Map([["CC1",new jh(0,0)],["CC2",new jh(0,1)],["CC3",new jh(1,0)],["CC4",new jh(1,1)]]);this.o=this.m=0;this.j=new Map;Ph(this)}function Ph(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Xg(b.i),Xg(b.l),Xg(b.o)}
|
|
247
247
|
function Qh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=Th(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())Dh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Uh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
|
|
248
|
-
function Th(a,b){var c=b.type;if(16===(b.
|
|
248
|
+
function Th(a,b){var c=b.type;if(16===(b.xa&112)){var d=b.xa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.xa&&255===b.Na||!b.xa&&!b.Na||!Vh(b.xa)||!Vh(b.Na))return 45<=++a.l&&Ph(a),null;a.l=0;b.xa&=127;b.Na&=127;if(!b.xa&&!b.Na)return null;d=null;if(16===(b.xa&112))a:{var e=b.xa;d=b.Na;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=sh[f]:7===f&&(h=!0);
|
|
249
249
|
d=1===(d&1);if(c.h!==nh){f=c.g;if(c.h===mh&&e!==f.g){var k=1+e-f.h;ih(f,k,1+f.g-f.h,f.h);Zg(f,0,k-1);Zg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",$g(c.g,ah,32),g=!1,e=sh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=rh[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))$g(c.g,ch,d);else if(18===
|
|
250
|
-
(e&246)&&32===(d&224))$g(c.g,e&1?gh:eh,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.
|
|
251
|
-
0,h-1),Zg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Zg(c.l,0,15);break;case 47:e=null,c.h!==nh&&(e=Yg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,oh(c),c.j=d}d=e;break a}d=null}else e=b.
|
|
250
|
+
(e&246)&&32===(d&224))$g(c.g,e&1?gh:eh,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Na){case 32:oh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=lh(c,2,d);break;case 38:e=lh(c,3,d);break;case 39:e=lh(c,4,d);break;case 40:$g(c.g,ah,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Xg(c.o);qh(c);break;case 43:qh(c);break;case 44:e=c.i;g=null;c.h!==nh&&(g=Yg(e,c.j,d));Zg(e,0,15);e=g;break;case 45:e=c.g;c.h!==mh?e=null:(g=Yg(e,c.j,d),h=e.g-e.h+1,ih(e,h-1,h,e.h),Zg(e,
|
|
251
|
+
0,h-1),Zg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Zg(c.l,0,15);break;case 47:e=null,c.h!==nh&&(e=Yg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,oh(c),c.j=d}d=e;break a}d=null}else e=b.Na,$g(c.g,ah,b.xa),$g(c.g,ah,e);return d}
|
|
252
252
|
function Uh(a,b){var c=[];try{for(;b.na();){var d=Fh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Fh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Gh(e));for(var g=a.j.get(e),h=b.W();b.W()-h<f;){e=b;var k=Fh(e),l=k.value,m=k.pts;if(16===l){var n=Fh(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:!yh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.B-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=zh(q,p,g.i));if(q.h+1>=q.D){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]=wh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=zh(q,p,g.i));q.i[q.h]=wh();q.g=0;break;case 12:q.isVisible()&&(e=zh(q,p,g.i)),vh(q),p=q,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Hh(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?xh(g.g,"\u266a"):xh(g.g,
|
|
254
254
|
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&xh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Nh.has(e)){var w=Nh.get(e);xh(g.g,w)}else xh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?xh(g.g,"_"):xh(g.g,"[CC]"));x=null}(e=x)&&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 Vh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Wh(a,b){var c=null,d=null,e=a.L();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.L());b&16&&(d=a.L());return{trackId:e,Xd:c,Ne:d}}function Xh(a,b){return{fd:1==b?a.Cb():a.L()}}function Yh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.L()}}
|
|
@@ -257,7 +257,7 @@ $h.prototype.init=function(a){var b=this,c=[],d=[];(new Fg).box("moov",Jg).box("
|
|
|
257
257
|
$h.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Fg).box("moof",Jg).box("traf",Jg).O("trun",function(k){f=Zh(k.reader,k.version,k.flags).oe}).O("tfhd",function(k){k=Wh(k.reader,k.flags);d=k.Xd||b.g;e=k.Ne||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).O("tfdt",function(k){g=Xh(k.reader,k.version).fd}).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.na();){var x=k.L();if(6==
|
|
258
258
|
(k.X()&31)){var w=0;q.length>v&&(w=q[v].Kc||0);w=(l+w)/m;for(var D=[],C,B=k.Wa(x-1),E=C=0;E<B.length;)2==C&&3==B[E]?(C=0,B=[].concat(ia(B)),B.splice(E,1),B=new Uint8Array(B)):0==B[E]?C++:C=0,E++;C=B;for(E=0;E<C.length;){for(B=0;255==C[E];)B+=255,E++;B+=C[E++];for(var G=0;255==C[E];)G+=255,E++;G+=C[E++];4==B&&D.push(C.subarray(E,E+G));E+=G}D=t(D);for(C=D.next();!C.done;C=D.next())c.push({zf:C.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=q.length>v?l+(q[v].Id||n):l+n,v++,y=q.length>
|
|
259
259
|
v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function ai(){this.h=new $h;this.g=new Oh}ai.prototype.init=function(a){this.h.init(a)};
|
|
260
|
-
function bi(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.zf);if(0<f.length&&(d=a.g,e=e.pts,f=new Cg(f,0),181===f.X()&&49===f.Bb()&&1195456820===f.L()&&3===f.X())){var g=f.X();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.X(),l=(k&4)>>2,m=f.X(),n=f.X();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,
|
|
260
|
+
function bi(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.zf);if(0<f.length&&(d=a.g,e=e.pts,f=new Cg(f,0),181===f.X()&&49===f.Bb()&&1195456820===f.L()&&3===f.X())){var g=f.X();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.X(),l=(k&4)>>2,m=f.X(),n=f.X();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,xa:m,Na: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 Qh(a.g)}
|
|
261
261
|
;function ci(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function di(a,b,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 ei(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(fi(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 gi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=fi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function fi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function hi(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.G={};this.F={};this.g=null;this.J=d||function(){};this.i={};this.o=new cf;this.s={};this.u=b;this.C=new pc;this.m=ii(this,this.C);this.B=new af(function(){return ji(e)});this.D=""}function ii(a,b){var c=new MediaSource;a.o.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.D);b.resolve()});a.D=ki(c);a.j.src=a.D;return c}r=hi.prototype;r.destroy=function(){return this.B.destroy()};
|
|
263
263
|
function ji(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=
|
|
@@ -265,8 +265,8 @@ function ji(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in
|
|
|
265
265
|
r.init=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g)return d=oc,u(m,c.C,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={pa:e.pa},g=f.next())e.pa=g.value,h=a.get(e.pa),k=$c(h.mimeType,h.codecs),e.pa==d.Y?li(c,k):(!b&&MediaSource.isTypeSupported(k)||!Wc(k,e.pa)||(c.s[e.pa]=new Vc,k=Yc(e.pa,k)),l=c.m.addSourceBuffer(k),c.o.v(l,"error",function(n){return function(){c.i[n.pa][0].p.reject(new N(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.o.v(l,"updateend",function(n){return function(){return mi(c,n.pa)}}(e)),
|
|
266
266
|
c.h[e.pa]=l,c.G[e.pa]=k,c.i[e.pa]=[],c.F[e.pa]=!!h.drmInfos.length);z(m)})};function li(a,b){a.g||(a.g=new ed(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Rb(gd[b]))}function ni(a){return a.m?"ended"==a.m.readyState:!0}function oi(a,b){if(b==nc)var c=a.g.g;else c=pi(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function qi(a,b){return b==nc?a.g.h:ci(pi(a,b))}
|
|
267
267
|
function ri(a,b,c){if(b==nc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=pi(a,b);return ei(a,c)}r.xc=function(){var a={total:fi(this.j.buffered),audio:fi(pi(this,"audio")),video:fi(pi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function pi(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
268
|
-
function si(a,b,c,d,e,f){var g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g){g=oc;if(b==g.Y)return u(v,hd(a.g,c,d,e),0);if(a.s[b])return u(v,Zc(a.s[b],c),10);if(f)return a.g||li(a,"text/vtt"),null==d&&null==e?a.u.init(c):(h=bi(a.u,c),h.length&&(k=a.h[g.
|
|
269
|
-
m,e));l.captions&&l.captions.length&&(n=a.h[g.
|
|
268
|
+
function si(a,b,c,d,e,f){var g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g){g=oc;if(b==g.Y)return u(v,hd(a.g,c,d,e),0);if(a.s[b])return u(v,Zc(a.s[b],c),10);if(f)return a.g||li(a,"text/vtt"),null==d&&null==e?a.u.init(c):(h=bi(a.u,c),h.length&&(k=a.h[g.Ma].timestampOffset,nd(a.g,h,d,e,k))),c=ti(a,c,d,b),u(v,ui(a,b,function(){a.h[b].appendBuffer(c)}),0);c=ti(a,c,d,b);return u(v,ui(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||li(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.J(l.metadata,
|
|
269
|
+
m,e));l.captions&&l.captions.length&&(n=a.h[g.Ma].timestampOffset,p=kd(l.captions),nd(a.g,p,d,e,n));q=l.data;q=ti(a,q,d,b);return u(v,ui(a,b,function(){a.h[b].appendBuffer(q)}),0)})}function vi(a,b){var c=qi(a,"video")||0;jd(a.g,b,c)}function wi(a){a.g&&jd(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return L(function(f){e=oc;return a==e.Y?u(f,d.g.remove(b,c),0):u(f,ui(d,a,function(){c<=b?mi(d,a):d.h[a].remove(b,c)}),0)})};
|
|
270
270
|
function xi(a,b){var c;return L(function(d){c=oc;return b==c.Y?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,ui(a,b,function(){var e=a.m.duration;0>=e?mi(a,b):a.h[b].remove(0,e)}),0)})}r.flush=function(a){var b=this,c;return L(function(d){c=oc;return a==c.Y?d["return"]():u(d,ui(b,a,function(){b.j.currentTime-=.001;mi(b,a)}),0)})};
|
|
271
271
|
function yi(a,b,c,d,e){var f;return L(function(g){f=oc;return b==f.Y?(a.g.u=c,id(a.g,d,e),g["return"]()):u(g,Promise.all([ui(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;mi(a,b)}),ui(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;mi(a,b)}),ui(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;mi(a,b)})]),0)})}
|
|
272
272
|
r.endOfStream=function(a){var b=this;return L(function(c){return u(c,zi(b,function(){ni(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ha=function(a){var b=this;return L(function(c){return u(c,zi(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function mi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ai(a,b))}function ui(a,b,c){bf(a.B);c={start:c,p:new pc};a.i[b].push(c);1==a.i[b].length&&Bi(a,b);return c.p}
|
|
@@ -275,63 +275,63 @@ function Bi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError
|
|
|
275
275
|
function Ei(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.ia=d;this.ba=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=Ei.prototype;r.ma=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.Ve=function(){return this.endTime};r.Wb=function(){return this.ia};r.Sb=function(){return this.ba};r.nf=function(){return this.tilesLayout};
|
|
276
276
|
r.mf=function(){return this.i};M("shaka.media.SegmentReference",Ei);Ei.prototype.getTileDuration=Ei.prototype.mf;Ei.prototype.getTilesLayout=Ei.prototype.nf;Ei.prototype.getEndByte=Ei.prototype.Sb;Ei.prototype.getStartByte=Ei.prototype.Wb;Ei.prototype.getEndTime=Ei.prototype.Ve;Ei.prototype.getStartTime=Ei.prototype.getStartTime;Ei.prototype.getUris=Ei.prototype.ma;function S(a,b,c){this.l=a;this.Jc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.B=void 0===c?!0:c;this.C=0;this.D=!1}r=S.prototype;r.getDuration=function(){return this.i};r.af=function(){return this.g};r.Ha=function(a){this.i=a};r.gf=function(){return this.l};r.te=function(a){this.o=a};r.dc=function(a){this.s=a};r.Pd=function(a){this.m=a};r.Of=function(a){this.Jc=a};r.Ue=function(){return this.Jc};
|
|
277
277
|
r.yb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Bd(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.B&&!this.D&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.ud=function(){this.D=!0};r.Bd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.zd=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.U=function(){return Infinity==this.i&&!this.s};r.ib=function(){return Infinity!=this.i&&!this.s};r.
|
|
279
|
-
r.
|
|
280
|
-
S.prototype.setUserSeekStart=S.prototype.ue;S.prototype.getSegmentAvailabilityStart=S.prototype.
|
|
281
|
-
S.prototype.setSegmentAvailabilityDuration=S.prototype.Pd;S.prototype.setStatic=S.prototype.dc;S.prototype.setClockOffset=S.prototype.te;S.prototype.getPresentationStartTime=S.prototype.gf;S.prototype.setDuration=S.prototype.Ha;S.prototype.getMaxSegmentDuration=S.prototype.af;S.prototype.getDuration=S.prototype.getDuration;function Fi(a,b){this.j=a;this.m=Gi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}Fi.prototype.release=function(){this.j=null;this.i=function(){}};function Hi(a,b){a.i=b}function Ii(a){this.g=a}function Gi(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(fi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Ji(a,b,c,d,e){var f=this;this.g=a;this.B=b;this.l=c;this.u=e;this.i=new cf;this.s=!1;this.C=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.v(a,"waiting",function(){return Ki(f)});this.m=(new O(function(){Ki(f)})).
|
|
278
|
+
r.U=function(){return Infinity==this.i&&!this.s};r.ib=function(){return Infinity!=this.i&&!this.s};r.Pa=function(){return Math.max(this.u,this.eb()-this.m)};r.ue=function(a){this.u=a};r.eb=function(){return this.U()||this.ib()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.C,this.i):this.h?Math.min(this.h,this.i):this.i};r.Vb=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.eb()-this.m+a,this.Oa()))};r.vb=function(){return this.Vb(0)};
|
|
279
|
+
r.Oa=function(){return Math.max(0,this.eb()-(this.U()||this.ib()?this.Jc:0))};r.xe=function(){return null==this.l||null!=this.h&&this.B?!1:!0};r.se=function(a){this.C=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.se;S.prototype.usingPresentationStartTime=S.prototype.xe;S.prototype.getSeekRangeEnd=S.prototype.Oa;S.prototype.getSeekRangeStart=S.prototype.vb;S.prototype.getSafeSeekRangeStart=S.prototype.Vb;S.prototype.getSegmentAvailabilityEnd=S.prototype.eb;
|
|
280
|
+
S.prototype.setUserSeekStart=S.prototype.ue;S.prototype.getSegmentAvailabilityStart=S.prototype.Pa;S.prototype.isInProgress=S.prototype.ib;S.prototype.isLive=S.prototype.U;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.zd;S.prototype.notifyMinSegmentStartTime=S.prototype.Bd;S.prototype.lockStartTime=S.prototype.ud;S.prototype.notifySegments=S.prototype.yb;S.prototype.getDelay=S.prototype.Ue;S.prototype.setDelay=S.prototype.Of;
|
|
281
|
+
S.prototype.setSegmentAvailabilityDuration=S.prototype.Pd;S.prototype.setStatic=S.prototype.dc;S.prototype.setClockOffset=S.prototype.te;S.prototype.getPresentationStartTime=S.prototype.gf;S.prototype.setDuration=S.prototype.Ha;S.prototype.getMaxSegmentDuration=S.prototype.af;S.prototype.getDuration=S.prototype.getDuration;function Fi(a,b){this.j=a;this.m=Gi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}Fi.prototype.release=function(){this.j=null;this.i=function(){}};function Hi(a,b){a.i=b}function Ii(a){this.g=a}function Gi(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(fi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Ji(a,b,c,d,e){var f=this;this.g=a;this.B=b;this.l=c;this.u=e;this.i=new cf;this.s=!1;this.C=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.v(a,"waiting",function(){return Ki(f)});this.m=(new O(function(){Ki(f)})).za(.25)}Ji.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.B=this.u=null};Ji.prototype.Ed=function(){this.o=!0;Ki(this)};
|
|
282
282
|
function Ki(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.C&&(a.j=!1,a.C=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Gi(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=gi(b,g,a.l.gapDetectionThreshold);if(!(null==
|
|
283
|
-
c||0==c&&!a.o||(d=b.start(c),d>=a.B.
|
|
283
|
+
c||0==c&&!a.o||(d=b.start(c),d>=a.B.Oa()))){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 P("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 Li(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Mi.value().get(b),c.oa(a,b,d))}var Mi=new qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ni(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new cf;this.i=new Oi(a);Li(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Pi(d,d.j)})}Ni.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 Qi(a){return a.m?a.g.currentTime:a.j}function Ri(a,b){0<a.g.readyState?Si(a.i,b):Li(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Pi(a,a.j)})}
|
|
284
284
|
function Pi(a,b){.001>Math.abs(a.g.currentTime-b)?Ti(a):(a.h.oa(a.g,"seeking",function(){Ti(a)}),Si(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Ti(a){a.m=!0;a.h.v(a.g,"seeking",function(){return a.l()})}function Oi(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--)})}Oi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
285
|
-
function Si(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.
|
|
286
|
-
function Vi(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 Ji(a,b.presentationTimeline,c,Wi(a,c),f);this.h=new Ni(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=Qi(g.h);h=Xi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.o||g.o<k-1)){g.o=k;Ri(g.h,h);h=void 0;break a}g.s();h=void 0}return h},Yi(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Qi(g.h),k=g.g.vb(),l=g.g.
|
|
287
|
-
3);h<k&&(h=Xi(g,h),g.i.currentTime=h)}})}r=Vi.prototype;r.dd=function(){this.m.
|
|
288
|
-
function Yi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.vb():a.g.
|
|
289
|
-
function Zi(a,b){var c=a.g.vb();if(b<c)return c;c=a.g.
|
|
285
|
+
function Si(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.za(.1)};function Ui(a){this.g=a;this.j=!1;this.h=null;this.i=new cf}r=Ui.prototype;r.dd=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;Li(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.ed=function(a){this.h=this.j?this.h:a};r.mc=function(){return(this.j?this.g.currentTime:this.h)||0};r.je=function(){};
|
|
286
|
+
function Vi(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 Ji(a,b.presentationTimeline,c,Wi(a,c),f);this.h=new Ni(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=Qi(g.h);h=Xi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.o||g.o<k-1)){g.o=k;Ri(g.h,h);h=void 0;break a}g.s();h=void 0}return h},Yi(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Qi(g.h),k=g.g.vb(),l=g.g.Oa();3>l-k&&(k=l-
|
|
287
|
+
3);h<k&&(h=Xi(g,h),g.i.currentTime=h)}})}r=Vi.prototype;r.dd=function(){this.m.za(.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.ed=function(a){Ri(this.h,a)};r.mc=function(){var a=Qi(this.h);return 0<this.i.readyState&&!this.i.paused?Zi(this,a):a};
|
|
288
|
+
function Yi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.vb():a.g.Oa():0>b&&(b=a.g.Oa()+b);return $i(a,Zi(a,b))}r.je=function(){this.j.Ed()};function $i(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Xi(a,b){var c=Math.max(a.u,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.vb(),f=a.g.Oa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Vb(c),k=a.g.Vb(d);c=a.g.Vb(c+d);return b>=g?$i(a,b):b>f?f:b<e?di(a.i.buffered,k)?k:c:b>=h||di(a.i.buffered,b)?b:c}
|
|
289
|
+
function Zi(a,b){var c=a.g.vb();if(b<c)return c;c=a.g.Oa();return b>c?c:b}function Wi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Fi(new Ii(a),b.stallThreshold);Hi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function U(a){this.K=a;this.g=null;this.h=0;this.i=!1}r=U.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.uf=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
291
|
r.Ec=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,ia(a)))};r.xb=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.Ec(a);this.ab(b)};r.ab=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.Va=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 Ei(a.startTime,b,a.j,a.ia,a.ba,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
|
|
293
|
-
r.Lc=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,ia(d)):(c.g.stop(),c.g=null)}),this.g.
|
|
293
|
+
r.Lc=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,ia(d)):(c.g.stop(),c.g=null)}),this.g.za(a))};U.prototype[Symbol.iterator]=function(){return this.cb(0)};U.prototype.cb=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.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new aj(this,b,d)};
|
|
294
294
|
function bj(a,b,c){return new U([new Ei(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",U);U.forSingleSegment=bj;U.prototype.getIteratorForTime=U.prototype.cb;U.prototype.updateEvery=U.prototype.Lc;U.prototype.fit=U.prototype.Va;U.prototype.evict=U.prototype.ab;U.prototype.mergeAndEvict=U.prototype.xb;U.prototype.merge=U.prototype.Ec;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.uf;
|
|
295
295
|
U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function aj(a,b,c){this.i=a;this.h=b;this.g=c}aj.prototype.seek=function(a){Kb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.cb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
|
|
296
296
|
aj.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.ma().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};aj.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.ma().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",aj);aj.prototype.next=aj.prototype.next;aj.prototype.current=aj.prototype.current;
|
|
297
297
|
aj.prototype.seek=aj.prototype.seek;function cj(){U.call(this,[]);this.j=[]}pa(cj,U);r=cj.prototype;r.clone=function(){var a=new cj;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
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.Ec=function(){};r.ab=function(){};r.xb=function(){};r.Va=function(){};r.Lc=function(){};M("shaka.media.MetaSegmentIndex",cj);cj.prototype.updateEvery=cj.prototype.Lc;cj.prototype.fit=cj.prototype.Va;cj.prototype.mergeAndEvict=cj.prototype.xb;cj.prototype.evict=cj.prototype.ab;cj.prototype.merge=cj.prototype.Ec;
|
|
299
|
-
cj.prototype.offset=cj.prototype.offset;cj.prototype.get=cj.prototype.get;cj.prototype.find=cj.prototype.find;cj.prototype.release=cj.prototype.release;function dj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Bc();this.h=new O(function(){b.g.ie(.25*b.i)})}dj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};dj.prototype.set=function(a){this.i=a;ej(this)};dj.prototype.yc=function(){return this.g.yc()};function ej(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Bc()!=b&&a.g.Od(b);return}catch(c){}a.h.
|
|
300
|
-
function gj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=t(d.i.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.g.get(h),l=e<h.startTime?hj:e>h.endTime?ij:jj;d.g.set(h,l);for(var m=t(d.j),n=m.next();!n.done;n=m.next())n=n.value,n.pb==k&&n.ob==l&&n.hb(h,f)}}};function kj(a){Le.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 P("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).
|
|
299
|
+
cj.prototype.offset=cj.prototype.offset;cj.prototype.get=cj.prototype.get;cj.prototype.find=cj.prototype.find;cj.prototype.release=cj.prototype.release;function dj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Bc();this.h=new O(function(){b.g.ie(.25*b.i)})}dj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};dj.prototype.set=function(a){this.i=a;ej(this)};dj.prototype.yc=function(){return this.g.yc()};function ej(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Bc()!=b&&a.g.Od(b);return}catch(c){}a.h.za(.25);0!=a.g.Bc()&&a.g.Od(0)};function fj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){gj(b,!1)})).za(.25)}fj.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()};
|
|
300
|
+
function gj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=t(d.i.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.g.get(h),l=e<h.startTime?hj:e>h.endTime?ij:jj;d.g.set(h,l);for(var m=t(d.j),n=m.next();!n.done;n=m.next())n=n.value,n.pb==k&&n.ob==l&&n.hb(h,f)}}};function kj(a){Le.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 P("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).za(2)}pa(kj,Le);kj.prototype.release=function(){this.g.clear();this.h.stop();Le.prototype.release.call(this)};function lj(a){Le.call(this);var b=this;this.i=a;this.g=new Map;this.j=[{pb:null,ob:jj,hb:function(c,d){return mj(b,"enter",c,d)}},{pb:hj,ob:jj,hb:function(c,d){return mj(b,"enter",c,d)}},{pb:ij,ob:jj,hb:function(c,d){return mj(b,"enter",c,d)}},{pb:jj,ob:hj,hb:function(c,d){return mj(b,"exit",c,d)}},{pb:jj,ob:ij,hb:function(c,d){return mj(b,"exit",c,d)}},{pb:hj,ob:ij,hb:function(c,d){return mj(b,"skip",c,d)}},{pb:ij,ob:hj,hb:function(c,d){return mj(b,"skip",c,d)}}];this.h=new cf;this.h.v(this.i,"regionremove",
|
|
301
301
|
function(c){b.g["delete"](c.region)})}pa(lj,Le);lj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Le.prototype.release.call(this)};function mj(a,b,c,d){b=new P(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var hj=1,jj=2,ij=3;function nj(a,b,c,d,e){a=Ue(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function oj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.u=1;this.o=this.l=null;this.i=new Map;this.B=!1;this.C=null;this.s=!1;this.h=new af(function(){return pj(c)})}oj.prototype.destroy=function(){return this.h.destroy()};function pj(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,qj(e),b.push(rj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;z(f)})}
|
|
302
302
|
oj.prototype.configure=function(a){this.j=a;this.C=new Ae({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)};oj.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,sj(a),2);bf(a.h);a.B=!0;z(b)})};
|
|
303
303
|
function tj(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=oc,A(k,2),u(k,xi(a.g.P,c.Y),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=$c(b.mimeType,b.codecs);li(a.g.P,e);f=a.g.P.l;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=uj(b),a.i.set(c.Y,h),vj(a,h,0);z(k)}})}function wj(a){var b=a.i.get(nc);b&&(qj(b),rj(b)["catch"](function(){}),a.i["delete"](nc));a.o=null}
|
|
304
304
|
function xj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.mb&&(yj(a,e,!1,0,!1),c.mb=d)}else if(d=c.mb)c.mb=null,yj(a,d,!0,0,!1)}}function zj(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.B&&(b.video&&yj(a,b.video,c,d,e),b.audio&&yj(a,b.audio,c,d,e))}function Aj(a,b){a.o=b;a.B&&yj(a,b,!0,0,!1)}
|
|
305
|
-
function yj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=nc?f&&(f.mb&&(b.trickModeVideo?(f.mb=b,b=b.trickModeVideo):f.mb=null),f.stream!=b||e)&&(b.type==nc&&li(a.g.P,$c(b.mimeType,b.codecs)),f.stream=b,f.$=null,c&&(f.Qb?f.Oc=!0:f.
|
|
306
|
-
function Cj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.
|
|
307
|
-
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.
|
|
308
|
-
function sj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=oc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Za,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.
|
|
309
|
-
(m=uj(l),a.i.set(k,m),vj(a,m,0));z(n)})}function uj(a){return{stream:a,type:a.type,$:null,
|
|
310
|
-
function Ej(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:bf(a.h);if(b.
|
|
305
|
+
function yj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=nc?f&&(f.mb&&(b.trickModeVideo?(f.mb=b,b=b.trickModeVideo):f.mb=null),f.stream!=b||e)&&(b.type==nc&&li(a.g.P,$c(b.mimeType,b.codecs)),f.stream=b,f.$=null,c&&(f.Qb?f.Oc=!0:f.ra?(f.Ya=!0,f.sc=d,f.Oc=!0):(qj(f),Bj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Cj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):tj(a,b)}
|
|
306
|
+
function Cj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.ua)return e["return"]();c=b.stream;d=b.ua;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.ua!=d||b.stream!=c)return e["return"]();var f=a.g.Ac();var g=qi(a.g.P,b.type),h=b.stream.segmentIndex.find(b.ya?b.ya.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ba?k.ba-k.ia:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ba?k.ba-k.ia:null)||0),k=a.g.getBandwidthEstimate(),
|
|
307
|
+
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.ua.h.g>h?!0:!1):f=!1;f&&b.ua.abort();z(e)})}function Dj(a,b){b.Qb||b.Ya||(b.ra?(b.Ya=!0,b.sc=0):null==oi(a.g.P,b.type)?null==b.Ja&&vj(a,b,0):(qj(b),Bj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
|
|
308
|
+
function sj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=oc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Za,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ma,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Y,a.o),d.add(a.o));e=a.g.P;f=a.j.forceTransmuxTS;return u(n,e.init(c,f),2)}bf(a.h);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.P.Ha(p):a.g.P.Ha(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.i.has(k)||
|
|
309
|
+
(m=uj(l),a.i.set(k,m),vj(a,m,0));z(n)})}function uj(a){return{stream:a,type:a.type,$:null,ya:null,Dc:null,td:null,sd:null,rd:null,mb:null,endOfStream:!1,ra:!1,Ja:null,Ya:!1,sc:0,Oc:!1,Qb:!1,Gd:!1,Xb:!1,ua:null}}
|
|
310
|
+
function Ej(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:bf(a.h);if(b.ra||null==b.Ja||b.Qb)return h["return"]();b.Ja=null;if(!b.Ya){h.A(2);break}return u(h,Bj(a,b,b.Oc,b.sc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return b.ra||b.Ja||vj(a,b,0),h["return"]();case 4:A(h,6);d=Fj(a,b);null!=d&&(vj(a,b,d),b.Xb=!1);va(h,7);break;case 6:return e=F(h),u(h,Gj(a,e),8);case 8:return h["return"]();
|
|
311
311
|
case 7:f=Array.from(a.i.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.P.endOfStream(),10);case 10:bf(a.h),g=a.g.P.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ha(g),z(h)}})}
|
|
312
|
-
function Fj(a,b){if(Hj(b))return vi(a.g.P,b.stream.originalId||""),null;b.type==nc&&wi(a.g.P);var c=a.g.Ac(),d=b.
|
|
313
|
-
f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Hj(h)||h.$&&!h.$.current()||(f=Math.min(f,h.
|
|
314
|
-
function Ij(a,b,c,d){if(b.$)return b.$.current();if(b.
|
|
315
|
-
function Jj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y,x,w,D;return L(function(C){switch(C.g){case 1:return e=oc,f=b.stream,g=b.$,b.
|
|
316
|
-
I.size+I.start;E=!0}).parse(n,!1,!0);if(!E)return J.A(0);H=n.subarray(0,G);n=n.subarray(G);return u(J,Mj(a,b,c,f,d,H),0)})},u(C,Nj(a,b,d,v),9);l=Nj(a,b,d);return u(C,l,7);case 7:return m=C.h,bf(a.h),a.s?C["return"]():b.Ya?(b.
|
|
317
|
-
x[b.type];Za(JSON.stringify(w));b.Ya||a.g.Ed();vj(a,b,0);va(C,0);break;case 2:D=F(C);bf(a.h,D);if(a.s)return C["return"]();b.
|
|
312
|
+
function Fj(a,b){if(Hj(b))return vi(a.g.P,b.stream.originalId||""),null;b.type==nc&&wi(a.g.P);var c=a.g.Ac(),d=b.ya?b.ya.endTime:c,e=ri(a.g.P,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=qi(a.g.P,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(nc))&&Hj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=Ij(a,b,c,h);if(!e)return a.j.updateIntervalSeconds;
|
|
313
|
+
f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Hj(h)||h.$&&!h.$.current()||(f=Math.min(f,h.ya?h.ya.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;Jj(a,b,c,e)["catch"](function(){});return null}
|
|
314
|
+
function Ij(a,b,c,d){if(b.$)return b.$.current();if(b.ya||d)return b.$=b.stream.segmentIndex.cb(b.ya?b.ya.endTime:d),b.$&&b.$.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.$=b.stream.segmentIndex.cb(d),e=b.$&&b.$.next().value);e||(b.$=b.stream.segmentIndex.cb(c),e=b.$&&b.$.next().value);return e}
|
|
315
|
+
function Jj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y,x,w,D;return L(function(C){switch(C.g){case 1:return e=oc,f=b.stream,g=b.$,b.ra=!0,A(C,2),u(C,Kj(a,b,d),4);case 4:bf(a.h);if(a.s)return C["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h)return n=new Uint8Array(0),q=p=!1,v=function(B){var E,G,H;return L(function(J){if(p)return J["return"]();q=!0;bf(a.h);if(a.s)return J["return"]();n=Lj(n,B);E=!1;G=0;(new Fg).box("mdat",function(I){G=
|
|
316
|
+
I.size+I.start;E=!0}).parse(n,!1,!0);if(!E)return J.A(0);H=n.subarray(0,G);n=n.subarray(G);return u(J,Mj(a,b,c,f,d,H),0)})},u(C,Nj(a,b,d,v),9);l=Nj(a,b,d);return u(C,l,7);case 7:return m=C.h,bf(a.h),a.s?C["return"]():b.Ya?(b.ra=!1,vj(a,b,0),C["return"]()):u(C,Mj(a,b,c,f,d,m),6);case 9:y=C.h;if(q){C.A(6);break}p=!0;bf(a.h);return a.s?C["return"]():b.Ya?(b.ra=!1,vj(a,b,0),C["return"]()):u(C,Mj(a,b,c,f,d,y),6);case 6:bf(a.h);if(a.s)return C["return"]();b.ya=d;g.next();b.ra=!1;b.Gd=!1;x=a.g.P.xc();w=
|
|
317
|
+
x[b.type];Za(JSON.stringify(w));b.Ya||a.g.Ed();vj(a,b,0);va(C,0);break;case 2:D=F(C);bf(a.h,D);if(a.s)return C["return"]();b.ra=!1;if(7001==D.code)b.ra=!1,qj(b),vj(a,b,0),C.A(0);else if(b.type==e.Y&&a.j.ignoreTextStreamFailures)a.i["delete"](e.Y),C.A(0);else if(3017==D.code)Oj(a,b,D),C.A(0);else return b.Xb=!0,D.severity=2,u(C,Gj(a,D),0)}})}function Lj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
318
318
|
function Oj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Gd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.Xb=!0;a.s=!0;a.g.onError(c);return}b.Gd=!0}vj(a,b,4)}
|
|
319
319
|
function Kj(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.td||e!=b.sd||f!=b.rd)h=function(){var n;return L(function(p){if(1==p.g)return A(p,2),b.sd=e,b.rd=f,b.td=g,u(p,yi(a.g.P,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=F(p);b.sd=null;b.rd=null;b.td=null;throw n;})},d.push(h());!Di(c.h,b.Dc)&&(b.Dc=c.h)&&(k=Nj(a,b,c.h),l=function(){var n,p,q;return L(function(v){switch(v.g){case 1:return A(v,2),u(v,k,4);
|
|
320
320
|
case 4:return n=v.h,bf(a.h),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,si(a.g.P,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw q=F(v),b.Dc=null,q;}})},d.push(l()));return u(m,Promise.all(d),0)})}
|
|
321
321
|
function Mj(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&&(new Fg).O("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Zb();var n=k.reader.Zb();var p=k.reader.L();var q=k.reader.L();var v=k.reader.L();var y=k.reader.L();var x=e.startTime+q/p}else p=k.reader.L(),x=k.reader.Cb()/p+e.timestampOffset,q=x-e.startTime,v=k.reader.L(),y=k.reader.L(),m=k.reader.Zb(),n=k.reader.Zb();
|
|
322
322
|
k=k.reader.Wa(k.reader.N.byteLength-k.reader.W());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.g.yf():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:q,eventDuration:v,id:y,messageData:k}),l=new P(Pj,l),a.g.onEvent(l)))}).parse(f),u(h,Qj(a,b,c),2);if(3!=h.g)return bf(a.h),u(h,si(a.g.P,b.type,f,e.startTime,e.endTime,g),3);bf(a.h);z(h)})}
|
|
323
323
|
function Qj(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=oi(a.g.P,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.P.remove(b.type,e,e+g),2)}bf(a.h);z(h)})}function Hj(a){return a&&a.type==nc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
324
|
-
function Nj(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g)return e=$e,f=nj(c.ma(),c.ia,c.ba,a.j.retryParameters,d),g=a.g.jb.request(e,f),b.
|
|
325
|
-
function Bj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Ya=!1,b.Oc=!1,b.sc=0,b.Qb=!0,b.
|
|
326
|
-
function vj(a,b,c){var d=b.type;if(d!=nc||a.i.has(d))b.
|
|
327
|
-
function Wj(a,b){var c={zb:function(){},Fc:function(){},lb:function(){},onError:function(){},Hc:function(){},wg:function(){}};a.m.push({create:b,
|
|
328
|
-
function Tj(a){return L(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.gb)var c=!1;else{a.g&&(a.g.
|
|
329
|
-
function Xj(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.cf(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Pe(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.
|
|
324
|
+
function Nj(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g)return e=$e,f=nj(c.ma(),c.ia,c.ba,a.j.retryParameters,d),g=a.g.jb.request(e,f),b.ua=g,u(k,g.promise,2);h=k.h;b.ua=null;return k["return"](h.data)})}
|
|
325
|
+
function Bj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Ya=!1,b.Oc=!1,b.sc=0,b.Qb=!0,b.ya=null,b.Dc=null,b.$=null,d?(e=a.g.Ac(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,xi(a.g.P,b.type),4);if(3!=g.g)return bf(a.h),c?u(g,a.g.P.flush(b.type),3):g.A(3);bf(a.h);b.Qb=!1;b.endOfStream=!1;b.ra||b.Ja||vj(a,b,0);z(g)})}
|
|
326
|
+
function vj(a,b,c){var d=b.type;if(d!=nc||a.i.has(d))b.Ja=(new rc(function(){var e;return L(function(f){if(1==f.g)return A(f,2),u(f,Ej(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).R(c)}function qj(a){null!=a.Ja&&(a.Ja.stop(),a.Ja=null)}function rj(a){return L(function(b){return a.ua?u(b,a.ua.abort(),0):b.A(0)})}function Gj(a,b){return L(function(c){if(1==c.g)return u(c,Ce(a.C),2);bf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);z(c)})};function Rj(a,b){var c=Sj(),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 Tj(d)});this.s=new af(function(){return Uj(d)})}Rj.prototype.destroy=function(){return this.s.destroy()};function Uj(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),Vj(a),u(e,a.u,2);a.g&&a.g.Fa.lb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Fa.lb();a.g=null;a.m=[];a.j=null;z(e)})}
|
|
327
|
+
function Wj(a,b){var c={zb:function(){},Fc:function(){},lb:function(){},onError:function(){},Hc:function(){},wg:function(){}};a.m.push({create:b,Fa:c});a.h&&a.h.abort();Vj(a);return c}
|
|
328
|
+
function Tj(a){return L(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.gb)var c=!1;else{a.g&&(a.g.Fa.lb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Fa.zb(),a.g={node:d.node,payload:d.payload,gb:d.gb,Fa:c.Fa}):c.Fa.Hc();c=!0}c?c=Promise.resolve():a.g?c=Xj(a):(a.j.xf(a.i),a.o=new pc,c=a.o);b=u(b,c,1)}return b})}
|
|
329
|
+
function Xj(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.cf(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Pe(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.Fa.Fc(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Fa.lb();else a.g.Fa.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,z(d)}})}function Vj(a){a.o&&(a.o.resolve(),a.o=null)};function Yj(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=Yj.prototype;r.remove=function(a,b){if(!this.g)return!1;Zj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
330
330
|
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",
|
|
331
331
|
"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={qb:f.qb},g=d.next())f.qb=g.value,a.some(function(h){return function(k){return k.startTime==h.qb.startTime&&k.endTime==h.qb.endTime&&k.text==h.qb.payload?!0:!1}}(f))||(g=ak(f.qb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
|
|
332
332
|
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&&(Zj(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"};
|
|
333
333
|
function ak(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}
|
|
334
|
-
function Zj(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",Yj);Yj.prototype.setTextVisibility=Yj.prototype.setTextVisibility;Yj.prototype.isTextVisible=Yj.prototype.isTextVisible;Yj.prototype.destroy=Yj.prototype.destroy;Yj.prototype.append=Yj.prototype.append;Yj.prototype.remove=Yj.prototype.remove;function bk(){}function ck(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",bk);bk.removeAllChildren=ck;function dk(a,b){var c=this;this.j=!1;this.i=[];this.B=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(){ek(c)})).
|
|
334
|
+
function Zj(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",Yj);Yj.prototype.setTextVisibility=Yj.prototype.setTextVisibility;Yj.prototype.isTextVisible=Yj.prototype.isTextVisible;Yj.prototype.destroy=Yj.prototype.destroy;Yj.prototype.append=Yj.prototype.append;Yj.prototype.remove=Yj.prototype.remove;function bk(){}function ck(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",bk);bk.removeAllChildren=ck;function dk(a,b){var c=this;this.j=!1;this.i=[];this.B=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(){ek(c)})).za(.25);this.h=new Map;this.s=new cf;this.s.v(document,"fullscreenchange",function(){ek(c,!0)});this.l=null;"ResizeObserver"in
|
|
335
335
|
window&&(this.l=new ResizeObserver(function(){ek(c,!0)}),this.l.observe(this.g));this.o=new Map}r=dk.prototype;r.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={fc:c.fc},d=a.next())c.fc=d.value,b.some(function(e){return function(f){return tb(f,e.fc)}}(c))||this.i.push(c.fc);ek(this)};
|
|
336
336
|
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});ek(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
|
|
337
337
|
function fk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
@@ -359,17 +359,17 @@ minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLa
|
|
|
359
359
|
e.trackSelectionCallback=function(g){return L(function(h){return h["return"](sk(g,f.preferredAudioLanguage))})};return f}function tk(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 nk(a,b,c||rk(),d,"")}
|
|
360
360
|
function sk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=vd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return pd(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/
|
|
361
361
|
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!=nc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",qk);qk.mergeConfigObjects=tk;function uk(){this.g=null;this.h=[]}function vk(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 wk(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}
|
|
362
|
-
function xk(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 yk(){this.i=this.h=null;this.g=[]}function zk(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 Ak(){this.u=this.B=this.F=this.C=this.s=this.j=this.D=this.m=this.i=this.G=this.J=this.M=this.l=this.o=NaN;this.g=new uk;this.h=new yk};function V(a,b){Le.call(this);var c=this;this.l=Bk;this.nc=this.g=null;this.ja=!1;this.uc=new cf;this.Mb=new cf;this.o=new cf;this.hd=this.u=this.Lb=this.i=this.vc=this.G=this.j=this.wc=this.J=this.pc=this.F=this.
|
|
363
|
-
this.Ob=this.h.preferForcedSubs;this.Nb=[];b&&b(this);this.D=Dk(this);this.D.Md(this.h.streaming.forceHTTPS);this.C=null;Ek&&(this.C=Rb(Ek));this.uc.v(window,"online",function(){c.Hd()});this.T={name:"detach"};this.V={name:"attach"};this.ea={name:"unload"};this.vd={name:"manifest-parser"};this.od={name:"manifest"};this.
|
|
364
|
-
f){return He(Fk(c,e,f))});d.set(this.T,function(e){e.H&&(c.Mb.
|
|
365
|
-
d.set(this.rb,function(e,f){return Nk(c,e,f)});this.ka=new Rj(this.T,{cf:function(e,f,g,h){var k=null;e==c.T&&(k=g==c.T?c.T:c.V);e==c.V&&(k=g==c.T||f.H!=h.H?c.T:g==c.V?c.V:g==c.
|
|
362
|
+
function xk(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 yk(){this.i=this.h=null;this.g=[]}function zk(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 Ak(){this.u=this.B=this.F=this.C=this.s=this.j=this.D=this.m=this.i=this.G=this.J=this.M=this.l=this.o=NaN;this.g=new uk;this.h=new yk};function V(a,b){Le.call(this);var c=this;this.l=Bk;this.nc=this.g=null;this.ja=!1;this.uc=new cf;this.Mb=new cf;this.o=new cf;this.hd=this.u=this.Lb=this.i=this.vc=this.G=this.j=this.wc=this.J=this.pc=this.F=this.La=this.B=this.M=this.m=this.D=null;this.qd=1E9;this.h=Ck(this);this.pd={width:Infinity,height:Infinity};this.s=null;this.Ca=new se(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Da=this.h.preferredTextLanguage;this.Fb=this.h.preferredTextRole;
|
|
363
|
+
this.Ob=this.h.preferForcedSubs;this.Nb=[];b&&b(this);this.D=Dk(this);this.D.Md(this.h.streaming.forceHTTPS);this.C=null;Ek&&(this.C=Rb(Ek));this.uc.v(window,"online",function(){c.Hd()});this.T={name:"detach"};this.V={name:"attach"};this.ea={name:"unload"};this.vd={name:"manifest-parser"};this.od={name:"manifest"};this.Ka={name:"media-source"};this.kd={name:"drm-engine"};this.aa={name:"load"};this.yd={name:"src-equals-drm-engine"};this.rb={name:"src-equals"};var d=new Map;d.set(this.V,function(e,
|
|
364
|
+
f){return He(Fk(c,e,f))});d.set(this.T,function(e){e.H&&(c.Mb.Ra(),e.H=null);c.C&&c.C.release();c.g=null;e=Promise.resolve();return He(e)});d.set(this.ea,function(e){return He(Gk(c,e))});d.set(this.Ka,function(e){e=Hk(c,e);return He(e)});d.set(this.vd,function(e,f){var g=Ik(c,e,f);return He(g)});d.set(this.od,function(e){return Jk(c,e)});d.set(this.kd,function(e){e=Kk(c,e);return He(e)});d.set(this.aa,function(e,f){return He(Lk(c,e,f))});d.set(this.yd,function(e,f){var g=Mk(c,e,f);return He(g)});
|
|
365
|
+
d.set(this.rb,function(e,f){return Nk(c,e,f)});this.ka=new Rj(this.T,{cf:function(e,f,g,h){var k=null;e==c.T&&(k=g==c.T?c.T:c.V);e==c.V&&(k=g==c.T||f.H!=h.H?c.T:g==c.V?c.V:g==c.Ka||g==c.aa?c.Ka:g==c.rb?c.yd:null);e==c.Ka&&(k=g==c.aa&&f.H==h.H?c.vd:c.ea);e==c.vd&&(k=Ok(c.aa,c.od,c.ea,g,f,h));e==c.od&&(k=Ok(c.aa,c.kd,c.ea,g,f,h));e==c.kd&&(k=Ok(c.aa,c.aa,c.ea,g,f,h));e==c.yd&&(k=g==c.rb&&f.H==h.H?c.rb:c.ea);if(e==c.aa||e==c.rb)k=c.ea;e==c.ea&&(k=h.H&&f.H==h.H?c.V:c.T);return k},Pe:function(e,f,g){c.dispatchEvent(Pk(Qk,
|
|
366
366
|
(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,Gk(c,e),2):f["return"](e.H?c.V:c.T)})},xf:function(e){c.dispatchEvent(Pk(Rk,(new Map).set("state",e.name)))}});a&&this.Pb(a,!0)}pa(V,Le);function Pk(a,b){return new P(a,b)}r=V.prototype;
|
|
367
367
|
r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Sk)return c["return"]();a.l=Sk;b=Wj(a.ka,function(){return{node:a.T,payload:Sj(),gb:!1}});return u(c,new Promise(function(d){b.zb=function(){};b.Fc=function(){d()};b.lb=function(){d()};b.onError=function(){d()};b.Hc=function(){d()}}),2);case 2:return u(c,a.ka.destroy(),3);case 3:a.uc&&(a.uc.release(),a.uc=null);a.Mb&&(a.Mb.release(),a.Mb=null);a.o&&(a.o.release(),a.o=null);a.hd=null;a.u=null;a.h=null;a.s=null;a.nc=null;
|
|
368
|
-
if(!a.D){c.A(4);break}return u(c,a.D.destroy(),5);case 5:a.D=null;case 4:Le.prototype.release.call(a),z(c)}})};r.Pb=function(a,b){b=void 0===b?!0:b;if(this.l==Sk)return Promise.reject(Tk());var c=Sj();c.H=a;sc()||(b=!1);var d=b?this.
|
|
369
|
-
r.Sd=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Sk)return Promise.reject(Tk());sc()||(a=!1);var c=Sj(),d=Wj(this.ka,function(e){var f=e.H&&a?b.
|
|
368
|
+
if(!a.D){c.A(4);break}return u(c,a.D.destroy(),5);case 5:a.D=null;case 4:Le.prototype.release.call(a),z(c)}})};r.Pb=function(a,b){b=void 0===b?!0:b;if(this.l==Sk)return Promise.reject(Tk());var c=Sj();c.H=a;sc()||(b=!1);var d=b?this.Ka:this.V,e=Wj(this.ka,function(){return{node:d,payload:c,gb:!1}});e.zb=function(){};return Uk(e)};r.detach=function(){var a=this;if(this.l==Sk)return Promise.reject(Tk());var b=Wj(this.ka,function(){return{node:a.T,payload:Sj(),gb:!1}});b.zb=function(){};return Uk(b)};
|
|
369
|
+
r.Sd=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Sk)return Promise.reject(Tk());sc()||(a=!1);var c=Sj(),d=Wj(this.ka,function(e){var f=e.H&&a?b.Ka:e.H?b.V:b.T;c.H=e.H;return{node:f,payload:c,gb:!1}});d.zb=function(){};return Uk(d)};
|
|
370
370
|
r.load=function(a,b,c){var d=this;if(this.l==Sk)return Promise.reject(Tk());this.dispatchEvent(Pk(Vk));var e=Sj();e.uri=a;e.Qd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Wk(this,e)?this.rb:this.aa,g=Wj(this.ka,function(h){if(null==h.H)return null;e.H=h.H;return{node:f,payload:e,gb:!0}});this.s=new Ak;g.zb=function(){};return new Promise(function(h,k){g.Hc=function(){return k(new N(2,7,7002))};g.Fc=function(){h();d.dispatchEvent(Pk(Xk))};g.lb=function(){return k(Tk())};g.onError=
|
|
371
371
|
function(l){return k(l)}})};function Wk(a,b){if(!sc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=zg(d),c=Yk[c]);if(c){if(""==(b.H||uc()).canPlayType(c))return!1;if(!sc()||!(c in yg||zg(d)in Ag)||a.h.streaming.preferNativeHls)return!0;if(Ac())return a.h.streaming.useNativeHlsOnSafari}return!1}function Fk(a,b,c){null==b.H&&(b.H=c.H,a.Mb.v(b.H,"error",function(){var d=Zk(a);d&&$k(a,d)}));a.g=b.H;return Promise.resolve()}
|
|
372
|
-
function Gk(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=Sk&&(a.l=Bk),c=a.Nb.map(function(p){return p()}),a.Nb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Pk(al));b.mimeType=null;b.startTime=null;b.uri=null;b.H&&a.o.
|
|
372
|
+
function Gk(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=Sk&&(a.l=Bk),c=a.Nb.map(function(p){return p()}),a.Nb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Pk(al));b.mimeType=null;b.startTime=null;b.uri=null;b.H&&a.o.Ra();a.La&&(a.La.release(),a.La=null);a.pc&&(a.pc.stop(),a.pc=null);if(!a.G){n.A(3);break}return u(n,a.G.stop(),4);case 4:a.G=null,a.vc=null;case 3:if(!a.u){n.A(5);break}return u(n,a.u.stop(),5);case 5:if(!a.j){n.A(7);break}return u(n,a.j.destroy(),
|
|
373
373
|
8);case 8:a.j=null;case 7:a.F&&(a.F.release(),a.F=null);a.B&&(a.B.release(),a.B=null);if(!a.M){n.A(9);break}return u(n,a.M.destroy(),10);case 10:a.M=null;case 9:if(a.C)a.C.onAssetUnload();if(!b.H||!b.H.src){n.A(11);break}return u(n,new Promise(function(p){return(new O(p)).R(.1)}),12);case 12:for(b.H.removeAttribute("src"),b.H.load();b.H.lastChild;)b.H.removeChild(b.H.firstChild);case 11:if(!a.m){n.A(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Lb=null;a.J=null;if(a.i){d=t(a.i.variants);
|
|
374
374
|
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 Ak;a.ld=null;bl(a);z(n)}})}
|
|
375
375
|
function Hk(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new ai,d=a.h.textDisplayFactory,e=Rb(d),a.ld=d,f=cl(b.H,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())dl(a,n,p,"ID3",v.value);if(a.C)a.C.onHlsTimedMetadata(m,n)}}),u(g,f.C,2);a.M=f;z(g)})}
|
|
@@ -379,12 +379,12 @@ l;break a}k=null}null==k&&(h.g.add(g),g=new P("regionadd",new Map([["region",g]]
|
|
|
379
379
|
a.G.start(c,e),2);g.i=m.h;h=Pk(il);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);jl(a.i);k=Date.now()/1E3;l=k-f;a.s.D=l;z(m)})}(),function(){return a.G.stop()})}
|
|
380
380
|
function Kk(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=kl(a,{jb:a.D,onError:function(f){$k(a,f)},Gc:function(f){ll(a,f)},onExpirationUpdated:function(f,g){ml(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==nl&&d&&(d=!1,a.s.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Tf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Pb(b.H),3):u(e,gl(a,a.i),0)})}
|
|
381
381
|
function Lk(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;d=b.H;e=b.uri;a.Lb=e;a.F=new dj({Bc:function(){return d.playbackRate},yc:function(){return d.defaultPlaybackRate},Od:function(x){d.playbackRate=x},ie:function(x){d.currentTime+=x}});f=function(){return ol(a)};g=function(){return pl(a)};a.o.v(d,"playing",f);a.o.v(d,"pause",f);a.o.v(d,"ended",f);a.o.v(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.hd==h||(a.hd=h,a.u=Rb(h),"function"!=typeof a.u.playbackRateChanged&&
|
|
382
|
-
(Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.h.abr));a.
|
|
382
|
+
(Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.h.abr));a.Ca=new se(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Da=a.h.preferredTextLanguage;a.Fb=a.h.preferredTextRole;a.Ob=a.h.preferForcedSubs;ql(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(x,w,D){a.j&&x!=a.j.l&&rl(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.B=sl(a,b.startTime);a.La=tl(a);
|
|
383
383
|
k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);ul(a,k);yd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=vl(a);a.j.configure(a.h.streaming);a.l=wl;d.textTracks&&a.o.v(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":xl(a,x)}});a.dispatchEvent(Pk(yl));l=null;if(m=a.Cc().find(function(x){return x.active})){y.A(2);break}l=zl(a)?a.u.chooseVariant():null;rl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.A(3);
|
|
384
|
-
break}n=a.B.mc();return u(y,Al(l,n),4);case 4:p=y.h,a.B.ed(p);case 3:Bl(a,null,Xd(l));case 2:return a.B.dd(),q=a.fb().find(function(x){return x.active}),q||((v=
|
|
384
|
+
break}n=a.B.mc();return u(y,Al(l,n),4);case 4:p=y.h,a.B.ed(p);case 3:Bl(a,null,Xd(l));case 2:return a.B.dd(),q=a.fb().find(function(x){return x.active}),q||((v=ge(a.i.textStreams,a.Da,a.Fb,a.Ob)[0]||null)&&zk(a.s.h,v,!0),l&&(v?(l.audio&&Cl(a,l.audio,v)&&(a.ja=!0),a.ja&&a.M.l.setTextVisibility(!0),Dl(a)):a.ja=!1),v&&(a.h.streaming.alwaysStreamText||a.nd())&&Aj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),El(a)),Od(a.j?a.j.l:null,a.i),Fl(a.i),Gl(a),zl(a),a.i.variants.some(function(x){return x.primary}),
|
|
385
385
|
a.o.oa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Qd}),z(y)}})}
|
|
386
386
|
function Mk(a,b,c){var d,e,f,g,h,k,l;return L(function(m){return 1==m.g?(d=oc,e=Date.now()/1E3,f=!0,a.m=kl(a,{jb:a.D,onError:function(n){$k(a,n)},Gc:function(n){ll(a,n)},onExpirationUpdated:function(n,p){ml(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==nl&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=zg(g),k=Yk[h],"application/x-mpegurl"==k&&Ac()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
|
|
387
|
-
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?dd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.
|
|
387
|
+
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?dd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ma,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.V=!0,u(m,Tf(a.m,[l],[]),2)):u(m,a.m.Pb(b.H),
|
|
388
388
|
0)})}
|
|
389
389
|
function Nk(a,b,c){function d(){return ol(a)}b.uri=c.uri;b.startTime=c.startTime;a.Lb=b.uri;var e=b.H;a.B=new Ui(e);var f=!1;a.Nb.push(function(){f=!0});null!=b.startTime&&a.B.ed(b.startTime);a.F=new dj({Bc:function(){return e.playbackRate},yc:function(){return e.defaultPlaybackRate},Od:function(h){e.playbackRate=h},ie:function(h){e.currentTime+=h}});ul(a,a.h.streaming.rebufferingGoal);a.o.v(e,"playing",d);a.o.v(e,"pause",d);a.o.v(e,"ended",d);a.o.v(e,"ratechange",function(){return pl(a)});"none"!=e.preload&&
|
|
390
390
|
a.o.oa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Qd});e.audioTracks&&(a.o.v(e.audioTracks,"addtrack",function(){return Gl(a)}),a.o.v(e.audioTracks,"removetrack",function(){return Gl(a)}),a.o.v(e.audioTracks,"change",function(){return Gl(a)}));e.textTracks&&(a.o.v(e.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":Hl(a,h);break;case "chapters":xl(a,h);break;default:Gl(a)}}),a.o.v(e.textTracks,"removetrack",function(){return Gl(a)}),a.o.v(e.textTracks,
|
|
@@ -394,8 +394,8 @@ function Jl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Jd(b);var c=a.h.pref
|
|
|
394
394
|
function Hl(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.v(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,dl(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Ml(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Eb().R(.5);a.Nb.push(function(){c.stop()})}}
|
|
395
395
|
function dl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Pk(Nl,b))}function xl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Eb().R(.5);a.Nb.push(function(){c.stop()})}}function jl(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 kl(a,b){return new Mf(b,a.h.drm.updateExpirationTime)}
|
|
396
396
|
function Dk(a){return new Qe(function(b,c){a.u&&a.u.segmentDownloaded(b,c)})}
|
|
397
|
-
function sl(a,b){return new Vi(a.g,a.i,a.h.streaming,b,function(){a.
|
|
398
|
-
Ol(a)},function(c){return a.dispatchEvent(c)})}function tl(a){var b=new lj(a.wc);b.addEventListener("enter",function(d){el(a,Pl,d.region)});b.addEventListener("exit",function(d){el(a,Ql,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(el(a,Pl,e),el(a,Ql,e))});var c=new fj(a.g);c.g.add(b);return c}function ul(a,b){a.J=new we;a.J.g=ye;ze(a.J,b,Math.min(.5,b/2));bl(a);a.pc=(new O(function(){Ol(a)})).
|
|
397
|
+
function sl(a,b){return new Vi(a.g,a.i,a.h.streaming,b,function(){a.La&&gj(a.La,!0);if(a.j){var c=a.j;if(c.g)for(var d=c.g.Ac(),e=c.j.smallGapLimit,f=t(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.$=null;var k=c.g.P;g==nc?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=pi(k,g),k=di(k,d,e));if(!k&&((null!=qi(c.g.P,g)||h.ra)&&Dj(c,h),h.ua&&(h.ua.abort(),h.ua=null),g===nc))for(g=c.g.P.u.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Ph(g),g=t(g.j.values()),h=g.next();!h.done;h=
|
|
398
|
+
g.next())Kh(h.value)}}a.J&&Ol(a)},function(c){return a.dispatchEvent(c)})}function tl(a){var b=new lj(a.wc);b.addEventListener("enter",function(d){el(a,Pl,d.region)});b.addEventListener("exit",function(d){el(a,Ql,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(el(a,Pl,e),el(a,Ql,e))});var c=new fj(a.g);c.g.add(b);return c}function ul(a,b){a.J=new we;a.J.g=ye;ze(a.J,b,Math.min(.5,b/2));bl(a);a.pc=(new O(function(){Ol(a)})).za(.25)}
|
|
399
399
|
function Ol(a){switch(a.l){case Il:if(a.g.ended)var b=!0;else{var c=ci(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case wl:a:if(a.g.ended||ni(a.M))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.eb();var d=ci(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ei(a.g.buffered,a.g.currentTime);c=a.J;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?xe:ye;c.g=d;b!=d&&bl(a)}function cl(a,b,c,d){return new hi(a,b,c,d)}
|
|
400
400
|
function vl(a){return new oj(a.i,{Ac:function(){return a.B.mc()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},P:a.M,jb:a.D,onError:function(b){return $k(a,b)},onEvent:function(b){return a.dispatchEvent(b)},yf:function(){a.G&&a.G.update&&a.G.update()},Ed:function(){a.B&&a.B.je();Ol(a)}})}
|
|
401
401
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ok(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=
|
|
@@ -404,22 +404,22 @@ function Rl(a){if(a.G){var b=Me(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.di
|
|
|
404
404
|
yj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),El(a));a.J&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),ze(a.J,b,Math.min(.5,b/2)));a.i&&ql(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Ck(this);tk(a,this.h,Ck(this));return a};
|
|
405
405
|
r.Se=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.ac().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.If=function(){for(var a in this.h)delete this.h[a];tk(this.h,Ck(this),Ck(this));Rl(this)};r.Ye=function(){return this.l};r.bf=function(){return this.g};r.Ub=function(){return this.D};r.jd=function(){return this.Lb};
|
|
406
406
|
r.ae=function(){return this.C?this.C:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};r.ib=function(){return this.i?this.i.presentationTimeline.ib():!1};r.sf=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};
|
|
407
|
-
r.ac=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.vb(),end:a.
|
|
407
|
+
r.ac=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.vb(),end:a.Oa()}}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.qf=function(){this.U()&&(this.g.currentTime=this.ac().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.Tb=function(){return this.m?this.m.Tb():Infinity};r.zc=function(){return this.m?this.m.zc():{}};
|
|
408
408
|
r.md=function(){return this.J?this.J.g==ye:!1};r.df=function(){return this.g?this.F?this.F.i:1:0};r.Rf=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.F.set(a),this.l==wl&&(this.u.playbackRateChanged(a),xj(this.j,1<Math.abs(a))))};r.Ie=function(){var a=this.F.yc();this.l==Il&&this.F.set(a);this.l==wl&&(this.F.set(a),this.u.playbackRateChanged(a),xj(this.j,!1))};
|
|
409
409
|
r.Cc=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,ee(e)){var f=Xd(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 de(g)}):[]};
|
|
410
410
|
r.fb=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=Yd(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Kl(this).map(function(f){return be(f)}):[]};r.We=function(){return this.i?this.i.imageStreams.map(function(a){return Zd(a)}):[]};
|
|
411
411
|
r.lf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B;return L(function(E){if(1==E.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?E.A(3):u(E,d.createSegmentIndex(),3):E["return"](null):E.A(2);if(2!=E.g){e=d.segmentIndex.find(b);if(null==e)return E["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return E["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;
|
|
412
412
|
v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;C=D=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,D=B%m*p,C=Math.floor(B/m)*q);return E["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:C,startTime:w,duration:x,uris:f.ma(),width:p})}return E["return"](null)})};
|
|
413
|
-
r.qe=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&&(zk(this.s.h,b,!1),Aj(this.j,b),Ul(this),this.
|
|
414
|
-
r.re=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&&ee(d)&&(rl(this,d,!1,b,c),this.
|
|
413
|
+
r.qe=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&&(zk(this.s.h,b,!1),Aj(this.j,b),Ul(this),this.Da=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Kl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,$d(c)==a.id?c.mode=this.ja?"showing":"hidden":c.mode="disabled";Ul(this)}};
|
|
414
|
+
r.re=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&&ee(d)&&(rl(this,d,!1,b,c),this.Ca=new re(d),zl(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,
|
|
415
415
|
$d(c)==a.id){Vl(this,c);break}};r.Re=function(){return Wl(this.Cc())};r.kf=function(){return Wl(this.fb())};r.Qe=function(){return Array.from(Xl(this.Cc()))};r.jf=function(){return Array.from(Xl(this.fb()))};
|
|
416
|
-
r.Jd=function(a,b){if(this.i&&this.B){this.
|
|
416
|
+
r.Jd=function(a,b){if(this.i&&this.B){this.Ca=new se(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Ca.create(this.i.variants),f=null;e=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=Xd(f),this.re(c,!0)):Tl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=pd(a);f=d=null;e=
|
|
417
417
|
t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=de(g);pd(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Vl(this,f):d&&Vl(this,d)}};
|
|
418
|
-
r.Kd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.
|
|
419
|
-
r.Jf=function(a){if(this.i&&this.B){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.
|
|
420
|
-
r.Te=function(a){var b=pd(a),c=Yl(this).filter(function(
|
|
421
|
-
function Ml(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Yl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
422
|
-
r.Pf=function(a){a=!!a;if(this.ja!=a){this.ja=a;if(this.l==wl)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=
|
|
418
|
+
r.Kd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.Da=a,this.Fb=b||"",this.Ob=c,(a=ge(this.i.textStreams,this.Da,this.Fb,this.Ob)[0]||null)&&a!=this.j.o&&(zk(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.nd()))Aj(this.j,a),Ul(this)}else{var d=pd(a);(a=this.fb().find(function(e){return pd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.qe(a)}};
|
|
419
|
+
r.Jf=function(a){if(this.i&&this.B){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.Ca=new se(b.language,"",0,a),Tl(this))}};r.nd=function(){var a=this.ja;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Kl(this).some(function(b){return"showing"==b.mode}):a};r.be=function(){return this.g&&this.g.src&&this.g.textTracks?Yl(this).map(function(a){return be(a)}):[]};
|
|
420
|
+
r.Te=function(a){var b=pd(a),c=Yl(this).filter(function(h){return pd(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};
|
|
421
|
+
function Kl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Ml(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Yl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
422
|
+
r.Pf=function(a){a=!!a;if(this.ja!=a){this.ja=a;if(this.l==wl)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ge(this.i.textStreams,this.Da,this.Fb,this.Ob),0<a.length&&(Aj(this.j,a[0]),Ul(this))):wj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Kl(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")}Dl(this)}};
|
|
423
423
|
r.ff=function(){if(!this.U())return null;var a=this.ka.l,b=0;if(this.B)b=this.B.mc();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};
|
|
424
424
|
r.ce=function(){if(!this.U())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.xc=function(){if(this.l==wl)return this.M.xc();var a={total:[],audio:[],video:[],text:[]};this.l==Il&&(a.total=fi(this.g.buffered));return a};
|
|
425
425
|
r.getStats=function(){if(this.l!=wl&&this.l!=Il)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:[]};ol(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)?
|
|
@@ -436,7 +436,7 @@ r.De=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:
|
|
|
436
436
|
case 5:throw new N(1,2,2012);}})};function $l(a,b){var c,d;return L(function(e){switch(e.g){case 1:c=zg(b);if(d=Zl[c])return e["return"](d);A(e,2);return u(e,Bg(b,a.D,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
|
|
437
437
|
function am(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,bm(b,a.D,a.h.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=cm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ki(l),e="text/vtt");m=document.createElement("track");m.src=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)})}
|
|
438
438
|
function bm(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=$e,e=Ue([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function cm(a,b,c,d){var e=gd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Fb(b),b=c.parseMedia(b,a),lk(b,d);throw new N(2,2,2014,c);}r.Nd=function(a,b){this.pd.width=a;this.pd.height=b};
|
|
439
|
-
r.Hd=function(a){if(this.l==wl){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value
|
|
439
|
+
r.Hd=function(a){if(this.l==wl){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Xb||d.ra||d.Ja||(d.Xb=!1,vj(b,d,a));b=!0}}else b=!1;return b};r.Ze=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.$e=function(){return this.vc};
|
|
440
440
|
function Ck(a){var b=rk();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Hd(d))}};b.textDisplayFactory=function(){return a.nc?new dk(a.g,a.nc):new Yj(a.g)};return b}r.ve=function(a){this.nc=a};
|
|
441
441
|
function hl(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 cj;h={id:a.qd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
442
442
|
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:nc,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 gl(a,b){return L(function(c){if(1==c.g)return u(c,dm(a,b),2);Sl(a,b);z(c)})}
|
|
@@ -445,7 +445,7 @@ function Sl(a,b){if(a.l!=Sk){for(var c=a.h.restrictions,d=a.pd,e=!1,f=t(b.varian
|
|
|
445
445
|
f.next())g=g.value,bg(a.m,g.initDataType,g.initData);em(a,b)}}
|
|
446
446
|
function Al(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.cb(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)})}
|
|
447
447
|
function bl(a){var b=a.md();if(a.s&&a.J&&a.B){var c=a.F;c.j=b;ej(c);ol(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Pk(fm,b))}function pl(a){var b=a.g.playbackRate;0!=b&&(a.F&&a.F.set(b),b=Pk(gm),a.dispatchEvent(b))}function ol(a){if(a.s&&a.J){var b=a.s.g;a.J.g==ye?vk(b,"buffering"):a.g.paused?vk(b,"paused"):a.g.ended?vk(b,"ended"):vk(b,"playing")}}
|
|
448
|
-
function zl(a){try{em(a,a.i)}catch(c){return $k(a,c),!1}var b=a.i.variants.filter(function(c){return ee(c)});b=a.
|
|
448
|
+
function zl(a){try{em(a,a.i)}catch(c){return $k(a,c),!1}var b=a.i.variants.filter(function(c){return ee(c)});b=a.Ca.create(b);a.u.setVariants(Array.from(b.values()));return!0}function Tl(a){var b;(b=zl(a)?a.u.chooseVariant():null)&&rl(a,b,!0,!0,0)}
|
|
449
449
|
function rl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&zj(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}));zj(a.j,b,d,e);d=null;f&&(d=Xd(f));b=Xd(b);c?Bl(a,d,b):hm(a,d,b)}}function Vl(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=de(c);var d=de(b);hm(a,c,d)}
|
|
450
450
|
function Cl(a,b,c){a=pd(a.h.preferredTextLanguage);b=pd(b.language);c=pd(c.language);return od(c,a)&&!od(b,c)}function Bl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Pk(im,b);jm(a,b)}function Gl(a){var b=Pk(km);jm(a,b)}function hm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Pk(lm,b);jm(a,b)}function Ul(a){var b=Pk(mm);jm(a,b)}function Dl(a){var b=Pk(nm);jm(a,b)}function El(a){var b=(new Map).set("newStatus",a.h.abr.enabled);jm(a,Pk(om,b))}
|
|
451
451
|
function $k(a,b){if(a.l!=Sk){var c=Pk(pm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function el(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(Pk(b,c))}
|
|
@@ -467,13 +467,13 @@ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=sc()?fd(l)?!0:MediaSource.isTyp
|
|
|
467
467
|
V.isBrowserSupported=function(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||wc("Trident/"))return!1;var a=Ec();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:sc()?!0:tc("application/x-mpegurl")};V.setAdManagerFactory=function(a){Ek=a};
|
|
468
468
|
V.registerSupportPlugin=function(a,b){sm[a]=b};V.prototype.destroy=V.prototype.destroy;
|
|
469
469
|
var om="abrstatuschanged",im="adaptation",fm="buffering",nl="drmsessionupdate",Pj="emsg",pm="error",rm="expirationupdated",Xk="loaded",Vk="loading",il="manifestparsed",Nl="metadata",Qk="onstatechange",Rk="onstateidle",gm="ratechange",yl="streaming",mm="textchanged",nm="texttrackvisibility",fl="timelineregionadded",Pl="timelineregionenter",Ql="timelineregionexit",km="trackschanged",al="unloading",lm="variantchanged",tm={Xf:om,Yf:im,Zf:fm,$f:nl,bg:Pj,Error:pm,cg:rm,dg:"largegap",eg:Xk,fg:Vk,gg:il,Metadata:Nl,
|
|
470
|
-
hg:Qk,ig:Rk,jg:gm,kg:"sessiondata",lg:yl,mg:mm,ng:nm,og:fl,pg:Pl,qg:Ql,rg:km,sg:al,tg:lm},Sk=0,Bk=1,wl=2,Il=3;V.LoadMode={DESTROYED:Sk,NOT_LOADED:Bk,MEDIA_SOURCE:wl,SRC_EQUALS:Il};V.version="v3.2.
|
|
470
|
+
hg:Qk,ig:Rk,jg:gm,kg:"sessiondata",lg:yl,mg:mm,ng:nm,og:fl,pg:Pl,qg:Ql,rg:km,sg:al,tg:lm},Sk=0,Bk=1,wl=2,Il=3;V.LoadMode={DESTROYED:Sk,NOT_LOADED:Bk,MEDIA_SOURCE:wl,SRC_EQUALS:Il};V.version="v3.2.17";var um=["3","2"];Lb=new function(a){this.g=a;this.i=Mb;this.h=Nb}(new Jb(Number(um[0]),Number(um[1])));
|
|
471
471
|
var qm=["output-restricted","internal-error"],sm={},Ek=null,Yk={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"},Zl={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
472
472
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function vm(){this.h=[];this.j=this.i=this.g=0};function W(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new cf;this.j.v(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.v(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}r=W.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};
|
|
473
473
|
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()};
|
|
474
474
|
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};M("shaka.ads.ClientSideAd",W);
|
|
475
475
|
W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;
|
|
476
|
-
W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function wm(a,b,c,d){var e=this;this.m=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.o=null;this.h=new cf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.
|
|
476
|
+
W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function wm(a,b,c,d){var e=this;this.m=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.o=null;this.h=new cf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.17");this.g=null;this.h.oa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){xm(e,f)});this.h.v(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
477
477
|
function(f){ym(e,f)});this.i.onended=function(){e.l.contentComplete()}}wm.prototype.stop=function(){this.g&&this.g.stop();this.m&&ck(this.m)};wm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function ym(a,b){b.getError();zm(a,null);a.j(new P("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
478
478
|
function xm(a,b){a.j(new P("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.j(new P("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.j(new P("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Am(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
479
479
|
a.h.v(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){zm(a,null)}}
|
|
@@ -494,8 +494,8 @@ f;e.i(new P("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Cm.prototyp
|
|
|
494
494
|
function Dm(a,b){a.i(new P("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.D||a.h.v(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 Y(){Le.call(this);this.g=this.i=null;this.h=new vm;this.j=navigator.language}pa(Y,Le);r=Y.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 wm(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)})};
|
|
495
495
|
r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Le.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new P("ad-stopped"));this.h=new vm};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.l.requestAds(a)};
|
|
496
496
|
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 Cm(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)})};
|
|
497
|
-
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.2.
|
|
498
|
-
(c.D=!0),c.j=new pc,c.g.requestStream(a),c.B=d||"",c.F=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.2.
|
|
497
|
+
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.2.17";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
498
|
+
(c.D=!0),c.j=new pc,c.g.requestStream(a),c.B=d||"",c.F=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.2.17";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.C};
|
|
499
499
|
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",Y);
|
|
500
500
|
Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;
|
|
501
501
|
Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
|
|
@@ -507,7 +507,7 @@ function Gm(a){return{length:a.length,start:function(b){return a.start[b]},end:f
|
|
|
507
507
|
var Hm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Im="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Jm=["loop","playbackRate"],Km=["pause","play"],Lm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
508
508
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Mm={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Nm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Om=[["getConfiguration","configure"]],Pm=[["isTextTrackVisible","setTextTrackVisibility"]],Qm="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay goToLive".split(" "),
|
|
509
509
|
Rm=["attach","detach","load","unload"];function Sm(a,b,c,d,e,f){var g=this;this.F=a;this.j=new O(b);this.T=c;this.u=!1;this.s=d;this.D=e;this.J=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return Tm(g)};this.C=function(h,k){var l=Fm(k);switch(l.type){case "event":var m=l.targetName;l=Ke(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.T(),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);
|
|
510
|
-
for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.G=0;this.i={};this.l=null;Um.add(this)}r=Sm.prototype;r.destroy=function(){Um["delete"](this);Vm(this);Wm&&Xm(this);this.j&&(this.j.stop(),this.j=null);this.D=this.s=null;this.h=this.m=!1;this.C=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.
|
|
510
|
+
for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.G=0;this.i={};this.l=null;Um.add(this)}r=Sm.prototype;r.destroy=function(){Um["delete"](this);Vm(this);Wm&&Xm(this);this.j&&(this.j.stop(),this.j=null);this.D=this.s=null;this.h=this.m=!1;this.C=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.sa=function(){return this.h};r.Fd=function(){return this.M};
|
|
511
511
|
r.init=function(){if(this.F.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Eb();var a=new chrome.cast.SessionRequest(this.F);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Um),d=c.next();!d.done;d=c.next())Ym(d.value,b)},function(b){for(var c=t(Um),d=c.next();!d.done;d=c.next())d=d.value,Zm="available"==b,d.j.Eb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Zm&&this.j.R($m);(a=Wm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Ym(this,
|
|
512
512
|
a):Wm=null}else window.__onGCastApiAvailable!==an&&(bn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=an)};r.Ld=function(a){this.o=a;this.h&&cn(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(!Zm)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new pc;chrome.cast.requestSession(function(d){return mn(b,a,d)},function(d){return nn(b,d)});return u(c,b.l,0)})};
|
|
513
513
|
function on(a){if(a.h){var b=a.J();chrome.cast.requestSession(function(c){return mn(a,b,c)},function(c){return nn(a,c)})}}r.tb=function(){if(this.h){Vm(this);if(Wm){Xm(this);try{Wm.stop(function(){},function(){})}catch(a){}Wm=null}Tm(this)}};
|
|
@@ -516,20 +516,20 @@ r.set=function(a,b,c){this.g[a][b]=c;cn(this,{type:"set",targetName:a,property:b
|
|
|
516
516
|
r.me=function(a,b){cn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};r.Ff=function(a,b){var c=Fa.apply(2,arguments),d=new pc,e=this.G.toString();this.G++;this.i[e]=d;try{cn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Ym(a,b){var c=a.J();a.l=new pc;a.u=!0;mn(a,c,b)}function Xm(a){var b=Wm;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
517
517
|
function Tm(a){var b=Wm?"connected"==Wm.status:!1;if(a.h&&!b){a.D();for(var c in a.g)a.g[c]={};Vm(a)}a.h=b;a.M=b?Wm.receiver.friendlyName:"";a.j.Eb()}function Vm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function cn(a,b){var c=Em(b),d=Wm;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 P("error",(new Map).set("detail",c)),a.s("player",d),a.tb(),c;}}var $m=.02,Zm=!1,Wm=null,bn=null,Um=new Set;
|
|
518
518
|
function an(a){bn?window.__onGCastApiAvailable=bn:delete window.__onGCastApiAvailable;bn=null;if(a)for(var b=t(Um),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function pn(a,b,c){Le.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.B=c;this.u=new Map;this.g=new Sm(c,function(){return qn(d)},function(){return rn(d)},function(e,f){return sn(d,e,f)},function(){return tn(d)},function(){return un(d)});vn(this)}pa(pn,Le);r=pn.prototype;
|
|
519
|
-
r.destroy=function(a){a&&this.g.tb();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;Le.prototype.release.call(this);return Promise.all(a)};r.pf=function(){return this.l};r.ef=function(){return this.s};r.Ge=function(){return this.g.m&&Zm};r.
|
|
519
|
+
r.destroy=function(a){a&&this.g.tb();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;Le.prototype.release.call(this);return Promise.all(a)};r.pf=function(){return this.l};r.ef=function(){return this.s};r.Ge=function(){return this.g.m&&Zm};r.sa=function(){return this.g.sa()};r.Fd=function(){return this.g.Fd()};
|
|
520
520
|
r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=un(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Sd(),0):c["return"]()})};r.Ld=function(a){this.g.Ld(a)};r.Qf=function(){on(this.g)};r.tb=function(){this.g.tb()};
|
|
521
521
|
r.Je=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.B)return c["return"]();b.B=a;b.g.tb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new Sm(a,function(){return qn(b)},function(){return rn(b)},function(d,e){return sn(b,d,e)},function(){return tn(b)},function(){return un(b)});b.g.init();z(c)})};
|
|
522
|
-
function vn(a){a.g.init();a.m=new cf;for(var b=t(Hm),c=b.next();!c.done;c=b.next())a.m.v(a.i,c.value,function(f){a.g.
|
|
522
|
+
function vn(a){a.g.init();a.m=new cf;for(var b=t(Hm),c=b.next();!c.done;c=b.next())a.m.v(a.i,c.value,function(f){a.g.sa()||(f=Ke(f),a.j.dispatchEvent(f))});for(var d in tm)a.m.v(a.h,tm[d],function(f){a.g.sa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Gb=e,Object.defineProperty(a.l,b.Gb,{configurable:!1,enumerable:!0,get:function(f){return function(){return wn(a,f.Gb)}}(b),set:function(f){return function(g){var h=f.Gb;a.g.sa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Gb:b.Gb};a.s={};xn(a,
|
|
523
523
|
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return yn(a,f)}})});zn(a);a.j=new Le;a.j.qc=a.l;a.o=new Le;a.o.qc=a.s}function zn(a){var b=new Map;xn(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)})}
|
|
524
524
|
function xn(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)}}
|
|
525
525
|
function un(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.jd(),startTime:null};a.i.pause();for(var c=t(Jm),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(Om);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(Pm);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 qn(a){var b=new P("caststatuschanged");a.dispatchEvent(b)}
|
|
526
526
|
function rn(a){var b=new P(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
527
527
|
function tn(a){for(var b=t(Om),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(Jm);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(Jm),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(Pm);for(k=
|
|
528
528
|
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 P(pm,h);a.h.dispatchEvent(h)})}
|
|
529
|
-
function wn(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.
|
|
529
|
+
function wn(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.sa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.sa()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
|
|
530
530
|
function yn(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.Ub()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.ae()};
|
|
531
|
-
if("setVideoContainer"==b)return function(c){return a.h.ve(c)};if(a.g.
|
|
532
|
-
function sn(a,b,c){a.g.
|
|
531
|
+
if("setVideoContainer"==b)return function(c){return a.h.ve(c)};if(a.g.sa()){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.sa()&&0==Object.keys(a.g.g.video).length&&(Lm[b]||Mm[b])||!a.g.sa()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
532
|
+
function sn(a,b,c){a.g.sa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}M("shaka.cast.CastProxy",pn);pn.prototype.changeReceiverId=pn.prototype.Je;pn.prototype.forceDisconnect=pn.prototype.tb;pn.prototype.suggestDisconnect=pn.prototype.Qf;pn.prototype.setAppData=pn.prototype.Ld;pn.prototype.cast=pn.prototype.cast;pn.prototype.receiverName=pn.prototype.Fd;pn.prototype.isCasting=pn.prototype.sa;pn.prototype.canCast=pn.prototype.Ge;pn.prototype.getPlayer=pn.prototype.ef;
|
|
533
533
|
pn.prototype.getVideo=pn.prototype.pf;pn.prototype.destroy=pn.prototype.destroy;function An(a,b,c,d){Le.call(this);var e=this;this.g=a;this.h=b;this.j=new cf;this.G={video:a,player:b};this.C=c||function(){};this.J=d||function(f){return f};this.i=null;this.D=!1;this.o=!0;this.m=0;this.B=!1;this.u=!0;this.s=this.l=null;this.F=new O(function(){Bn(e)});Cn(this)}pa(An,Le);r=An.prototype;r.isConnected=function(){return this.D};r.tf=function(){return this.o};r.Mf=function(a){this.i=a};r.Me=function(){this.i=null};
|
|
534
534
|
r.Nf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Lf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Kf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
535
535
|
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.F&&(a.F.stop(),a.F=null),a.g=null,a.G=null,a.C=null,a.D=!1,a.o=!0,a.l=null,a.s=null,Le.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
|
|
@@ -557,7 +557,7 @@ function go(a){var b=a.getAttribute("schemeIdUri"),c=vf(a,"urn:mpeg:cenc:2013","
|
|
|
557
557
|
var eo=1,fo=(new Map).set("com.widevine.alpha",function(a){return(a=sf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",co).set("com.microsoft.playready.recommendation",co).set("com.microsoft.playready.software",co).set("com.microsoft.playready.hardware",co);function ho(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=
|
|
558
558
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
559
559
|
function io(a,b){var c=jo(a,b,"timescale"),d=1;c&&(d=Ff(c)||1);var e=jo(a,b,"duration");c=Ff(e||"");"image"==a.I.contentType&&(c=Hf(e||""));c&&(c/=d);var f=jo(a,b,"startNumber");e=Number(jo(a,b,"presentationTimeOffset"))||0;var g=Gf(f||"");if(null==f||null==g)g=1;var h=ko(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.S.duration||Infinity;h=rf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Af(p,"t",Gf),y=Af(p,"d",Gf);p=Af(p,"r",Ef);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
|
|
560
|
-
p||0;if(0>p)if(q){q=Af(q,"t",Gf);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,Uf:v}),v=m}f=l}return{timescale:d,ha:c,Db:g,
|
|
560
|
+
p||0;if(0>p)if(q){q=Af(q,"t",Gf);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,Uf:v}),v=m}f=l}return{timescale:d,ha:c,Db:g,Sa:e/d||0,Td:e,timeline:f}}function jo(a,b,c){return[b(a.I),b(a.fa),b(a.ca)].filter(Qb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
561
561
|
function ko(a,b,c){return[b(a.I),b(a.fa),b(a.ca)].filter(Qb).map(function(d){return qf(d,c)}).reduce(function(d,e){return d||e})}
|
|
562
562
|
function lo(a,b,c,d,e,f){for(var g=vf(a,"http://www.w3.org/1999/xlink","href"),h=vf(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 Ee(new N(2,4,4028));if("onLoad"!=h)return Ee(new N(2,4,4027));var m=ic([d],[g]);return e.request(0,Ue(m,b)).Z(function(n){n=Lf(n.data,a.tagName);if(!n)return Ee(new N(2,4,4001,g));
|
|
563
563
|
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 mo(a,b,c,m[0],e,f+1)})}
|
|
@@ -566,28 +566,28 @@ function oo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)
|
|
|
566
566
|
function qo(a){var b=ro(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=ro(a);a:{d=t(so);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.W();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.W()+b<=a.h.byteLength?b:a.h.byteLength-a.g.W();d=Ib(a.h,a.g.W(),b);a.g.skip(b);return new to(c,d)}
|
|
567
567
|
function ro(a){var b=a.g.W(),c=a.g.X();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 so=[[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 to(a,b){this.id=a;this.g=b}
|
|
568
568
|
function uo(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 vo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new po(a.g);for(var n=null,p=null;a.na();){var q=qo(a);if(187==q.id){var v=wo(q);v&&(q=c*v.Vf,v=b+v.Ef,null!=n&&m.push(new Ei(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new Ei(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
569
|
-
function wo(a){var b=new po(a.g);a=qo(b);if(179!=a.id)throw new N(2,3,3013);a=uo(a);b=qo(b);if(183!=b.id)throw new N(2,3,3012);b=new po(b.g);for(var c=0;b.na();){var d=qo(b);if(241==d.id){c=uo(d);break}}return{Vf:a,Ef:c}};function xo(a,b){var c=ko(a,b,"Initialization");if(!c)return null;var d=a.I.
|
|
570
|
-
function yo(a,b){var c=Number(jo(a,zo,"presentationTimeOffset"))||0,d=jo(a,zo,"timescale"),e=1;d&&(e=Ff(d)||1);var f=c/e||0,g=xo(a,zo);Ao(a,g);var h=Ne(a);return{ub:function(){var k=ko(h,zo,"RepresentationIndex"),l=h.I.
|
|
569
|
+
function wo(a){var b=new po(a.g);a=qo(b);if(179!=a.id)throw new N(2,3,3013);a=uo(a);b=qo(b);if(183!=b.id)throw new N(2,3,3012);b=new po(b.g);for(var c=0;b.na();){var d=qo(b);if(241==d.id){c=uo(d);break}}return{Vf:a,Ef:c}};function xo(a,b){var c=ko(a,b,"Initialization");if(!c)return null;var d=a.I.wa,e=c.getAttribute("sourceURL");e&&(d=ic(a.I.wa,[e]));e=0;var f=null;if(c=Af(c,"range",Df))e=c.start,f=c.end;return new Ci(function(){return d},e,f)}
|
|
570
|
+
function yo(a,b){var c=Number(jo(a,zo,"presentationTimeOffset"))||0,d=jo(a,zo,"timescale"),e=1;d&&(e=Ff(d)||1);var f=c/e||0,g=xo(a,zo);Ao(a,g);var h=Ne(a);return{ub:function(){var k=ko(h,zo,"RepresentationIndex"),l=h.I.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=ic(h.I.wa,[k]));k=Bo(h);return Co(h,b,g,l,k.start,k.end,f)}}}
|
|
571
571
|
function Co(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,C,B,E;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.$a||!a.S.ge,l=a.S.start,m=a.S.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.ma(),c.ia,c.ba):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;D=null;C=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var H=no(x,e,d,c,C,B,E);else{H=new po(w);if(440786851!=qo(H).id)throw new N(2,3,3008);var J=qo(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
|
|
572
572
|
J=new po(J.g);for(var I=null;J.na();){var K=qo(J);if(357149030==K.id){I=K;break}}if(!I)throw new N(2,3,3010);I=new po(I.g);K=1E6;for(J=null;I.na();){var Q=qo(I);if(2807729==Q.id)K=uo(Q);else if(17545==Q.id)if(4==Q.g.byteLength)J=Q.g.getFloat32(0);else if(8==Q.g.byteLength)J=Q.g.getFloat64(0);else throw new N(2,3,3003);}if(null==J)throw new N(2,3,3011);I=K/1E9;J*=I;K=qo(new po(x));if(475249515!=K.id)throw new N(2,3,3007);H=vo(K,H,I,J,d,c,C,B,E)}D=H;h.yb(D);q=new U(D);k&&q.Va(B,E,!0);return G["return"](q)})}
|
|
573
|
-
function zo(a){return a.bc}function Bo(a){var b=ko(a,zo,"RepresentationIndex");a=jo(a,zo,"indexRange");a=Df(a||"");b&&(a=Af(b,"range",Df,a));return a}function Ao(a,b){Do(a,b);if(!Bo(a))throw new N(2,4,4002);}function Do(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=nc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function Eo(a,b){var c=xo(a,Fo),d=Go(a);if(!d.ha&&!d.timeline&&1<d.wb.length)throw new N(2,4,4002);if(!d.ha&&!a.S.duration&&!d.timeline&&1==d.wb.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.ca.id&&a.I.id&&(f=a.ca.id+","+a.I.id,e=b[f]);c=Ho(a.S.start,a.S.duration,a.I.
|
|
574
|
-
Infinity,d);return{ub:function(){return Promise.resolve(e)}}}function Fo(a){return a.Xa}function Go(a){var b=Io(a);a=io(a,Fo);var c=a.Db;0==c&&(c=1);var d=0;a.ha?d=a.ha*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ha:a.ha,startTime:d,Db:c,
|
|
575
|
-
function Ho(a,b,c,d,e){var f=d.wb.length;d.timeline&&d.timeline.length!=d.wb.length&&(f=Math.min(d.timeline.length,d.wb.length));for(var g=a-d.
|
|
576
|
-
function Io(a){return[a.I.Xa,a.fa.Xa,a.ca.Xa].filter(Qb).map(function(b){return rf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.ee&&(a.ee=!0);var c=b.getAttribute("media");b=Af(b,"mediaRange",Df,{start:0,end:null});return{wf:c,start:b.start,end:b.end}})};function Jo(a,b,c,d,e,f){var g=Ko(a),h=Lo(a);Mo(h);var k=Ne(a);if(h.Yb)return Do(a,g),{ub:function(){var v=ho(h.Yb,k.I.id,null,k.bandwidth||null,null);v=ic(k.I.
|
|
577
|
-
p;l?(q&&(new U(m)).Va(n,p,!0),l.xb(m,a.presentationTimeline.
|
|
573
|
+
function zo(a){return a.bc}function Bo(a){var b=ko(a,zo,"RepresentationIndex");a=jo(a,zo,"indexRange");a=Df(a||"");b&&(a=Af(b,"range",Df,a));return a}function Ao(a,b){Do(a,b);if(!Bo(a))throw new N(2,4,4002);}function Do(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=nc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function Eo(a,b){var c=xo(a,Fo),d=Go(a);if(!d.ha&&!d.timeline&&1<d.wb.length)throw new N(2,4,4002);if(!d.ha&&!a.S.duration&&!d.timeline&&1==d.wb.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.ca.id&&a.I.id&&(f=a.ca.id+","+a.I.id,e=b[f]);c=Ho(a.S.start,a.S.duration,a.I.wa,d,c);d=!e;e?e.xb(c,a.presentationTimeline.Pa()):(e=new U(c),f&&a.$a&&(b[f]=e));a.presentationTimeline.yb(c);a.$a&&a.S.ge||e.Va(a.S.start,a.S.duration?a.S.start+a.S.duration:
|
|
574
|
+
Infinity,d);return{ub:function(){return Promise.resolve(e)}}}function Fo(a){return a.Xa}function Go(a){var b=Io(a);a=io(a,Fo);var c=a.Db;0==c&&(c=1);var d=0;a.ha?d=a.ha*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ha:a.ha,startTime:d,Db:c,Sa:a.Sa,timeline:a.timeline,wb:b}}
|
|
575
|
+
function Ho(a,b,c,d,e){var f=d.wb.length;d.timeline&&d.timeline.length!=d.wb.length&&(f=Math.min(d.timeline.length,d.wb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Uc:m.Uc},n++){var p=d.wb[n];m.Uc=ic(c,[p.wf]);var q=void 0;q=null!=d.ha?l+d.ha:d.timeline?d.timeline[n].end:l+b;k.push(new Ei(a+l,a+q,function(v){return function(){return v.Uc}}(m),p.start,p.end,e,g,a,h));l=q}return k}
|
|
576
|
+
function Io(a){return[a.I.Xa,a.fa.Xa,a.ca.Xa].filter(Qb).map(function(b){return rf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.ee&&(a.ee=!0);var c=b.getAttribute("media");b=Af(b,"mediaRange",Df,{start:0,end:null});return{wf:c,start:b.start,end:b.end}})};function Jo(a,b,c,d,e,f){var g=Ko(a),h=Lo(a);Mo(h);var k=Ne(a);if(h.Yb)return Do(a,g),{ub:function(){var v=ho(h.Yb,k.I.id,null,k.bandwidth||null,null);v=ic(k.I.wa,[v]);return Co(k,b,g,v,0,null,h.Sa)}};if(h.ha)return d||"image"===a.fa.contentType||(a.presentationTimeline.zd(h.ha),a.presentationTimeline.Bd(a.S.start)),{ub:function(){return No(k,h,e,g,f)}};var l=null;d=null;a.ca.id&&a.I.id&&(d=a.ca.id+","+a.I.id,l=c[d]);var m=Oo(k,h,g),n=a.S.start,p=a.S.duration?a.S.start+a.S.duration:Infinity,q=Infinity!=
|
|
577
|
+
p;l?(q&&(new U(m)).Va(n,p,!0),l.xb(m,a.presentationTimeline.Pa())):(l=new U(m),d&&a.$a&&(c[d]=l));a.presentationTimeline.yb(m);q&&l.Va(n,p);return{ub:function(){return Promise.resolve(l)}}}function Po(a){return a.cc}function Lo(a){var b=io(a,Po),c=jo(a,Po,"media");a=jo(a,Po,"index");return{ha:b.ha,timescale:b.timescale,Db:b.Db,Sa:b.Sa,Td:b.Td,timeline:b.timeline,xd:c,Yb:a}}
|
|
578
578
|
function Mo(a){var b=a.Yb?1:0;b+=a.timeline?1:0;b+=a.ha?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Yb&&(a.timeline=null),a.ha=null);if(!a.Yb&&!a.xd)throw new N(2,4,4002);}
|
|
579
|
-
function No(a,b,c,d,e){function f(I){var K=(I-q)*p,Q=K+b.
|
|
580
|
-
y=b.xd,x=a.bandwidth||null,w=a.I.id,D=a.I.
|
|
581
|
-
function Oo(a,b,c){var d=a.S.start,e=a.S.duration,f=d-b.
|
|
582
|
-
function Ko(a){var b=jo(a,Po,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.
|
|
579
|
+
function No(a,b,c,d,e){function f(I){var K=(I-q)*p,Q=K+b.Sa,T=K+l;K=T+p;var R=Math.min(K,h());T=new Ei(T,R,function(){var da=ho(y,w,I,x,Q*v);return ic(D,[da])},0,null,d,C,l,h());T.l=K;return T}function g(){var I=[Math.max(k.Pa(),l),Math.min(k.eb(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(K){return K+q})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.S.start,m=a.ca.id,n=a.S.duration,p=b.ha,q=b.Db,v=b.timescale,
|
|
580
|
+
y=b.xd,x=a.bandwidth||null,w=a.I.id,D=a.I.wa,C=l-b.Sa,B=g();a=a.$a?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var G=f(E);c.push(G)}var H=new U(c);c=k.eb()<h();E=k.U();if(c||E){var J=Math.max(a,B+1);H.Lc(p,function(){var I=k.Pa();H.ab(I);var K=t(g());K.next();K=K.next().value;for(var Q=[];J<=K;){var T=f(J);Q.push(T);J++}return I>h()&&!Q.length?null:Q})}return Promise.resolve(H)}
|
|
581
|
+
function Oo(a,b,c){var d=a.S.start,e=a.S.duration,f=d-b.Sa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Tc:h.Tc,Xc:h.Xc,$c:h.$c,Qc:h.Qc,bd:h.bd,Rc:h.Rc},k++){var l=b.timeline[k],m=l.start,n=l.Uf;l=l.end;h.$c=k+b.Db;h.bd=n+b.Td;h.Xc=a.I.id;h.Qc=a.bandwidth||null;h.Tc=b.xd;h.Rc=a.I.wa;g.push(new Ei(d+m,d+l,function(p){return function(){var q=ho(p.Tc,p.Xc,p.$c,p.Qc||null,p.bd);return ic(p.Rc,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
582
|
+
function Ko(a){var b=jo(a,Po,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.wa;return new Ci(function(){var f=ho(b,c,null,d,null);return ic(e,[f])},0,null)};function Qo(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Qo.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=[]};
|
|
583
583
|
function Ro(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,Ma;return L(function(Ja){switch(Ja.g){case 1:d=oc;So(b);To(b);Uo(b);Vo(b);if(!c&&1==b.length){e=b[0];a.g=e.oc;a.h=e.Nc;a.j=e.textStreams;a.i=e.imageStreams;Ja.A(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 Ja["return"]();k=b.map(function(Aa){return Aa.oc});l=b.map(function(Aa){return Aa.Nc});m=b.map(function(Aa){return Aa.textStreams});n=b.map(function(Aa){return Aa.imageStreams});
|
|
584
584
|
p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(Wo(d.Y));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(Wo(d.Kb));return u(Ja,Xo(a.g,k,f,Yo,Zo),3);case 3:return u(Ja,Xo(a.h,l,f,Yo,Zo),4);case 4:return u(Ja,Xo(a.j,m,f,Yo,Zo),5);case 5:return u(Ja,Xo(a.i,n,f,Yo,Zo),2);case 2:D=0;C=[];if(a.h.length&&a.g.length)for(I=t(a.g),K=I.next();!K.done;K=I.next())for(Q=K.value,T=t(a.h),R=T.next();!R.done;R=T.next())da=R.value,sa=ug(Q.drmInfos,da.drmInfos),Q.drmInfos.length&&da.drmInfos.length&&
|
|
585
|
-
!sa.length||(Ma=D++,C.push({id:Ma,language:Q.language,primary:Q.primary,audio:Q,video:da,bandwidth:(Q.bandwidth||0)+(da.bandwidth||0),drmInfos:sa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),E=t(B),G=E.next();!G.done;G=E.next())H=G.value,J=D++,C.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Za?H:null,video:H.type==d.
|
|
585
|
+
!sa.length||(Ma=D++,C.push({id:Ma,language:Q.language,primary:Q.primary,audio:Q,video:da,bandwidth:(Q.bandwidth||0)+(da.bandwidth||0),drmInfos:sa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),E=t(B),G=E.next();!G.done;G=E.next())H=G.value,J=D++,C.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Za?H:null,video:H.type==d.Ma?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
586
586
|
a.l=C;z(Ja)}})}function So(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.oc),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.oc=c}}
|
|
587
587
|
function Uo(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}}
|
|
588
588
|
function To(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Nc),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)&&pf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Nc=c}}
|
|
589
589
|
function Vo(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}}
|
|
590
|
-
function $o(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q;return L(function(T){switch(T.g){case 1:b=oc;if(1==a.length)return T["return"](a[0]);c=a.map(function(R){return R.filter(function(da){return da.type==b.Za})});d=a.map(function(R){return R.filter(function(da){return da.type==b.
|
|
590
|
+
function $o(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q;return L(function(T){switch(T.g){case 1:b=oc;if(1==a.length)return T["return"](a[0]);c=a.map(function(R){return R.filter(function(da){return da.type==b.Za})});d=a.map(function(R){return R.filter(function(da){return da.type==b.Ma})});e=a.map(function(R){return R.filter(function(da){return da.type==b.Y})});f=a.map(function(R){return R.filter(function(da){return da.type==b.Kb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
|
|
591
591
|
k.push(ap(b.Y));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(ap(b.Kb));return u(T,Xo([],c,0,bp,cp),2);case 2:return p=T.h,u(T,Xo([],d,0,bp,cp),3);case 3:return q=T.h,u(T,Xo([],e,0,bp,cp),4);case 4:return v=T.h,u(T,Xo([],f,0,bp,cp),5);case 5:y=T.h;x=0;if(q.length&&p.length)for(E=t(p),G=E.next();!G.done;G=E.next())for(H=G.value,J=t(q),I=J.next();!I.done;I=J.next())K=I.value,Q=x++,K.variantIds.push(Q),H.variantIds.push(Q);else for(w=q.concat(p),D=t(w),C=D.next();!C.done;C=D.next())B=C.value,
|
|
592
592
|
B.variantIds=[x++];return T["return"](q.concat(p).concat(v).concat(y))}})}
|
|
593
593
|
function Xo(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I;return L(function(K){switch(K.g){case 1:f=oc;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.A(4);break}m=l.value;return u(K,dp(m,b,c,e,g),5);case 5:n=K.h;if(!n)throw new N(2,4,4037);l=k.next();K.A(2);break;case 4:p=t(g),q=p.next();case 6:if(q.done){K.A(8);break}v=q.value;y=t(v);x=y.next();case 9:if(x.done){q=p.next();K.A(6);break}w=x.value;return u(K,ep(w,b,d,e,g),12);
|
|
@@ -611,12 +611,12 @@ r.stop=function(){for(var a=t(Object.values(this.u)),b=a.next();!b.done;b=a.next
|
|
|
611
611
|
function wp(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=Ue(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b),Pe(a.m,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);return u(k,yp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.G.sample(1,h);return k["return"](h)})}
|
|
612
612
|
function yp(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=Lf(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](zp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=mo(d,a.g.retryParameters,f,c,a.h.networkingEngine);Pe(a.m,g);return u(k,g.promise,2)}h=k.h;return k["return"](zp(a,h,c))})}
|
|
613
613
|
function zp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,Ma,Ja,Aa;return L(function(Na){switch(Na.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=rf(b,"Location").map(xf).filter(Qb);0<f.length&&(g=ic(e,f),e=a.l=g);h=rf(b,"BaseURL");k=h.map(xf);l=ic(e,k);m=0;h&&h.length&&(m=Af(h[0],"availabilityTimeOffset",Hf)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Af(b,"minBufferTime",Cf)||0);a.D=Af(b,"minimumUpdatePeriod",Cf,-1);q=Af(b,"availabilityStartTime",Bf);v=Af(b,
|
|
614
|
-
"timeShiftBufferDepth",Cf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Af(b,"suggestedPresentationDelay",Cf));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Af(b,"maxSegmentDuration",Cf));C=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.u)),G=E.next();!G.done;G=E.next())H=G.value,H.ab(B.
|
|
614
|
+
"timeShiftBufferDepth",Cf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Af(b,"suggestedPresentationDelay",Cf));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Af(b,"maxSegmentDuration",Cf));C=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.u)),G=E.next();!G.done;G=E.next())H=G.value,H.ab(B.Pa());else J=a.g.defaultPresentationDelay||1.5*p,I=null!=x?x:J,B=new S(q,I,a.g.dash.autoCorrectDrift);B.dc("static"==C);(K=B.U())&&!isNaN(a.g.availabilityWindowOverride)&&
|
|
615
615
|
(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Pd(v);Q=b.getAttribute("profiles")||"";T={$a:"static"!=C,presentationTimeline:B,ca:null,S:null,fa:null,I:null,bandwidth:0,ee:!1,sb:m,profiles:Q.split(",")};R=Ap(a,T,l,b);da=R.duration;sa=R.periods;"static"!=C&&R.Yd||B.Ha(da||Infinity);a.s&&!a.B&&(Ma=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.se(a.s):a.s&&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.");
|
|
616
616
|
B.zd(D||1);return u(Na,Ro(a.j,sa,T.$a),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);Na.A(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.xe()){Na.A(4);break}Ja=rf(b,"UTCTiming");return u(Na,Bp(a,l,Ja),5);case 5:Aa=Na.h;if(!a.h)return Na["return"]();B.te(Aa);case 4:B.ud();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Na)}})}
|
|
617
617
|
function Ap(a,b,c,d){var e=Af(d,"mediaPresentationDuration",Cf),f=[],g=0;d=rf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Af(k,"start",Cf,g),n=k.id,p=Af(k,"duration",Cf),q=null;if(l){var v=Af(l,"start",Cf);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.o&&null!==n&&null!==m&&m<a.o)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.o||m>a.o)&&(a.o=m);g=Cp(a,b,c,{start:m,duration:q,node:k,ge:null==q||!l});f.push(g);b.ca.id&&q&&(a.M[b.ca.id]=q);if(null==q){g=
|
|
618
618
|
null;break}g=m+q}}a.J=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Yd:!1}:{periods:f,duration:g,Yd:!0}}
|
|
619
|
-
function Cp(a,b,c,d){b.ca=Dp(d.node,null,c);b.S=d;b.ca.sb=b.sb;b.ca.id||(b.ca.id="__shaka_period_"+d.start);var e=rf(d.node,"EventStream");c=b.presentationTimeline.
|
|
619
|
+
function Cp(a,b,c,d){b.ca=Dp(d.node,null,c);b.S=d;b.ca.sb=b.sb;b.ca.id||(b.ca.id="__shaka_period_"+d.start);var e=rf(d.node,"EventStream");c=b.presentationTimeline.Pa();e=t(e);for(var f=e.next();!f.done;f=e.next())Ep(a,d.start,d.duration,f.value,c);c=rf(d.node,"AdaptationSet").map(function(m){return Fp(a,b,m)}).filter(Qb);if(b.$a){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Hf);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);
|
|
620
620
|
}d=c.filter(function(m){return!m.Rd});c=c.filter(function(m){return m.Rd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Rd.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={lc:h.lc},l=k.next())h.lc=l.value,h.lc.trickModeVideo=e.streams.find(function(m){return function(n){return bd(m.lc.codecs)==bd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Gp(d,"audio");g=a.g.disableVideo?[]:Gp(d,"video");f=a.g.disableText?
|
|
621
621
|
[]:Gp(d,nc);c=a.g.disableThumbnails?[]:Gp(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,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ca.id,oc:d,Nc:e,textStreams:g,imageStreams:f}}
|
|
622
622
|
function Gp(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
@@ -626,13 +626,13 @@ l}}var n;m=rf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.do
|
|
|
626
626
|
1,null!=q)for(q=t(q.split(";")),x=q.next();!x.done;x=q.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,pd(w));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=rf(c,"ContentProtection");var C=Xn(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=pd(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=rf(c,"Label"))&&l.length&&
|
|
627
627
|
(l=l[0],l.textContent&&(E=l.textContent));l=rf(c,"Representation");c=l.map(function(G){if(G=Hp(a,b,C,h,B,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.fa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.fa.contentType||"application"==b.fa.contentType)for(b.fa.contentType=Ip(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.fa.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
628
628
|
m.value,p=t(C.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Qb);return{id:b.fa.id||"__fake__"+a.F++,contentType:b.fa.contentType,language:B,vg:e,streams:c,drmInfos:C.drmInfos,Rd:f,Hf:k}}
|
|
629
|
-
function Hp(a,b,c,d,e,f,g,h,k,l){b.I=Dp(l,b.fa,null);a.s=Math.min(a.s,b.I.sb);if(!Jp(b.I))return null;var m=b.S.start;b.bandwidth=Af(l,"bandwidth",Ff)||0;var n=b.I.contentType,p=n==nc||"application"==n;n="image"==n;try{var q=function(G,H,J){return Kp(a,G,H,J)};if(b.I.bc)var v=yo(b,q);else if(b.I.Xa)v=Eo(b,a.u);else if(b.I.cc)v=Jo(b,q,a.u,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.I.
|
|
629
|
+
function Hp(a,b,c,d,e,f,g,h,k,l){b.I=Dp(l,b.fa,null);a.s=Math.min(a.s,b.I.sb);if(!Jp(b.I))return null;var m=b.S.start;b.bandwidth=Af(l,"bandwidth",Ff)||0;var n=b.I.contentType,p=n==nc||"application"==n;n="image"==n;try{var q=function(G,H,J){return Kp(a,G,H,J)};if(b.I.bc)var v=yo(b,q);else if(b.I.Xa)v=Eo(b,a.u);else if(b.I.cc)v=Jo(b,q,a.u,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.I.wa,x=b.S.duration||0;v={ub:function(){return Promise.resolve(bj(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
|
|
630
630
|
throw G;}q=rf(l,"ContentProtection");q=$n(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var w=!1;rf(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(w=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(n&&((l=rf(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
|
|
631
631
|
(C=l.getAttribute("value")),!C))return null;var B;l=b.I.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 E={id:a.F++,originalId:b.I.id,createSegmentIndex:function(){var G;return L(function(H){if(1==H.g){if(E.segmentIndex)return H.A(0);G=E;return u(H,v.ub(),3)}G.segmentIndex=H.h;z(H)})},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,
|
|
632
632
|
bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.fa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.I.Cd,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:C};return E}
|
|
633
633
|
function vp(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,wp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();xp(a,b);z(d)}})}function xp(a,b){0>a.D||a.C.R(Math.max(3,a.D-b,Qa(a.G)))}
|
|
634
|
-
function Dp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Cd:null,audioSamplingRate:null,sb:0};c=c||b.
|
|
635
|
-
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=rf(a,"AudioChannelConfiguration");m=Lp(m)||b.Cd;p=Af(a,"audioSamplingRate",Gf)||b.audioSamplingRate;f||(f=Ip(g,h));var q=qf(a,"SegmentBase"),v=qf(a,"SegmentTemplate"),y=q?Af(q,"availabilityTimeOffset",Hf)||0:0,x=v?Af(v,"availabilityTimeOffset",Hf)||0:0;d=d&&d.length?Af(d[0],"availabilityTimeOffset",Hf)||0:0;d=b.sb+d+y+x;return{
|
|
634
|
+
function Dp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Cd:null,audioSamplingRate:null,sb:0};c=c||b.wa;var d=rf(a,"BaseURL"),e=d.map(xf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Af(a,"frameRate",If)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=rf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
|
|
635
|
+
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=rf(a,"AudioChannelConfiguration");m=Lp(m)||b.Cd;p=Af(a,"audioSamplingRate",Gf)||b.audioSamplingRate;f||(f=Ip(g,h));var q=qf(a,"SegmentBase"),v=qf(a,"SegmentTemplate"),y=q?Af(q,"availabilityTimeOffset",Hf)||0:0,x=v?Af(v,"availabilityTimeOffset",Hf)||0:0;d=d&&d.length?Af(d[0],"availabilityTimeOffset",Hf)||0:0;d=b.sb+d+y+x;return{wa:ic(c,e),bc:q||b.bc,Xa:qf(a,"SegmentList")||b.Xa,cc:v||b.cc,width:Af(a,"width",Gf)||b.width,height:Af(a,
|
|
636
636
|
"height",Gf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Cd:m,audioSamplingRate:p,sb:d}}
|
|
637
637
|
function Lp(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=
|
|
638
638
|
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 Jp(a){var b=a.bc?1:0;b+=a.Xa?1:0;b+=a.cc?1:0;if(0==b)return a.contentType==nc||"application"==a.contentType?!0:!1;1!=b&&(a.bc&&(a.Xa=null),a.cc=null);return!0}
|
|
@@ -647,15 +647,15 @@ function aq(a,b,c){b=Ic(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
|
|
|
647
647
|
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=bq(a,m),cq.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=ic([d],[m.trim()])[0],h&&g.push(h),e.push(new Qp(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Qp("",g,k)));return new Np(c,b,f,e)}f.push(h);
|
|
648
648
|
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Rp("URI",k)),e=!0)}}return new Np(c,b,f)}function bq(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 Wp(f);var h;(h=Yp(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Yp(f,k);)d.push(new Rp(h[1],h[2]||h[3])),Xp(f)}return new Op(c,e,d,g)}
|
|
649
649
|
var cq="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(" "),dq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function eq(){}function fq(a){try{var b=gq(a);return Ge({uri:a,ke:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ee(c)}}function gq(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=Rc(a):e=Mc(a);return{data:e,contentType:c}}
|
|
650
|
-
M("shaka.net.DataUriPlugin",eq);eq.parse=fq;Re("data",fq);function hq(){var a=this;this.g=this.j=null;this.
|
|
651
|
-
r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,kq(c,Ue([a],c.g.retryParameters),0),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,lq(c,d.data),3);e=c.
|
|
650
|
+
M("shaka.net.DataUriPlugin",eq);eq.parse=fq;Re("data",fq);function hq(){var a=this;this.g=this.j=null;this.Ka=1;this.o=new Map;this.u=new Map;this.Da=new Set;this.h=new Map;this.i=null;this.M="";this.da=new $p;this.Ca=0;this.B=new O(function(){iq(a)});this.m=jq;this.C=null;this.ja=0;this.F=Infinity;this.aa=this.ka=0;this.D=new Oe;this.V=[];this.J=new Map;this.La=!1;this.s=new Map;this.T=null;this.ea=new Map;this.G=new Map;this.l=!1}r=hq.prototype;r.configure=function(a){this.g=a};
|
|
651
|
+
r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,kq(c,Ue([a],c.g.retryParameters),0),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,lq(c,d.data),3);e=c.Ca;0<e&&c.B.R(e);return f["return"](c.C)})};r.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.g=this.j=null;this.Da.clear();this.C=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
|
|
652
652
|
r.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==jq)return e["return"]();b=[];a.T=null;c=Array.from(a.h.values());return c.length?u(e,mq(a,c[0]),2):e.A(2)}for(d=1;d<c.length;d++)b.push(mq(a,c[d]));return u(e,Promise.all(b),0)})};
|
|
653
|
-
function mq(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=nq,d=b.Ce,e=new Wb(d),a.l&&b.He&&Zb(e,new ac("_HLS_skip=YES")),u(y,kq(a,Ue([e.toString()],a.g.retryParameters),0),2);if(3!=y.g){f=y.h;g=aq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=Sp(g.g,"EXT-X-DEFINE");k=oq(a,h);l=b.stream;return u(y,pq(a,b.Mc,g,l.type,l.mimeType,b.wd,k,b.Oe),3)}m=y.h;l.segmentIndex.xb(m,a.i.
|
|
653
|
+
function mq(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=nq,d=b.Ce,e=new Wb(d),a.l&&b.He&&Zb(e,new ac("_HLS_skip=YES")),u(y,kq(a,Ue([e.toString()],a.g.retryParameters),0),2);if(3!=y.g){f=y.h;g=aq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=Sp(g.g,"EXT-X-DEFINE");k=oq(a,h);l=b.stream;return u(y,pq(a,b.Mc,g,l.type,l.mimeType,b.wd,k,b.Oe),3)}m=y.h;l.segmentIndex.xb(m,a.i.Pa());m.length&&(n=Vp(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.wd.get(n),l.segmentIndex.ab(p));
|
|
654
654
|
q=m[m.length-1];if(v=Up(g.g,"EXT-X-ENDLIST"))qq(a,c.Be),a.i.Ha(q.endTime);z(y)})}r.onExpirationUpdated=function(){};
|
|
655
655
|
function lq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,Ma,Ja,Aa,Na,Cc,md;return L(function(ab){switch(ab.g){case 1:c=aq(a.da,b,a.M);if(0!=c.type)throw new N(2,4,4022);d=Sp(c.g,"EXT-X-DEFINE");rq(a,d);e=Sp(c.g,"EXT-X-MEDIA");f=Sp(c.g,"EXT-X-STREAM-INF");g=Sp(c.g,"EXT-X-IMAGE-STREAM-INF");sq(a,f);h=Sp(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",
|
|
656
|
-
ic([a.M],[p])[0]),q&&y.set("language",q),v&&y.set("value",v),x=new P("sessiondata",y),a.j)a.j.onEvent(x);return u(ab,tq(a,e),2);case 2:return uq(a,e),u(ab,vq(a,f),3);case 3:return w=ab.h,u(ab,wq(a,e),4);case 4:return D=ab.h,u(ab,xq(a,g),5);case 5:C=ab.h;if(!a.j)throw new N(2,7,7001);if(a.
|
|
657
|
-
a.g.defaultPresentationDelay:a.aa?a.aa:3*a.ja),a.i.dc(!1)):(a.i=new S(null,0),a.i.dc(!0));if(a.m!=jq)a.
|
|
658
|
-
Ja.next())(Na=Aa.value)&&R.push(Na);return u(ab,Promise.all(R.map(function(Dc){return L(function(
|
|
656
|
+
ic([a.M],[p])[0]),q&&y.set("language",q),v&&y.set("value",v),x=new P("sessiondata",y),a.j)a.j.onEvent(x);return u(ab,tq(a,e),2);case 2:return uq(a,e),u(ab,vq(a,f),3);case 3:return w=ab.h,u(ab,wq(a,e),4);case 4:return D=ab.h,u(ab,xq(a,g),5);case 5:C=ab.h;if(!a.j)throw new N(2,7,7001);if(a.La&&0==w.length)throw new N(2,4,4034);E=B=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,B=Math.min(B,J.he),"text"!=J.stream.type&&(E=Math.min(E,J.vf-J.he));a.m!=jq?(a.i=new S(0,a.g.defaultPresentationDelay?
|
|
657
|
+
a.g.defaultPresentationDelay:a.aa?a.aa:3*a.ja),a.i.dc(!1)):(a.i=new S(null,0),a.i.dc(!0));if(a.m!=jq)a.Ca=a.F,I=nq,a.m==I.Ae&&(K=a.i.Jc,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.i.Pd(K));else for(a.i.Ha(E),a.i.offset(-B),Q=t(a.h.values()),H=Q.next();!H.done;H=Q.next())T=H.value,T.stream.segmentIndex.offset(-B),T.stream.segmentIndex.Va(0,E);a.V=[];R=[];da=t(w);for(sa=da.next();!sa.done;sa=da.next())for(Ma=sa.value,Ja=t([Ma.video,Ma.audio]),Aa=Ja.next();!Aa.done;Aa=
|
|
658
|
+
Ja.next())(Na=Aa.value)&&R.push(Na);return u(ab,Promise.all(R.map(function(Dc){return L(function(he){return u(he,Dc.createSegmentIndex(),0)})})),6);case 6:Cc=t(R);for(Aa=Cc.next();!Aa.done;Aa=Cc.next())md=Aa.value,a.V.push(md.segmentIndex.K);yq(a);a.i.ud();a.C={presentationTimeline:a.i,variants:w,textStreams:D,imageStreams:C,offlineSessionIds:[],minBufferTime:0};a.j.makeTextStreamsForClosedCaptions(a.C);z(ab)}})}
|
|
659
659
|
function rq(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 oq(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}
|
|
660
660
|
function sq(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=zq(a,e);if(g){var h=lc(nc,e);a.s.set(g,h);fb(e,h)}f&&(g=kc("audio",e),a.s.set(f,g));d&&(f=kc("video",e),a.s.set(d,f))}}
|
|
661
661
|
function wq(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=Tp(b,"SUBTITLES"),d=c.map(function(y){var x,w,D;return L(function(C){if(1==C.g){if(x=a.g.disableText)return C["return"](null);A(C,2);return u(C,Aq(a,y),4)}if(2!=C.g)return w=C.h,C["return"](w.stream);D=F(C);if(a.g.hls.ignoreTextStreamFailures)return C["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=Pp(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
|
|
@@ -663,9 +663,9 @@ t(m),p=n.next();!p.done;p=n.next())q=p.value,q.stream.codecs=l;return v["return"
|
|
|
663
663
|
function xq(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);A(l,2);return u(l,Bq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(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}))})}
|
|
664
664
|
function tq(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,Aq(a,b[0]),2):d.A(2);c=b.slice(1).map(function(e){return Aq(a,e)});return u(d,Promise.all(c),0)})}
|
|
665
665
|
function vq(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(Pp(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,Cq(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,D=v.video,C=t(D),B=C.next();!B.done;B=C.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
|
|
666
|
-
void 0,B.frameRate=Number(h)||void 0,B.hdr=q||void 0;C=a.g.disableAudio;if(!w.length||C)w=[null];C=a.g.disableVideo;if(!D.length||C)D=[null];C=[];w=t(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var E=t(D),G=E.next();!G.done;G=E.next()){var H=G.value;G=B?B.stream:null;var J=H?H.stream:null,I=B?B.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Mc:"")+" - "+(B?B.Mc:"");G&&J&&I.length&&K.length&&!(0<ug(I,K).length)||a.
|
|
667
|
-
!!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(G),a.
|
|
668
|
-
function Cq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(x){if(1==x.g)return c=oc,d=zq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Pp(b,"URI"),p=k.audio.find(function(w){return w&&w.Mc==n}),q=lc(c.
|
|
666
|
+
void 0,B.frameRate=Number(h)||void 0,B.hdr=q||void 0;C=a.g.disableAudio;if(!w.length||C)w=[null];C=a.g.disableVideo;if(!D.length||C)D=[null];C=[];w=t(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var E=t(D),G=E.next();!G.done;G=E.next()){var H=G.value;G=B?B.stream:null;var J=H?H.stream:null,I=B?B.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Mc:"")+" - "+(B?B.Mc:"");G&&J&&I.length&&K.length&&!(0<ug(I,K).length)||a.Da.has(H)||(G={id:a.Ka++,language:G?G.language:"und",primary:!!G&&G.primary||
|
|
667
|
+
!!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(G),a.Da.add(H))}}y=x.call(y,C)}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)})}
|
|
668
|
+
function Cq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(x){if(1==x.g)return c=oc,d=zq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Pp(b,"URI"),p=k.audio.find(function(w){return w&&w.Mc==n}),q=lc(c.Ma,d),(v=lc(c.Za,d))&&!q?l=c.Za:!h.length&&v&&q?(l=c.Ma,d=[[q,v].join()]):k.audio.length&&p?(l=c.Za,m=!0):l=k.video.length&&!k.audio.length?c.Za:c.Ma,m?x.A(2):u(x,Dq(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===
|
|
669
669
|
y)return x["return"](null);Eq(k);return x["return"](k)})}function zq(a,b){var c=[];a.g.disableVideo||c.push("avc1.42E01E");a.g.disableAudio||c.push("mp4a.40.2");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=cd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Fq(a){a=Z(a,"LANGUAGE")||"und";return pd(a)}
|
|
670
670
|
function Eq(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function uq(a,b){var c=Tp(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Fq(e);var f=Pp(e,"GROUP-ID");e=Pp(e,"INSTREAM-ID");a.J.get(f)||a.J.set(f,new Map);a.J.get(f).set(e,d)}}
|
|
671
671
|
function Aq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(x){if(1==x.g){c=Pp(b,"GROUP-ID");d="";var w=Pp(b,"TYPE").toLowerCase();"subtitles"==w&&(w=nc);e=w;e!=nc&&c&&a.s.has(c)&&(d=a.s.get(c));f=Gq(Pp(b,"URI"),a.o);if(a.h.has(f))return x["return"](a.h.get(f));g=Fq(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Z(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Z(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
|
|
@@ -673,9 +673,9 @@ v="YES"==q;return u(x,Hq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.u.has(c)?a.u.get
|
|
|
673
673
|
function Bq(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(p){if(1==p.g){c=Gq(Pp(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Fq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,Hq(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=
|
|
674
674
|
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)})}
|
|
675
675
|
function Dq(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){e=Gq(Pp(b,"URI"),a.o);if(a.h.has(e))return k["return"](a.h.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.J.get(l):null;g=kc(d,c);return u(k,Hq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
|
|
676
|
-
function Hq(a,b,c,d,e,f,g,h,k,l,m,n){var p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,Ma,Ja,Aa,Na,Cc,md,ab,Dc,
|
|
677
|
-
H.next())if(I=J.value,K=Pp(I,"METHOD"),"NONE"!=K){B=!0;if("AES-128"==K)return a.
|
|
678
|
-
break;case 4:
|
|
676
|
+
function Hq(a,b,c,d,e,f,g,h,k,l,m,n){var p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,Ma,Ja,Aa,Na,Cc,md,ab,Dc,he,dn,en,fn,gn,Rh,Sh,zf,hn,jn,kn,ln;return L(function(bb){switch(bb.g){case 1:return p=ic([a.M],[b])[0],u(bb,kq(a,Ue([p],a.g.retryParameters),0),2);case 2:q=bb.h;p=q.uri;v=aq(a.da,q.data,p);if(1!=v.type)throw new N(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())D=w.value,C=Sp(D.g,"EXT-X-KEY"),y.push.apply(y,ia(C));B=!1;E=[];G=new Set;H=t(y);for(J=H.next();!J.done;J=
|
|
677
|
+
H.next())if(I=J.value,K=Pp(I,"METHOD"),"NONE"!=K){B=!0;if("AES-128"==K)return a.La=!0,bb["return"](null);Q=Pp(I,"KEYFORMAT");if(R=(T=Iq[Q])?T(I):null){if(R.keyIds)for(da=t(R.keyIds),sa=da.next();!sa.done;sa=da.next())Ma=sa.value,G.add(Ma);E.push(R)}}if(B&&!E.length)throw new N(2,4,4026);Ja=Sp(v.g,"EXT-X-DEFINE");Aa=oq(a,Ja);Jq(a,v);return u(bb,Kq(a,d,c,v,Aa),3);case 3:return Na=bb.h,Lq.includes(Na)&&(c=""),Cc=new Map,md=new Map,ab=a.l,A(bb,4),u(bb,pq(a,b,v,d,Na,Cc,Aa,md),6);case 6:Dc=bb.h;va(bb,5);
|
|
678
|
+
break;case 4:he=F(bb);if(4035==he.code)return Ua("Skipping unsupported HLS stream",Na,b),bb["return"](null);throw he;case 5:ab!=a.l&&Jq(a,v);dn=Dc[0].startTime;en=Dc[Dc.length-1].endTime;fn=new U(Dc);gn=d==nc?"subtitle":void 0;Rh=[];if(l)for(Sh=t(l.split(",")),zf=Sh.next();!zf.done;zf=Sh.next())hn=zf.value,Rh.push(hn);kn=(jn=Up(v.g,"EXT-X-SERVER-CONTROL"))?null!=jn.getAttribute("CAN-SKIP-UNTIL"):!1;ln={id:a.Ka++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:fn,
|
|
679
679
|
mimeType:Na,codecs:c,kind:gn,encrypted:B,drmInfos:E,keyIds:G,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:Rh,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return bb["return"]({stream:ln,Mc:b,Ce:p,he:dn,vf:en,wd:Cc,Oe:md,He:kn})}})}
|
|
680
680
|
function Jq(a,b){var c=Up(b.g,"EXT-X-PLAYLIST-TYPE"),d=Up(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)qq(a,jq);else{c?qq(a,Mq):qq(a,Nq);d=Up(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Up(b.g,"EXT-X-PART-INF");a.l&&c?(a.ka=Number(Pp(c,"PART-TARGET")),a.F=Math.min(a.ka,a.F),c=Up(b.g,"EXT-X-SERVER-CONTROL"),a.aa=c?Number(Pp(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ja=Math.max(d,a.ja)}}
|
|
681
681
|
function Oq(a,b,c,d){c=Up(c,"EXT-X-MAP");if(!c)return null;var e=Pp(c,"URI");d=Gq(ic([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=Pq(d,c),a.ea.set(b,c));return a.ea.get(b)}function Pq(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 Ci(function(){return[a]},c,d)}
|
|
@@ -692,8 +692,8 @@ function Sq(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,x;return L(function(w){switch(w
|
|
|
692
692
|
function Vq(a,b,c,d){var e=0;(new Fg).box("moov",Jg).box("trak",Jg).box("mdia",Jg).O("mdhd",function(h){e=Yh(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 Fg).box("moof",Jg).box("traf",Jg).O("tfdt",function(h){f=Xh(h.reader,h.version).fd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
|
|
693
693
|
function Wq(a,b,c){function d(){f.seek(g+188);h=f.X();71!=h&&(f.seek(g+192),h=f.X());71!=h&&(f.seek(g+204),h=f.X());71!=h&&e();f.ne(1)}function e(){throw new N(2,4,4030,a,b);}var f=new Cg(c,0),g=0,h=0;for(c=Math.min(f.N.byteLength-188,940);;){g=f.W();h=f.X();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Bb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.X()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.X(),f.skip(k)),1!=f.L()>>8)d();else{f.skip(3);c=f.X()>>6;0!=c&&1!=c||e();0==f.X()&&e();c=f.X();k=f.Bb();var l=
|
|
694
694
|
f.Bb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Gq(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}
|
|
695
|
-
function Kq(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x;return L(function(w){if(1==w.g){f=oc;g=$e;h=Math.trunc((d.segments.length-1)/2);k=Gq(d.segments[h].h,e);l=new Wb(k);m=l.
|
|
696
|
-
(x=n.mp4,w["return"](x))})}function iq(a){var b,c;L(function(d){if(1==d.g){if(!a.j)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.
|
|
695
|
+
function Kq(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x;return L(function(w){if(1==w.g){f=oc;g=$e;h=Math.trunc((d.segments.length-1)/2);k=Gq(d.segments[h].h,e);l=new Wb(k);m=l.va.split(".").pop();n=Xq[b];if(p=n[m])return w["return"](p);if(b==f.Y)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.Kb&&(!c||"jpeg"==c))return w["return"]("image/jpeg");q=Ue([k],a.g.retryParameters);q.method="HEAD";return u(w,kq(a,q,g),2)}v=w.h;y=v.headers["content-type"];return y?w["return"](y.split(";")[0]):
|
|
696
|
+
(x=n.mp4,w["return"](x))})}function iq(a){var b,c;L(function(d){if(1==d.g){if(!a.j)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.Ca,a.B.R(b),va(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.B.R(.1);z(d)})}function qq(a,b){a.m=b;a.i&&a.i.dc(a.m==jq);a.m!=jq||a.B.stop()}function kq(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);Pe(a.D,b);return b.promise}M("shaka.hls.HlsParser",hq);
|
|
697
697
|
var Lq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Xq={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",
|
|
698
698
|
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"}},Iq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Pp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Pp(a,"URI");b=gq(b);b=Fb(b.data);b=jc("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=
|
|
699
699
|
Pp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Pp(a,"URI");a=gq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vn(a,b);return jc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},jq="VOD",Nq="EVENT",Mq="LIVE",nq={Be:jq,ag:Nq,Ae:Mq};Ag.m3u8=function(){return new hq};yg["application/x-mpegurl"]=function(){return new hq};yg["application/vnd.apple.mpegurl"]=function(){return new hq};function Yq(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,ke:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Lc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Zq(){}function $q(a,b,c,d){var e=new ar;nf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new br,g={Ud:!1,we:!1};a=cr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new De(a,function(){g.Ud=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new O(function(){g.we=!0;f.abort()});h.R(b/1E3);a["finally"](function(){h.stop()})}return a}
|
|
@@ -712,7 +712,7 @@ r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=v
|
|
|
712
712
|
function zr(a,b,c,d){a=vr(a.g,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={jc:e.jc},f=c.next())e.jc=f.value,b["delete"](e.jc).onsuccess=function(g){return function(){return d(g.jc)}}(e);return a.promise()}
|
|
713
713
|
function Ar(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=wr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Jb:h.Jb,Hb:h.Hb},l=k.next())h.Hb=l.value,h.Jb=e.get(h.Hb),h.Jb.onsuccess=function(n){return function(){void 0==n.Jb.result&&g.push(n.Hb);f[n.Hb]=n.Jb.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 Br(a){this.g=new ur(a)}Br.prototype.destroy=function(){return this.g.destroy()};Br.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=wr(a.g,"session-ids","readonly"),c=[],u(d,tr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Br.prototype.add=function(a){var b=vr(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()};
|
|
714
714
|
Br.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=vr(b.g,"session-ids"),u(d,tr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Cr(){this.g=new Map}Cr.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)};Cr.prototype.init=function(){var a=this;Dr.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)};
|
|
715
|
-
function Er(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{
|
|
715
|
+
function Er(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ga: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 Fr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ga:d,la:f},e)})})}
|
|
716
716
|
function Gr(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 Hr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Ir(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()}
|
|
717
717
|
function Jr(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Dr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Kr(a,b){Dr.set(a,b)}M("shaka.offline.StorageMuxer",Cr);Cr.unregister=function(a){Dr["delete"](a)};Cr.register=Kr;Cr.prototype.destroy=Cr.prototype.destroy;var Dr=new Map;function Lr(){xr.apply(this,arguments)}pa(Lr,xr);Lr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=vr(c.g,c.h);e=d.store();f=new pc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
|
|
718
718
|
Lr.prototype.Rb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Mr(a.periods[c],e),b.push(f);return u(h,$o(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
|
|
@@ -730,7 +730,7 @@ new Qr(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contain
|
|
|
730
730
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
|
|
731
731
|
r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
|
|
732
732
|
r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Ur(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
|
|
733
|
-
function Ur(){var a=new pc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}Kr("idb",function(){return zc()||vc()||!window.indexedDB?null:new Tr});function Vr(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Vr.prototype.
|
|
733
|
+
function Ur(){var a=new pc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}Kr("idb",function(){return zc()||vc()||!window.indexedDB?null:new Tr});function Vr(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Vr.prototype.Ga=function(){return this.i};Vr.prototype.la=function(){return this.h};Vr.prototype.key=function(){return this.l};Vr.prototype.toString=function(){return this.j};
|
|
734
734
|
function Wr(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 Vr(b,c,d,Number(a[4])):null};function Xr(a,b){this.h=a;this.g=b}
|
|
735
735
|
function Yr(a,b){var c=new S(null,0);c.Ha(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Zr(a,d,e,c);e=b.streams.filter(function(l){return l.type==nc}).map(function(l){return $r(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return $r(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=
|
|
736
736
|
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}}
|
|
@@ -739,37 +739,37 @@ e.value,g=$r(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.va
|
|
|
739
739
|
function $r(a,b,c){var d=b.segments.map(function(e){return as(a,e)});c.yb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U(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,
|
|
740
740
|
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function as(a,b){var c=new Vr("segment",a.h,a.g,b.dataKey);return new Ei(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?bs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
741
741
|
function bs(a,b){var c=new Vr("segment",a.h,a.g,b);return new Ci(function(){return[c.toString()]},0,null)};function cs(){this.g=null}r=cs.prototype;r.configure=function(){};
|
|
742
|
-
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=Wr(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Cr;ua(m);return u(m,e.init(),4);case 4:return u(m,Gr(e,d.
|
|
743
|
-
r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new Cr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Gr(e,d.
|
|
742
|
+
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=Wr(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Cr;ua(m);return u(m,e.init(),4);case 4:return u(m,Gr(e,d.Ga(),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 Xr(d.Ga(),d.la()),l=Yr(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
743
|
+
r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new Cr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Gr(e,d.Ga(),d.la()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
|
|
744
744
|
yg["application/x-offline-manifest"]=function(){return new cs};function ds(){}function es(a){var b=Wr(a);b&&"manifest"==b.g?(a={uri:a,ke:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ge(a)):a=b&&"segment"==b.g?fs(b.key(),b):Ee(new N(2,1,9004,a));return a}
|
|
745
|
-
function fs(a,b){var c=new Cr;return Ge(void 0).Z(function(){return c.init()}).Z(function(){return Gr(c,b.
|
|
745
|
+
function fs(a,b){var c=new Cr;return Ge(void 0).Z(function(){return c.init()}).Z(function(){return Gr(c,b.Ga(),b.la())}).Z(function(d){return d.getSegments([b.key()])}).Z(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",ds);ds.plugin=es;Re("offline",es);function gs(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,hs(y.info,p)){y.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=is(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l["return"](d)}})}
|
|
746
746
|
function is(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new Mf({jb:b,onError:function(){},Gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,Uf(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 F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),u(f,cg(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
|
|
747
747
|
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 A(h,2),u(h,dg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
748
|
-
function hs(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 js(a,b,c){var d=b.presentationTimeline.getDuration();b=ks(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function ls(a,b){var c=Yr(new Xr(a.
|
|
748
|
+
function hs(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 js(a,b,c){var d=b.presentationTimeline.getDuration();b=ks(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function ls(a,b){var c=Yr(new Xr(a.Ga(),a.la()),b),d=b.appMetadata||{};c=ks(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
|
|
749
749
|
function ks(a){var b=[],c=fe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Xd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Yd(c.value));return b};function ms(){this.g={}}function ns(a,b,c){c=c.endTime-c.startTime;return os(a,b)*c}function os(a,b){var c=a.g[b];null==c&&(c=0);return c};function ps(a){var b=this;if(a&&a.constructor!=V)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ub()):(this.h=rk(),this.g=new Qe);this.j=[];this.i=[];this.l=[];var c=!a;this.m=new af(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.l.map(function(l){return mr(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.A(4);break}return u(k,b.g.destroy(),
|
|
750
750
|
4);case 4:b.h=null,b.g=null,z(k)}})})}function qs(){if(sc())a:{var a=t(Dr.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=ps.prototype;r.destroy=function(){return this.m.destroy()};
|
|
751
751
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ok(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 tk(this.h,a)};r.getConfiguration=function(){var a=rk();tk(a,this.h,rk());return a};r.Ub=function(){return this.g};
|
|
752
752
|
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new lr(this.g);this.l.push(f);b=rs(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return u(k,xg(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Rb(h))})},e,f);var g=new De(b,function(){return mr(f)});g["finally"](function(){fb(d.l,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.");
|
|
753
753
|
return g.promise.then(h)};return ss(this,g)};r.hf=function(){Kb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
|
|
754
754
|
function rs(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x;return L(function(w){switch(w.g){case 1:return ts(),h=g=null,k=new Cr,m=l=null,A(w,2,3),u(w,d(),5);case 5:return g=w.h,u(w,us(a,b,g,e),6);case 6:n=w.h;vs(a);p=!n.presentationTimeline.U()&&!n.presentationTimeline.ib();if(!p)throw new N(2,9,9005,b);return u(w,ws(a,n,function(D){m=m||D},e),7);case 7:h=w.h;vs(a);if(m)throw m;return u(w,xs(n,e),8);case 8:return u(w,k.init(),9);case 9:return vs(a),u(w,Er(k),10);case 10:return l=w.h,vs(a),u(w,ys(a,l.la,
|
|
755
|
-
h,n,b,c,e,f),11);case 11:q=w.h;vs(a);if(m)throw m;return u(w,l.la.addManifests([q]),12);case 12:return v=w.h,vs(a),y=new Vr("manifest",l.path.
|
|
755
|
+
h,n,b,c,e,f),11);case 11:q=w.h;vs(a);if(m)throw m;return u(w,l.la.addManifests([q]),12);case 12:return v=w.h,vs(a),y=new Vr("manifest",l.path.Ga,l.path.la,v[0]),w["return"](ls(y,q));case 3:return wa(w),a.j=[],u(w,k.destroy(),13);case 13:if(!g){w.A(14);break}return u(w,g.stop(),14);case 14:if(!h){w.A(16);break}return u(w,h.destroy(),16);case 16:xa(w,0);break;case 2:x=F(w);if(!l){w.A(18);break}return u(w,l.la.removeSegments(a.j,function(){}),18);case 18:throw m||x;}})}
|
|
756
756
|
function xs(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da;return L(function(sa){switch(sa.g){case 1:return c={width:Infinity,height:Infinity},Kd(a,b.restrictions,c),u(sa,Nd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;yd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Xd(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
|
|
757
757
|
d.push(Yd(q));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(Zd(x));return u(sa,b.offline.trackSelectionCallback(d),3);case 3:w=sa.h;D=a.presentationTimeline.getDuration();C=0;B=t(w);for(E=B.next();!E.done;E=B.next())G=E.value,H=G.bandwidth*D/8,C+=H;A(sa,4);return u(sa,b.offline.downloadSizeCallback(C),6);case 6:J=sa.h;if(!J)throw new N(2,9,9014);va(sa,5);break;case 4:I=F(sa);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:K=new Set;Q=new Set;T=new Set;R=t(w);for(E=
|
|
758
758
|
R.next();!E.done;E=R.next())da=E.value,"variant"==da.type&&K.add(da.id),"text"==da.type&&Q.add(da.id),"image"==da.type&&T.add(da.id);a.variants=a.variants.filter(function(Ma){return K.has(Ma.id)});a.textStreams=a.textStreams.filter(function(Ma){return Q.has(Ma.id)});a.imageStreams=a.imageStreams.filter(function(Ma){return T.has(Ma.id)});zs(a);z(sa)}})}
|
|
759
759
|
function ys(a,b,c,d,e,f,g,h){var k,l,m,n,p,q,v,y,x,w,D,C;return L(function(B){switch(B.g){case 1:return k=js(e,d,f),l=g.offline.progressCallback,m=function(E,G){k.size=G;l(k,E)},n=function(E,G){v&&g.offline.usePersistentLicense&&y==G&&bg(c,"cenc",E)},nr(h,m,n),p=d.variants.some(function(E){var G=E.audio&&E.audio.encrypted;return E.video&&E.video.encrypted||G}),q=d.variants.some(function(E){return(E.video?E.video.drmInfos:[]).concat(E.audio?E.audio.drmInfos:[]).some(function(G){return G.initData&&
|
|
760
760
|
G.initData.length})}),v=p&&!q,y=null,v&&(x=c.g,y=As.get(x.keySystem)),ua(B),D=w=Bs(a,h,b,c,d,e,f,g),u(B,rr(h),4);case 4:D.size=B.h;w.expiration=c.Tb();C=hg(c);w.sessionIds=g.offline.usePersistentLicense?C:[];if(p&&g.offline.usePersistentLicense&&!C.length)throw new N(2,9,9007);return B["return"](w);case 2:return wa(B),u(B,h.destroy(),5);case 5:xa(B,0)}})}r.remove=function(a){return Cs(this,Ds(this,a))};
|
|
761
|
-
function Ds(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:ts();c=Wr(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Cr;ua(k);return u(k,e.init(),4);case 4:return u(k,Gr(e,d.
|
|
761
|
+
function Ds(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:ts();c=Wr(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Cr;ua(k);return u(k,e.init(),4);case 4:return u(k,Gr(e,d.Ga(),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([Es(a,h,e),Fs(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
|
|
762
762
|
function Gs(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:$c(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:$c(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Es(a,b,c){return L(function(d){return u(d,Hs(a.g,a.h.drm,c,b),0)})}
|
|
763
763
|
function Fs(a,b,c){function d(){}var e=Is(c);ls(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Gf=function(){return Cs(this,Js(this))};
|
|
764
764
|
function Js(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return ts(),b=a.g,c=a.h.drm,d=new Cr,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],Hr(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,gs(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
|
|
765
|
-
r.list=function(){return Cs(this,Ks())};function Ks(){var a,b,c;return L(function(d){switch(d.g){case 1:return ts(),a=[],b=new Cr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Fr(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ls(new Vr("manifest",e.
|
|
765
|
+
r.list=function(){return Cs(this,Ks())};function Ks(){var a,b,c;return L(function(d){switch(d.g){case 1:return ts(),a=[],b=new Cr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Fr(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ls(new Vr("manifest",e.Ga,e.la,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
|
|
766
766
|
function us(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),vs(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,vs(a),k=Ls(h),u(l,Promise.all(lf(k,
|
|
767
767
|
function(m){return m.createSegmentIndex()})),3);vs(a);if(e)throw e;return l["return"](h)})}function ws(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new Mf({jb:a.g,onError:c,Gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Rf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,cg(e),3);case 3:return u(f,ag(e),4);case 4:return f["return"](e)}})}
|
|
768
768
|
function Bs(a,b,c,d,e,f,g,h){for(var k=new ms,l=t(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,q=m.video;p&&!q&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&q&&(n.g[q.id]=q.bandwidth||m.bandwidth);if(p&&q){var v=p.bandwidth||393216,y=q.bandwidth||m.bandwidth-v;0>=y&&(y=m.bandwidth);n.g[p.id]=v;n.g[q.id]=y}}l=t(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=t(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
|
|
769
769
|
n.set(null,Promise.resolve(null));m=new Map;p=Ls(e);l=new Map;p=t(p);for(q=p.next();!q.done;q=p.next())q=q.value,v=Ms(a,b,c,k,e,q,h,n,m),l.set(q.id,v);a=t(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.g)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
|
|
770
770
|
expiration:d.Tb(),streams:a,sessionIds:h?hg(d):[],drmInfo:b,appMetadata:g}}
|
|
771
771
|
function Ms(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
|
|
772
|
-
tilesLayout:f.tilesLayout},m=f.id;Ns(f,e.presentationTimeline.
|
|
772
|
+
tilesLayout:f.tilesLayout},m=f.id;Ns(f,e.presentationTimeline.Pa(),function(n){var p=Os(a,b,m,f.id,c,d,n.h,g,h),q=Ps(a,b,m,f.id,c,d,n,g,k);qr(b,m,function(){var v,y;return L(function(x){if(1==x.g)return u(x,p,2);if(3!=x.g)return v=x.h,u(x,q,3);y=x.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(x)})})});return l}
|
|
773
773
|
function Os(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=nj(g.ma(),g.ia,g.ba,h.streaming.retryParameters);b=or(b,c,h,.5*os(f,d),!0,function(l){var m;return L(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.j.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
|
|
774
774
|
function Ps(a,b,c,d,e,f,g,h,k){var l=[g.ma()[0],g.ia,g.ba].join("-");if(k.has(l))return k.get(l);h=nj(g.ma(),g.ia,g.ba,h.streaming.retryParameters);b=or(b,c,h,ns(f,d,g),!1,function(m){var n;return L(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.j.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Ns(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function vs(a){if(a.m.g)throw new N(2,9,7001);}
|
|
775
775
|
function ts(){if(!qs())throw new N(2,9,9E3);}function Cs(a,b){return L(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);fb(a.i,b);return xa(c,0)})}function ss(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){fb(a.i,c)})}
|
|
@@ -797,27 +797,27 @@ function vt(a){var b=this.mediaKeys;b&&b!=a&&zt(b,null);delete this.mediaKeys;re
|
|
|
797
797
|
function xt(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
798
798
|
k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=t(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
799
799
|
xt.prototype.createMediaKeys=function(){var a=new wt(this.keySystem);return Promise.resolve(a)};xt.prototype.getConfiguration=function(){return this.g};function wt(a){this.h=new WebKitMediaKeys(a);this.g=new cf}wt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Bt(this.h,a)};wt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
800
|
-
function zt(a,b){a.g.
|
|
800
|
+
function zt(a,b){a.g.Ra();if(!b)return Promise.resolve();a.g.v(b,"webkitneedkey",At);try{return Li(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Bt(a){Le.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new cf;this.sessionId="";this.expiration=NaN;this.closed=new pc;this.keyStatuses=new Ct}pa(Bt,Le);r=Bt.prototype;
|
|
801
801
|
r.generateRequest=function(a,b){var c=this;this.g=new pc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.v(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Gb(e.message));e=new P("message",e);c.dispatchEvent(e)});this.j.v(d,"webkitkeyadded",function(){c.h&&(Dt(c,"usable"),c.h.resolve(),c.h=null)});this.j.v(d,"webkitkeyerror",function(){var e=
|
|
802
802
|
Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Dt(c,"output-not-allowed");break;default:Dt(c,"internal-error")}});Dt(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
803
|
-
r.update=function(a){this.h=new pc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.
|
|
803
|
+
r.update=function(a){this.h=new pc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Dt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new P("keystatuseschange");a.dispatchEvent(c)}
|
|
804
804
|
function Ct(){this.size=0;this.g=void 0}r=Ct.prototype;r.forEach=function(a){this.g&&a(this.g,vg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=vg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};Rs(ut);function Et(){}function Ft(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Gt,window.MediaKeySystemAccess=Ht,navigator.requestMediaKeySystemAccess=It,HTMLMediaElement.prototype.setMediaKeys=Jt)}function It(a,b){try{var c=new Ht(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
805
805
|
function Kt(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Gb(Wn(a.initData));this.dispatchEvent(b)}}Qs.PatchedMediaKeysMs=Et;Et.install=Ft;
|
|
806
806
|
function Ht(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
|
|
807
807
|
!0));if(e.videoCapabilities)for(h=t(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
808
808
|
Ht.prototype.createMediaKeys=function(){var a=new Gt(this.keySystem);return Promise.resolve(a)};Ht.prototype.getConfiguration=function(){return this.g};function Jt(a){var b=this.mediaKeys;b&&b!=a&&Lt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Lt(a,this):Promise.resolve()}function Gt(a){this.h=new MSMediaKeys(a);this.g=new cf}
|
|
809
|
-
Gt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Mt(this.h,a)};Gt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Lt(a,b){a.g.
|
|
809
|
+
Gt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Mt(this.h,a)};Gt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Lt(a,b){a.g.Ra();if(!b)return Promise.resolve();a.g.v(b,"msneedkey",Kt);try{return Li(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
|
|
810
810
|
function Mt(a){Le.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new cf;this.sessionId="";this.expiration=NaN;this.closed=new pc;this.keyStatuses=new Nt}pa(Mt,Le);r=Mt.prototype;
|
|
811
811
|
r.generateRequest=function(a,b){var c=this;this.g=new pc;try{this.i=this.l.createSession("video/mp4",Fb(b),null),this.j.v(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Gb(d.message));d=new P("message",d);c.dispatchEvent(d)}),this.j.v(this.i,"mskeyadded",function(){c.g?(Ot(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Ot(c,"usable"),c.h.resolve(),c.h=null)}),this.j.v(this.i,"mskeyerror",
|
|
812
812
|
function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Ot(c,"output-not-allowed");break;default:Ot(c,"internal-error")}}),Ot(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
813
|
-
r.update=function(a){this.h=new pc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.
|
|
813
|
+
r.update=function(a){this.h=new pc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Ot(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new P("keystatuseschange");a.dispatchEvent(c)}
|
|
814
814
|
function Nt(){this.size=0;this.g=void 0}r=Nt.prototype;r.forEach=function(a){this.g&&a(this.g,vg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=vg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};Rs(Ft);function Pt(){}function Qt(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Rt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=St,window.MediaKeys=Tt,window.MediaKeySystemAccess=Ut)}function Rt(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
815
815
|
function St(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Qs.PatchedMediaKeysNop=Pt;Pt.install=Qt;function Tt(){throw new TypeError("Illegal constructor.");}Tt.prototype.createSession=function(){};Tt.prototype.setServerCertificate=function(){};function Ut(){this.keySystem="";throw new TypeError("Illegal constructor.");}Ut.prototype.getConfiguration=function(){};Ut.prototype.createMediaKeys=function(){};Rs(Qt,-10);function Vt(){}function Wt(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Xt="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Yt;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Zt;window.MediaKeys=$t;window.MediaKeySystemAccess=au}}
|
|
816
816
|
function bu(a){var b=Xt;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Yt(a,b){try{var c=new au(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Zt(a){var b=this.mediaKeys;b&&b!=a&&cu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&cu(a,this);return Promise.resolve()}Qs.PatchedMediaKeysWebkit=Vt;Vt.install=Wt;
|
|
817
817
|
function au(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
|
|
818
818
|
m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=t(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
|
|
819
819
|
d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}au.prototype.createMediaKeys=function(){var a=new $t(this.g);return Promise.resolve(a)};au.prototype.getConfiguration=function(){return this.h};function $t(a){this.l=a;this.h=null;this.g=new cf;this.i=[];this.j=new Map}
|
|
820
|
-
function cu(a,b){a.h=b;a.g.
|
|
820
|
+
function cu(a,b){a.h=b;a.g.Ra();var c=Xt;b&&(a.g.v(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.v(b,c+"keymessage",function(d){var e=du(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new P("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.v(b,c+"keyadded",function(d){if(d=du(a,d.sessionId))eu(d,"usable"),
|
|
821
821
|
d.g&&d.g.resolve(),d.g=null}),a.g.v(b,c+"keyerror",function(d){var e=du(a,d.sessionId);e&&e.handleError(d)}))}$t.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new fu(b,this.l,a);this.i.push(a);return a};$t.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
822
822
|
function du(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function fu(a,b,c){Le.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new pc;this.keyStatuses=new gu}pa(fu,Le);r=fu.prototype;
|
|
823
823
|
r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?eu(this,"output-restricted"):1==b?eu(this,"expired"):eu(this,"internal-error"))};
|