shaka-player 4.7.10 → 4.7.11
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/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +1 -1
- package/dist/locales.js +31 -31
- package/dist/shaka-player.compiled.debug.js +27 -25
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +268 -267
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +30 -27
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +383 -382
- package/dist/shaka-player.ui.map +3 -3
- package/lib/ads/ad_manager.js +1 -1
- package/lib/deprecate/deprecate.js +1 -1
- package/lib/hls/hls_parser.js +22 -3
- package/lib/media/manifest_parser.js +3 -2
- package/lib/player.js +5 -5
- package/lib/polyfill/mediasource.js +5 -36
- package/lib/text/vtt_text_parser.js +2 -1
- package/lib/util/error.js +1 -0
- package/lib/util/ts_parser.js +2 -2
- package/package.json +2 -2
- package/ui/less/containers.less +1 -0
|
@@ -73,14 +73,14 @@ var ec=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
73
73
|
Copyright 2006 The Closure Library Authors
|
|
74
74
|
SPDX-License-Identifier: Apache-2.0
|
|
75
75
|
*/
|
|
76
|
-
function fc(a){var b;a instanceof fc?(gc(this,a.ab),this.Wb=a.Wb,hc(this,a.ob),ic(this,a.
|
|
77
|
-
r.toString=function(){var a=[],b=this.ab;b&&a.push(mc(b,nc,!0),":");if(b=this.ob){a.push("//");var c=this.Wb;c&&a.push(mc(c,nc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.
|
|
78
|
-
r.resolve=function(a){var b=this.clone();"data"===b.ab&&(b=new fc);var c=!!a.ab;c?gc(b,a.ab):c=!!a.Wb;c?b.Wb=a.Wb:c=!!a.ob;c?hc(b,a.ob):c=null!=a.
|
|
79
|
-
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.Ga=d:c=""!==a.g.toString();c?jc(b,a.g.clone()):c=!!a.Lb;c&&(b.Lb=a.Lb);return b};r.clone=function(){return new fc(this)};function gc(a,b,c){a.ab=c?kc(b,!0):b;a.ab&&(a.ab=a.ab.replace(/:$/,""))}function hc(a,b,c){a.ob=c?kc(b,!0):b}function ic(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.
|
|
76
|
+
function fc(a){var b;a instanceof fc?(gc(this,a.ab),this.Wb=a.Wb,hc(this,a.ob),ic(this,a.nc),this.Ga=a.Ga,jc(this,a.g.clone()),this.Lb=a.Lb):a&&(b=String(a).match(ec))?(gc(this,b[1]||"",!0),this.Wb=kc(b[2]||""),hc(this,b[3]||"",!0),ic(this,b[4]),this.Ga=kc(b[5]||"",!0),jc(this,b[6]||"",!0),this.Lb=kc(b[7]||"")):this.g=new lc(null)}r=fc.prototype;r.ab="";r.Wb="";r.ob="";r.nc=null;r.Ga="";r.Lb="";
|
|
77
|
+
r.toString=function(){var a=[],b=this.ab;b&&a.push(mc(b,nc,!0),":");if(b=this.ob){a.push("//");var c=this.Wb;c&&a.push(mc(c,nc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.nc;null!=b&&a.push(":",String(b))}if(b=this.Ga)this.ob&&"/"!=b.charAt(0)&&a.push("/"),a.push(mc(b,"/"==b.charAt(0)?oc:pc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Lb)&&a.push("#",mc(b,qc));return a.join("")};
|
|
78
|
+
r.resolve=function(a){var b=this.clone();"data"===b.ab&&(b=new fc);var c=!!a.ab;c?gc(b,a.ab):c=!!a.Wb;c?b.Wb=a.Wb:c=!!a.ob;c?hc(b,a.ob):c=null!=a.nc;var d=a.Ga;if(c)ic(b,a.nc);else if(c=!!a.Ga){if("/"!=d.charAt(0))if(this.ob&&!this.Ga)d="/"+d;else{var e=b.Ga.lastIndexOf("/");-1!=e&&(d=b.Ga.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(""):".."==
|
|
79
|
+
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.Ga=d:c=""!==a.g.toString();c?jc(b,a.g.clone()):c=!!a.Lb;c&&(b.Lb=a.Lb);return b};r.clone=function(){return new fc(this)};function gc(a,b,c){a.ab=c?kc(b,!0):b;a.ab&&(a.ab=a.ab.replace(/:$/,""))}function hc(a,b,c){a.ob=c?kc(b,!0):b}function ic(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.nc=b}else a.nc=null}
|
|
80
80
|
function jc(a,b,c){b instanceof lc?a.g=b:(c||(b=mc(b,rc)),a.g=new lc(b))}function kc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function mc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,sc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function sc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var nc=/[#\/\?@]/g,pc=/[#\?:]/g,oc=/[#\?]/g,rc=/[#\?@]/g,qc=/#/g;function lc(a){this.g=a||null}
|
|
81
|
-
function uc(a){if(!a.xa&&(a.xa={},a.
|
|
81
|
+
function uc(a){if(!a.xa&&(a.xa={},a.Nc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=lc.prototype;r.xa=null;r.Nc=null;function vc(a){uc(a);return a.Nc}r.add=function(a,b){uc(this);this.g=null;var c=this.xa.hasOwnProperty(a)?this.xa[a]:null;c||(this.xa[a]=c=[]);c.push(b);this.Nc++;return this};
|
|
82
82
|
r.set=function(a,b){uc(this);this.g=null;this.xa.hasOwnProperty(a)?this.xa[a]=[b]:this.add(a,b);return this};r.get=function(a){uc(this);return this.xa[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.xa)return"";var a=[],b;for(b in this.xa)for(var c=encodeURIComponent(b),d=this.xa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
83
|
-
r.clone=function(){var a=new lc;a.g=this.g;if(this.xa){var b={},c;for(c in this.xa)b[c]=this.xa[c].concat();a.xa=b;a.
|
|
83
|
+
r.clone=function(){var a=new lc;a.g=this.g;if(this.xa){var b={},c;for(c in this.xa)b[c]=this.xa[c].concat();a.xa=b;a.Nc=this.Nc}return a};function O(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(wc)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}O.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",O);var wc=!0;O.Severity={RECOVERABLE:1,CRITICAL:2};O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
84
84
|
O.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
|
|
85
85
|
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,
|
|
86
86
|
WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_CODEC_UNKNOWN:3021,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,
|
|
@@ -110,11 +110,11 @@ var gd=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
110
110
|
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
|
|
111
111
|
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
112
112
|
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
113
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function md(){this.g={}}r=md.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function nd(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function od(a){var b={},c;for(c in a)b[c]=a[c];return b};function pd(a){this.h=a;this.g=null}pd.prototype.U=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};pd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function qd(a){this.h=a;this.g=null}qd.prototype.
|
|
114
|
-
qd.prototype.tickAfter=qd.prototype.U;qd.prototype.tickNow=qd.prototype.
|
|
113
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function md(){this.g={}}r=md.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function nd(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function od(a){var b={},c;for(c in a)b[c]=a[c];return b};function pd(a){this.h=a;this.g=null}pd.prototype.U=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};pd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function qd(a){this.h=a;this.g=null}qd.prototype.qc=function(){this.stop();this.h();return this};qd.prototype.U=function(a){var b=this;this.stop();this.g=(new pd(function(){b.h()})).U(a);return this};qd.prototype.$a=function(a){var b=this;this.stop();this.g=(new pd(function(){b.g.U(a);b.h()})).U(a);return this};qd.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};N("shaka.util.Timer",qd);qd.prototype.stop=qd.prototype.stop;qd.prototype.tickEvery=qd.prototype.$a;
|
|
114
|
+
qd.prototype.tickAfter=qd.prototype.U;qd.prototype.tickNow=qd.prototype.qc;function rd(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function sd(a){return""!=td().canPlayType(a)}function ud(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function vd(){return wd("Xbox One")}function xd(){return wd("Tizen")}function yd(){return wd("Tizen 3")}function zd(){return wd("Tizen 2")}function Ad(){return wd("Web0S")&&wd("Chrome/38.0.2125.122 Safari/537.36")}function Bd(){return wd("CrKey")}
|
|
115
115
|
function Cd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!xd()&&!wd("PC=EOS")&&!wd("PC=APL")&&!wd("VirginMedia")&&!wd("SOPOpenBrowser")&&!Dd()&&!wd("AFT")&&!wd("WPE")}function Dd(){return wd("PlayStation 4")}function Id(){if(!Cd())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 wd(a){return(navigator.userAgent||"").includes(a)}
|
|
116
116
|
function td(){if(Jd)return Jd;Kd||(Kd=new qd(function(){Jd=null}));(Jd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Jd=document.createElement("video"));Kd.U(1);return Jd}var Kd=null,Jd=null;function Ld(){}
|
|
117
|
-
function Md(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Nd(e,b,c);if(d.length){b=new md;c=t(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(u,v){u=0;var x=[],z={};v=t(v);for(var y=v.next();!y.done;z={
|
|
117
|
+
function Md(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Nd(e,b,c);if(d.length){b=new md;c=t(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(u,v){u=0;var x=[],z={};v=t(v);for(var y=v.next();!y.done;z={Gc:z.Gc},y=v.next())z.Gc=y.value,y=d.filter(function(B){return function(A){return B.Gc.decodingInfos[0][A]}}(z)).length,y>u?(u=y,x=[z.Gc]):y==u&&x.push(z.Gc);f.push.apply(f,w(x))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
|
|
118
118
|
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=Kc(m.codecs),q=Kc(g.codecs);n==q&&g.bandwidth>m.bandwidth&&(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);e.set(k,l)}c=Array.from(b).sort(function(u,
|
|
119
119
|
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=bb();var p=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Kc(m.codecs),q=Kc(g.codecs),n!==q))continue;g.width>m.width||g.height>m.height?(l.push(g),p.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Kc(m.codecs),q=Kc(g.codecs),n==q&&g.bandwidth>m.bandwidth&&(l.push(g),p.push(g.id)))}else l.push(g),
|
|
120
120
|
p.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!p.includes(u.id)?!1:!0})}
|
|
@@ -159,9 +159,9 @@ r.trySuggestStreams=function(){null!=this.u&&this.o&&we(this)};r.getBandwidthEst
|
|
|
159
159
|
r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.F.U(xe)}),this.h.observe(this.l))};r.setCmsdManager=function(a){this.j=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
160
160
|
function we(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0}else if(Date.now()-a.u<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function ue(a,b,c,d,e){if(a.j){var f=a.j.Rf();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Pd(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
161
161
|
function ve(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}N("shaka.abr.SimpleAbrManager",te);te.prototype.configure=te.prototype.configure;te.prototype.setCmsdManager=te.prototype.setCmsdManager;te.prototype.setMediaElement=te.prototype.setMediaElement;te.prototype.playbackRateChanged=te.prototype.playbackRateChanged;te.prototype.setVariants=te.prototype.setVariants;
|
|
162
|
-
te.prototype.getBandwidthEstimate=te.prototype.getBandwidthEstimate;te.prototype.trySuggestStreams=te.prototype.trySuggestStreams;te.prototype.segmentDownloaded=te.prototype.segmentDownloaded;te.prototype.disable=te.prototype.disable;te.prototype.enable=te.prototype.enable;te.prototype.chooseVariant=te.prototype.chooseVariant;te.prototype.init=te.prototype.init;te.prototype.release=te.prototype.release;te.prototype.stop=te.prototype.stop;var xe=1;function ye(a,b){this.g=a;this.h=b}ye.prototype.toString=function(){return"v"+this.g+"."+this.h};function ze(a,b){var c=new ye(5,0),d=Ae,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Be(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ce(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ae=null;N("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});N("shaka.config.CodecSwitchingStrategy",{Hi:"reload",yg:"smooth"});function De(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}De.prototype.add=function(a,b,c){return
|
|
163
|
-
function
|
|
164
|
-
function Ge(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Mc(d)});b=b.codecs.split(",").map(function(d){return Mc(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function He(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Ie(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Je(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Ie.prototype.create=function(a){var b=this,c="smooth"==this.h&&bb(),d=a.filter(function(e){return
|
|
162
|
+
te.prototype.getBandwidthEstimate=te.prototype.getBandwidthEstimate;te.prototype.trySuggestStreams=te.prototype.trySuggestStreams;te.prototype.segmentDownloaded=te.prototype.segmentDownloaded;te.prototype.disable=te.prototype.disable;te.prototype.enable=te.prototype.enable;te.prototype.chooseVariant=te.prototype.chooseVariant;te.prototype.init=te.prototype.init;te.prototype.release=te.prototype.release;te.prototype.stop=te.prototype.stop;var xe=1;function ye(a,b){this.g=a;this.h=b}ye.prototype.toString=function(){return"v"+this.g+"."+this.h};function ze(a,b){var c=new ye(5,0),d=Ae,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Be(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ce(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var Ae=null;N("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});N("shaka.config.CodecSwitchingStrategy",{Hi:"reload",yg:"smooth"});function De(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}De.prototype.add=function(a,b,c){return Ee(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
163
|
+
function Ee(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||c&&!Ge(e,f)||!He(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Ge(a,b))&&He(a.roles,b.roles)));return d?!1:!0}De.prototype.values=function(){return this.g.values()};
|
|
164
|
+
function Ge(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Mc(d)});b=b.codecs.split(",").map(function(d){return Mc(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function He(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Ie(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Je(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Ie.prototype.create=function(a){var b=this,c="smooth"==this.h&&bb(),d=a.filter(function(e){return Ee(b.i,e,!c,b.g)});return d.length?new De(d[0],d,!c,this.g):this.j.create(a)};
|
|
165
165
|
function Je(a,b,c,d,e,f,g,h,k,l){this.s=a;this.u=b;this.h=c;this.i=d;this.A=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.o=void 0===l?!1:l}
|
|
166
166
|
Je.prototype.create=function(a){var b=[];b=Ke(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Le(b,this.u);a.length&&(b=a);this.l&&(a=Me(b,this.l),a.length&&(b=a));this.i&&(a=Ne(b,this.i),a.length&&(b=a));this.h&&(a=Oe(b,this.h),a.length&&(b=a));this.g&&(a=Pe(b,this.g),a.length&&(b=a));this.j&&(a=Qe(b,this.j),a.length&&(b=a));a=Re(b,this.A);a.length&&(b=a);return new De(b[0],b,!("smooth"==this.m&&bb()),this.o)};
|
|
167
167
|
function Ke(a,b){b=dd(b);var c=ld(b,a.map(function(d){return kd(d)}));return c?a.filter(function(d){return c==kd(d)}):[]}function Le(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Pe(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Qe(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
@@ -193,10 +193,10 @@ function Of(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004)
|
|
|
193
193
|
function Qf(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=hb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Nf(c);if(254==c[0]&&255==c[1])return Of(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Of(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Of(a,!1);if(0==c[1]&&0==c[3])return Of(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Nf(a);throw new O(2,2,2003);}
|
|
194
194
|
function Rf(a){if(window.TextEncoder&&!Dd()){var b=new TextEncoder;return kb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return kb(b)}function Sf(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}N("shaka.util.StringUtils",Kf);Kf.resetFromCharCode=function(){Pf.g=void 0};Kf.toUTF16=Sf;Kf.toUTF8=Rf;Kf.fromBytesAutoDetect=Qf;Kf.fromUTF16=Of;
|
|
195
195
|
Kf.fromUTF8=Nf;var Pf=new Hf(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={yb:65536};0<b.yb;b={yb:b.yb},b.yb/=2)if(a(b.yb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.yb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.yb));return e}}(b);return null});function Tf(a,b){this.h=nb(a);this.i=b==Uf;this.g=0}r=Tf.prototype;r.ia=function(){return this.g<this.h.byteLength};r.qa=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.ga=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Vf();}};r.Ea=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Vf();}};r.L=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Vf();}};
|
|
196
|
-
r.fg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Vf();}};r.
|
|
196
|
+
r.fg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Vf();}};r.oc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Vf();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.ub=function(a){if(this.g+a>this.h.byteLength)throw Vf();var b=hb(this.h,this.g,a);this.g+=a;return b};
|
|
197
197
|
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Vf();this.g+=a};r.Rh=function(a){if(this.g<a)throw Vf();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Vf();this.g=a};r.ad=function(){for(var a=this.g;this.ia()&&0!=this.h.getUint8(this.g);)this.g+=1;a=hb(this.h,a,this.g-a);this.g+=1;return Nf(a)};function Vf(){return new O(2,3,3E3)}N("shaka.util.DataViewReader",Tf);Tf.prototype.readTerminatedString=Tf.prototype.ad;Tf.prototype.seek=Tf.prototype.seek;Tf.prototype.rewind=Tf.prototype.Rh;
|
|
198
|
-
Tf.prototype.skip=Tf.prototype.skip;Tf.prototype.readBytes=Tf.prototype.ub;Tf.prototype.readUint64=Tf.prototype.
|
|
199
|
-
r.Yc=function(a,b,c,d){var e=b.qa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.L(),g=b.L(),h=$f(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.qa()+8>b.getLength()){this.g=!0;return}f=b.
|
|
198
|
+
Tf.prototype.skip=Tf.prototype.skip;Tf.prototype.readBytes=Tf.prototype.ub;Tf.prototype.readUint64=Tf.prototype.oc;Tf.prototype.readInt32=Tf.prototype.fg;Tf.prototype.readUint32=Tf.prototype.L;Tf.prototype.readUint16=Tf.prototype.Ea;Tf.prototype.readUint8=Tf.prototype.ga;Tf.prototype.getLength=Tf.prototype.getLength;Tf.prototype.getPosition=Tf.prototype.qa;Tf.prototype.hasMoreData=Tf.prototype.ia;var Uf=1;Tf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Uf};function Wf(){this.i=[];this.h=[];this.g=!1}r=Wf.prototype;r.box=function(a,b){a=Xf(a);this.i[a]=Yf;this.h[a]=b;return this};r.O=function(a,b){a=Xf(a);this.i[a]=Zf;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Tf(a,0);for(this.g=!1;a.ia()&&!this.g;)this.Yc(0,a,b,c)};
|
|
199
|
+
r.Yc=function(a,b,c,d){var e=b.qa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.L(),g=b.L(),h=$f(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.qa()+8>b.getLength()){this.g=!0;return}f=b.oc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Zf){if(d&&b.qa()+4>b.getLength()){this.g=!0;return}n=b.L();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.qa(),b=0<d?b.ub(d):new Uint8Array(0),b=new Tf(b,0),l({name:h,parser:this,
|
|
200
200
|
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.qa(),b.getLength()-b.qa()))}};function ag(a){for(var b=bg(a);a.reader.ia()&&!a.parser.g;)a.parser.Yc(a.start+b,a.reader,a.partialOkay)}function cg(a){for(var b=bg(a),c=a.reader.L(),d=0;d<c&&(a.parser.Yc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function dg(a){var b=bg(a);for(a.reader.skip(78);a.reader.ia()&&!a.parser.g;)a.parser.Yc(a.start+b,a.reader,a.partialOkay)}
|
|
201
201
|
function eg(a){return function(b){a(b.reader.ub(b.reader.getLength()-b.reader.qa()))}}function Xf(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function $f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function bg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}N("shaka.util.Mp4Parser",Wf);Wf.headerSize=bg;Wf.typeToString=$f;Wf.allData=eg;Wf.visualSampleEntry=dg;Wf.sampleDescription=cg;Wf.children=ag;Wf.prototype.parseNext=Wf.prototype.Yc;
|
|
202
202
|
Wf.prototype.parse=Wf.prototype.parse;Wf.prototype.stop=Wf.prototype.stop;Wf.prototype.fullBox=Wf.prototype.O;Wf.prototype.box=Wf.prototype.box;var Yf=0,Zf=1;function fg(){}function gg(a){a=hb(a);a=Pf.value()(a);return btoa(a)}function hg(a,b){b=void 0==b?!0:b;a=gg(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function ig(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function jg(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
@@ -215,13 +215,13 @@ function Sg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:
|
|
|
215
215
|
function Qg(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y;return K(function(B){if(1==B.g){if(c=Ug(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(A){return A.video&&A.video.drmInfos.length||A.audio&&A.audio.drmInfos.length?!0:!1});g||(h=If(a.h.servers),Vg(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Wg(m),q=t(n),p=q.next();!p.done;p=q.next())u=p.value,k.add(u);v=t(k);for(p=v.next();!p.done;p=
|
|
216
216
|
v.next())x=p.value,Xg(x,If(a.h.servers),If(a.h.advanced||{}),a.h.keySystemsMapping);return C(B,Vd(b,a.K,a.Y,a.h.preferredKeySystems),2)}z=g||Object.keys(a.h.servers).length;if(!z)return a.da=!0,B.return(Promise.resolve());y=Tg(a,void 0,b);return B.return(g?y:y.catch(function(){}))})}
|
|
217
217
|
function Yg(a){var b;return K(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.B(2);break}return C(c,a.G,3);case 3:return zf(a.j),c.return();case 2:return sa(c,4),a.G=a.m.setMediaKeys(a.s),C(c,a.G,6);case 6:ua(c,5);break;case 4:b=va(c),a.o(new O(2,6,6003,b.message));case 5:zf(a.j),E(c)}})}function Zg(a,b){return K(function(c){if(1==c.g)return C(c,Yg(a),2);$g(a,b.initDataType,hb(b.initData));E(c)})}
|
|
218
|
-
r.
|
|
218
|
+
r.Ic=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.s)return b.A.ja(a,"encrypted",function(){b.o(new O(2,6,6010))}),c.return();b.m=a;b.A.ja(b.m,"play",function(){for(var d=t(b.J),e=d.next();!e.done;e=d.next())ah(b,e.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.A.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Og(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
|
|
219
219
|
b.u.size?C(c,Yg(b),2):c.B(2)}bh(b).catch(function(){});b.F||b.u.size||b.h.parseInbandPsshEnabled||b.A.D(b.m,"encrypted",function(d){return Zg(b,d)});E(c)})};
|
|
220
220
|
function ch(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=qf([a.g.serverCertificateUri],a.h.retryParameters);sa(g,3);c=a.C.Tb.request(5,b);return C(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=hb(d.data);ua(g,4);break;case 3:throw e=va(g),new O(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
221
221
|
sa(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=va(g),new O(2,6,6004,f.message);}})}function dh(a,b){var c,d,e;return K(function(f){if(1==f.g)return C(f,eh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.hb=new Ze,d.push(e.hb);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);E(f)})}
|
|
222
222
|
function bh(a){var b,c,d,e,f;return K(function(g){if(1==g.g){if(!a.u.size)return g.B(2);a.u.forEach(function(h,k){eh(a,k,h)});return C(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&fh(a))return g.return(a.l);a.l=new Ze;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,$g(a,f.initDataType,f.initData);c.length||a.l.resolve();return g.return(a.l)})}
|
|
223
223
|
function $g(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(fb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&gh(a)&&(a.l.resolve(),a.l=new Ze,a.l.catch(function(){}));hh(a,b,c,a.g.sessionType)}}function ih(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function jh(a){a=a.i.keys();a=Ff(a,function(b){return b.sessionId});return Array.from(a)}
|
|
224
|
-
r.Fe=function(){var a=this,b=this.i.keys();b=Ff(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.
|
|
224
|
+
r.Fe=function(){var a=this,b=this.i.keys();b=Ff(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.Qc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Bd=function(){return Jf(this.ea)};
|
|
225
225
|
function Tg(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z;return K(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=kh(a,c,d);y.B(2);break}return C(y,lh(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new O(2,6,6001);zf(a.j);sa(y,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());q=t(k);for(m=q.next();!m.done;m=q.next())p=m.value,a.H.add(p.contentType.toLowerCase());if(c.length){var B=
|
|
226
226
|
f.keySystem;var A=d.get(f.keySystem);var D=[],F=[],J=[],G=[],H=new Set;mh(A,D,J,F,G,H);var I=a.K?"persistent-license":"temporary";B={keySystem:B,licenseServerUri:D[0],distinctiveIdentifierRequired:A[0].distinctiveIdentifierRequired,persistentStateRequired:A[0].persistentStateRequired,sessionType:A[0].sessionType||I,audioRobustness:A[0].audioRobustness||"",videoRobustness:A[0].videoRobustness||"",serverCertificate:J[0],serverCertificateUri:F[0],initData:G,keyIds:H};A=t(A);for(D=A.next();!D.done;D=
|
|
227
227
|
A.next())D=D.value,D.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(B.persistentStateRequired=D.persistentStateRequired);A=B}else A=f.keySystem,B=b.get(f.keySystem),D=[],F=[],J=[],G=[],H=new Set,mh(B.drmInfos,D,J,F,G,H),A={keySystem:A,licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?
|
|
@@ -253,18 +253,18 @@ function Vg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseSer
|
|
|
253
253
|
function mh(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={Fa:g.Fa},h=a.next()){g.Fa=h.value;b.includes(g.Fa.licenseServerUri)||b.push(g.Fa.licenseServerUri);d.includes(g.Fa.serverCertificateUri)||d.push(g.Fa.serverCertificateUri);g.Fa.serverCertificate&&(c.some(function(m){return function(n){return fb(n,m.Fa.serverCertificate)}}(g))||c.push(g.Fa.serverCertificate));if(g.Fa.initData){h={};for(var k=t(g.Fa.initData),l=k.next();!l.done;h={kd:h.kd},l=k.next())h.kd=l.value,e.some(function(m){return function(n){var q=
|
|
254
254
|
m.kd;return n.keyId&&n.keyId==q.keyId?!0:n.initDataType==q.initDataType&&fb(n.initData,q.initData)}}(h))||e.push(h.kd)}if(g.Fa.keyIds)for(h=t(g.Fa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
255
255
|
function Xg(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
|
|
256
|
-
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var uh=1,ph=5,rh=.5,xh=new Hf(function(){return kb(new Uint8Array([0]))});function yh(){}function
|
|
256
|
+
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var uh=1,ph=5,rh=.5,xh=new Hf(function(){return kb(new Uint8Array([0]))});function yh(){}function zh(a,b){if(b){var c=Ah[b.toLowerCase()];if(c)return c}throw new O(2,4,4E3,a,b);}N("shaka.media.ManifestParser",yh);yh.unregisterParserByMime=function(a){delete Ah[a]};yh.registerParserByMime=function(a,b){Ah[a]=b};yh.registerParserByExtension=function(){ze("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};yh.AccessibilityPurpose={Yi:"visually impaired",ui:"hard of hearing"};var Ah={};function Ch(a){function b(){d=!0}function c(l){f.push(l);ag(l)}a=hb(a);var d=!1,e,f=[],g=[];(new Wf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).O("stsd",function(l){e=l;f.push(l);cg(l)}).O("encv",b).O("enca",b).O("dvav",function(l){g.push({box:l,Ma:1701733238})}).O("dva1",function(l){g.push({box:l,Ma:1701733238})}).O("dvh1",function(l){g.push({box:l,Ma:1701733238})}).O("dvhe",function(l){g.push({box:l,Ma:1701733238})}).O("hev1",function(l){g.push({box:l,Ma:1701733238})}).O("hvc1",
|
|
257
257
|
function(l){g.push({box:l,Ma:1701733238})}).O("avc1",function(l){g.push({box:l,Ma:1701733238})}).O("avc3",function(l){g.push({box:l,Ma:1701733238})}).O("ac-3",function(l){g.push({box:l,Ma:1701733217})}).O("ec-3",function(l){g.push({box:l,Ma:1701733217})}).O("ac-4",function(l){g.push({box:l,Ma:1701733217})}).O("mp4a",function(l){g.push({box:l,Ma:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw Ya(kg(a)),new O(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
|
|
258
258
|
a=Dh(a,e,k.box,f,k.Ma);return a}
|
|
259
259
|
function Dh(a,b,c,d,e){var f=Eh.value(),g=a.subarray(c.start,c.start+c.size),h=nb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=nb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Fh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=vd()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Fh(e,d.start,d.size+k.byteLength);k=nb(e,b.start);b=bg(b);a=k.getUint32(b);
|
|
260
|
-
k.setUint32(b,a+1);return e}function Fh(a,b,c){a=nb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Eh=new Hf(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Gh(a,b,c,d,e,f,g){this.Z=a;this.Qa=b;this.wa=c;this.Ve=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g;this.mimeType=this.codecs=null}Gh.prototype.
|
|
261
|
-
Gh.prototype.getStartByte=Gh.prototype.
|
|
260
|
+
k.setUint32(b,a+1);return e}function Fh(a,b,c){a=nb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Eh=new Hf(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Gh(a,b,c,d,e,f,g){this.Z=a;this.Qa=b;this.wa=c;this.Ve=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g;this.mimeType=this.codecs=null}Gh.prototype.ic=function(){return this.Qa};Gh.prototype.fc=function(){return this.wa};function Hh(a,b){return a===b?!0:a&&b?a.ic()==b.ic()&&a.fc()==b.fc()&&xb(a.Z().sort(),b.Z().sort())&&fb(a.g,b.g):a==b}N("shaka.media.InitSegmentReference",Gh);Gh.prototype.getEndByte=Gh.prototype.fc;
|
|
261
|
+
Gh.prototype.getStartByte=Gh.prototype.ic;
|
|
262
262
|
function S(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,v){l=void 0===l?[]:l;p=void 0===p?Ih:p;this.startTime=a;this.h=this.endTime=b;this.A=c;this.Qa=d;this.wa=e;this.aa=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.u=void 0===n?null:n;this.ca=void 0===q?null:q;this.status=p;this.l=!1;this.j=!0;this.m=!1;this.aes128Key=void 0===u?null:u;this.s=null;this.i=0;this.o=void 0===v?!1:v;this.Md=this.Zc=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.ag();
|
|
263
|
-
this.o&&this.g.length&&this.g[this.g.length-1].$f();this.mimeType=this.codecs=null}r=S.prototype;r.Z=function(){return this.A()};r.getStartTime=function(){return this.startTime};r.Ug=function(){return this.endTime};r.
|
|
263
|
+
this.o&&this.g.length&&this.g[this.g.length-1].$f();this.mimeType=this.codecs=null}r=S.prototype;r.Z=function(){return this.A()};r.getStartTime=function(){return this.startTime};r.Ug=function(){return this.endTime};r.ic=function(){return this.Qa};r.fc=function(){return this.wa};r.lh=function(){return this.tilesLayout};r.kh=function(){return this.u};r.Pb=function(){return this.status};r.Bh=function(){this.status=Jh};r.Ue=function(){this.l=!0};r.xh=function(){return this.l};r.Od=function(){this.j=!1};
|
|
264
264
|
r.uh=function(){return this.j};r.ag=function(){this.Zc=!0};r.wh=function(){return this.Zc};r.$f=function(){this.Md=!0};r.vh=function(){return this.Md};r.Zf=function(){this.m=!0};r.rh=function(){return this.m};r.pg=function(a){this.s=a};r.jh=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.h+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.h+=a};
|
|
265
265
|
r.tf=function(a){null==this.ca?Ra("Sync attempted without sync time!"):(a=this.ca-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};N("shaka.media.SegmentReference",S);S.prototype.syncAgainst=S.prototype.tf;S.prototype.offset=S.prototype.offset;S.prototype.getThumbnailSprite=S.prototype.jh;S.prototype.setThumbnailSprite=S.prototype.pg;S.prototype.hasByterangeOptimization=S.prototype.rh;S.prototype.markAsByterangeOptimization=S.prototype.Zf;S.prototype.isLastPartial=S.prototype.vh;
|
|
266
|
-
S.prototype.markAsLastPartial=S.prototype.$f;S.prototype.isPartial=S.prototype.wh;S.prototype.markAsPartial=S.prototype.ag;S.prototype.isIndependent=S.prototype.uh;S.prototype.markAsNonIndependent=S.prototype.Od;S.prototype.isPreload=S.prototype.xh;S.prototype.markAsPreload=S.prototype.Ue;S.prototype.markAsUnavailable=S.prototype.Bh;S.prototype.getStatus=S.prototype.Pb;S.prototype.getTileDuration=S.prototype.kh;S.prototype.getTilesLayout=S.prototype.lh;S.prototype.getEndByte=S.prototype.
|
|
267
|
-
S.prototype.getStartByte=S.prototype.
|
|
266
|
+
S.prototype.markAsLastPartial=S.prototype.$f;S.prototype.isPartial=S.prototype.wh;S.prototype.markAsPartial=S.prototype.ag;S.prototype.isIndependent=S.prototype.uh;S.prototype.markAsNonIndependent=S.prototype.Od;S.prototype.isPreload=S.prototype.xh;S.prototype.markAsPreload=S.prototype.Ue;S.prototype.markAsUnavailable=S.prototype.Bh;S.prototype.getStatus=S.prototype.Pb;S.prototype.getTileDuration=S.prototype.kh;S.prototype.getTilesLayout=S.prototype.lh;S.prototype.getEndByte=S.prototype.fc;
|
|
267
|
+
S.prototype.getStartByte=S.prototype.ic;S.prototype.getEndTime=S.prototype.Ug;S.prototype.getStartTime=S.prototype.getStartTime;S.prototype.getUris=S.prototype.Z;var Ih=0,Jh=1;S.Status={gi:Ih,Wi:Jh,Ai:2};function Kh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Lh(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Mh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Nh(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
268
268
|
function Oh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Nh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Nh(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};/*
|
|
269
269
|
@license
|
|
270
270
|
Shaka Player
|
|
@@ -276,7 +276,7 @@ function Th(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
|
|
|
276
276
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Nf(hb(a.data,1,d));a=Nf(hb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Nf(hb(a.data,1,d));a=Nf(hb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Nf(hb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
277
277
|
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=kb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Nf(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Nf(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=kb(a.data),b):null}
|
|
278
278
|
function Uh(a){for(var b=0,c=[];Qh(a,b);){var d=Sh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Sh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Th(e))&&c.push(f);b+=e.size+10}Rh(a,b)&&(b+=10)}return c}function Vh(a,b){for(var c=b=void 0===b?0:b,d=0;Qh(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Sh(a,b+6),Rh(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}N("shaka.util.Id3Utils",Ph);Ph.getID3Data=Vh;
|
|
279
|
-
Ph.getID3Frames=Uh;function Wh(a,b){var c=null,d=null,e=null,f=a.L();b&1&&(e=a.
|
|
279
|
+
Ph.getID3Frames=Uh;function Wh(a,b){var c=null,d=null,e=null,f=a.L();b&1&&(e=a.oc());b&2&&a.skip(4);b&8&&(c=a.L());b&16&&(d=a.L());return{trackId:f,Kf:c,Mg:d,$i:e}}function Xh(a,b){return 1==b?(b=a.L(),a=a.L(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.L()}}function Yh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.L();a.skip(4);a=a.Ea();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
280
280
|
function Zh(a,b,c){var d=a.L(),e=[],f=null;c&1&&(f=a.L());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={hf:null,sampleSize:null,Wd:null};c&256&&(h.hf=a.L());c&512&&(h.sampleSize=a.L());c&1024&&a.skip(4);c&2048&&(h.Wd=0==b?a.L():a.fg());e.push(h)}return{dj:d,ig:e,Lg:f}}
|
|
281
281
|
function $h(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.L();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.Ea()+a.Ea()/16;a=a.Ea()+a.Ea()/16;return{trackId:c,width:b,height:a}}
|
|
282
282
|
function ai(a){for(var b="mp4a",c,d;a.ia();){c=a.ga();for(var e=a.ga();e&128;)e=a.ga();if(3==c)a.Ea(),e=a.ga(),e&128&&a.Ea(),e&64&&a.skip(a.ga()),e&32&&a.Ea();else if(4==c)d=a.ga(),a.skip(12);else if(5==c)break}d&&(b+="."+this.g(d),5==c&&a.ia()&&(c=a.ga(),d=(c&248)>>3,31===d&&a.ia()&&(d=32+((c&7)<<3)+((a.ga()&224)>>5)),b+="."+d));return{ha:b}}function bi(a,b){a.skip(87);return{ha:b+"."+this.g(a.ga())+this.g(a.ga())+this.g(a.ga())}}function ci(a){a=a.L();return{ha:$f(a)}};/*
|
|
@@ -303,19 +303,19 @@ k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(-
|
|
|
303
303
|
"hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.F=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.s=f.audio,this.o=f.audioCodec);-1!=f.Jd&&(this.u=f.Jd);d&&!this.C&&(d=!1,e=b-188);this.C=!0;break;case this.F:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.s:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&
|
|
304
304
|
this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);break;case this.u:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
305
305
|
function pi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),packetLength:a[4]<<8|a[5],pts:null,dts:null,nalus:[]};if(b.packetLength&&b.packetLength>a.byteLength-6)return null;var c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));c=a[8]+9;if(a.byteLength<=c)return null;b.data=a.subarray(c);return b}
|
|
306
|
-
r.Hh=function(a){ze("TsParser","Please use parseNalus function instead.");return this.cf(a)};
|
|
306
|
+
r.Hh=function(a){ze("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.cf(a)};
|
|
307
307
|
r.cf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var q=a[n];if(q){if(2<=g&&1==q){b&&!h.length&&-1==k&&(q=n-(3<g?3:g),c&&0!=q&&(q=a.subarray(0,q),b.data=lg(b.data,q),b.fullData=lg(b.fullData,q)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=lg(b.data,k),b.fullData=lg(b.fullData,k)));if(n>=e-f)return h;
|
|
308
308
|
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=lg(b.data,a),b.fullData=lg(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=lg.apply(fg,w(c.value)),(c=pi(c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Uh(c.data),dts:c.dts,pts:c.pts});return a};
|
|
309
309
|
r.Mb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=lg.apply(fg,w(c.value)),e=pi(d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=lg(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
310
|
-
r.
|
|
311
|
-
d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Mb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.
|
|
312
|
-
r.Fd=function(){for(var a=[],b=t(this.
|
|
310
|
+
r.kc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=lg.apply(fg,w(d.value)),f=pi(e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=lg(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.cf(d,g,void 0),
|
|
311
|
+
d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Mb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.kc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.Pc=function(){return{audio:this.o,video:this.m}};
|
|
312
|
+
r.Fd=function(){for(var a=[],b=t(this.kc()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};r.oh=function(){ze("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Je();return{height:a.height,width:a.width}};r.Je=function(){return"hvc"==this.m?qi(this):ri(this)};
|
|
313
313
|
function ri(a){var b={height:null,width:null,ha:null};a=a.Fd();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new di(a.data);var c=ki(a),d=ki(a),e=ki(a);ii(a);if(si.includes(c)){var f=T(a);3===f&&fi(a,1);ii(a);ii(a);fi(a,1);if(U(a)){f=3!==f?8:12;for(var g=0;g<f;g++)U(a)&&(6>g?li(a,16):li(a,64))}}ii(a);f=T(a);if(0===f)T(a);else if(1===f)for(fi(a,1),ii(a),ii(a),f=T(a),g=0;g<f;g++)ii(a);ii(a);fi(a,1);f=T(a);g=T(a);var h=gi(a,1);0===h&&fi(a,1);fi(a,1);var k=0,l=0,m=0,n=
|
|
314
314
|
0;U(a)&&(k=T(a),l=T(a),m=T(a),n=T(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.ha="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
315
315
|
function qi(a){var b={height:null,width:null,ha:null};a=a.Fd();if(!a.length)return b;a=a.find(function(A){return 33==A.type});if(!a)return b;var c=new di(a.fullData,!0);ki(c);ki(c);gi(c,4);var d=gi(c,3);U(c);var e=gi(c,2),f=gi(c,1),g=gi(c,5),h=gi(c,32);a=ki(c);for(var k=ki(c),l=ki(c),m=ki(c),n=ki(c),q=ki(c),p=ki(c),u=[],v=[],x=0;x<d;x++)u.push(U(c)),v.push(U(c));if(0<d)for(x=d;8>x;x++)gi(c,2);for(x=0;x<d;x++)u[x]&&gi(c,88),v[x]&&ki(c);T(c);d=T(c);3==d&&gi(c,1);u=T(c);v=T(c);var z=x=0,y=0,B=0;U(c)&&
|
|
316
316
|
(x+=T(c),z+=T(c),y+=T(c),B+=T(c));b.width=String(u-(x+z)*(1===d||2===d?2:1));b.height=String(v-(y+B)*(1===d?2:1));c=function(A){for(var D=0,F=0;32>F;F++)D|=(A>>F&1)<<31-F;return D>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;q&&(e+="."+q.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
|
|
317
|
-
a.toString(16).toUpperCase());b.ha=e;return b}function ti(a){return 0>oi(a)?!1:!0}function oi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}N("shaka.util.TsParser",ni);ni.syncOffset=oi;ni.probe=ti;ni.prototype.getVideoInfo=ni.prototype.Je;ni.prototype.getVideoResolution=ni.prototype.oh;ni.prototype.getVideoNalus=ni.prototype.Fd;ni.prototype.getCodecs=ni.prototype.
|
|
318
|
-
ni.prototype.getVideoData=ni.prototype.
|
|
317
|
+
a.toString(16).toUpperCase());b.ha=e;return b}function ti(a){return 0>oi(a)?!1:!0}function oi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}N("shaka.util.TsParser",ni);ni.syncOffset=oi;ni.probe=ti;ni.prototype.getVideoInfo=ni.prototype.Je;ni.prototype.getVideoResolution=ni.prototype.oh;ni.prototype.getVideoNalus=ni.prototype.Fd;ni.prototype.getCodecs=ni.prototype.Pc;ni.prototype.getStartTime=ni.prototype.getStartTime;
|
|
318
|
+
ni.prototype.getVideoData=ni.prototype.kc;ni.prototype.getAudioData=ni.prototype.Mb;ni.prototype.getMetadata=ni.prototype.getMetadata;ni.prototype.parseNalus=ni.prototype.cf;ni.prototype.parseAvcNalus=ni.prototype.Hh;ni.prototype.parse=ni.prototype.parse;ni.prototype.clearData=ni.prototype.clearData;ni.Timescale=9E4;var si=[100,110,122,244,44,83,86,118,128,138,139,134];function ui(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Sa("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,ze("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Sa("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Sa("Could not find LCEVC Library on this page"),
|
|
319
319
|
a=!1):(this.h.SupportObject.SupportStatus||Sa(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function vi(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
320
320
|
ui.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function wi(a,b,c){var d=xi,e=yi;switch(b.mimeType){case "video/webm":d=zi;break;case "video/mp4":d=Ai}switch(c){case "DASH":e=Bi;break;case "HLS":e=Ci}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}N("shaka.lcevc.Dec",ui);ui.prototype.release=ui.prototype.release;var xi=0,zi=1,Ai=2,Ci=0,Bi=1,yi=-1;function Di(a,b,c,d){var e=this;this.i=a;this.C=null;this.F=b;this.g={};this.G={};this.ma={};this.h=null;this.Y=!1;this.Aa=c||function(){};this.N=d||null;this.j={};this.s=new Af;this.m={};this.H=null;this.J=new Ze;this.K="";this.da=!1;this.l=Ei(this,this.J);this.A=!1;this.I=new yf(function(){return Fi(e)});this.u=!1;this.W="UNKNOWN";this.ka=this.za=!1;this.Ba=new Ze;this.o=!1;this.ea=!0;this.V=null}
|
|
321
321
|
function Ei(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.ea=!0});a.s.D(c,"endstreaming",function(){a.ea=!1});a.s.ja(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.ja(a.i,"playing",function(){a.da=!0});a.K=Gi(c);a.i.src=a.K;return c}c=new MediaSource;a.s.ja(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.ja(a.i,"playing",function(){a.da=!0});a.K=Gi(c);a.i.src=a.K;return c}
|
|
@@ -338,7 +338,7 @@ function $i(a,b,c,d,e,f,g,h,k){var l,m,n;return K(function(q){if(1==q.g){l=Ec;if
|
|
|
338
338
|
l.P,function(){var p=l.P;a.g[p].appendWindowStart=0;a.g[p].appendWindowEnd=e;a.g[p].appendWindowStart=d;Ki(a,p)}));return C(q,Promise.all(m),0)})}function bj(a,b,c){var d;return K(function(e){if(1==e.g){d=Ec;if(b==d.na)return e.return();Si(a,b,function(){return Ti(a,b)});a.o&&Si(a,d.P,function(){return Ti(a,d.P)});return C(e,Si(a,b,function(){return Ui(a,b,c)}),2)}return a.o?C(e,Si(a,d.P,function(){return Ui(a,d.P,c)}),0):e.B(0)})}
|
|
339
339
|
r.endOfStream=function(a){var b=this;return K(function(c){return C(c,cj(b,function(){Li(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Pa=function(a){var b=this;return K(function(c){return C(c,cj(b,function(){if(a<b.l.duration)for(var d in b.g){var e={start:function(){},p:new Ze};b.j[d].unshift(e)}b.l.duration=a;b.V=a}),0)})};r.getDuration=function(){return this.l.duration};function Yi(a,b,c,d){d<=c?Ki(a,b):a.g[b].remove(c,d)}
|
|
340
340
|
function Ti(a,b){var c=a.g[b].appendWindowStart,d=a.g[b].appendWindowEnd;a.g[b].abort();a.g[b].appendWindowStart=c;a.g[b].appendWindowEnd=d;Ki(a,b)}function Ui(a,b,c){0>c&&(c+=.001);a.g[b].timestampOffset=c;Ki(a,b)}function Ki(a,b){if(!a.A){var c=a.j[b][0];c&&(c.p.resolve(),dj(a,b))}}function Si(a,b,c){zf(a.I);c={start:c,p:new Ze};a.j[b].push(c);1==a.j[b].length&&ej(a,b);return c.p}
|
|
341
|
-
function cj(a,b){var c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:zf(a.I);c=[];d={};for(e in a.g)d.
|
|
341
|
+
function cj(a,b){var c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:zf(a.I);c=[];d={};for(e in a.g)d.yc=new Ze,f={start:function(m){return function(){return m.yc.resolve()}}(d),p:d.yc},a.j[e].push(f),c.push(d.yc),1==a.j[e].length&&f.start(),d={yc:d.yc};sa(l,2);return C(l,Promise.all(c),4);case 4:ua(l,3);break;case 2:throw g=va(l),g;case 3:return sa(l,5,6),C(l,b(),6);case 6:wa(l);for(h in a.g)dj(a,h);ya(l,0);break;case 5:throw k=va(l),new O(2,3,3015,k,a.i.error||"No error in the media element");
|
|
342
342
|
}})}function dj(a,b){a.j[b].shift();ej(a,b)}function ej(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d,a.i.error||"No error in the media element")),dj(a,b)}}function Vi(a,b,c,d){var e=a.ma[d];a.C.insertFakeEncryptionInInit&&null==c&&e&&(xd()||vd()||wd("SOPOpenBrowser"))&&"mp4"==a.G[d].split(";")[0].split("/")[1]&&(b=Ch(b));return b}
|
|
343
343
|
function fj(a,b,c,d){return Si(a,b,function(){b!==Dc&&(bb()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.g[b].changeType(c+a.C.sourceBufferExtraFeatures),a.G[b]=c),Ki(a,b))})}
|
|
344
344
|
function gj(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G;return K(function(H){switch(H.g){case 1:c=Ec;a.A=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.da&&(a.i.autoplay=!1);ta(H,2);a.s.Za();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch($c)),n=t(l.slice(1)),q=n.next();!q.done;q=n.next())p=q.value,p.p.reject(new O(2,7,7003,void 0));for(u in a.g){v=a.g[u];try{a.l.removeSourceBuffer(v)}catch(I){}}return C(H,Promise.all(g),
|
|
@@ -346,13 +346,13 @@ function gj(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G;return K(func
|
|
|
346
346
|
e;f||a.i.play()}),ya(H,0)}})}function hj(a,b){return cj(a,function(){return gj(a,b)})}
|
|
347
347
|
function aj(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){if(1==A.g){f=Ec;if(b==f.na)return A.return(!1);g=Mc(Oc(a.G[b]));h=Nc(a.G[b]);l=!1;m=Gc(c,d);n=a.C.forceTransmux;if(!Za(m)||!a.u&&Hc.includes(m)||d.includes(","))n=!0;n&&(q=Ic(c,d),p=$b(q))&&(k=p(),u=Bc(f.P,(d||"").split(",")),v=Bc(f.$,(d||"").split(",")),u&&v?(l=!0,x=v,b==f.P&&(x=u),m=k.convertCodecs(b,Ic(c,x))):m=k.convertCodecs(b,q));z=Mc(Oc(m));y=Nc(m);if(g===z&&h===y)return A.return(!1);B=!0;if(a.o||l&&k&&!a.m[b])B=
|
|
348
348
|
!1;if(B&&"smooth"===a.C.codecSwitchingStrategy&&bb())return C(A,fj(a,b,m,k),3);k&&k.destroy();return C(A,hj(a,e),3)}return A.return(!0)})}
|
|
349
|
-
function ij(a,b,c){if(b==Dc)var d=!1;else{d=Mc(Oc(a.G[b]));var e=Nc(a.G[b]),f=Gc(c.mimeType,c.codecs),g=a.C.forceTransmux;if(!Za(f)||!a.u&&Hc.includes(f)||c.codecs.includes(","))g=!0;c=Ic(c.mimeType,c.codecs);g&&(g=$b(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=Mc(Oc(f));f=Nc(f);d=d!==b||e!==f}return d?"smooth"!==a.C.codecSwitchingStrategy||!bb()||a.o:!1}var Gi=window.URL.createObjectURL,Ji="sequence";function jj(a,b,c){this.i=a;this.o=b;this.u=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.C=!0;this.F=0;this.A=void 0===c?!0:c;this.G=0;this.m=!1}r=jj.prototype;r.getDuration=function(){return this.j};r.$g=function(){return this.g};r.qf=function(a){this.i=a};r.Pa=function(a){this.j=a};r.eh=function(){return this.i};r.mg=function(a){this.s=a};r.
|
|
349
|
+
function ij(a,b,c){if(b==Dc)var d=!1;else{d=Mc(Oc(a.G[b]));var e=Nc(a.G[b]),f=Gc(c.mimeType,c.codecs),g=a.C.forceTransmux;if(!Za(f)||!a.u&&Hc.includes(f)||c.codecs.includes(","))g=!0;c=Ic(c.mimeType,c.codecs);g&&(g=$b(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=Mc(Oc(f));f=Nc(f);d=d!==b||e!==f}return d?"smooth"!==a.C.codecSwitchingStrategy||!bb()||a.o:!1}var Gi=window.URL.createObjectURL,Ji="sequence";function jj(a,b,c){this.i=a;this.o=b;this.u=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.C=!0;this.F=0;this.A=void 0===c?!0:c;this.G=0;this.m=!1}r=jj.prototype;r.getDuration=function(){return this.j};r.$g=function(){return this.g};r.qf=function(a){this.i=a};r.Pa=function(a){this.j=a};r.eh=function(){return this.i};r.mg=function(a){this.s=a};r.pc=function(a){this.C=a};r.Xd=function(a){this.u=a};r.ng=function(a){this.o=a};r.Tg=function(){return this.o};
|
|
350
350
|
r.dg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Sd(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.A&&!this.m&&(this.i=(Date.now()+this.s)/1E3-this.h-this.g)}};
|
|
351
351
|
r.Xc=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.s)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Sd(b);this.h=Math.max(this.h,c);null!=this.i&&this.A&&!this.m&&(this.i=d-this.h-this.g)}};r.Nd=function(){this.m=!0};r.yh=function(){return this.m};r.Sd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};
|
|
352
352
|
r.Ye=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.R=function(){return Infinity==this.j&&!this.C};r.Rb=function(){return Infinity!=this.j&&!this.C};r.eb=function(){return Math.max(this.F,this.Bb()-this.u)};r.qg=function(a){this.F=a};r.Bb=function(){return this.R()||this.Rb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j};
|
|
353
|
-
r.
|
|
354
|
-
jj.prototype.getSeekRangeEnd=jj.prototype.qb;jj.prototype.getSeekRangeStart=jj.prototype.
|
|
355
|
-
jj.prototype.notifyMinSegmentStartTime=jj.prototype.Sd;jj.prototype.isStartTimeLocked=jj.prototype.yh;jj.prototype.lockStartTime=jj.prototype.Nd;jj.prototype.notifySegments=jj.prototype.Xc;jj.prototype.notifyTimeRange=jj.prototype.dg;jj.prototype.getDelay=jj.prototype.Tg;jj.prototype.setDelay=jj.prototype.ng;jj.prototype.setSegmentAvailabilityDuration=jj.prototype.Xd;jj.prototype.setStatic=jj.prototype.
|
|
353
|
+
r.Rc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.u?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Bb()-this.u+a,this.qb()))};r.hc=function(){return this.Rc(0)};r.qb=function(){return Math.max(0,this.Bb()-(this.R()||this.Rb()?this.o:0))};r.ug=function(){return null==this.i||null!=this.h&&this.A?!1:!0};r.lg=function(a){this.G=a};N("shaka.media.PresentationTimeline",jj);jj.prototype.setAvailabilityTimeOffset=jj.prototype.lg;jj.prototype.usingPresentationStartTime=jj.prototype.ug;
|
|
354
|
+
jj.prototype.getSeekRangeEnd=jj.prototype.qb;jj.prototype.getSeekRangeStart=jj.prototype.hc;jj.prototype.getSafeSeekRangeStart=jj.prototype.Rc;jj.prototype.getSegmentAvailabilityEnd=jj.prototype.Bb;jj.prototype.setUserSeekStart=jj.prototype.qg;jj.prototype.getSegmentAvailabilityStart=jj.prototype.eb;jj.prototype.isInProgress=jj.prototype.Rb;jj.prototype.isLive=jj.prototype.R;jj.prototype.offset=jj.prototype.offset;jj.prototype.notifyMaxSegmentDuration=jj.prototype.Ye;
|
|
355
|
+
jj.prototype.notifyMinSegmentStartTime=jj.prototype.Sd;jj.prototype.isStartTimeLocked=jj.prototype.yh;jj.prototype.lockStartTime=jj.prototype.Nd;jj.prototype.notifySegments=jj.prototype.Xc;jj.prototype.notifyTimeRange=jj.prototype.dg;jj.prototype.getDelay=jj.prototype.Tg;jj.prototype.setDelay=jj.prototype.ng;jj.prototype.setSegmentAvailabilityDuration=jj.prototype.Xd;jj.prototype.setStatic=jj.prototype.pc;jj.prototype.setClockOffset=jj.prototype.mg;jj.prototype.getPresentationStartTime=jj.prototype.eh;
|
|
356
356
|
jj.prototype.setDuration=jj.prototype.Pa;jj.prototype.setPresentationStartTime=jj.prototype.qf;jj.prototype.getMaxSegmentDuration=jj.prototype.$g;jj.prototype.getDuration=jj.prototype.getDuration;function kj(a,b,c){this.j=c;this.l=a;this.s=lj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}kj.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function mj(a,b){a.i=b}function nj(a){this.g=a}function lj(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Nh(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 oj(a,b,c,d,e){var f=this;this.u=e;this.g=a;this.A=b;this.s=c;this.l=new Af;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return pj(f)});this.m=(new qd(function(){pj(f)})).$a(this.s.gapJumpTimerTime)}oj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.A=this.u=null};oj.prototype.af=function(){this.o=!0;pj(this)};
|
|
357
357
|
function pj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=lj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Oh(c,b,a.s.gapDetectionThreshold),null==
|
|
358
358
|
d||0==d&&!a.o||(e=c.start(d),e>=a.A.qb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.u(new Q("gapjumped")))))}}};function qj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=rj.value().get(b),c.ja(a,b,d))}var rj=new Hf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function sj(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new Af;this.i=new tj(a);qj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){uj(e,e.j())})}sj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function vj(a){return a.o?a.g.currentTime:a.j()}
|
|
@@ -360,9 +360,9 @@ function wj(a,b){0<a.g.readyState?xj(a.i,b):qj(a.g,HTMLMediaElement.HAVE_METADAT
|
|
|
360
360
|
function tj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new qd(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}tj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function xj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.$a(.1)};function zj(a){this.g=a;this.j=!1;this.h=null;this.i=new Af}r=zj.prototype;r.ie=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ja(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;qj(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.je=function(a){this.h=this.j?this.h:a};r.qd=function(){return(this.j?this.g.currentTime:this.h)||0};r.Bf=function(){return 0};
|
|
361
361
|
r.Af=function(){return 0};r.cg=function(){};
|
|
362
362
|
function Aj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.A=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=Bj(a,c,f);this.j=new oj(a,b.presentationTimeline,c,this.o,f);this.h=new sj(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=vj(g.h);h=Cj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;wj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
|
|
363
|
-
g.g.
|
|
363
|
+
g.g.hc():g.g.qb():0>h&&(h=g.g.qb()+h);return Dj(g,Ej(g,h))});this.m=new qd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=vj(g.h),k=g.g.hc(),l=g.g.qb();3>l-k&&(k=l-3);h<k&&(h=Cj(g,h),g.i.currentTime=h)}})}r=Aj.prototype;r.ie=function(){this.m.$a(.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.u=function(){}};r.je=function(a){wj(this.h,a)};
|
|
364
364
|
r.qd=function(){var a=vj(this.h);return 0<this.i.readyState&&!this.i.paused?Ej(this,a):a};r.Bf=function(){return this.o?this.o.o:0};r.Af=function(){return this.j.C};r.cg=function(){this.j.af()};function Dj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
365
|
-
function Cj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.
|
|
365
|
+
function Cj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.hc(),f=a.g.qb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Rc(c),k=a.g.Rc(d);c=a.g.Rc(c+d);return b>=g?Dj(a,b):b>f?f:b<e?Lh(a.i.buffered,k)?k:c:b>=h||Lh(a.i.buffered,b)?b:c}function Ej(a,b){var c=a.g.hc();if(b<c)return c;a=a.g.qb();return b>a?a:b}
|
|
366
366
|
function Bj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new kj(new nj(a),b.stallThreshold,c);mj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Fj(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Fj.prototype;r.Ab=function(){return this.g.length};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.Ch=function(){this.o=!0};function Gj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};
|
|
367
367
|
r.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};r.Qd=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,w(a))}};
|
|
368
368
|
r.Wc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Qd(a);this.bb(b)};r.bb=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
|
|
@@ -384,14 +384,14 @@ r.configure=function(a){this.h=a;this.G=new We({maxAttempts:Math.max(a.retryPara
|
|
|
384
384
|
(c.ra=null)}else 0<a.segmentPrefetchLimit&&(c.ra=kk(this,c.stream))};r.start=function(){var a=this;return K(function(b){if(1==b.g)return C(b,lk(a),2);zf(a.l);a.A=!0;E(b)})};
|
|
385
385
|
function mk(a,b){var c,d,e,f,g,h,k;K(function(l){switch(l.g){case 1:return c=Ec,a.F++,d=a.F,sa(l,2),C(l,Zi(a.g.T,c.na),4);case 4:ua(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=Gc(b.mimeType,b.codecs),Ii(a.g.T,f,a.m.sequenceMode,b.external),g=a.g.T.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.F==d&&(k=nk(a,b),a.i.set(c.na,k),ok(a,k,0)),E(l)}})}function pk(a){var b=a.i.get(Dc);b&&(ik(b),jk(b).catch(function(){}),a.i.delete(Dc));a.o=null}
|
|
386
386
|
function qk(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Ub&&(rk(a,b,!1,0,!1),c.Ub=d);else if(d=c.Ub)c.Ub=null,rk(a,d,!0,0,!1)}}function sk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.A&&(b.video&&rk(a,b.video,c,d,e,f),b.audio&&rk(a,b.audio,c,d,e,f))}function tk(a,b){K(function(c){if(1==c.g)return a.o=b,a.A?b.segmentIndex?c.B(2):C(c,b.createSegmentIndex(),2):c.return();rk(a,b,!0,0,!1);E(c)})}
|
|
387
|
-
function rk(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Dc?g&&(g.Ub&&(b.trickModeVideo?(g.Ub=b,b=b.trickModeVideo):g.Ub=null),g.stream!=b||e)&&(g.ra&&ek(g.ra,b),b.type==Dc&&(e=Gc(b.mimeType,b.codecs),Ii(a.g.T,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.X=null,g.Cf=!!f,c&&(g.
|
|
387
|
+
function rk(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Dc?g&&(g.Ub&&(b.trickModeVideo?(g.Ub=b,b=b.trickModeVideo):g.Ub=null),g.stream!=b||e)&&(g.ra&&ek(g.ra,b),b.type==Dc&&(e=Gc(b.mimeType,b.codecs),Ii(a.g.T,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.X=null,g.Cf=!!f,c&&(g.Lc?g.Zd=!0:g.Da?(g.wb=!0,g.vd=d,g.Zd=!0):(ik(g),uk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),vk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):mk(a,b)}
|
|
388
388
|
function vk(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.Na)return e.return();c=b.stream;d=b.Na;return c.segmentIndex?e.B(2):C(e,c.createSegmentIndex(),2)}if(b.Na!=d||b.stream!=c)return e.return();var f=a.g.Dd();var g=Oi(a.g.T,b.type),h=b.stream.segmentIndex.find(b.Ca?b.Ca.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Qa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.aa)&&(h+=(k.wa?k.wa-k.Qa:null)||0),k=a.g.getBandwidthEstimate(),
|
|
389
389
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Na.h.g>h?!0:!1):f=!1;f&&b.Na.abort();E(e)})}
|
|
390
390
|
r.dd=function(){if(this.g)for(var a=this.g.Dd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.X&&(e=c.X.current());if(!e||e.startTime>a||e.endTime<a)c.X=null;e=this.g.T;e.A?e=!1:d==Dc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Ni(e,d),e=Lh(e,a));e||((null!=Oi(this.g.T,d)||c.Da)&&wk(this,c),c.Na&&(c.Na.abort(),c.Na=null),d===Dc&&(d=this.g.T,d.H&&d.H.h()),c.dd=!0)}};
|
|
391
|
-
function wk(a,b){b.
|
|
391
|
+
function wk(a,b){b.Lc||b.wb||(b.Da?(b.wb=!0,b.vd=0):null==Mi(a.g.T,b.type)?null==b.ib&&ok(a,b,0):(ik(b),uk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
392
392
|
function lk(a){var b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){b=Ec;if(!a.j)throw new O(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.P,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.$,a.j.video),d.add(a.j.video));a.o&&(c.set(b.na,a.o),d.add(a.o));e=a.g.T;return C(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}zf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.i.has(h)||(l=nk(a,k),a.i.set(h,l),ok(a,l,0));
|
|
393
|
-
E(m)})}function nk(a,b){return{stream:b,type:b.type,X:null,ra:kk(a,b),Ca:null,Db:null,Re:null,Pe:null,Oe:null,Ub:null,endOfStream:!1,Da:!1,ib:null,wb:!1,vd:0,Zd:!1,
|
|
394
|
-
function yk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:zf(a.l);if(b.Da||null==b.ib||b.
|
|
393
|
+
E(m)})}function nk(a,b){return{stream:b,type:b.type,X:null,ra:kk(a,b),Ca:null,Db:null,Re:null,Pe:null,Oe:null,Ub:null,endOfStream:!1,Da:!1,ib:null,wb:!1,vd:0,Zd:!1,Lc:!1,dd:!0,Xe:!1,ff:!1,Tc:!1,Na:null}}function kk(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.h.segmentPrefetchLimit?new Xj(a.h.segmentPrefetchLimit,b,function(c,d,e){return xk(a,c,d,e)}):null}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.T.Pa(a):this.g.T.Pa(Math.pow(2,32))};
|
|
394
|
+
function yk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:zf(a.l);if(b.Da||null==b.ib||b.Lc)return h.return();b.ib=null;if(!b.wb){h.B(2);break}return C(h,uk(a,b,b.Zd,b.vd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Da||b.ib||ok(a,b,0),h.return();case 4:sa(h,6);d=zk(a,b);null!=d&&(ok(a,b,d),b.Tc=!1);ua(h,7);break;case 6:return e=
|
|
395
395
|
va(h),C(h,Ak(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return C(h,a.g.T.endOfStream(),10);case 10:zf(a.l),g=a.g.T.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Pa(g),E(h)}})}
|
|
396
396
|
function zk(a,b){if(Bk(b))return Wi(a.g.T,b.stream.originalId||""),null;b.type==Dc&&Xi(a.g.T);if(!a.g.T.ea&&b.type!=Dc)return a.h.updateIntervalSeconds/2;var c=a.g.Dd(),d=b.Ca?b.Ca.endTime:c,e=Pi(a.g.T,b.type,c),f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u),g=a.m.presentationTimeline.getDuration()-d,h=Oi(a.g.T,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Dc))&&Bk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/
|
|
397
397
|
2;e=Dk(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Bk(h)||h.X&&!h.X.current()||(f=Math.min(f,h.Ca?h.Ca.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.ra&&b.X&&(d=e.aa,!d||b.Ca&&Hh(d,b.Db)||bk(b.ra,d),Yj(b.ra,e));Ek(a,b,c,e).catch(function(){});return null}
|
|
@@ -405,14 +405,14 @@ function Fk(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v;return K(function(x){if(1==x.g)
|
|
|
405
405
|
new Map,a.j.audio&&z.set(d.P,a.j.audio),a.j.video&&z.set(d.$,a.j.video),sa(D,2),b.Pe=f,b.Oe=g,b.Qe=h,b.Yf=k,b.Re=l,y=a.m.sequenceMode||"HLS"==a.m.type,C(D,$i(a.g.T,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=D.g)return m&&(B=null,b.type===d.$?B=a.i.get(d.P):b.type===d.P&&(B=a.i.get(d.$)),B&&(B.wb=!1,B.Da=!1,wk(a,B))),ua(D,0);A=va(D);b.Pe=null;b.Oe=null;b.Qe=null;b.Re=null;throw A;})};return C(x,q(),2)}Hh(c.aa,b.Db)||(b.Db=c.aa,c.j&&c.aa&&(p=Ik(a,b,c.aa),u=function(){var z,
|
|
406
406
|
y,B,A,D,F;return K(function(J){switch(J.g){case 1:return sa(J,2),C(J,p,4);case 4:return z=J.h,zf(a.l),y=null,B=new Map,A=new Wf,A.box("moov",ag).box("trak",ag).box("mdia",ag).O("mdhd",function(G){y=Yh(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.ub(4);var H=String.fromCharCode(G[0]);H+=String.fromCharCode(G[1]);H+=String.fromCharCode(G[2]);H+=String.fromCharCode(G[3]);switch(H){case "soun":B.set(d.P,y);break;case "vide":B.set(d.$,y)}y=null}).parse(z),B.has(b.type)?
|
|
407
407
|
c.aa.timescale=B.get(b.type):null!=y&&(c.aa.timescale=y),D=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(J,a.g.Ef(b.type,z),5);case 5:return C(J,Ri(a.g.T,b.type,z,null,b.stream,D),6);case 6:ua(J,0);break;case 2:throw F=va(J),b.Db=null,F;}})},a.g.Eh(c.startTime,c.aa),e.push(u())));a.m.sequenceMode&&(v=b.Ca?b.Ca.i:null,c.i!=v||b.Xe)&&(b.Xe=!1,e.push(bj(a.g.T,b.type,c.startTime)));return C(x,Promise.all(e),0)})}
|
|
408
|
-
function Hk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return K(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.C;if(l||m)k=new Wf;l&&k.O("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var x=u.reader.ad();var z=u.reader.ad();var y=u.reader.L();var B=u.reader.L();var A=u.reader.L();var D=u.reader.L();var F=e.startTime+B/y}else y=u.reader.L(),F=u.reader.
|
|
408
|
+
function Hk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return K(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.C;if(l||m)k=new Wf;l&&k.O("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var x=u.reader.ad();var z=u.reader.ad();var y=u.reader.L();var B=u.reader.L();var A=u.reader.L();var D=u.reader.L();var F=e.startTime+B/y}else y=u.reader.L(),F=u.reader.oc()/
|
|
409
409
|
y+e.timestampOffset,B=F-e.startTime,A=u.reader.L(),D=u.reader.L(),x=u.reader.ad(),z=u.reader.ad();u=u.reader.ub(u.reader.getLength()-u.reader.qa());if(v&&v.includes(x)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==x?a.g.Fh():(v=(new Map).set("detail",{startTime:F,endTime:F+A/y,schemeIdUri:x,value:z,timescale:y,presentationTimeDelta:B,eventDuration:A,id:D,messageData:u}),v=new Q("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=x&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
410
410
|
x||(x=Uh(u),x.length&&e&&a.g.Gh([{cueTime:e.startTime,data:u,frames:x,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.O("prft",function(u){if(!a.C&&e.aa.timescale){var v=u.reader,x=u.version;v.L();u=v.L();var z=v.L();u=1E3*u+z/Math.pow(2,32)*1E3;0===x?v=v.L():(x=v.L(),v=v.L(),v=x*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.aa.timescale*1E3)});v=new Q("prft",v);a.g.onEvent(v);
|
|
411
411
|
a.C=!0}});(l||m)&&k.parse(f);return C(p,Lk(a,b,c),2);case 2:return zf(a.l),n=b.dd,b.dd=!1,q=b.Cf,b.Cf=!1,C(p,a.g.Ef(b.type,f),3);case 3:return C(p,Ri(a.g.T,b.type,f,e,d,h,n,q,g),4);case 4:zf(a.l),E(p)}})}function Lk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Mi(a.g.T,b.type);if(null==e)return h.return();f=c-e;g=f-d;return 1>=g?h.return():C(h,a.g.T.remove(b.type,e,e+g),2)}zf(a.l);E(h)})}
|
|
412
412
|
function Bk(a){return a&&a.type==Dc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
413
413
|
function Ik(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof Gh&&(e=c.g))return l.return(e);f=null;if(b.ra){var m=b.ra;if(m.g.has(c)){var n=m.g.get(c);d&&(n.h=d);m.g.delete(c);f=n.g}else f=null}f||(f=xk(a,c,b.stream,d));g=0;b.X&&(g=b.X.g);b.Na=f;return C(l,f.promise,2);case 2:h=l.h;b.Na=null;k=h.data;if(!c.aes128Key){l.B(3);break}return C(l,Kk(k,c.aes128Key,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
414
414
|
function xk(a,b,c,d){var e=b instanceof S?b:void 0,f=e?1:0;b=fk(b.Z(),b.Qa,b.wa,a.h.retryParameters,d);return a.g.Tb.request(wf,b,{type:f,stream:c,segment:e})}
|
|
415
|
-
function uk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.wb=!1,b.Zd=!1,b.vd=0,b.
|
|
415
|
+
function uk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.wb=!1,b.Zd=!1,b.vd=0,b.Lc=!0,b.Ca=null,b.Db=null,b.X=null,b.ra&&ck(b.ra),d?(e=a.g.Dd(),f=a.g.T.getDuration(),C(g,a.g.T.remove(b.type,e+d,f),3)):C(g,Zi(a.g.T,b.type),4);if(3!=g.g)return zf(a.l),c?C(g,a.g.T.flush(b.type),3):g.B(3);zf(a.l);b.Lc=!1;b.endOfStream=!1;b.Da||b.ib||ok(a,b,0);E(g)})}
|
|
416
416
|
function ok(a,b,c){var d=b.type;if(d!=Dc||a.i.has(d))b.ib=(new pd(function(){var e;return K(function(f){if(1==f.g)return sa(f,2),C(f,yk(a,b),4);if(2!=f.g)return ua(f,0);e=va(f);if(a.g)a.g.onError(e);E(f)})})).U(c)}function ik(a){null!=a.ib&&(a.ib.stop(),a.ib=null)}function jk(a){return K(function(b){return a.Na?C(b,a.Na.abort(),0):b.B(0)})}
|
|
417
417
|
function Ak(a,b,c){var d;return K(function(e){if(1==e.g)return C(e,Ye(a.G),2);zf(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.wd(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);E(e)})}
|
|
418
418
|
function Mk(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.H<c)return h.return(!1);a.H=b;d=Ec;if(e=a.i.get(d.P))e.Db=null,wk(a,e),jk(e).catch(function(){});if(f=a.i.get(d.$))f.Db=null,wk(a,f),jk(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.P,a.j.audio);a.j.video&&g.set(d.$,a.j.video);return C(h,hj(a.g.T,g),2)}return h.return(!0)})};function Nk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:var n=(new fc(a)).Ga.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Ok[d])return m.return(e);f=0;g=qf([a],c);sa(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ua(m,3);break;case 2:k=va(m);if(!k||1002!=k.code&&1001!=k.code){m.B(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
@@ -477,46 +477,47 @@ preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restric
|
|
|
477
477
|
logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};f.trackSelectionCallback=function(h){return K(function(k){return k.return(Rl(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return g}
|
|
478
478
|
function Sl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Fl(a,b,c||Ql(),d,"")}
|
|
479
479
|
function Rl(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=ld(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return dd(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
|
|
480
|
-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Dc&&"image"!=c.type||b.push(c);return b}N("shaka.util.PlayerConfiguration",Pl);Pl.mergeConfigObjects=Sl;Pl.createDefault=Ql;function Tl(){this.g=null;this.h=[]}function Ul(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Vl(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 Wl(){this.i=this.h=null;this.g=[]}function Xl(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 Yl(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.K=this.N=this.H=this.I=this.J=this.l=this.o=NaN;this.g=new Tl;this.h=new Wl};function W(a,b){jf.call(this);var c=this;this.l=Zl;this.xd=this.h=null;this.da=!1;this.Gd=new Af;this.
|
|
481
|
-
this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.lb=this.g.preferredTextLanguage;this.
|
|
482
|
-
this.A.configure(this.g.ads));this.Gd.D(window,"online",function(){dm(c);c.gf()});this.yd=new qd(function(){return em(c)});a&&(ze("Player","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.
|
|
480
|
+
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Dc&&"image"!=c.type||b.push(c);return b}N("shaka.util.PlayerConfiguration",Pl);Pl.mergeConfigObjects=Sl;Pl.createDefault=Ql;function Tl(){this.g=null;this.h=[]}function Ul(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Vl(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 Wl(){this.i=this.h=null;this.g=[]}function Xl(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 Yl(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.K=this.N=this.H=this.I=this.J=this.l=this.o=NaN;this.g=new Tl;this.h=new Wl};function W(a,b){jf.call(this);var c=this;this.l=Zl;this.xd=this.h=null;this.da=!1;this.Gd=new Af;this.sc=new Af;this.o=new Af;this.Ba=new Af;this.C=this.G=this.m=this.H=null;this.Kd=0;this.W=new Il;this.ma=this.ea=this.i=this.Ld=this.F=this.j=this.za=this.J=this.eg=this.Y=this.V=this.Aa=this.K=this.I=this.$b=null;this.mb=!1;this.Ne=this.s=null;this.We=1E9;this.Oc=[];this.N=NaN;this.g=$l(this);this.Id={width:Infinity,height:Infinity};this.u=null;this.kb=new Je(this.g.preferredAudioLanguage,this.g.preferredVariantRole,
|
|
481
|
+
this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.lb=this.g.preferredTextLanguage;this.Kc=this.g.preferredTextRole;this.Jc=this.g.preferForcedSubs;this.Hc=[];b&&b(this);this.V=am(this);this.Y=new yl(this.g.cmsd);this.H=bm(this);this.H.nf(this.g.streaming.forceHTTPS);this.A=null;cm&&(this.A=cm(),
|
|
482
|
+
this.A.configure(this.g.ads));this.Gd.D(window,"online",function(){dm(c);c.gf()});this.yd=new qd(function(){return em(c)});a&&(ze("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Ic(a,!0))}oa(W,jf);function fm(a){null!=a.J&&(vi(a.J),a.J.release(),a.J=null)}
|
|
483
483
|
function gm(a,b){if(b.lcevc.enabled){var c=a.Cb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(ud()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Sa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));fm(a);null==a.J&&(a.J=new ui(a.h,a.eg,b.lcevc),a.G&&(a.G.N=a.J))}else fm(a)}function hm(a,b){return new Q(a,b)}r=W.prototype;
|
|
484
|
-
r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==im)return c.return();fm(a);b=a.detach();a.l=im;return C(c,b,2);case 2:a.Gd&&(a.Gd.release(),a.Gd=null);a.
|
|
484
|
+
r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==im)return c.return();fm(a);b=a.detach();a.l=im;return C(c,b,2);case 2:a.Gd&&(a.Gd.release(),a.Gd=null);a.sc&&(a.sc.release(),a.sc=null);a.o&&(a.o.release(),a.o=null);a.Ba&&(a.Ba.release(),a.Ba=null);a.Ne=null;a.g=null;a.u=null;a.xd=null;a.V=null;a.Y=null;if(!a.H){c.B(3);break}return C(c,a.H.destroy(),4);case 4:a.H=null;case 3:a.s&&(a.s.release(),a.s=null),jf.prototype.release.call(a),E(c)}})};
|
|
485
485
|
function jm(a,b){a.dispatchEvent(hm("onstatechange",(new Map).set("state",b)))}
|
|
486
|
-
r.
|
|
487
|
-
r.Eg=function(a){this.eg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return K(function(c){if(1==c.g){if(b.l==im)throw new O(2,7,7E3);return C(c,b.
|
|
488
|
-
r.
|
|
486
|
+
r.Ic=function(a,b){b=void 0===b?!0:b;var c=this,d,e;return K(function(f){switch(f.g){case 1:if(c.l==im)throw new O(2,7,7E3);if(!c.h||c.h==a){f.B(2);break}return C(f,c.detach(),2);case 2:return C(f,km(c,"attach"),4);case 4:if(f.h)return f.return();sa(f,5,6);jm(c,"attach");d=function(){var g=lm(c);g&&mm(c,g)};c.sc.D(a,"error",d);c.h=a;if(!b||!rd()||c.G){f.B(6);break}return C(f,nm(c),6);case 6:wa(f);c.W.release();ya(f,0);break;case 5:return e=va(f),C(f,c.detach(),10);case 10:throw e;}})};
|
|
487
|
+
r.Eg=function(a){this.eg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return K(function(c){if(1==c.g){if(b.l==im)throw new O(2,7,7E3);return C(c,b.rc(!1,a),2)}if(3!=c.g)return C(c,km(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.sc.Za(),b.h=null),jm(b,"detach"),b.A&&!a&&b.A.release()}finally{b.W.release()}E(c)})};function km(a,b){var c;return K(function(d){return 1==d.g?(c=++a.Kd,C(d,Jl(a.W,b),2)):c!=a.Kd?(a.W.release(),d.return(!0)):d.return(!1)})}
|
|
488
|
+
r.rc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return K(function(q){switch(q.g){case 1:return c.l!=im&&(c.l=Zl),C(q,km(c,"unload"),2);case 2:if(q.h)return q.return();ta(q,3);c.mb=!1;jm(c,"unload");a&&!rd()&&(a=!1);fm(c);d=c.Hc.map(function(p){return p()});c.Hc=[];return C(q,Promise.all(d),5);case 5:c.dispatchEvent(hm("unloading"));c.Aa&&(c.Aa.release(),c.Aa=null);c.h&&(c.o.Za(),c.Ba.Za());c.yd.stop();c.$b&&(c.$b.release(),c.$b=null);if(!c.F){q.B(6);break}return C(q,
|
|
489
489
|
c.F.stop(),7);case 7:c.F=null,c.Ld=null;case 6:if(!c.s){q.B(8);break}return C(q,c.s.stop(),8);case 8:if(!c.j){q.B(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.I&&(c.I.release(),c.I=null);c.C&&(c.C.release(),c.C=null);if(!c.G){q.B(12);break}return C(q,c.G.destroy(),13);case 13:c.G=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.Y&&(c.Y.g=null);c.h&&Xk(c.h);if(!c.h||!c.h.src){q.B(14);break}return C(q,new Promise(function(p){return(new qd(p)).U(.1)}),15);case 15:c.h.removeAttribute("src"),
|
|
490
|
-
c.h.load();case 14:if(!c.m){q.B(16);break}return C(q,c.m.destroy(),17);case 17:c.m=null;case 16:c.ea=null;c.K=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.u=new Yl;c.Te=null;c.
|
|
490
|
+
c.h.load();case 14:if(!c.m){q.B(16);break}return C(q,c.m.destroy(),17);case 17:c.m=null;case 16:c.ea=null;c.K=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.u=new Yl;c.Te=null;c.Oc=[];c.N=NaN;om(c);case 3:wa(q);c.W.release();ya(q,4);break;case 4:if(a&&
|
|
491
491
|
rd()&&!c.G)return C(q,nm(c),0);q.B(0)}})};r.ei=function(a){this.ma=a};
|
|
492
|
-
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:if(d.l==im)throw new O(2,7,7E3);return C(m,Jl(d.W,"load"),2);case 2:d.W.release();if(!d.h)throw new O(2,7,7002);if(!d.ea){m.B(3);break}return C(m,d.
|
|
492
|
+
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:if(d.l==im)throw new O(2,7,7E3);return C(m,Jl(d.W,"load"),2);case 2:d.W.release();if(!d.h)throw new O(2,7,7002);if(!d.ea){m.B(3);break}return C(m,d.rc(!1),3);case 3:e=++d.Kd;f=function(){if(d.Kd!=e)throw new O(2,7,7E3);};g=function(n,q){return K(function(p){switch(p.g){case 1:return ta(p,2),C(p,Jl(d.W,q),4);case 4:return f(),C(p,n(),5);case 5:f();case 2:wa(p),d.W.release(),ya(p,0)}})};sa(m,5);
|
|
493
493
|
d.ma=b;d.mb=!1;d.dispatchEvent(hm("loading"));h=Date.now()/1E3;d.u=new Yl;d.ea=a;if(c){m.B(7);break}return C(m,g(function(){return K(function(n){if(1==n.g)return C(n,pm(d),2);c=n.h;E(n)})},"guessMimeType_"),7);case 7:if(k=qm(d,c))return C(m,g(function(){return K(function(n){return C(n,rm(d,c),0)})},"initializeSrcEqualsDrmInner_"),16);if(d.G){m.B(11);break}return C(m,g(function(){return K(function(n){return C(n,nm(d),0)})},"initializeMediaSourceEngineInner_"),11);case 11:return C(m,g(function(){return K(function(n){return C(n,
|
|
494
|
-
sm(d,c),0)})},"parseManifestInner_"),13);case 13:return C(m,g(function(){return K(function(n){return C(n,tm(d),0)})},"initializeDrmInner_"),14);case 14:return C(m,g(function(){return K(function(n){return C(n,um(d,h),0)})},"loadInner_"),10);case 16:return C(m,g(function(){return K(function(n){return C(n,vm(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(hm("loaded"));ua(m,0);break;case 5:l=va(m);if(7E3==l.code){m.B(18);break}return C(m,d.
|
|
495
|
-
function pm(a){var b,c;return K(function(d){if(1==d.g)return b=a.g.manifest.retryParameters,C(d,Nk(a.ea,a.H,b),2);c=d.h;"application/x-mpegurl"==c&&Cd()&&(c="application/vnd.apple.mpegurl");return d.return(c)})}function qm(a,b){if(!rd())return!0;if(b){if(""==(a.h||td()).canPlayType(b))return!1;if(!(rd()&&b in
|
|
494
|
+
sm(d,c),0)})},"parseManifestInner_"),13);case 13:return C(m,g(function(){return K(function(n){return C(n,tm(d),0)})},"initializeDrmInner_"),14);case 14:return C(m,g(function(){return K(function(n){return C(n,um(d,h),0)})},"loadInner_"),10);case 16:return C(m,g(function(){return K(function(n){return C(n,vm(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(hm("loaded"));ua(m,0);break;case 5:l=va(m);if(7E3==l.code){m.B(18);break}return C(m,d.rc(!1),18);case 18:throw l;}})};
|
|
495
|
+
function pm(a){var b,c;return K(function(d){if(1==d.g)return b=a.g.manifest.retryParameters,C(d,Nk(a.ea,a.H,b),2);c=d.h;"application/x-mpegurl"==c&&Cd()&&(c="application/vnd.apple.mpegurl");return d.return(c)})}function qm(a,b){if(!rd())return!0;if(b){if(""==(a.h||td()).canPlayType(b))return!1;if(!(rd()&&b in Ah))return!0;if("application/x-mpegurl"===b||"application/vnd.apple.mpegurl"===b){if(a.g.streaming.preferNativeHls)return!0;if(Cd())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
496
496
|
function nm(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return jm(a,"media-source"),b=a.g.textDisplayFactory,c=b(),a.Te=b,d=wm(a.h,c,function(h,k,l){xm(a,h,k,l)},a.J),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.Y=f,C(g,d.J,2);a.G=d;E(g)})}
|
|
497
|
-
function sm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.H,jm(a,"manifest-parser"),a.Ld=
|
|
497
|
+
function sm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.H,jm(a,"manifest-parser"),a.Ld=zh(a.ea,b||null),a.F=a.Ld(),d=nd(a.g.manifest),a.h&&"AUDIO"===a.h.nodeName&&(d.disableVideo=!0),a.F.configure(d),a.Aa=new Rj(function(){return a.Eb()}),a.Aa.addEventListener("regionadd",function(n){n=n.region;ym(a,"timelineregionadded",n);if(a.A)a.A.onDashTimedMetadata(n)}),a.za=null,a.g.streaming.observeQualityChanges&&(a.za=new Nj(function(){return a.pb()}),a.za.addEventListener("qualitychange",
|
|
498
498
|
function(n){var q=n.quality;n=n.position;q=(new Map).set("mediaQuality",{bandwidth:q.bandwidth,audioSamplingRate:q.audioSamplingRate,codecs:q.codecs,contentType:q.contentType,frameRate:q.frameRate,height:q.height,mimeType:q.mimeType,channelsCount:q.channelsCount,pixelAspectRatio:q.pixelAspectRatio,width:q.width}).set("position",n);a.dispatchEvent(hm("mediaqualitychanged",q))})),e={networkingEngine:c,filter:function(n){return zm(a,n)},makeTextStreamsForClosedCaptions:function(n){return Am(a,n)},onTimelineRegionAdded:function(n){var q=
|
|
499
499
|
a.Aa;a:{var p=t(q.g);for(var u=p.next();!u.done;u=p.next())if(u=u.value,u.schemeIdUri==n.schemeIdUri&&u.id==n.id&&u.startTime==n.startTime&&u.endTime==n.endTime){p=u;break a}p=null}null==p&&(q.g.add(n),n=new Q("regionadd",new Map([["region",n]])),q.dispatchEvent(n))},onEvent:function(n){return a.dispatchEvent(n)},onError:function(n){return mm(a,n)},isLowLatencyMode:function(){return a.g.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.g.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",
|
|
500
500
|
!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(n){var q=a.m?a.m.g:null;q&&a.m.s&&Bm(a,q.keySystem,n)},onManifestUpdated:function(){var n=(new Map).set("isLive",a.R());a.dispatchEvent(hm("manifestupdated",n));if(a.A)a.A.onManifestUpdated(a.R())},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()}},f=Date.now()/1E3,jm(a,"manifest"),g=a,C(m,a.F.start(a.ea,e),2);g.i=m.h;h=hm("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036);
|
|
501
501
|
Cm(a.i);k=Date.now()/1E3;l=k-f;a.u.F=l;E(m)})}
|
|
502
|
-
function tm(a){var b,c,d,e;return K(function(f){return 1==f.g?(jm(a,"drm-engine"),b=Date.now()/1E3,c=!0,a.m=Dm(a,{Tb:a.H,onError:function(g){mm(a,g)},Ud:function(g){Em(a,g)},onExpirationUpdated:function(g,h){Fm(a,g,h)},onEvent:function(g){a.dispatchEvent(g);"drmsessionupdate"==g.type&&c&&(c=!1,a.u.j=Date.now()/1E3-b,a.J&&vi(a.J))}}),a.m.configure(a.g.drm),(d=Qd(a.i.variants,a.g.restrictions,a.Id))&&a.j&&Gm(a),e=pe(a.i.variants),C(f,Rg(a.m,e,a.i.offlineSessionIds),2)):3!=f.g?C(f,a.m.
|
|
502
|
+
function tm(a){var b,c,d,e;return K(function(f){return 1==f.g?(jm(a,"drm-engine"),b=Date.now()/1E3,c=!0,a.m=Dm(a,{Tb:a.H,onError:function(g){mm(a,g)},Ud:function(g){Em(a,g)},onExpirationUpdated:function(g,h){Fm(a,g,h)},onEvent:function(g){a.dispatchEvent(g);"drmsessionupdate"==g.type&&c&&(c=!1,a.u.j=Date.now()/1E3-b,a.J&&vi(a.J))}}),a.m.configure(a.g.drm),(d=Qd(a.i.variants,a.g.restrictions,a.Id))&&a.j&&Gm(a),e=pe(a.i.variants),C(f,Rg(a.m,e,a.i.offlineSessionIds),2)):3!=f.g?C(f,a.m.Ic(a.h),3):C(f,
|
|
503
503
|
zm(a,a.i),0)})}
|
|
504
|
-
function um(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){switch(D.g){case 1:jm(a,"load");c=a.h;a.I=new Kj({Ed:function(){return c.playbackRate},ec:function(){return c.defaultPlaybackRate},rf:function(F){c.playbackRate=F},bg:function(F){c.currentTime+=F}});d=function(){return Hm(a)};e=function(){return Im(a)};a.o.D(c,"playing",d);a.o.D(c,"pause",d);a.o.D(c,"ended",d);a.o.D(c,"ratechange",e);gm(a,a.g);f=a.g.abrFactory;a.s&&a.Ne==f||(a.Ne=f,a.s=f(),"function"!=typeof a.s.setMediaElement&&(ze("AbrManager",
|
|
505
|
-
"Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),"function"!=typeof a.s.setCmsdManager&&(ze("AbrManager","Please use an AbrManager with setCmsdManager function."),a.s.setCmsdManager=function(){}),"function"!=typeof a.s.trySuggestStreams&&(ze("AbrManager","Please use an AbrManager with trySuggestStreams function."),a.s.trySuggestStreams=function(){}),a.s.configure(a.g.abr));a.kb=new Je(a.g.preferredAudioLanguage,a.g.preferredVariantRole,
|
|
506
|
-
a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups);a.lb=a.g.preferredTextLanguage;a.
|
|
507
|
-
a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes);a.j=Lm(a);a.j.configure(a.g.streaming);a.l=Mm;c.textTracks&&a.o.D(c.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":Nm(a,F)}});a.dispatchEvent(hm("streaming"));g=null;(h=a.j.j)||(g=Om(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=m.next())(q=n.value)&&!q.segmentIndex&&k.push(q.createSegmentIndex());if(!(0<k.length)){D.B(2);break}return C(D,Promise.all(k),
|
|
508
|
-
Jm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.C=Pm(a,a.ma);a.$b=Qm(a,b);p=Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal);Rm(a,c,p);if(h){D.B(4);break}Km(a,g,!0,!1,0);if(!a.g.streaming.startAtSegmentBoundary){D.B(4);break}u=a.C;v=u.je;return C(D,Sm(g,a.C.qd()),6);case 6:v.call(u,D.h);case 4:return a.C.ie(),x=a.
|
|
509
|
-
Um(a)):a.da=!1),z&&(a.g.streaming.alwaysStreamText||a.Me())&&tk(a.j,z)),C(D,a.j.start(),7);case 7:a.g.abr.enabled&&(a.s.enable(),Vm(a));Gm(a);Wm(a);a.i.variants.some(function(F){return F.primary});(y=a.R())&&(a.g.streaming.liveSync||a.i.serviceDescription)?(B=function(){return Xm(a)},a.o.D(c,"timeupdate",B)):y||(A=function(){return Ym(a)},a.o.D(c,"timeupdate",A),Ym(a));if(a.A)a.A.onManifestUpdated(y);
|
|
504
|
+
function um(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){switch(D.g){case 1:jm(a,"load");c=a.h;a.I=new Kj({Ed:function(){return c.playbackRate},ec:function(){return c.defaultPlaybackRate},rf:function(F){c.playbackRate=F},bg:function(F){c.currentTime+=F}});d=function(){return Hm(a)};e=function(){return Im(a)};a.o.D(c,"playing",d);a.o.D(c,"pause",d);a.o.D(c,"ended",d);a.o.D(c,"ratechange",e);gm(a,a.g);f=a.g.abrFactory;a.s&&a.Ne==f||(a.Ne=f,a.s=f(),"function"!=typeof a.s.setMediaElement&&(ze("AbrManager w/o setMediaElement",
|
|
505
|
+
"Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),"function"!=typeof a.s.setCmsdManager&&(ze("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),a.s.setCmsdManager=function(){}),"function"!=typeof a.s.trySuggestStreams&&(ze("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),a.s.trySuggestStreams=function(){}),a.s.configure(a.g.abr));a.kb=new Je(a.g.preferredAudioLanguage,a.g.preferredVariantRole,
|
|
506
|
+
a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups);a.lb=a.g.preferredTextLanguage;a.Kc=a.g.preferredTextRole;a.Jc=a.g.preferForcedSubs;Jm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.s.init(function(F,J,G){a.j&&F!=a.j.j&&Km(a,F,!0,void 0===J?!1:J,void 0===G?0:G)});a.s.setMediaElement(c);a.s.setCmsdManager(a.Y);
|
|
507
|
+
Md(a.i,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes);a.j=Lm(a);a.j.configure(a.g.streaming);a.l=Mm;c.textTracks&&a.o.D(c.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":Nm(a,F)}});a.dispatchEvent(hm("streaming"));g=null;(h=a.j.j)||(g=Om(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=m.next())(q=n.value)&&!q.segmentIndex&&k.push(q.createSegmentIndex());if(!(0<k.length)){D.B(2);break}return C(D,Promise.all(k),
|
|
508
|
+
2);case 2:if(a.F&&a.F.onInitialVariantChosen)a.F.onInitialVariantChosen(l);Jm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.C=Pm(a,a.ma);a.$b=Qm(a,b);p=Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal);Rm(a,c,p);if(h){D.B(4);break}Km(a,g,!0,!1,0);if(!a.g.streaming.startAtSegmentBoundary){D.B(4);break}u=a.C;v=u.je;return C(D,Sm(g,a.C.qd()),6);case 6:v.call(u,D.h);case 4:return a.C.ie(),x=a.jc().find(function(F){return F.active}),x||((z=qe(a.i.textStreams,a.lb,a.Kc,a.Jc)[0]||
|
|
509
|
+
null)&&Xl(a.u.h,z,!0),g&&(z?(g.audio&&Tm(a,g.audio,z)&&(a.da=!0),a.da&&a.G.F.setTextVisibility(!0),Um(a)):a.da=!1),z&&(a.g.streaming.alwaysStreamText||a.Me())&&tk(a.j,z)),C(D,a.j.start(),7);case 7:a.g.abr.enabled&&(a.s.enable(),Vm(a));Gm(a);Wm(a);a.i.variants.some(function(F){return F.primary});(y=a.R())&&(a.g.streaming.liveSync||a.i.serviceDescription)?(B=function(){return Xm(a)},a.o.D(c,"timeupdate",B)):y||(A=function(){return Ym(a)},a.o.D(c,"timeupdate",A),Ym(a));if(a.A)a.A.onManifestUpdated(y);
|
|
510
|
+
a.mb=!0;a.o.ja(c,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});E(D)}})}
|
|
510
511
|
function rm(a,b){var c,d,e,f;return K(function(g){return 1==g.g?(c=Ec,d=Date.now()/1E3,e=!0,a.m=Dm(a,{Tb:a.H,onError:function(h){mm(a,h)},Ud:function(h){Em(a,h)},onExpirationUpdated:function(h,k){Fm(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.u.j=Date.now()/1E3-d)}}),a.m.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,
|
|
511
|
-
mimeType:b?Nc(b):"",codecs:b?Oc(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.$,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Y=!0,C(g,Rg(a.m,[f],[]),2)):C(g,a.m.
|
|
512
|
-
function vm(a,b,c){var d,e,f,g,h,k,l,m,n,q;return K(function(p){if(1==p.g)return jm(a,"src-equals"),d=a.h,a.C=new zj(d),e=!1,a.
|
|
512
|
+
mimeType:b?Nc(b):"",codecs:b?Oc(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.$,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Y=!0,C(g,Rg(a.m,[f],[]),2)):C(g,a.m.Ic(a.h),0)})}
|
|
513
|
+
function vm(a,b,c){var d,e,f,g,h,k,l,m,n,q;return K(function(p){if(1==p.g)return jm(a,"src-equals"),d=a.h,a.C=new zj(d),e=!1,a.Hc.push(function(){e=!0}),null!=a.ma&&a.C.je(a.ma),a.I=new Kj({Ed:function(){return d.playbackRate},ec:function(){return d.defaultPlaybackRate},rf:function(u){d.playbackRate=u},bg:function(u){d.currentTime+=u}}),f=a.g.streaming.rebufferingGoal,Rm(a,d,f),g=function(){return Hm(a)},h=function(){return Im(a)},a.o.D(d,"playing",g),a.o.D(d,"pause",g),a.o.D(d,"ended",g),a.o.D(d,
|
|
513
514
|
"ratechange",h),"none"!=d.preload&&a.o.ja(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.o.D(d.audioTracks,"addtrack",function(){return Gm(a)}),a.o.D(d.audioTracks,"removetrack",function(){return Gm(a)}),a.o.D(d.audioTracks,"change",function(){return Gm(a)})),d.textTracks&&(a.o.D(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":Zm(a,u);break;case "chapters":Nm(a,u);break;default:Gm(a)}}),a.o.D(d.textTracks,"removetrack",function(){return Gm(a)}),
|
|
514
515
|
a.o.D(d.textTracks,"change",function(){return Gm(a)})),d.src=il(a.V,a.ea,c),(xd()||wd("Web0S"))&&d.load(),a.l=$m,a.dispatchEvent(hm("streaming")),k=new Ze,qj(d,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.C.ie();k.resolve()}),qj(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var u;return K(function(v){if(1==v.g)return an(a),u=bn(a),u.find(function(x){return"disabled"!=x.mode})?(0<u.length&&(a.da=!0),v.B(2)):C(v,new Promise(function(x){a.o.ja(d.textTracks,"change",x);(new qd(x)).U(1)}),2);
|
|
515
516
|
if(e)return v.return();cn(a);E(v)})}),d.error?k.reject(lm(a)):"none"==d.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.o.ja(d,"error",function(){k.reject(lm(a))}),C(p,k,2);(l=a.R())&&a.g.streaming.liveSync?(m=function(){return Xm(a)},a.o.D(d,"timeupdate",m)):l||(n=function(){return Ym(a)},
|
|
516
517
|
a.o.D(d,"timeupdate",n),Ym(a));a.A&&(a.A.onManifestUpdated(l),l&&(q=a.Eb().end,a.o.D(d,"progress",function(){var u=a.Eb().end;q!=u&&(a.A.onManifestUpdated(a.R()),q=u)})));a.mb=!0;E(p)})}function an(a){var b=a.g.preferredAudioLanguage;""!=b&&a.jg(b,a.g.preferredVariantRole)}function cn(a){var b=a.g.preferredTextLanguage;""!=b&&a.kf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
517
|
-
function Zm(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,dn(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new qd(function(){var d=en(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).
|
|
518
|
+
function Zm(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,dn(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new qd(function(){var d=en(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).qc().U(.5);a.Hc.push(function(){c.stop()})}}
|
|
518
519
|
function xm(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())dn(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function dn(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(hm("metadata",b))}
|
|
519
|
-
function Nm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new qd(function(){b.mode="hidden"})).
|
|
520
|
+
function Nm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new qd(function(){b.mode="hidden"})).qc().U(.5);a.Hc.push(function(){c.stop()})}}function Cm(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))}r.Mh=function(){for(var a=this.W;a.g;)a.release()};function Dm(a,b){return new Kg(b,a.g.drm.updateExpirationTime)}
|
|
520
521
|
function bm(a){return new mf(function(b,c,d){a.s&&a.s.segmentDownloaded(b,c,d)},function(b,c,d){c=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(hm("downloadheadersreceived",c));if(a.Y&&(c=a.Y,c.h.enabled)){if(d=b["cmsd-static"])try{var e=new Map,f=d.split(",");for(d=0;d<f.length;d++){var g=f[d].split("=");e.set(g[0],Dl(g[1]))}}catch(n){}if(b=b["cmsd-dynamic"]){try{var h=new Map,k=b.split(";");for(b=1;b<k.length;b++){var l=k[b].split("=");h.set(l[0],Dl(l[1]))}var m=
|
|
521
522
|
h}catch(n){m=null}m&&(c.g=m)}}},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(hm("downloadfailed",b))},function(b,c,d){var e=a.V;d=void 0===d?{}:d;if(e.g.enabled)if("HEAD"===c.method)pl(e,c);else switch(b){case 0:try{if(e.g.enabled){if(d.type){a:{switch(d.type){case 4:var f="d";break a;case 3:case 2:f="h";break a;case 5:f="s";break a}f=void 0}e.m=f}pl(e,c,{ot:ml,su:!e.i})}}catch(m){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",
|
|
522
523
|
m)}break;case wf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.R()?"l":"v"};h.ot=sl(b);var k=h.ot===ql||h.ot===kl||h.ot===ll||h.ot===ul,l=b.stream;l&&(k&&(h.bl=wl(e,l.type)),l.bandwidth&&(h.br=l.bandwidth/1E3));k&&h.ot!==ul&&(h.tb=xl(e,h.ot)/1E3);pl(e,c,h)}}catch(m){Ta("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:pl(e,c,{ot:"k"});break;case 4:pl(e,c,{ot:"o"})}},function(b,c,d,e){a.F&&a.F.banLocation&&a.F.banLocation(e)})}
|
|
@@ -534,37 +535,37 @@ function gn(a){if(a.F){var b=nd(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.di
|
|
|
534
535
|
e.destroy());d.h&&(d.h.j=c);a.Te=b;a.j&&(b=a.j,(c=b.i.get(Dc))&&rk(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.g.abr),a.g.abr.enabled?a.s.enable():a.s.disable(),Vm(a));a.K&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ve(a.K,b,Math.min(.5,b/2)));a.i&&Jm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.V&&a.V.configure(a.g.cmcd);a.Y&&a.Y.configure(a.g.cmsd)}r.getConfiguration=function(){var a=$l(this);Sl(a,this.g,$l(this));return a};
|
|
535
536
|
r.Qg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Eb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};r.Qh=function(){for(var a in this.g)delete this.g[a];Sl(this.g,$l(this),$l(this));gn(this)};r.Xg=function(){return this.l};r.He=function(){return this.i?this.i.type:null};r.ah=function(){return this.h};
|
|
536
537
|
r.Ob=function(){return this.H};r.Ge=function(){return this.ea};r.Of=function(){return this.A?this.A:null};r.R=function(){return this.i?this.i.presentationTimeline.R():this.h&&this.h.src?Infinity==this.h.duration:!1};r.Rb=function(){return this.i?this.i.presentationTimeline.Rb():!1};r.sh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
|
|
537
|
-
r.Eb=function(){if(this.i){if(!this.mb&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.
|
|
538
|
+
r.Eb=function(){if(this.i){if(!this.mb&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.hc(),end:a.qb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.ph=function(){this.R()&&(this.h.currentTime=this.Eb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.Qc=function(){return this.m?this.m.Qc():Infinity};
|
|
538
539
|
r.Fe=function(){return this.m?this.m.Fe():[]};r.Bd=function(){return this.m?this.m.Bd():{}};r.Ke=function(){return this.K?this.K.g==Ue:!1};r.Cd=function(){return this.h?this.I?this.I.h:1:0};
|
|
539
540
|
r.xf=function(a){var b=this;0==a?Sa("A trick play rate of 0 is unsupported!"):(this.Ba.Za(),this.h.paused&&this.h.play(),this.I.set(a),this.l==Mm&&(this.s.playbackRateChanged(a),qk(this.j,1<Math.abs(a))),this.R()&&this.Ba.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Eb(),e=b.g.streaming.safeSeekOffset;0<a?c>=d.end&&b.ud():c<=d.start+e&&b.ud()}))};r.ud=function(){var a=this.I.ec();this.l==$m&&this.I.set(a);this.l==Mm&&(this.I.set(a),this.s.playbackRateChanged(a),qk(this.j,!1));this.Ba.Za()};
|
|
540
541
|
r.Cb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,oe(e)){var f=ge(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.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return ne(g)}):[]};
|
|
541
|
-
r.
|
|
542
|
-
r.Ng=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Mm&&b.l!=$m)return g.return(null);c=b.
|
|
542
|
+
r.jc=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=he(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?bn(this).map(function(f){return le(f)}):[]};r.Wg=function(){var a=this.Oc;this.i&&(a=this.i.imageStreams);return a.map(function(b){return ie(b)})};
|
|
543
|
+
r.Ng=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Mm&&b.l!=$m)return g.return(null);c=b.Oc;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Gj(d.segmentIndex,function(h){var k=kn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Kb;for(var l=h.h-h.startTime,m=0;m<k;m++)e.push(b.Tf(a,h.startTime+l*m/k))}}),C(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
543
544
|
function kn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Kb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
544
|
-
r.Tf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){if(1==D.g){if(c.l!=Mm&&c.l!=$m)return D.return(null);d=c.
|
|
545
|
+
r.Tf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){if(1==D.g){if(c.l!=Mm&&c.l!=$m)return D.return(null);d=c.Oc;c.i&&(d=c.i.imageStreams);return(e=d.find(function(F){return F.id==a}))?e.segmentIndex?D.B(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=kn(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Kb;n=l/h.rows;q=h.Kb*h.rows;p=g.h-g.startTime;
|
|
545
546
|
u=g.u||p/q;v=g.startTime;z=x=0;1<q&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.Kb*m,z=Math.floor(y/h.Kb)*n);B=!1;if(A=g.s)B=!0,n=A.height,x=A.positionX,z=A.positionY,m=A.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:x,positionY:z,startTime:v,duration:u,uris:g.Z(),width:m,sprite:B})})};
|
|
546
547
|
r.kg=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&&(Xl(this.u.h,b,!1),tk(this.j,b),ln(this),this.lb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=bn(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,je(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";ln(this)}};
|
|
547
548
|
r.lf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.g.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&oe(d)&&(Km(this,d,!1,b,c),this.kb=new Ie(d,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),Wm(this))}else if(this.h&&this.h.audioTracks)for(b=
|
|
548
|
-
Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,je(c)==a.id){mn(this,c);break}};r.Pg=function(){return nn(this.Cb())};r.ih=function(){return nn(this.
|
|
549
|
+
Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,je(c)==a.id){mn(this,c);break}};r.Pg=function(){return nn(this.Cb())};r.ih=function(){return nn(this.jc())};r.Og=function(){return Array.from(on(this.Cb()))};r.hh=function(){return Array.from(on(this.jc()))};
|
|
549
550
|
r.jg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.kb=new Je(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.kb.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
|
|
550
|
-
b))c=f;c?(a=ge(c),this.lf(a,!0,d)):jn(this)}else this.h&&this.h.audioTracks&&(d=qe(this.Cb(),a,b||"",!1)[0])&&this.lf(d)};r.kf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.lb=a,this.
|
|
551
|
+
b))c=f;c?(a=ge(c),this.lf(a,!0,d)):jn(this)}else this.h&&this.h.audioTracks&&(d=qe(this.Cb(),a,b||"",!1)[0])&&this.lf(d)};r.kf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.lb=a,this.Kc=b||"",this.Jc=c,(a=qe(this.i.textStreams,this.lb,this.Kc,this.Jc)[0]||null)&&a!=this.j.o&&(Xl(this.u.h,a,!1),this.g.streaming.alwaysStreamText||this.Me()))tk(this.j,a),ln(this)}else(a=qe(this.jc(),a,b||"",c)[0])&&this.kg(a)};
|
|
551
552
|
r.Wh=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.kb=new Je(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),jn(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&mn(this,b)}};
|
|
552
553
|
r.Me=function(){var a=this.da;return this.G&&this.l==Mm?this.G.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?bn(this).some(function(b){return"showing"==b.mode}):a};r.Pf=function(){return this.h&&this.h.src&&this.h.textTracks?pn(this).map(function(a){return le(a)}):[]};
|
|
553
554
|
r.Rg=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=dd(a),c=pn(this).filter(function(h){return dd(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};
|
|
554
555
|
function bn(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function en(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function pn(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
555
|
-
r.og=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Mm)this.G.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.o||(a=qe(this.i.textStreams,this.lb,this.
|
|
556
|
+
r.og=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Mm)this.G.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.o||(a=qe(this.i.textStreams,this.lb,this.Kc,this.Jc),0<a.length&&(tk(this.j,a[0]),ln(this))):pk(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=bn(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")}Um(this)}};
|
|
556
557
|
r.dh=function(){if(!this.R())return null;if(this.C)var a=this.C.qd();else{if(null==this.ma)return new Date;a=this.ma}if(this.i)return new Date(1E3*(this.i.presentationTimeline.i+a));if(this.h&&this.h.getStartDate){var b=this.h.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)}return null};
|
|
557
558
|
r.Sf=function(){if(!this.R())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.h&&this.h.getStartDate){var a=this.h.getStartDate();return isNaN(a.getTime())?null:a}return null};r.pb=function(){if(this.l==Mm)return this.G.pb();var a={total:[],audio:[],video:[],text:[]};this.l==$m&&(a.total=Nh(this.h.buffered));return a};
|
|
558
559
|
r.getStats=function(){if(this.l!=Mm&&this.l!=$m)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Hm(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.u;b=
|
|
559
560
|
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.u.K=this.C.Af(),this.u.N=this.C.Bf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.u;var d=Number(c.totalVideoFrames);b.J=Number(c.droppedVideoFrames);b.I=d;this.u.H=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.u.s=c;if(this.l==Mm){c=this.j.j;b=this.j.o;if(c){d=this.I?this.I.h:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.u.A=e}c&&c.video&&(b=this.u,d=c.video.height||
|
|
560
561
|
NaN,b.o=c.video.width||NaN,b.l=d);this.R()&&(c=this.Sf().valueOf()+1E3*a.currentTime,this.u.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.u.G=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.u.u=c}this.l==$m&&(c=this.u,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.u;a=f.o;c=f.l;b=f.A;d=f.I;e=f.J;var g=f.H,h=f.N,k=f.K,l=f.u,m=f.i,n=f.m,q=f.F,p=f.j,u=Ul(f.g,"playing"),v=Ul(f.g,"paused"),x=Ul(f.g,"buffering"),z=f.s,y=f.C,B=f.G,A=Vl(f.g),D=[];f=t(f.h.g);
|
|
561
562
|
for(var F=f.next();!F.done;F=f.next())F=F.value,D.push({timestamp:F.timestamp,id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:q,drmTimeSeconds:p,playTime:u,pauseTime:v,bufferingTime:x,licenseTime:z,liveLatency:y,maxSegmentDuration:B,stateHistory:A,switchHistory:D}};
|
|
562
|
-
r.Bg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:if(h.l!=Mm&&h.l!=$m)throw new O(1,7,7004);"subtitles"!=c&&"captions"!=c&&Sa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.B(2);break}return C(A,qn(h,a),3);case 3:d=A.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=$m){A.B(4);break}g&&(c="forced");return C(A,rn(h,a,b,c,d,f||"",k),5);case 5:l=dd(b);m=h.
|
|
563
|
+
r.Bg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:if(h.l!=Mm&&h.l!=$m)throw new O(1,7,7004);"subtitles"!=c&&"captions"!=c&&Sa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.B(2);break}return C(A,qn(h,a),3);case 3:d=A.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=$m){A.B(4);break}g&&(c="forced");return C(A,rn(h,a,b,c,d,f||"",k),5);case 5:l=dd(b);m=h.jc();if(n=m.find(function(D){return dd(D.language)==
|
|
563
564
|
l&&D.label==(f||"")&&D.kind==c}))return Gm(h),A.return(n);throw new O(1,2,2012);case 4:q=Ec;p=h.h.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new O(1,4,4033);if(!k.length){A.B(6);break}return C(A,sn(h,a,h.H,h.g.streaming.retryParameters),7);case 7:u=A.h,v=tn(h,u,d,k),x=new Blob([v],{type:"text/vtt"}),a=Gi(x),d="text/vtt";case 6:z={id:h.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ij(0,p,[a]),mimeType:d||"",
|
|
564
565
|
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};y=Gc(z.mimeType,z.codecs);B=Qc(y);if(!B)throw new O(2,2,2014,d);h.i.textStreams.push(z);Gm(h);return A.return(he(z))}})};
|
|
565
566
|
r.Cg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y;return K(function(B){switch(B.g){case 1:if(c.l!=Mm&&c.l!=$m)throw new O(1,7,7004);if(b){B.B(2);break}return C(B,qn(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new O(1,2,2017,a);d=Ec;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new O(1,4,4045);return C(B,sn(c,a,c.H,c.g.streaming.retryParameters),4);case 4:f=B.h;g=Rc[b];if(!g)throw new O(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
566
|
-
vttOffset:0};l=hb(f);m=h.parseMedia(l,k,a);n=[];q={};p=t(m);for(u=p.next();!u.done;q={
|
|
567
|
-
n.push(x);y={id:c.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.he,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1};c.l==$m?c.
|
|
567
|
+
vttOffset:0};l=hb(f);m=h.parseMedia(l,k,a);n=[];q={};p=t(m);for(u=p.next();!u.done;q={Dc:q.Dc,Hb:q.Hb},u=p.next())q.Hb=u.value,q.Dc=null,v=function(A){return function(){null==A.Dc&&(A.Dc=xc([a],[A.Hb.payload]));return A.Dc||[]}}(q),x=new S(q.Hb.startTime,q.Hb.endTime,v,0,null,null,0,0,Infinity),q.Hb.payload.includes("#xywh")&&(z=q.Hb.payload.split("#xywh=")[1].split(","),4===z.length&&x.pg({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
|
|
568
|
+
n.push(x);y={id:c.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.he,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1};c.l==$m?c.Oc.push(y):
|
|
568
569
|
c.i.imageStreams.push(y);Gm(c);return B.return(ie(y))}})};
|
|
569
570
|
r.Ag=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Mm&&d.l!=$m)throw new O(1,7,7004);if(c){k.B(2);break}return C(k,qn(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),C(k,rn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Pf();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return C(k,new Promise(function(l,m){d.o.ja(f,"load",l);d.o.ja(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return Gm(d),k.return(h);case 5:throw new O(1,
|
|
570
571
|
2,2012);}})};function qn(a,b){var c;return K(function(d){switch(d.g){case 1:return sa(d,2),C(d,Nk(b,a.H,a.g.streaming.retryParameters),4);case 4:c=d.h;ua(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new O(1,2,2011,b);}})}
|
|
@@ -598,21 +599,21 @@ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new O(2,4,4012,a)
|
|
|
598
599
|
function nn(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=dd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
599
600
|
h.push({language:l,role:m,label:n})}});return h}N("shaka.Player",W);W.prototype.setVideoContainer=W.prototype.rg;W.prototype.getManifestParserFactory=W.prototype.Zg;W.prototype.getManifest=W.prototype.Yg;W.prototype.retryStreaming=W.prototype.gf;W.prototype.setMaxHardwareResolution=W.prototype.pf;W.prototype.addChaptersTrack=W.prototype.Ag;W.prototype.addThumbnailsTrack=W.prototype.Cg;W.prototype.addTextTrackAsync=W.prototype.Bg;W.prototype.getStats=W.prototype.getStats;
|
|
600
601
|
W.prototype.getBufferedInfo=W.prototype.pb;W.prototype.getPresentationStartTimeAsDate=W.prototype.Sf;W.prototype.getPlayheadTimeAsDate=W.prototype.dh;W.prototype.setTextTrackVisibility=W.prototype.og;W.prototype.getChapters=W.prototype.Rg;W.prototype.getChaptersTracks=W.prototype.Pf;W.prototype.isTextTrackVisible=W.prototype.Me;W.prototype.selectVariantsByLabel=W.prototype.Wh;W.prototype.selectTextLanguage=W.prototype.kf;W.prototype.selectAudioLanguage=W.prototype.jg;
|
|
601
|
-
W.prototype.getTextLanguages=W.prototype.hh;W.prototype.getAudioLanguages=W.prototype.Og;W.prototype.getTextLanguagesAndRoles=W.prototype.ih;W.prototype.getAudioLanguagesAndRoles=W.prototype.Pg;W.prototype.selectVariantTrack=W.prototype.lf;W.prototype.selectTextTrack=W.prototype.kg;W.prototype.getThumbnails=W.prototype.Tf;W.prototype.getAllThumbnails=W.prototype.Ng;W.prototype.getImageTracks=W.prototype.Wg;W.prototype.getTextTracks=W.prototype.
|
|
602
|
-
W.prototype.cancelTrickPlay=W.prototype.ud;W.prototype.trickPlay=W.prototype.xf;W.prototype.getPlaybackRate=W.prototype.Cd;W.prototype.isBuffering=W.prototype.Ke;W.prototype.getKeyStatuses=W.prototype.Bd;W.prototype.getActiveSessionsMetadata=W.prototype.Fe;W.prototype.getExpiration=W.prototype.
|
|
602
|
+
W.prototype.getTextLanguages=W.prototype.hh;W.prototype.getAudioLanguages=W.prototype.Og;W.prototype.getTextLanguagesAndRoles=W.prototype.ih;W.prototype.getAudioLanguagesAndRoles=W.prototype.Pg;W.prototype.selectVariantTrack=W.prototype.lf;W.prototype.selectTextTrack=W.prototype.kg;W.prototype.getThumbnails=W.prototype.Tf;W.prototype.getAllThumbnails=W.prototype.Ng;W.prototype.getImageTracks=W.prototype.Wg;W.prototype.getTextTracks=W.prototype.jc;W.prototype.getVariantTracks=W.prototype.Cb;
|
|
603
|
+
W.prototype.cancelTrickPlay=W.prototype.ud;W.prototype.trickPlay=W.prototype.xf;W.prototype.getPlaybackRate=W.prototype.Cd;W.prototype.isBuffering=W.prototype.Ke;W.prototype.getKeyStatuses=W.prototype.Bd;W.prototype.getActiveSessionsMetadata=W.prototype.Fe;W.prototype.getExpiration=W.prototype.Qc;W.prototype.drmInfo=W.prototype.drmInfo;W.prototype.keySystem=W.prototype.keySystem;W.prototype.goToLive=W.prototype.ph;W.prototype.seekRange=W.prototype.Eb;W.prototype.isAudioOnly=W.prototype.sh;
|
|
603
604
|
W.prototype.isInProgress=W.prototype.Rb;W.prototype.isLive=W.prototype.R;W.prototype.getAdManager=W.prototype.Of;W.prototype.getAssetUri=W.prototype.Ge;W.prototype.getNetworkingEngine=W.prototype.Ob;W.prototype.getMediaElement=W.prototype.ah;W.prototype.getManifestType=W.prototype.He;W.prototype.getLoadMode=W.prototype.Xg;W.prototype.resetConfiguration=W.prototype.Qh;W.prototype.getBufferFullness=W.prototype.Qg;W.prototype.getConfiguration=W.prototype.getConfiguration;W.prototype.configure=W.prototype.configure;
|
|
604
|
-
W.prototype.releaseAllMutexes=W.prototype.Mh;W.prototype.load=W.prototype.load;W.prototype.updateStartTime=W.prototype.ei;W.prototype.unload=W.prototype.
|
|
605
|
-
W.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?C(h,sh(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(rd())for(var l in
|
|
605
|
+
W.prototype.releaseAllMutexes=W.prototype.Mh;W.prototype.load=W.prototype.load;W.prototype.updateStartTime=W.prototype.ei;W.prototype.unload=W.prototype.rc;W.prototype.detach=W.prototype.detach;W.prototype.attachCanvas=W.prototype.Eg;W.prototype.attach=W.prototype.Ic;
|
|
606
|
+
W.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?C(h,sh(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(rd())for(var l in Ah)k[l]=!0;l=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=rd()?!!Ah[m]:sd(m);c=k;l='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(w(Hc));
|
|
606
607
|
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=rd()?Qc(m)?!0:Za(m)||($b(m)?!0:!1):sd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=zn;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
607
608
|
W.isBrowserSupported=function(){window.Promise||Sa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||wd("Trident/"))return!1;var a=Id();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:rd()?!0:sd("application/x-mpegurl")};W.setAdManagerFactory=function(a){cm=a};
|
|
608
|
-
W.registerSupportPlugin=function(a,b){zn[a]=b};W.prototype.destroy=W.prototype.destroy;var im=0,Zl=1,Mm=2,$m=3;W.LoadMode={DESTROYED:im,NOT_LOADED:Zl,MEDIA_SOURCE:Mm,SRC_EQUALS:$m};W.version="v4.7.
|
|
609
|
+
W.registerSupportPlugin=function(a,b){zn[a]=b};W.prototype.destroy=W.prototype.destroy;var im=0,Zl=1,Mm=2,$m=3;W.LoadMode={DESTROYED:im,NOT_LOADED:Zl,MEDIA_SOURCE:Mm,SRC_EQUALS:$m};W.version="v4.7.11";var An=["4","7"];Ae=new function(a){this.g=a;this.i=Be;this.h=Ce}(new ye(Number(An[0]),Number(An[1])));var yn=["output-restricted","internal-error"],zn={},cm=null;function Bn(){this.h=[];this.j=this.i=this.g=0};function Cn(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new Af;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=Cn.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
609
610
|
r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
610
611
|
r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
611
612
|
r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
612
613
|
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};N("shaka.ads.ClientSideAd",Cn);Cn.prototype.release=Cn.prototype.release;
|
|
613
614
|
Cn.prototype.getPodIndex=Cn.prototype.getPodIndex;Cn.prototype.getTimeOffset=Cn.prototype.getTimeOffset;Cn.prototype.getMediaUrl=Cn.prototype.getMediaUrl;Cn.prototype.getAdvertiserName=Cn.prototype.getAdvertiserName;Cn.prototype.getCreativeAdId=Cn.prototype.getCreativeAdId;Cn.prototype.getAdId=Cn.prototype.getAdId;Cn.prototype.getVastMediaWidth=Cn.prototype.getVastMediaWidth;Cn.prototype.getVastMediaHeight=Cn.prototype.getVastMediaHeight;Cn.prototype.getVastMediaBitrate=Cn.prototype.getVastMediaBitrate;
|
|
614
615
|
Cn.prototype.getDescription=Cn.prototype.getDescription;Cn.prototype.getTitle=Cn.prototype.getTitle;Cn.prototype.getPositionInSequence=Cn.prototype.getPositionInSequence;Cn.prototype.getSequenceLength=Cn.prototype.getSequenceLength;Cn.prototype.setMuted=Cn.prototype.setMuted;Cn.prototype.resize=Cn.prototype.resize;Cn.prototype.isLinear=Cn.prototype.isLinear;Cn.prototype.isMuted=Cn.prototype.isMuted;Cn.prototype.setVolume=Cn.prototype.setVolume;Cn.prototype.getVolume=Cn.prototype.getVolume;
|
|
615
|
-
Cn.prototype.play=Cn.prototype.play;Cn.prototype.pause=Cn.prototype.pause;Cn.prototype.skip=Cn.prototype.skip;Cn.prototype.canSkipNow=Cn.prototype.canSkipNow;Cn.prototype.getTimeUntilSkippable=Cn.prototype.getTimeUntilSkippable;Cn.prototype.isSkippable=Cn.prototype.isSkippable;Cn.prototype.isPaused=Cn.prototype.isPaused;Cn.prototype.getRemainingTime=Cn.prototype.getRemainingTime;Cn.prototype.getMinSuggestedDuration=Cn.prototype.getMinSuggestedDuration;Cn.prototype.getDuration=Cn.prototype.getDuration;function Dn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=NaN;this.m=e;this.j=null;this.h=new Af;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.7.
|
|
616
|
+
Cn.prototype.play=Cn.prototype.play;Cn.prototype.pause=Cn.prototype.pause;Cn.prototype.skip=Cn.prototype.skip;Cn.prototype.canSkipNow=Cn.prototype.canSkipNow;Cn.prototype.getTimeUntilSkippable=Cn.prototype.getTimeUntilSkippable;Cn.prototype.isSkippable=Cn.prototype.isSkippable;Cn.prototype.isPaused=Cn.prototype.isPaused;Cn.prototype.getRemainingTime=Cn.prototype.getRemainingTime;Cn.prototype.getMinSuggestedDuration=Cn.prototype.getMinSuggestedDuration;Cn.prototype.getDuration=Cn.prototype.getDuration;function Dn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=NaN;this.m=e;this.j=null;this.h=new Af;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.7.11");this.g=null;this.u=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
616
617
|
function(g){En(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Fn(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.ja(this.i,"play",function(){f.A=!0})}Dn.prototype.configure=function(a){this.C=a};Dn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Xk(this.o)};Dn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
|
|
617
618
|
function Fn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new Q("ad-error",b));Gn(a,null);a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
618
619
|
function En(a,b){a.m(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));if(a.C.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.u);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.u);a.m(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -662,9 +663,9 @@ function Yn(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
662
663
|
r.release=function(){this.h&&(this.h.release(),this.h=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);jf.prototype.release.call(this)};r.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.j=new Bn};r.requestClientSideAds=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.F=Date.now()/1E3;b.l.requestAds(a)};
|
|
663
664
|
r.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.u=a;b.g&&b.g.updateAdsRenderingSettings(b.u)};r.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Ln(a,b,c,function(e){return Zn(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new O(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new O(1,10,10004)):(d.l=new Ze,On(d,a,b),d.G=c||"",d.W=Date.now()/1E3,a=d.l);return a};
|
|
664
665
|
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new Xn(a,b,this.m,function(d){return Zn(c,d)});this.g.configure(this.l)};
|
|
665
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.7.
|
|
666
|
-
(c.G=!0),c.j=new Ze,c.g.requestStream(a),c.A=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.7.
|
|
667
|
-
r.getServerSideCuePoints=function(){ze("AdManager","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
666
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.7.11";c=this.g;c.j?a=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
667
|
+
(c.G=!0),c.j=new Ze,c.g.requestStream(a),c.A=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.7.11";this.g.g.replaceAdTagParameters(a)};
|
|
668
|
+
r.getServerSideCuePoints=function(){ze("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
668
669
|
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)};
|
|
669
670
|
function Zn(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}N("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
|
|
670
671
|
Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;
|
|
@@ -678,18 +679,18 @@ var co="ended play playing pause pausing ratechange seeked seeking timeupdate vo
|
|
|
678
679
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},io={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},jo={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},ko=[["getConfiguration","configure"]],lo=[["isTextTrackVisible","setTextTrackVisibility"]],mo="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
679
680
|
no=["attach","attachCanvas","detach","load","unload"];function oo(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.j=new qd(b);this.N=c;this.u=!1;this.s=d;this.F=e;this.I=f;this.h=this.m=!1;this.J="";this.o=null;this.A=function(){return po(h)};this.C=function(k,l){k=ao(l);switch(k.type){case "event":var m=k.targetName,n=gf(k.event);h.s(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.u&&(h.N(),h.u=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new O(q.severity,q.category,
|
|
680
681
|
q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;qo.add(this)}r=oo.prototype;r.destroy=function(){qo.delete(this);ro(this);so&&to(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.C=this.A=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.Ka=function(){return this.h};r.ef=function(){return this.J};
|
|
681
|
-
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.
|
|
682
|
+
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.qc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(qo),d=c.next();!d.done;d=c.next())uo(d.value,b)},function(b){for(var c=t(qo),d=c.next();!d.done;d=c.next())d=d.value,vo="available"==b,d.j.qc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});vo&&this.j.U(wo);(a=so)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
682
683
|
uo(this,a):so=null}else window.__onGCastApiAvailable!==xo&&(yo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=xo)};r.mf=function(a){this.o=a;this.h&&zo(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new O(1,8,8E3);if(!vo)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Ze;chrome.cast.requestSession(function(d){return Ao(b,a,d)},function(d){return Bo(b,d)});return C(c,b.l,0)})};
|
|
683
684
|
function Co(a){if(a.h){var b=a.I();chrome.cast.requestSession(function(c){return Ao(a,b,c)},function(c){return Bo(a,c)})}}r.cc=function(){if(this.h){ro(this);if(so){to(this);try{so.stop(function(){},function(){})}catch(a){}so=null}po(this)}};
|
|
684
685
|
r.get=function(a,b){var c=this;if("video"==a){if(go.includes(b))return function(){return c.hg.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))}}else if("player"==a){if(jo[b]&&!this.get("player","isLive")())return function(){};if(mo.includes(b))return function(){return c.hg.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))};if(no.includes(b))return function(){return c.Nh.apply(c,[a,b].concat(w(Fa.apply(0,arguments))))};if(ho[b]||io[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
685
686
|
r.set=function(a,b,c){this.g[a][b]=c;zo(this,{type:"set",targetName:a,property:b,value:c})};function Ao(a,b,c){so=c;c.addUpdateListener(a.A);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);po(a);zo(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Bo(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new O(2,8,c,b))}
|
|
686
687
|
r.hg=function(a,b){zo(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};r.Nh=function(a,b){var c=Fa.apply(2,arguments),d=new Ze,e=this.H.toString();this.H++;this.i[e]=d;try{zo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function uo(a,b){var c=a.I();a.l=new Ze;a.u=!0;Ao(a,c,b)}function to(a){var b=so;b.removeUpdateListener(a.A);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
687
|
-
function po(a){var b=so?"connected"==so.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};ro(a)}a.h=b;a.J=b?so.receiver.friendlyName:"";a.j.
|
|
688
|
+
function po(a){var b=so?"connected"==so.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};ro(a)}a.h=b;a.J=b?so.receiver.friendlyName:"";a.j.qc()}function ro(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function zo(a,b){b=$n(b);var c=so;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Va)}catch(d){throw b=new O(2,8,8005,d),c=new Q("error",(new Map).set("detail",b)),a.s("player",c),a.cc(),b;}}var wo=.02,vo=!1,so=null,yo=null,qo=new Set;
|
|
688
689
|
function xo(a){yo?window.__onGCastApiAvailable=yo:delete window.__onGCastApiAvailable;yo=null;if(a)for(var b=t(qo),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Do(a,b,c,d){d=void 0===d?!1:d;jf.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.A=d;this.u=new Map;this.g=new oo(c,function(){return Eo(e)},function(){return Fo(e)},function(f,g){return Go(e,f,g)},function(){return Ho(e)},function(){return Io(e)},d);Jo(this)}oa(Do,jf);r=Do.prototype;
|
|
689
690
|
r.destroy=function(a){a&&this.g.cc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;jf.prototype.release.call(this);return Promise.all(a)};r.nh=function(){return this.l};r.bh=function(){return this.s};r.Fg=function(){return this.g.m&&vo};r.Ka=function(){return this.g.Ka()};r.ef=function(){return this.g.ef()};
|
|
690
|
-
r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Io(a),C(c,a.g.cast(b),2)):a.h?C(c,a.h.
|
|
691
|
+
r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Io(a),C(c,a.g.cast(b),2)):a.h?C(c,a.h.rc(),0):c.return()})};r.mf=function(a){this.g.mf(a)};r.ai=function(){Co(this.g)};r.cc=function(){this.g.cc()};
|
|
691
692
|
r.Gg=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.C&&b==c.A)return d.return();c.C=a;c.A=b;c.g.cc();return C(d,c.g.destroy(),2)}c.g=null;c.g=new oo(a,function(){return Eo(c)},function(){return Fo(c)},function(e,f){return Go(c,e,f)},function(){return Ho(c)},function(){return Io(c)},b);c.g.init();E(d)})};
|
|
692
|
-
function Jo(a){a.g.init();a.m=new Af;for(var b=t(co),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Ka()||(f=gf(f),a.j.dispatchEvent(f))});for(var d in hf)a.m.D(a.h,hf[d],function(f){a.g.Ka()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.
|
|
693
|
+
function Jo(a){a.g.init();a.m=new Af;for(var b=t(co),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Ka()||(f=gf(f),a.j.dispatchEvent(f))});for(var d in hf)a.m.D(a.h,hf[d],function(f){a.g.Ka()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.wc=e,Object.defineProperty(a.l,b.wc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Ko(a,f.wc)}}(b),set:function(f){return function(g){var h=f.wc;a.g.Ka()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={wc:b.wc};a.s={};Lo(a,
|
|
693
694
|
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Mo(a,f)}})});No(a);a.j=new jf;a.j.zd=a.l;a.o=new jf;a.o.zd=a.s}function No(a){var b=new Map;Lo(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.u.set(c,d):a.u.set(d,c)):b.set(d,c)})}
|
|
694
695
|
function Lo(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
695
696
|
function Io(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Ge(),startTime:null};a.i.pause();for(var c=t(fo),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(ko);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(lo);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Eo(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
|
|
@@ -713,7 +714,7 @@ function Po(a){a.G.U(ap);for(var b={video:{},player:{}},c=t(eo),d=c.next();!d.do
|
|
|
713
714
|
1);Yo(a)}function Yo(a){return a.u&&(a.g.duration||a.h.R())?(bp(a),a.u=!1,!0):!1}function bp(a,b){var c={contentId:a.h.Ge(),streamType:a.h.R()?"LIVE":"BUFFERED",contentType:""};a.h.R()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Zo(a,void 0===b?0:b,c)}
|
|
714
715
|
function Uo(a,b){var c=ao(b.data);switch(c.type){case "init":a.m=0;a.A=!1;a.u=!0;$o(a,c.initState,c.appData);Po(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
715
716
|
"player"==d&&"load"==e&&(a.m=0,a.A=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return cp(a,g,f,null)},function(h){return cp(a,g,f,h)})}}
|
|
716
|
-
function To(a,b){var c=ao(b.data);switch(c.type){case "PLAY":a.g.play();Zo(a);break;case "PAUSE":a.g.pause();Zo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Zo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Zo(a));break;case "STOP":a.h.
|
|
717
|
+
function To(a,b){var c=ao(b.data);switch(c.type){case "PLAY":a.g.play();Zo(a);break;case "PAUSE":a.g.pause();Zo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Zo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Zo(a));break;case "STOP":a.h.rc().then(function(){a.h&&Zo(a)});break;case "GET_STATUS":bp(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
717
718
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Zo(a);break;case "LOAD":a.m=0;a.A=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&bp(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");So(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:So(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
718
719
|
function cp(a,b,c,d){a.h&&So(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function So(a,b,c,d){a.F&&(a=$n(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Zo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?dp:a.h.Ke()?ep:a.g.paused?fp:gp,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);So(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
719
720
|
N("shaka.cast.CastReceiver",Oo);Oo.prototype.destroy=Oo.prototype.destroy;Oo.prototype.setContentArtist=Oo.prototype.Xh;Oo.prototype.setContentImage=Oo.prototype.Yh;Oo.prototype.setContentTitle=Oo.prototype.$h;Oo.prototype.clearContentMetadata=Oo.prototype.Jg;Oo.prototype.setContentMetadata=Oo.prototype.Zh;Oo.prototype.isIdle=Oo.prototype.th;Oo.prototype.isConnected=Oo.prototype.isConnected;var ap=.5,Xo=5,dp="IDLE",gp="PLAYING",ep="BUFFERING",fp="PAUSED";function hp(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=ip(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],p=-1,u=-1,v=0;v<q.length;v++)if(null!=q[v]&&""!==q[v].g.trim()){p=v;break}for(v=q.length-1;0<=v;v--)if(null!=q[v]&&""!==q[v].g.trim()){u=v;break}if(-1===
|
|
@@ -747,7 +748,7 @@ b).box("encv",dg).box("sinf",ag).box("frma",function(f){f=ci(f.reader).ha;f in x
|
|
|
747
748
|
vq.prototype.parse=function(a){var b=this;if(this.g==wq)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Wf).box("moof",function(l){f=l.start;g=[];ag(l)}).box("traf",ag).O("trun",function(l){l=Zh(l.reader,l.version,l.flags);g.push(l)}).O("tfhd",function(l){l=Wh(l.reader,l.flags);d=l.Kf||b.h;e=l.Mg||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).O("tfdt",function(l){h=Xh(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Sa("Unable to find base media decode time for CEA captions!"),
|
|
748
749
|
new O(2,2,2010);yq(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
749
750
|
function yq(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.ig});n=[].concat.apply([],w(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Lg);b.ia();){g=b.L();var q=b.ga(),p=null;p=!1;h=1;switch(a.g){case zq:p=q&31;p=6==p;break;case Aq:h=2;b.skip(1);p=q>>1&63;p=39==p||40==p;break;default:return}if(p)for(q=0,l<n.length&&(q=n[l].Wd||0),q=(c+q)/d,h=t(uq(b.ub(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:q});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
750
|
-
c+(n[l].hf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}N("shaka.cea.Mp4CeaParser",vq);var wq=0,zq=1,Aq=2,xq={avc1:zq,avc3:zq,hev1:Aq,hvc1:Aq,dvh1:Aq,dvhe:Aq};qb["video/mp4"]=function(){return new vq};function Bq(){}Bq.prototype.init=function(){};Bq.prototype.parse=function(a){var b=[];a=hb(a);if(!ti(a))return b;a=(new ni).parse(a);var c=a.
|
|
751
|
+
c+(n[l].hf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}N("shaka.cea.Mp4CeaParser",vq);var wq=0,zq=1,Aq=2,xq={avc1:zq,avc3:zq,hev1:Aq,hvc1:Aq,dvh1:Aq,dvhe:Aq};qb["video/mp4"]=function(){return new vq};function Bq(){}Bq.prototype.init=function(){};Bq.prototype.parse=function(a){var b=[];a=hb(a);if(!ti(a))return b;a=(new ni).parse(a);var c=a.Pc(),d=a.Fd();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(uq(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};N("shaka.cea.TsCeaParser",Bq);qb["video/mp2t"]=function(){return new Bq};function Cq(a,b,c){var d=Dq(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(k){return k.keyId}));h.delete(null);if(1<h.size)throw new O(2,4,4010);if(!b){f=d.filter(function(k){return"urn:mpeg:dash:sea:2012"==k.cd});if(1<f.length)throw new O(2,4,4050);f.length&&(g=Eq(f[0]));f=d.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.cd?(e=k.init||e,!1):"urn:mpeg:dash:sea:2012"!=k.cd});f.length&&(a=Fq(e,f,c,h),0==a.length&&(a=[yc("",e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),
|
|
751
752
|
c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(yc(c,e));if(h=Array.from(h)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Jf:h,aj:e,drmInfos:a,ke:g,Nf:!0}}
|
|
752
753
|
function Gq(a,b,c,d){var e=Cq(a,c,d);if(b.Nf){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Nf=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new O(2,4,4008);return e.Jf||b.Jf}
|
|
753
754
|
function Hq(a){var b=0,c=nb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
@@ -767,7 +768,7 @@ function Pq(a,b,c){b=Rq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.val
|
|
|
767
768
|
function Sq(a,b,c,d,e,f){for(var g=tg(a,"http://www.w3.org/1999/xlink","href"),h=tg(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 af(new O(2,4,4028));if("onLoad"!=h)return af(new O(2,4,4027));var m=xc([d],[g]);return e.request(0,qf(m,b)).pa(function(n){n=Jg(n.data,a.tagName);if(!n)return af(new O(2,4,4001,g));
|
|
768
769
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var q=n.childNodes[0];n.removeChild(q);a.appendChild(q)}n=t(Array.from(n.attributes));for(q=n.next();!q.done;q=n.next())a.setAttributeNode(q.value.cloneNode(!1));return Tq(a,b,c,m[0],e,f+1)})}
|
|
769
770
|
function Tq(a,b,c,d,e,f){f=void 0===f?0:f;if(tg(a,"http://www.w3.org/1999/xlink","href")){var g=Sq(a,b,c,d,e,f);c&&(g=g.pa(void 0,function(){return Tq(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==tg(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Tq(k,b,c,d,e,f)));return ef(g).pa(function(){return a})};function Uq(a,b,c,d,e,f,g){var h,k=(new Wf).O("sidx",function(l){h=Vq(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
|
|
770
|
-
function Vq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.
|
|
771
|
+
function Vq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.oc(),m=g.reader.oc();g.reader.skip(2);var n=g.reader.Ea();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.L(),p=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.L();g.reader.skip(4);if(1==p)throw new O(2,3,3006);h.push(new S(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function Wq(a){this.h=nb(a);this.g=new Tf(this.h,0)}Wq.prototype.ia=function(){return this.g.ia()};
|
|
771
772
|
function Xq(a){var b=Yq(a);if(7<b.length)throw new O(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=Yq(a);a:{d=t(Zq);for(var e=d.next();!e.done;e=d.next())if(fb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.qa();else{if(8==b.length&&b[1]&224)throw new O(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.qa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.qa();d=nb(a.h,a.g.qa(),b);a.g.skip(b);return new $q(c,
|
|
772
773
|
d)}function Yq(a){var b=a.g.qa(),c=a.g.ga();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return hb(a.h,b,c)}var Zq=[[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 $q(a,b){this.id=a;this.g=b}
|
|
773
774
|
function ar(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(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 br(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Wq(a.g);for(var n=null,q=null;a.ia();){var p=Xq(a);if(187==p.id){var u=cr(p);u&&(p=c*u.di,u=b+u.Lh,null!=n&&m.push(new S(n+g,p+g,l,q,u-1,f,g,h,k)),n=p,q=u)}}null!=n&&m.push(new S(n+g,d+g,l,q,null,f,g,h,k));return m}
|
|
@@ -776,18 +777,18 @@ function fr(a,b,c){var d=Number(Pq(a,gr,"presentationTimeOffset"))||0,e=Pq(a,gr,
|
|
|
776
777
|
function jr(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,x,z,y,B,A,D;return K(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.zb||!a.ba.Le,l=a.ba.start,m=a.ba.duration,n=a.M.mimeType.split("/")[1],q=b,p=null,u=[q(d,e,f,!1),"webm"==n?q(c.Z(),c.Qa,c.wa,!0):null],q=null,C(F,Promise.all(u),2);v=F.h;x=v[0];z=v[1]||null;y=null;B=l-g;A=l;D=m?l+m:Infinity;if("mp4"==n)var J=Uq(x,e,d,c,B,A,D);else{J=new Wq(z);if(440786851!=Xq(J).id)throw new O(2,3,3008);var G=Xq(J);if(408125543!=G.id)throw new O(2,3,3009);
|
|
777
778
|
J=G.g.byteOffset;G=new Wq(G.g);for(var H=null;G.ia();){var I=Xq(G);if(357149030==I.id){H=I;break}}if(!H)throw new O(2,3,3010);H=new Wq(H.g);I=1E6;for(G=null;H.ia();){var L=Xq(H);if(2807729==L.id)I=ar(L);else if(17545==L.id)if(4==L.g.byteLength)G=L.g.getFloat32(0);else if(8==L.g.byteLength)G=L.g.getFloat64(0);else throw new O(2,3,3003);}if(null==G)throw new O(2,3,3011);H=I/1E9;G*=H;I=Xq(new Wq(x));if(475249515!=I.id)throw new O(2,3,3007);J=br(I,J,H,G,d,c,B,A,D)}y=J;h.Xc(y);p=new Fj(y);k&&p.bc(A,D,
|
|
778
779
|
!0);return F.return(p)})}function gr(a){return a.ed}function ir(a){var b=Qq(a,gr,"RepresentationIndex");a=Pq(a,gr,"indexRange");a=Ag(a||"");b&&(a=xg(b,"range",Ag,a));return a}function hr(a,b){kr(a,b);if(!ir(a))throw new O(2,4,4002);}function kr(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=Dc&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
|
|
779
|
-
function er(a){var b=a.M;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Td,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function lr(a,b,c){var d=dr(a,mr,c),e=nr(a);if(!e.ya&&!e.timeline&&1<e.
|
|
780
|
-
a.ba.duration:Infinity,b);g&&(g.segmentIndex=f);return{dc:function(){f&&0!=f.Ab()||f.Qd(h);return Promise.resolve(f)}}}function mr(a){return a.Fb}function nr(a){var b=pr(a);a=Oq(a,mr);var c=a.gd;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,gd:c,vb:a.vb,timeline:a.timeline,
|
|
781
|
-
function or(a,b,c,d,e,f){var g=d.
|
|
780
|
+
function er(a){var b=a.M;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Td,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function lr(a,b,c){var d=dr(a,mr,c),e=nr(a);if(!e.ya&&!e.timeline&&1<e.lc.length)throw new O(2,4,4002);if(!e.ya&&!a.ba.duration&&!e.timeline&&1==e.lc.length)throw new O(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new O(2,4,4002);var f=null,g=null;a.ta.id&&a.M.id&&(g=b[a.ta.id+","+a.M.id])&&(f=g.segmentIndex);var h=or(a.ba.start,a.ba.duration,a.M.cb,e,d,c);b=!f;f?f.Wc(h,a.presentationTimeline.eb()):f=new Fj(h);a.presentationTimeline.Xc(h);a.zb&&a.ba.Le||f.bc(a.ba.start,a.ba.duration?a.ba.start+
|
|
781
|
+
a.ba.duration:Infinity,b);g&&(g.segmentIndex=f);return{dc:function(){f&&0!=f.Ab()||f.Qd(h);return Promise.resolve(f)}}}function mr(a){return a.Fb}function nr(a){var b=pr(a);a=Oq(a,mr);var c=a.gd;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,gd:c,vb:a.vb,timeline:a.timeline,lc:b}}
|
|
782
|
+
function or(a,b,c,d,e,f){var g=d.lc.length;d.timeline&&d.timeline.length!=d.lc.length&&(g=Math.min(d.timeline.length,d.lc.length));for(var h=a-d.vb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},q=0;q<g;n={Ec:n.Ec,Ac:n.Ac},q++){n.Ac=d.lc[q];var p=void 0;p=null!=d.ya?m+d.ya:d.timeline?d.timeline[q].end:m+b;n.Ec=null;l.push(new S(a+m,a+p,function(u){return function(){null==u.Ec&&(u.Ec=xc(c(),[u.Ac.Dh]));return u.Ec}}(n),n.Ac.start,n.Ac.end,e,h,a,k,[],"",null,null,Ih,f));m=p}return l}
|
|
782
783
|
function pr(a){return[a.M.Fb,a.oa.Fb,a.ta.Fb].filter(ad).map(function(b){return pg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Wf&&(a.Wf=!0);var c=b.getAttribute("media");b=xg(b,"mediaRange",Ag,{start:0,end:null});return{Dh:c,start:b.start,end:b.end}})};function qr(a,b,c,d,e,f,g){var h=rr(a,g),k=sr(a);tr(k);var l=od(a);if(k.Uc)return kr(a,h),{dc:function(){var u=Nq(k.Uc,l.M.id,null,null,l.bandwidth||null,null);u=xc(l.M.cb(),[u]);return jr(l,b,h,u,0,null,k.vb)}};if(k.ya)return d||"image"===a.oa.contentType||(a.presentationTimeline.Ye(k.ya),a.presentationTimeline.Sd(a.ba.start)),{dc:function(){return ur(l,k,e,h,f,g)}};var m=null;d=d=null;a.ta.id&&a.M.id&&(d=a.ta.id+","+a.M.id,d=c[d])&&(m=d.segmentIndex);var n=a.ba.start,q=a.ba.duration?n+a.ba.duration:
|
|
783
784
|
Infinity,p=!(a.zb&&a.ba.Le);m?(c=m,vr(c,k,n,q,p,h),c.bb(a.presentationTimeline.eb())):m=new wr(k,a.M.id,a.bandwidth,a.M.cb,n,q,h,p,g,a.M.jf);k.timeline&&"image"!==a.oa.contentType&&a.presentationTimeline.dg(k.timeline,n);d&&a.zb&&(d.segmentIndex=m);return{dc:function(){m instanceof wr&&0==m.Ab()&&vr(m,k,n,q,p,h);return Promise.resolve(m)}}}function xr(a){return a.fd}
|
|
784
|
-
function sr(a){var b=Oq(a,xr),c=Pq(a,xr,"media");a=Pq(a,xr,"index");return{ya:b.ya,timescale:b.timescale,gd:b.gd,vb:b.vb,yf:b.yf,timeline:b.timeline,
|
|
785
|
+
function sr(a){var b=Oq(a,xr),c=Pq(a,xr,"media");a=Pq(a,xr,"index");return{ya:b.ya,timescale:b.timescale,gd:b.gd,vb:b.vb,yf:b.yf,timeline:b.timeline,mc:c,Uc:a}}function tr(a){var b=a.Uc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Uc&&(a.timeline=null),a.ya=null);if(!a.Uc&&!a.mc)throw new O(2,4,4002);}
|
|
785
786
|
function ur(a,b,c,d,e,f){function g(I){var L=(I-u)*p,M=L+b.vb,P=L+m;L=P+p;var V=Math.min(L,k());P=new S(P,V,function(){var X=M*v;"BigInt"in window&&X>Number.MAX_SAFE_INTEGER&&(X=BigInt(M)*BigInt(v));X=Nq(x,y,I,null,z,X);return xc(B(),[X])},0,null,d,A,m,k(),[],"",null,null,Ih,f);P.h=L;return P}function h(){var I=[Math.max(l.eb(),m),Math.min(l.Bb(),k())].map(function(L){return L-m});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(L){return L+u})}function k(){var I=null!=n&&e[n]||q;return I?
|
|
786
|
-
m+I:Infinity}var l=a.presentationTimeline,m=a.ba.start,n=a.ta.id,q=a.ba.duration,p=b.ya,u=b.gd,v=b.timescale,x=b.
|
|
787
|
+
m+I:Infinity}var l=a.presentationTimeline,m=a.ba.start,n=a.ta.id,q=a.ba.duration,p=b.ya,u=b.gd,v=b.timescale,x=b.mc,z=a.bandwidth||null,y=a.M.id,B=a.M.cb,A=m-b.vb,D=h();a=a.zb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var F=a;F<=D;++F){var J=g(F);c.push(J)}var G=new Fj(c);c=l.Bb()<k();F=l.R();if(c||F){var H=Math.max(a,D+1);G.Yd(p,function(){var I=l.eb();G.bb(I);var L=t(h());L.next();L=L.next().value;for(var M=[];H<=L;){var P=g(H);M.push(P);H++}return I>k()&&!M.length?null:M})}return Promise.resolve(G)}
|
|
787
788
|
function rr(a,b){var c=Pq(a,xr,"initialization");if(!c)return null;var d=a.M.id,e=a.bandwidth||null,f=a.M.cb;return new Gh(function(){var g=Nq(c,d,null,null,e,null);return xc(f(),[g])},0,null,er(a),null,null,b)}function wr(a,b,c,d,e,f,g,h,k,l){Fj.call(this,[]);this.h=a;this.F=b;this.A=c;this.C=d;this.i=e;this.l=f;this.s=g;this.u=k;this.G=l;h&&yr(this)}oa(wr,Fj);r=wr.prototype;r.Ab=function(){return this.h?this.h.timeline.length:0};r.release=function(){Fj.prototype.release.call(this);this.h=null};
|
|
788
|
-
r.bb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.Ab()&&this.release())}};function vr(a,b,c,d,e,f){a.s=f;if(a.h){c=a.h.timeline;a.h.
|
|
789
|
+
r.bb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.Ab()&&this.release())}};function vr(a,b,c,d,e,f){a.s=f;if(a.h){c=a.h.timeline;a.h.mc=b.mc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,w(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&yr(a)}
|
|
789
790
|
function yr(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.bb(a.i)}}r.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
|
|
790
|
-
r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.Ab()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.
|
|
791
|
+
r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.Ab()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.mc,e=this.h.timeline[a],f=e.Vh,g=this.h.yf+e.zf;c=this.i-this.h.vb;var h=this.i+e.end,k=h;a===this.Ab()-1&&Infinity!==this.l&&(k=this.l);for(var l=[],m=(e.end-e.start)/e.fb,n={},q=0;q<e.fb;n={Fc:n.Fc,fe:n.fe},q++){var p=e.start+m*q,u=p+m;n.fe=q+1;n.Fc=null;p=new S(this.i+p,this.i+u,function(v){return function(){if(!b.h)return[];null==v.Fc&&(v.Fc=zr(b.h.mc,b.F,f,b.A,g,v.fe,b.C));return v.Fc}}(n),
|
|
791
792
|
0,null,this.s,c,this.i,this.l,[],"",null,null,Ih,this.u);0==this.G?0<q&&p.Od():0!=q%this.G&&p.Od();l.push(p)}c=new S(this.i+e.start,k,function(){return 0<e.fb?[]:zr(d,b.F,f,b.A,g,null,b.C)},0,null,this.s,c,this.i,this.l,l,"",null,null,Ih,this.u,0<e.fb);c.h=h;this.g[a]=c}return c};function zr(a,b,c,d,e,f,g){a=Nq(a,b,c,f,d||null,e);return xc(g(),[a]).map(function(h){return h.toString()})};function Ar(a){this.o=null;this.u=a;this.G=new kf;this.j=[];this.h=null;this.m=[];this.A=null;this.F=[];this.C=300;this.l=new Map;this.i=new Map;this.g=null;this.s="UNKNOWN"}Ar.prototype.configure=function(a){this.o=a};Ar.prototype.destroy=function(){this.u=this.o=null;this.j=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Ar.prototype.setManifestType=function(a){this.s=a};
|
|
792
793
|
function Br(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=xc(a.j,[Cr(a,b)]),d=qf(c,a.o.retryParameters),e=a.u.networkingEngine.request(8,d),lf(a.G,e),sa(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=Nf(f.data),h=JSON.parse(g),1==h.VERSION&&Dr(a,h,f.uri),ua(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new qd(function(){Br(a,b)});a.g.U(a.C);E(l)})}
|
|
793
794
|
function Cr(a,b){if(!a.m.length)return b;b=new fc(b);var c=a.A||a.m[0],d=Math.round(a.u.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));vc(e)&&jc(b,e);return b.toString()}function Dr(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new qd(function(){Br(a,d)});if(c=b.TTL)a.C=c;a.g.U(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
@@ -828,11 +829,11 @@ r.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.s=b.i
|
|
|
828
829
|
r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return sa(c,2),C(c,qs(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);E(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Bb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.F=b.endTime-a,rs(this,0))}}};
|
|
829
830
|
r.banLocation=function(a){this.g&&this.g.i.set(a,Date.now()+6E4)};function qs(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=a.o,1<a.o.length&&a.g&&(c=Fr(a.g,"Location",!0),c.length&&(b=c)),d=qf(b,a.h.retryParameters),e=Date.now(),C(k,ss(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.o.includes(f.uri)&&a.o.unshift(f.uri);return C(k,ts(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.H.sample(1,h);return k.return(h)})}
|
|
830
831
|
function ts(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Jg(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.h.dash.disableXlinkProcessing)return k.return(us(a,d,c));f=a.h.dash.xlinkFailGracefully;g=Tq(d,a.h.retryParameters,f,c,a.i.networkingEngine);lf(a.C,g);return C(k,g.promise,2)}h=k.h;return k.return(us(a,h,c))})}
|
|
831
|
-
function us(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V,X,ba,R,Oa,ab,vb,Tb,Cb,xa,ib,wb,Ub,Vb,jb,Ed,hd,Fd,tc,Gd,
|
|
832
|
+
function us(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V,X,ba,R,Oa,ab,vb,Tb,Cb,xa,ib,wb,Ub,Vb,jb,Ed,hd,Fd,tc,Gd,Bh,Fe,Hd,Ac,Wc,Lf,Mf,Ck,Yp,Zp;return K(function(Xc){switch(Xc.g){case 1:(d=a.h.dash.manifestPreprocessor)&&d(b);a.g&&a.g.l.clear();e=[c];f=[];g=new Map;h=pg(b,"Location");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=m.getAttribute("serviceLocation"),q=vg(m))p=xc(e,[q])[0],n&&(a.g?Er(a.g,"Location",n,p):g.set(n,p)),f.push(p);a.g?(u=Fr(a.g,"Location",!0),0<
|
|
832
833
|
u.length&&(e=a.o=u)):f.length&&(e=a.o=f);v=Promise.resolve();if((x=og(b,"ContentSteering"))&&a.i){z=x.getAttribute("defaultServiceLocation");if(a.g)a.g.j=e,a.g.h=z;else if(a.g=new Ar(a.i),a.g.configure(a.h),a.g.setManifestType("DASH"),a.g.j=e,a.g.h=z,y=vg(x))(B=xg(x,"queryBeforeStart",Fg,!1))?v=Br(a.g,y):Br(a.g,y);A=t(g.keys());for(D=A.next();!D.done;D=A.next())F=D.value,J=g.get(F),Er(a.g,"Location",F,J)}G=pg(b,"BaseURL");I=!1;if(a.g)for(L=t(G),M=L.next();!M.done;M=L.next())P=M.value,V=P.getAttribute("serviceLocation"),
|
|
833
834
|
X=vg(P),V&&X&&(Er(a.g,"BaseURL",V,X),I=!0);I&&a.g||(ba=G.map(vg),H=xc(e,ba));R=function(){return a.g&&I?Fr(a.g,"BaseURL"):H?H:[]};Oa=0;G&&G.length&&(Oa=xg(G[0],"availabilityTimeOffset",Eg)||0);ab=a.h.dash.ignoreMinBufferTime;vb=0;ab||(vb=xg(b,"minBufferTime",zg)||0);a.F=xg(b,"minimumUpdatePeriod",zg,-1);Tb=xg(b,"availabilityStartTime",yg);Cb=xg(b,"timeShiftBufferDepth",zg);xa=a.h.dash.ignoreSuggestedPresentationDelay;ib=null;xa||(ib=xg(b,"suggestedPresentationDelay",zg));wb=a.h.dash.ignoreMaxSegmentDuration;
|
|
834
|
-
Ub=null;wb||(Ub=xg(b,"maxSegmentDuration",zg));Vb=b.getAttribute("type")||"static";if(a.j)for(jb=a.j.presentationTimeline,Ed=t(Object.values(a.m)),hd=Ed.next();!hd.done;hd=Ed.next())Fd=hd.value,Fd.segmentIndex&&Fd.segmentIndex.bb(jb.eb());else tc=a.h.defaultPresentationDelay||1.5*vb,Gd=null!=ib?ib:tc,jb=new jj(Tb,Gd,a.h.dash.autoCorrectDrift);jb.
|
|
835
|
-
"";Hd={zb:"static"!=Vb,presentationTimeline:jb,ta:null,ba:null,oa:null,M:null,bandwidth:0,Wf:!1,ac:Oa,profiles:
|
|
835
|
+
Ub=null;wb||(Ub=xg(b,"maxSegmentDuration",zg));Vb=b.getAttribute("type")||"static";if(a.j)for(jb=a.j.presentationTimeline,Ed=t(Object.values(a.m)),hd=Ed.next();!hd.done;hd=Ed.next())Fd=hd.value,Fd.segmentIndex&&Fd.segmentIndex.bb(jb.eb());else tc=a.h.defaultPresentationDelay||1.5*vb,Gd=null!=ib?ib:tc,jb=new jj(Tb,Gd,a.h.dash.autoCorrectDrift);jb.pc("static"==Vb);(Bh=jb.R())&&!isNaN(a.h.availabilityWindowOverride)&&(Cb=a.h.availabilityWindowOverride);null==Cb&&(Cb=Infinity);jb.Xd(Cb);Fe=b.getAttribute("profiles")||
|
|
836
|
+
"";Hd={zb:"static"!=Vb,presentationTimeline:jb,ta:null,ba:null,oa:null,M:null,bandwidth:0,Wf:!1,ac:Oa,profiles:Fe.split(",")};Ac=vs(a,Hd,R,b);Wc=Ac.duration;Lf=Ac.periods;"static"!=Vb&&Ac.Lf||jb.Pa(Wc||Infinity);a.A&&!a.s&&(Mf=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?jb.lg(a.A):a.A&&Sa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
836
837
|
jb.Ye(Ub||1);return C(Xc,a.l.Gf(Lf,Hd.zb),2);case 2:return C(Xc,v,3);case 3:a.s&&(vb=0);if(a.j){a.j.variants=a.l.j;Ck=a.l.Ie();0<Ck.length&&(a.j.textStreams=Ck);a.j.imageStreams=a.l.i;a.i.filter(a.j);Xc.B(4);break}a.j={presentationTimeline:jb,variants:a.l.j,textStreams:a.l.Ie(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:vb||0,sequenceMode:a.h.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:ws(b)};if(!jb.ug()){Xc.B(5);break}Yp=pg(b,"UTCTiming");
|
|
837
838
|
return C(Xc,xs(a,R,Yp),6);case 6:Zp=Xc.h;if(!a.i)return Xc.return();jb.mg(Zp);case 5:jb.Nd();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),E(Xc)}})}
|
|
838
839
|
function ws(a){a=og(a,"ServiceDescription");if(!a)return null;var b=og(a,"Latency"),c=og(a,"PlaybackRate");if(b&&b.getAttribute("max")||c){a=b&&b.getAttribute("max")?parseInt(b.getAttribute("max"),10)/1E3:null;var d=c?parseFloat(c.getAttribute("max")):null;b=b&&b.getAttribute("min")?parseInt(b.getAttribute("min"),10)/1E3:null;c=c?parseFloat(c.getAttribute("min")):null;return{maxLatency:a,maxPlaybackRate:d,minLatency:b,minPlaybackRate:c}}return null}
|
|
@@ -866,7 +867,7 @@ function xs(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d
|
|
|
866
867
|
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return C(n,Js(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,Js(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ua(n,
|
|
867
868
|
3);break;case 5:va(n);case 3:g=f.next();n.B(2);break;case 4:return Sa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
868
869
|
function As(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=xg(d,"timescale",Dg)||1;d=t(pg(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=xg(k,"presentationTime",Dg)||0,m=xg(k,"duration",Dg)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.i.onTimelineRegionAdded(k))}}
|
|
869
|
-
function Gs(a,b,c,d,e){var f,g,h,k;return K(function(l){if(1==l.g)return f=wf,g=e?0:1,h=fk(b,c,d,a.h.retryParameters),C(l,ss(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Es(a,b){b=Gc(a,b);return Qc(b)?Dc:a.split("/")[0]}function ss(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);lf(a.C,b);return b.promise}N("shaka.dash.DashParser",os);
|
|
870
|
+
function Gs(a,b,c,d,e){var f,g,h,k;return K(function(l){if(1==l.g)return f=wf,g=e?0:1,h=fk(b,c,d,a.h.retryParameters),C(l,ss(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Es(a,b){b=Gc(a,b);return Qc(b)?Dc:a.split("/")[0]}function ss(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);lf(a.C,b);return b.promise}N("shaka.dash.DashParser",os);Ah["application/dash+xml"]=function(){return new os};Ah["video/vnd.mpeg.dash.mpd"]=function(){return new os};function Ks(){}N("shaka.dependencies",Ks);Ks.has=function(a){return Ls.has(a)};Ks.add=function(a,b){if(!Ms[a])throw Error(a+" is not supported");a==Ns?ze("mux.js","mux.js is no longer used in Shaka Player."):Ls.set(a,function(){return b})};var Ns="muxjs",Ms={cj:Ns,ISOBoxer:"ISOBoxer"};Ks.Allowed=Ms;var Ls=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Os(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Ps(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Ps.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.g?this.g.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
870
871
|
function Qs(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}Ps.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Rs(a,b){a=a.getAttribute(b);if(!a)throw new O(2,4,4023,b);return a.value}function Ss(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.fb=c}
|
|
871
872
|
function Ts(a,b){this.name=a;this.value=b};function Us(a,b){return a.filter(function(c){return c.name==b})}function Vs(a,b){return a.filter(function(c){return Rs(c,"TYPE")==b})}function Ws(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Xs(a,b,c){c=void 0===c?0:c;return(a=Ws(a,b))?Number(a.value):c}function Ys(a,b,c){return b?Zs(a,[b],c):[]}
|
|
872
873
|
function Zs(a,b,c){if(!b.length)return[];b=xc(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new O(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function $s(a){this.h=a||"";this.g=0}function at(a){bt(a,/[ \t]+/gm)}function bt(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function ct(a){return a.g==a.h.length?null:(a=bt(a,/[^ \t\n]*/gm))?a[0]:null};function dt(){this.g=0}
|
|
@@ -891,10 +892,10 @@ function Ht(a,b){if(Infinity==a.V){b=t(b);for(var c=b.next();!c.done;c=b.next())
|
|
|
891
892
|
function Gt(a,b,c){b.Sb+=c;b.rb+=c;a=zt(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.Z()}
|
|
892
893
|
function st(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V,X,ba;return K(function(R){switch(R.g){case 1:d=et(a.za,b);e=Us(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];if(1==d.type)return v=function(){return[c]},C(R,It(a,d,v),6);Jt(a,e);k=Us(d.g,"EXT-X-MEDIA");l=Us(d.g,"EXT-X-STREAM-INF");m=Us(d.g,"EXT-X-IMAGE-STREAM-INF");n=Us(d.g,"EXT-X-I-FRAME-STREAM-INF");q=Us(d.g,"EXT-X-SESSION-KEY");p=Us(d.g,"EXT-X-SESSION-DATA");u=Us(d.g,"EXT-X-CONTENT-STEERING");Kt(a,p);return C(R,Lt(a,u),4);case 4:return Mt(a,
|
|
893
894
|
l),Nt(a,k),f=Ot(a,l,q,k),g=Pt(a,k),C(R,Qt(a,m,n),5);case 5:h=R.h;R.B(3);break;case 6:return x=R.h,z=x.type,y=x.mimeType,B=x.codecs,A=x.language,D=x.height,F=x.width,J=x.channelCount,G=x.sampleRate,H=x.closedCaptions,C(R,Rt(a,a.u++,d,v,c,B,z,A,!0,"Media Playlist",J,H,null,!1,G,!1,y),7);case 7:I=R.h,a.h.set(c,I),"video"==z&&St(I.stream,F,D,null,null,null),f.push({id:0,language:dd(A||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==z?I.stream:null,video:"video"==z?I.stream:null,bandwidth:I.stream.bandwidth||
|
|
894
|
-
0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,7,7001);a.l=new jj(null,0);a.l.
|
|
895
|
+
0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,7,7001);a.l=new jj(null,0);a.l.pc(!0);1==d.type&&(tt(a)&&(Tt(a,d),L=a.m,a.s.U(L)),M=Array.from(a.h.values()),Ut(a,M),yt(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null};if(a.da||!a.g.hls.disableCodecGuessing){R.B(8);
|
|
895
896
|
break}P=[];V=t(a.C.variants);for(X=V.next();!X.done;X=V.next())ba=X.value,ba.audio&&""===ba.audio.codecs&&P.push(ba.audio.createSegmentIndex()),ba.video&&""===ba.video.codecs&&P.push(ba.video.createSegmentIndex());return C(R,Promise.all(P),8);case 8:a.i.makeTextStreamsForClosedCaptions(a.C),E(R)}})}
|
|
896
|
-
function It(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){switch(D.g){case 1:d=lt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return D.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=Ys(c(),b.segments[0].h);h=g[0];k=new fc(h);l=k.Ga.split(".").pop();if(m=Vt[l])return D.return(lt(m));n=wf;q=null;p=Wt(a,b,f.g,c);a.W.clear();if(!p){D.B(2);break}u=
|
|
897
|
-
a.g.retryParameters),C(D,Xt(a,x,n,{type:1}),4);case 4:z=D.h;(y=z.headers["content-type"])&&(y=y.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==y){var F=z.data;var J=hb(F);J=(new ni).parse(J);var G=J.
|
|
897
|
+
function It(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A;return K(function(D){switch(D.g){case 1:d=lt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return D.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=Ys(c(),b.segments[0].h);h=g[0];k=new fc(h);l=k.Ga.split(".").pop();if(m=Vt[l])return D.return(lt(m));n=wf;q=null;p=Wt(a,b,f.g,c);a.W.clear();if(!p){D.B(2);break}u=fk(p.Z(),p.ic(),p.fc(),a.g.retryParameters);return C(D,Xt(a,u,n,{type:0}),3);case 3:v=D.h,q=v.data;case 2:return x=
|
|
898
|
+
qf(g,a.g.retryParameters),C(D,Xt(a,x,n,{type:1}),4);case 4:z=D.h;(y=z.headers["content-type"])&&(y=y.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==y){var F=z.data;var J=hb(F);J=(new ni).parse(J);var G=J.Pc();J=J.Je();var H=[],I=!1,L=!1;switch(G.audio){case "aac":H.push("mp4a.40.2");I=!0;break;case "mp3":H.push("mp4a.40.34");I=!0;break;case "ac3":H.push("ac-3");I=!0;break;case "ec3":H.push("ec-3"),I=!0}switch(G.video){case "avc":J.ha?H.push(J.ha):H.push("avc1.42E01E");L=!0;break;case "hvc":J.ha?
|
|
898
899
|
H.push(J.ha):H.push("hvc1.1.6.L93.90"),L=!0}if(H.length){G=I&&!L;I=new Map;if(L){L=new pb("video/mp2t");L.i(F);F=t(L.j());for(var M=F.next();!M.done;M=F.next())M=M.value,I.set(M,M);L.h()}J={type:G?"audio":"video",mimeType:"video/mp2t",codecs:H.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:I}}else J=null;if(B=J)return D.return(B)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"video/mp4"==y||"audio/mp4"==y||"video/iso.segment"==y)if(A=mt(q,z.data))return D.return(A);
|
|
899
900
|
return D.return(d)}})}function yt(a){if(tt(a)){if(a.ea==Yt){var b=Zt(a);a.g.hls.useSafariBehaviorForLive&&(b=a.l.o);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Xd(b)}if(!a.l.m){b=Array.from(a.h.values()).filter(function(d){return d.stream.segmentIndex});b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,("audio"==c.type||"video"==c.type)&&(c=c.stream.segmentIndex.get(0))&&c.ca&&a.l.qf(c.ca)}}else a.l.Pa($t(a));a.l.Nd()}
|
|
900
901
|
function Jt(a,b){var c=(new fc(a.Y)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}}
|
|
@@ -936,27 +937,27 @@ function Bt(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.d
|
|
|
936
937
|
function su(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Sa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new O(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=jg(g.substr(2));if(16!=h.byteLength)throw new O(2,4,4048);}else f=Xs(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,q,p;return K(function(u){if(1==u.g)return l=Ys(d(),Rs(b,"URI"),e),m=qf(l,a.g.retryParameters),
|
|
937
938
|
C(u,Xt(a,m,6),2);if(3!=u.g){n=u.h;if(!n.data||16!=n.data.byteLength)throw new O(2,4,4049);q={name:"AES-CBC"};p=k;return C(u,window.crypto.subtle.importKey("raw",n.data,q,!0,["decrypt"]),3)}p.cryptoKey=u.h;k.fetchKey=void 0;E(u)})}};return k}
|
|
938
939
|
function Et(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Ws(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Ws(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Ws(b.g,"EXT-X-PART-INF"))a.K=Number(Rs(e,"PART-TARGET"));b=Ws(b.g,"EXT-X-SERVER-CONTROL");a.A&&a.K?(a.m=a.lb?5*a.K<=c?Math.min(a.K,a.m):Math.min(c,a.m):Math.min(a.K,a.m),a.ma=b?Number(Rs(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
939
|
-
b.getAttribute("HOLD-BACK"):null,a.ka=c?Number(c.value):0);a.Aa=Math.max(d,a.Aa)}function Tt(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ma)b=a.ma;else if(a.ka)b=a.ka;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Aa*c}a.l.qf(0);a.l.ng(b);a.l.
|
|
940
|
+
b.getAttribute("HOLD-BACK"):null,a.ka=c?Number(c.value):0);a.Aa=Math.max(d,a.Aa)}function Tt(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ma)b=a.ma;else if(a.ka)b=a.ka;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Aa*c}a.l.qf(0);a.l.ng(b);a.l.pc(!1)}
|
|
940
941
|
function Wt(a,b,c,d,e){var f=Ws(c,"EXT-X-MAP");if(!f)return null;var g=Rs(f,"URI"),h=Ys(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.W.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?"AES-128"==Rs(m,"METHOD")&&m.id<f.id&&(k=su(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=tu(h,f,l,k);a.W.set(g,b)}return a.W.get(g)}
|
|
941
942
|
function tu(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Gh(function(){return a},e,f,null,null,null,d)}
|
|
942
943
|
function uu(a,b,c,d,e,f,g,h,k){var l=d.g,m=Ws(l,"EXTINF"),n=0,q=0,p=null;d.fb.length&&!a.A&&Sa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=Ws(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=yg(v.value))}var x=Ih;Ws(l,"EXT-X-GAP")&&(x=2);if(!m){if(0==d.fb.length)throw new O(2,4,4024,"EXTINF");
|
|
943
|
-
if(!a.A)return null}var z=[];v=!1;var y=null,B=!1,A=!1;if(a.A&&d.fb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=u,F={},J=0;J<d.fb.length;F={
|
|
944
|
-
(P=Z(G,"BYTERANGE"),V=t(vu(H,P)),P=V.next().value,V=V.next().value);F.md=Z(G,"URI");if(F.md){H=Ih;"YES"==Z(G,"GAP")&&(H=2,B=!0);F.
|
|
944
|
+
if(!a.A)return null}var z=[];v=!1;var y=null,B=!1,A=!1;if(a.A&&d.fb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=u,F={},J=0;J<d.fb.length;F={Cc:F.Cc,md:F.md},J++){var G=d.fb[J],H=0==J?c:z[z.length-1],I=0==J?e:H.endTime,L=Number(Z(G,"DURATION"))||a.K;if(L){var M=I+L,P=0,V=null;"EXT-X-PRELOAD-HINT"==G.name?(P=(P=Z(G,"BYTERANGE-START"))?Number(P):0,(H=Z(G,"BYTERANGE-LENGTH"))?V=P+Number(H)-1:P&&(V=Number.MAX_SAFE_INTEGER)):
|
|
945
|
+
(P=Z(G,"BYTERANGE"),V=t(vu(H,P)),P=V.next().value,V=V.next().value);F.md=Z(G,"URI");if(F.md){H=Ih;"YES"==Z(G,"GAP")&&(H=2,B=!0);F.Cc=null;var X=function(R){return function(){null==R.Cc&&(R.Cc=Ys(h(),R.md,f));return R.Cc}}(F);n&&0<=P&&null!=V&&(y=X,v=!0);I=new S(I,M,X,P,V,b,0,0,Infinity,[],"",null,D,H,k);"EXT-X-PRELOAD-HINT"==G.name&&(I.Ue(),A=!0);"YES"!=Z(G,"INDEPENDENT")&&0<J&&I.Od();z.push(I);D&&(D+=L)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=z[z.length-
|
|
945
946
|
1].endTime;else return null;v&&(B||0!=z[0].Qa?(v=!1,y=null):z=[]);(m=Ws(l,"EXT-X-BYTERANGE"))?(p=t(vu(c,m.value)),q=p.next().value,p=p.next().value):z.length&&(q=z[0].Qa,p=z[z.length-1].wa);c="";m=null;"image"==g.type&&(c="1x1",g=Ws(l,"EXT-X-TILES"))&&(c=Rs(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var ba=null;b=new S(e,n,function(){if(y)return y();null==ba&&(ba=Ys(h(),d.h,f));return ba||[]},q,p,b,0,0,Infinity,z,c,m,u,x,k,0<z.length&&!!d.h);v&&(a.lb=!0,b.Zf(),A&&b.Ue());return b}
|
|
946
947
|
function vu(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+b-1);return[c,d]}
|
|
947
948
|
function Ct(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Xs(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Xs(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Ws(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,q=l+n,p=0;tt(a)&&d.has(q)&&(p=d.get(q));0===p&&a.ea==Yt&&0<d.size&&!d.has(q)&&(p=a.l.eb());var u=[],v=null;m=[];for(var x=0;x<g.length;x++){var z=g[x],y=0==x?p:v.endTime;q=l+n+x;Ws(z.g,"EXT-X-DISCONTINUITY")&&k++;var B=t(z.g);for(var A=B.next();!A.done;A=B.next())A=A.value,"EXT-X-KEY"==A.name&&("AES-128"==Rs(A,
|
|
948
949
|
"METHOD")?h=su(a,A,b,f,e):h=void 0);d.set(q,y);B=Wt(a,b,z.g,f,e);!a.A&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.A=a.i.isLowLatencyMode());if(y=uu(a,B,v,z,y,e,c,f,h))(v=Xs(z.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:y.endTime-y.startTime}):m.length&&(v=m.pop(),v.duration+=y.endTime-y.startTime,m.push(v)),v=y,y.i=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.I&&q<a.I||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(D,F){return D+F.duration},0),b=Math.round(m.reduce(function(D,
|
|
949
|
-
F){return D+F.bitrate*F.duration},0)/b*1E3));if(m=u.some(function(D){return null!=D.ca}))for(c={},d=0;d<u.length;c={
|
|
950
|
+
F){return D+F.bitrate*F.duration},0)/b*1E3));if(m=u.some(function(D){return null!=D.ca}))for(c={},d=0;d<u.length;c={vc:c.vc,uc:c.uc,hd:c.hd,xb:c.xb,tc:c.tc},d++)if(c.xb=u[d],null==c.xb.ca)for(c.uc=0,c.vc=d,e=function(D){return function(){var F=u[D.vc];if(F){if(null!=F.ca)return F.ca+D.uc;D.uc-=F.endTime-F.startTime;D.vc+=1}return null}}(c),c.tc=0,c.hd=d,f=function(D){return function(){var F=u[D.hd];if(F){F!=D.xb&&(D.tc+=F.endTime-F.startTime);if(null!=F.ca)return F.ca+D.tc;--D.hd}return null}}(c);null==
|
|
950
951
|
c.xb.ca;)c.xb.ca=f(),null==c.xb.ca&&(c.xb.ca=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.ca,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.ca=d,d+=f.endTime-f.startTime;a=a.V;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.tf(a);return{segments:u,bandwidth:b}}
|
|
951
952
|
function cu(a,b){if(a==Dc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function du(a){return a==Dc?"text/vtt":wu[a].mp4}
|
|
952
953
|
function ru(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,x,z,y;return K(function(B){switch(B.g){case 1:g=wf;h=Math.trunc((d.segments.length-1)/2);k=Ys(f(),d.segments[h].h,e);l=new fc(k[0]);m=l.Ga.split(".").pop();n=wu[b];if((q=n[m])||(q=Vt[m])||(q=cu(b,c)))return B.return(q);u=1;v=qf(k,a.g.retryParameters);sa(B,2);v.method="HEAD";return C(B,Xt(a,v,g,{type:u}),4);case 4:x=B.h;p=x.headers["content-type"];ua(B,3);break;case 2:z=va(B);if(!z||1002!=z.code&&1001!=z.code){B.B(3);break}v.method="GET";return C(B,
|
|
953
954
|
Xt(a,v,g,{type:u}),6);case 6:y=B.h,p=y.headers["content-type"];case 3:return p?B.return(p.split(";")[0]):B.return(du(b))}})}function St(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function rt(a,b,c){return Xt(a,qf(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
954
955
|
function pt(a){var b,c,d,e,f,g;K(function(h){switch(h.g){case 1:if(!a.i)return h.return();sa(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();tt(a)&&(d=(c-b)/1E3,a.kb.sample(1,d),e=a.m,f=Math.max(0,e-Na(a.kb)),a.s.U(f));ua(h,3);break;case 2:g=va(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.s.U(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();E(h)}})}
|
|
955
|
-
function tt(a){return a.ea!=qt}function xt(a,b){a.ea=b;a.l&&a.l.
|
|
956
|
+
function tt(a){return a.ea!=qt}function xt(a,b){a.ea=b;a.l&&a.l.pc(!tt(a));tt(a)||a.s.stop()}function Xt(a,b,c,d){if(!a.N)throw new O(2,7,7001);b=a.i.networkingEngine.request(c,b,d);lf(a.N,b);return b.promise}N("shaka.hls.HlsParser",ot);
|
|
956
957
|
var Vt={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},wu={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
957
958
|
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},hu={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new O(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new O(2,4,4041);return yc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Rs(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
958
|
-
b=Rs(a,"URI");b=kt(b);b=hb(b.data);b=yc("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=Rs(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Rs(a,"URI");a=kt(a);a=hb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=ng(a,b,new Set,0);return yc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a
|
|
959
|
-
Rs(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?yc("org.w3.clearkey",null):null}},qt="VOD",qu="EVENT",Yt="LIVE",wt={zg:qt,oi:qu,xi:Yt};
|
|
959
|
+
b=Rs(a,"URI");b=kt(b);b=hb(b.data);b=yc("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=Rs(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Rs(a,"URI");a=kt(a);a=hb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=ng(a,b,new Set,0);return yc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a,
|
|
960
|
+
b){if("video/mp2t"==b)throw new O(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new O(2,4,4041);a=Rs(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?yc("org.w3.clearkey",null):null}},qt="VOD",qu="EVENT",Yt="LIVE",wt={zg:qt,oi:qu,xi:Yt};Ah["application/x-mpegurl"]=function(){return new ot};Ah["application/vnd.apple.mpegurl"]=function(){return new ot};function xu(a){var b=0,c=nb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function yu(a){if(a=zu(a))a:{a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=og(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
|
|
960
961
|
function zu(a){a=ig(a.textContent);a=xu(a).filter(function(b){return b.type===Au})[0];if(!a)return null;a=Of(a.value,!0);return(a=Hg(a,"WRMHEADER"))?a:null}var Au=1,Bu=(new Map).set("com.microsoft.playready",yu).set("com.microsoft.playready.recommendation",yu).set("com.microsoft.playready.software",yu).set("com.microsoft.playready.hardware",yu);function Cu(a){if(!Du){Du=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Eu=Fu("ftyp",b,d,b,c);b=Fu("dref",Gu);Hu=Fu("dinf",b)}this.g=a}
|
|
961
962
|
function Iu(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Fu;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Ju+1));m=Math.floor(m%(Ju+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Ku(h,4)),[0,0,0,0],w(Ku(n,4)),w(Ku(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],w(Ku(k,2)),[0,0],w(Ku(l,
|
|
962
963
|
2)),[0,0]));h=Fu("tkhd",h);k=Fu;n=g.duration*g.timescale;l=Math.floor(n/(Ju+1));n=Math.floor(n%(Ju+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Ku(g.timescale,4)),w(Ku(l,4)),w(Ku(n,4)),w(Ku(m,2)),[0,0]));l=Fu("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Lu;break;case "audio":m=Mu}n=Fu("hdlr",m);a:{switch(g.type){case "video":g=Fu("minf",Fu("vmhd",Nu),Hu,Ou(g));break a;
|
|
@@ -979,7 +980,7 @@ var Du=!1,Ju=Math.pow(2,32)-1,av={},Lu=new Uint8Array([0,0,0,0,0,0,0,0,118,105,1
|
|
|
979
980
|
0,0,0,0,0,0,0]),Uu=new Uint8Array([0,0,0,0,0,0,0,1]),Eu=new Uint8Array([]),Gu=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Hu=new Uint8Array([]);function bv(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.A=new Ma(5);this.o=new qd(function(){cv(a)});this.u=new kf;this.m=new Map}r=bv.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return K(function(d){if(1==d.g)return c.l=[a],c.h=b,C(d,dv(c),2);if(!c.h)throw new O(2,7,7001);return d.return(c.j)})};
|
|
980
981
|
function cv(a){var b;K(function(c){switch(c.g){case 1:return sa(c,2),C(c,dv(a),4);case 4:ua(c,3);break;case 2:b=va(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();E(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.u.destroy()};
|
|
981
982
|
r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return sa(c,2),C(c,dv(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);E(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
|
|
982
|
-
function dv(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=qf(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),lf(a.u,e),C(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=Jg(f.data,"SmoothStreamingMedia");if(!m)throw new O(2,4,4046,l);(l=a.g.mss.manifestPreprocessor)&&l(m);a.i||(a.i=new jj(null,0));if(l=xg(m,"IsLive",Fg,!1))throw new O(2,4,4047);a.i.
|
|
983
|
+
function dv(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=qf(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),lf(a.u,e),C(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=Jg(f.data,"SmoothStreamingMedia");if(!m)throw new O(2,4,4046,l);(l=a.g.mss.manifestPreprocessor)&&l(m);a.i||(a.i=new jj(null,0));if(l=xg(m,"IsLive",Fg,!1))throw new O(2,4,4047);a.i.pc(!l);var n=xg(m,"TimeScale",Dg,1E7),
|
|
983
984
|
q=xg(m,"DVRWindowLength",Dg);l&&(0===q||isNaN(q))&&(q=Infinity);var p=xg(m,"CanSeek",Fg,!1);0===q&&p&&(q=Infinity);p=null;q&&0<q&&(p=q/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.Xd(p);q=xg(m,"Duration",Dg,Infinity);l||a.i.Pa(q/n);l={variants:[],textStreams:[],timescale:n,duration:q/n};p=pg(m,"Protection");var u;n=a.g.mss.keySystemsBySystemId;q=[];p=t(p);for(u=p.next();!u.done;u=p.next())q=q.concat(pg(u.value,"ProtectionHeader"));if(q.length){p=
|
|
984
985
|
[];for(u=0;u<q.length;u++){var v=q[u],x=v.getAttribute("SystemID").toLowerCase(),z=n[x];if(z){var y=zu(v);if(y)a:{y=t(y.getElementsByTagName("DATA"));for(var B=y.next();!B.done;B=y.next())if(B=og(B.value,"KID")){y=ig(B.textContent);y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],y[4],y[7],y[6]].concat(w(y.slice(8))));y=kg(y);break a}y=null}else y=null;B=ig(v.textContent);x=jg(x.replace(/-/g,""));x=[{initData:ng(B,x,new Set,0),initDataType:"cenc",keyId:y}];x=yc(z,x);y&&x.keyIds.add(y);if(z=Bu.get(z))x.licenseServerUri=
|
|
985
986
|
z(v);p.push(x)}}n=p}else n=[];u=n;p=[];n=[];q=[];m=pg(m,"StreamIndex");m=t(m);for(v=m.next();!v.done;v=m.next()){v=v.value;z=pg(v,"QualityLevel");x=l.timescale;y=l.duration;B=pg(v,"c");for(var A=[],D=0,F=0;F<B.length;++F){var J=B[F],G=B[F+1],H=xg(J,"t",Dg),I=xg(J,"d",Dg);J=xg(J,"r",Bg);if(!I)break;H=null!=H?H:D;J=J||0;if(0>J)if(G){G=xg(G,"t",Dg);if(null==G)break;else if(H>=G)break;J=Math.ceil((G-H)/I)-1}else{if(Infinity==y)break;else if(H/x>=y)break;J=Math.ceil((y*x-H)/I)-1}for(G=0;G<=J;++G)D=H+I,
|
|
@@ -994,8 +995,8 @@ if(a.m.has(x.id))var z=a.m.get(x.id);else z=[],"video"==x.type&&(z=x.mssPrivateD
|
|
|
994
995
|
function(){x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null)};return x}
|
|
995
996
|
function hv(a,b,c,d){if(a=a.getAttribute("CodecPrivateData"))return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|
|
|
996
997
|
b<<3;b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function iv(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function jv(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
997
|
-
function kv(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={
|
|
998
|
-
|
|
998
|
+
function kv(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={Bc:g.Bc},h=e.next())g.Bc=h.value,d.push(new S(g.Bc.start,g.Bc.end,function(k){return function(){return xc(a.l,[f.replace("{start time}",String(k.Bc.zf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}N("shaka.mss.MssParser",bv);var gv="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),fv={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
999
|
+
Ah["application/vnd.ms-sstr+xml"]=function(){return new bv};function lv(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Qf(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function mv(){}function nv(a,b,c,d,e){var f=new ov;If(b.headers).forEach(function(l,m){f.append(m,l)});var g=new pv,h={Ff:!1,tg:!1};a=qv(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new $e(a,function(){h.Ff=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new qd(function(){h.tg=!0;g.abort()});k.U(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
999
1000
|
function qv(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:return h=rv,k=sv,q=n=0,p=Date.now(),sa(A,2),C(A,h(a,c),4);case 4:l=A.h;f(tv(l.headers));if("HEAD"==c.method){A.B(5);break}u=l.clone().body.getReader();x=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;z=function(D){function F(){var J,G;return K(function(H){switch(H.g){case 1:return sa(H,2),C(H,u.read(),4);case 4:J=H.h;ua(H,3);break;case 2:return va(H),H.return();case 3:if(J.done){H.B(5);break}n+=
|
|
1000
1001
|
J.value.byteLength;if(!g){H.B(5);break}return C(H,g(J.value),5);case 5:G=Date.now();if(100<G-p||J.done)e(G-p,n-q,x-n),q=n,p=G;J.done?D.close():(D.enqueue(J.value),F());E(H)}})}F()};new k({start:z});return C(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:ua(A,3);break;case 2:y=va(A);if(d.Ff)throw new O(1,1,7001,a,b);if(d.tg)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,y,b);case 3:return B=tv(l.headers),A.return(lv(B,m,l.status,a,l.url,b))}})}
|
|
1001
1002
|
function tv(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function uv(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",mv);mv.isSupported=uv;mv.parse=nv;var rv=window.fetch,pv=window.AbortController,sv=window.ReadableStream,ov=window.Headers;
|
|
@@ -1007,25 +1008,25 @@ function Hv(a,b,c,d,e,f){zf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(func
|
|
|
1007
1008
|
function Iv(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=wf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),C(g,d.promise,2);f=g.h;tb(a.h,e);return g.return(f.data)})};function Kv(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Ze;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Kv.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}sa(b,2);return C(b,a.g,4)}if(2!=b.g)return ua(b,0);va(b);E(b)})};
|
|
1008
1009
|
function Lv(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return C(g,b(f.key,f.value,f),2)}f.continue();E(g)})}})}Kv.prototype.store=function(){return this.h};Kv.prototype.promise=function(){return this.g};function Mv(a){this.h=a;this.g=[]}Mv.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Nv(a,b){return Ov(a,b,"readwrite")}function Ov(a,b,c){c=a.h.transaction([b],c);var d=new Kv(c,b);a.g.push(d);d.promise().then(function(){tb(a.g,d)},function(){tb(a.g,d)});return d};function Pv(a,b,c){this.h=new Mv(a);this.i=b;this.g=c}r=Pv.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Qv(this.i)};r.removeSegments=function(a,b){return Rv(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return C(d,Sv(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Hf(e)}))})};r.addManifests=function(){return Qv(this.g)};
|
|
1009
1010
|
r.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function Tv(a,b,c){a=Nv(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Nv(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Rv(this,this.g,a,b)};
|
|
1010
|
-
r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return C(d,Sv(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.
|
|
1011
|
+
r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return C(d,Sv(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Mc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Ov(a.h,a.g,"readonly"),c=new Map,C(d,Lv(b,function(e,f){var g;return K(function(h){if(1==h.g)return C(h,a.Mc(f),2);g=h.h;c.set(e,g);E(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};r.Hf=function(a){return a};r.Mc=function(a){return Promise.resolve(a)};
|
|
1011
1012
|
function Qv(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Nv(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={nd:g.nd},k=h.next())l=k.value,g.nd=e.add(l),g.nd.onsuccess=function(n){return function(){f.push(n.nd.result)}}(g);return C(m,d.promise(),2)}return m.return(f)})};
|
|
1012
1013
|
function Rv(a,b,c,d){a=Nv(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={ld:e.ld},f=c.next())e.ld=f.value,b.delete(e.ld).onsuccess=function(g){return function(){return d(g.ld)}}(e);return a.promise()}
|
|
1013
|
-
function Sv(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Ov(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={
|
|
1014
|
+
function Sv(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Ov(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={zc:h.zc,xc:h.xc},l=k.next())h.xc=l.value,h.zc=e.get(h.xc),h.zc.onsuccess=function(n){return function(){void 0==n.zc.result&&g.push(n.xc);f[n.xc]=n.zc.result}}(h);return C(m,d.promise(),2)}if(g.length)throw new O(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Uv(a){this.g=new Mv(a)}Uv.prototype.destroy=function(){return this.g.destroy()};Uv.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Ov(a.g,"session-ids","readonly"),c=[],C(d,Lv(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};Uv.prototype.add=function(a){var b=Nv(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()};
|
|
1014
1015
|
Uv.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Nv(b.g,"session-ids"),C(d,Lv(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function Vv(){this.g=new Map}Vv.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)};Vv.prototype.init=function(){var a=this;Wv.forEach(function(e,f){(e=e())&&a.g.set(f,e)});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)};
|
|
1015
1016
|
function Xv(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Wa:d,va:f},va:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function Yv(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Wa:d,va:f},e)})})}
|
|
1016
1017
|
function Zv(a,b,c){a=a.g.get(b);if(!a)throw new O(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new O(2,9,9013,"Could not find cell with name "+c);return b}function $v(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function aw(a){var b=Array.from(a.g.keys());if(!b.length)throw new O(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1017
1018
|
function bw(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Wv,d.forEach(function(f){(f=f())&&b.push(f)})),C(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):C(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function cw(a,b){Wv.set(a,b)}N("shaka.offline.StorageMuxer",Vv);Vv.unregister=function(a){Wv.delete(a)};Vv.register=cw;Vv.prototype.destroy=Vv.prototype.destroy;var Wv=new Map;function dw(){Pv.apply(this,arguments)}oa(dw,Pv);dw.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Nv(c.h,c.g);e=d.store();f=new Ze;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return C(g,Promise.all([d.promise(),f]),0)})};
|
|
1018
|
-
dw.prototype.
|
|
1019
|
+
dw.prototype.Mc=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=ew(a.periods[c],e),b.push(f);return C(h,Qr(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
1019
1020
|
function ew(a,b){fw(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return gw(e,a.startTime,b)})}
|
|
1020
1021
|
function gw(a,b,c){var d=a.initSegmentUri?hw(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1021
1022
|
hw(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}dw.prototype.Hf=function(a){return{data:a.data}};
|
|
1022
1023
|
function hw(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new O(2,9,9004,"Could not parse uri "+a);}
|
|
1023
1024
|
function fw(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
1024
1025
|
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function iw(){Pv.apply(this,arguments)}oa(iw,Pv);
|
|
1025
|
-
iw.prototype.
|
|
1026
|
+
iw.prototype.Mc=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(jw(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,Qr(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1026
1027
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1027
1028
|
function jw(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1028
|
-
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function kw(){Pv.apply(this,arguments)}oa(kw,Pv);r=kw.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Tv(this,a,b)};r.
|
|
1029
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function kw(){Pv.apply(this,arguments)}oa(kw,Pv);r=kw.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Tv(this,a,b)};r.Mc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function lw(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=lw.prototype;
|
|
1029
1030
|
r.init=function(){var a=this,b=new Ze,c=!1,d=new qd(function(){c=!0;b.reject(new O(2,9,9017))});d.U(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new dw(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new iw(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1030
1031
|
new iw(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new kw(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Uv(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new O(2,
|
|
1031
1032
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return C(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return C(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),E(b)}})};
|
|
@@ -1043,13 +1044,13 @@ function tw(a,b){var c=new nw("segment",a.h,a.g,b.dataKey);return new S(b.startT
|
|
|
1043
1044
|
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=ow(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new Vv;ta(m,2);return C(m,e.init(),4);case 4:return C(m,Zv(e,d.Wa(),d.va()),5);case 5:return f=m.h,C(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new pw(d.Wa(),d.va()),l=qw(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),C(m,e.destroy(),7);case 7:ya(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
1044
1045
|
r.update=function(){};
|
|
1045
1046
|
r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new Vv,sa(m,2,3),C(m,e.init(),5);case 5:return C(m,Zv(e,d.Wa(),d.va()),6);case 6:return f=m.h,C(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.B(3);break}return C(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),C(m,e.destroy(),10);case 10:ya(m,0);break;case 2:va(m),m.B(3)}})};
|
|
1046
|
-
r.onInitialVariantChosen=function(){};r.banLocation=function(){};
|
|
1047
|
+
r.onInitialVariantChosen=function(){};r.banLocation=function(){};Ah["application/x-offline-manifest"]=function(){return new vw};function ww(){}function xw(a){var b=ow(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=cf(a)):a=b&&"segment"==b.g?yw(b.key(),b):af(new O(2,1,9004,a));return a}
|
|
1047
1048
|
function yw(a,b){var c=new Vv;return cf(void 0).pa(function(){return c.init()}).pa(function(){return Zv(c,b.Wa(),b.va())}).pa(function(d){return d.getSegments([b.key()])}).pa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}N("shaka.offline.OfflineScheme",ww);ww.plugin=xw;nf("offline",xw);function zw(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,Aw(v.info,q)){v.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Bw(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
|
|
1048
1049
|
function Bw(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new Kg({Tb:b,onError:function(){},Ud:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),sa(f,2),d.configure(a),C(f,Sg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return va(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==
|
|
1049
1050
|
h.g)return sa(h,2),C(h,dh(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);va(h);E(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function Aw(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ub(a.audioCapabilities,b.audioCapabilities,c)&&ub(a.videoCapabilities,b.videoCapabilities,c)};function Cw(a,b,c){var d=b.presentationTimeline.getDuration();b=Dw(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ew(a,b){var c=qw(new pw(a.Wa(),a.va()),b),d=b.appMetadata||{};c=Dw(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
1050
1051
|
function Dw(a){var b=[],c=pe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(ge(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(he(c.value));return b};function Fw(){this.g={}}function Gw(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Hw(a,b){a.g[b.id]=b.bandwidth||2048}function Iw(a,b){a=a.g[b];null==a&&(a=0);return a};function Jw(a){var b=this;if(a&&a.constructor!=W)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Ob()):(this.h=Ql(),this.g=new mf);this.i=[];this.j=[];var c=!a;this.l=new yf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return Fv(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 C(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return C(k,b.g.destroy(),4);
|
|
1051
1052
|
case 4:b.h=null,b.g=null,E(k)}})})}function Kw(){if(rd())a:{var a=t(Wv.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=Jw.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Gl(a,b));return Sl(this.h,a)};r.getConfiguration=function(){var a=Ql();Sl(a,this.h,Ql());return a};r.Ob=function(){return this.g};
|
|
1052
|
-
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Ev(this.g);this.j.push(f);b=Lw(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return c?h.B(2):C(h,Nk(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=
|
|
1053
|
+
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Ev(this.g);this.j.push(f);b=Lw(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return c?h.B(2):C(h,Nk(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=zh(a,c||null);return h.return(g())})},e,f);b=new $e(b,function(){return Fv(f)});b.finally(function(){tb(d.j,f)});return Mw(this,b)};
|
|
1053
1054
|
function Lw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:return Nw(),h=g=null,k=new Vv,n=m=l=null,sa(A,2,3),C(A,d(),5);case 5:return g=A.h,C(A,Ow(a,b,g,e),6);case 6:q=A.h;Pw(a);p=!q.presentationTimeline.R()&&!q.presentationTimeline.Rb();if(!p)throw new O(2,9,9005,b);return C(A,Qw(a,q,function(D){n=n||D},e),7);case 7:h=A.h;Pw(a);if(n)throw n;return C(A,Rw(q,h,e),8);case 8:return C(A,k.init(),9);case 9:return Pw(a),C(A,Xv(k),10);case 10:return l=A.h,Pw(a),u=Sw(h,
|
|
1054
1055
|
q,b,c,e,f),v=u.Ah,x=u.vf,C(A,l.va.addManifests([v]),11);case 11:z=A.h;Pw(a);m=z[0];Pw(a);if(n)throw n;return C(A,Tw(a,x,m,v,f,e,l.va,q,h),12);case 12:return Pw(a),Uw(q,v,h,e),C(A,l.va.updateManifest(m,v),13);case 13:return Pw(a),y=new nw("manifest",l.path.Wa,l.path.va,m),A.return(Ew(y,v));case 3:return wa(A),C(A,k.destroy(),14);case 14:if(!g){A.B(15);break}return C(A,g.stop(),15);case 15:if(!h){A.B(17);break}return C(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=va(A);if(null==m){A.B(19);break}return C(A,
|
|
1055
1056
|
Vw(m),19);case 19:throw n||B;}})}
|
|
@@ -1062,8 +1063,8 @@ function Rw(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B,A,D,F,J,G,H,I,L,M,P,V;r
|
|
|
1062
1063
|
for(v=u.next();!v.done;v=u.next())x=v.value,e.push(ie(x));return C(X,c.offline.trackSelectionCallback(e),3);case 3:z=X.h;y=a.presentationTimeline.getDuration();B=0;A=t(z);for(D=A.next();!D.done;D=A.next())F=D.value,J=F.bandwidth*y/8,B+=J;sa(X,4);return C(X,c.offline.downloadSizeCallback(B),6);case 6:G=X.h;if(!G)throw new O(2,9,9014);ua(X,5);break;case 4:H=va(X);if(H instanceof O)throw H;throw new O(2,9,9015);case 5:I=new Set;L=new Set;M=new Set;P=t(z);for(D=P.next();!D.done;D=P.next())V=D.value,"variant"==
|
|
1063
1064
|
V.type&&I.add(V.id),"text"==V.type&&L.add(V.id),"image"==V.type&&M.add(V.id);a.variants=a.variants.filter(function(ba){return I.has(ba.id)});a.textStreams=a.textStreams.filter(function(ba){return L.has(ba.id)});a.imageStreams=a.imageStreams.filter(function(ba){return M.has(ba.id)});Zw(a);E(X)}})}
|
|
1064
1065
|
function Sw(a,b,c,d,e,f){var g=Cw(c,b,d),h=e.offline.progressCallback;Gv(f,function(p,u){g.size=u;h(g,p)},function(p,u){k&&e.offline.usePersistentLicense&&l==u&&$g(a,"cenc",p)});var k=Ww(b)&&!Xw(b),l=null;k&&(l=$w.get(a.g.keySystem));for(var m=new Fw,n=t(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=t(b.imageStreams);for(q=n.next();!q.done;q=n.next())Hw(m,q.value);q=t(b.variants);for(n=q.next();!n.done;n=q.next())Gw(m,n.value);m=ax(f,m,b,e);f=m.streams;m=m.vf;q=a.g;n=e.offline.usePersistentLicense;
|
|
1065
|
-
q&&n&&(q.initData=[]);return{Ah:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.
|
|
1066
|
-
function Xw(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Uw(a,b,c,d){b.expiration=c.
|
|
1066
|
+
q&&n&&(q.initData=[]);return{Ah:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Qc(),streams:f,sessionIds:n?jh(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},vf:m}}function Ww(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1067
|
+
function Xw(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Uw(a,b,c,d){b.expiration=c.Qc();c=jh(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Ww(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}r.remove=function(a){return bx(this,cx(this,a))};
|
|
1067
1068
|
function cx(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Nw();c=ow(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new Vv;ta(k,2);return C(k,e.init(),4);case 4:return C(k,Zv(e,d.Wa(),d.va()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([dx(a,h,e),ex(f,d,h)]),2);case 2:return wa(k),C(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
1068
1069
|
function fx(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:Gc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Gc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function dx(a,b,c){return K(function(d){return C(d,gx(a.g,a.h.drm,c,b),0)})}
|
|
1069
1070
|
function ex(a,b,c){function d(){}var e=hx(c);Ew(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Oh=function(){return bx(this,ix(this))};
|
|
@@ -1090,179 +1091,179 @@ function Fx(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,x,z,y,B;return K(function(A){sw
|
|
|
1090
1091
|
(D+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(D)}else e=Za(c.contentType);else xd()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=Za(f)):e=Za(c.contentType);if(!e)return A.return(b)}if(d&&(Bd()&&d.spatialRendering?(h=d.contentType+"; spatialRendering=true",g=Za(h)):g=Za(d.contentType),!g))return A.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=sd(k),
|
|
1091
1092
|
!l)||d&&(m=d.contentType,n=sd(m),!n))return A.return(b)}else return A.return(b);if(!a.keySystemConfiguration)return b.supported=!0,A.return(Promise.resolve(b));q=a.keySystemConfiguration;p=[];u=[];q.audio&&(v={robustness:q.audio.robustness||"",contentType:a.audio.contentType},xd()&&a.audio.contentType.includes('codecs="ac-3"')&&(v={robustness:v.robustness,contentType:'audio/mp4; codecs="ec-3"'}),p.push(v));q.video&&(x={robustness:q.video.robustness||"",contentType:a.video.contentType},u.push(x));
|
|
1092
1093
|
z={initDataTypes:[q.initDataType],distinctiveIdentifier:q.distinctiveIdentifier,persistentState:q.persistentState,sessionTypes:q.sessionTypes};p.length&&(z.audioCapabilities=p);u.length&&(z.videoCapabilities=u);y=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;sa(A,3);if(y in Gx){B=Gx[y];A.B(5);break}return C(A,navigator.requestMediaKeySystemAccess(q.keySystem,[z]),6);case 6:B=A.h,Gx[y]=B;case 5:ua(A,4);break;case 3:va(A);case 4:B&&(b.supported=
|
|
1093
|
-
!0,b.keySystemAccess=B);case 2:return A.return(b)}})}nx.MediaCapabilities=Cx;Cx.install=Dx;var Ex=null;Cx.originalMcap=Ex;var Gx={};Cx.memoizedMediaKeySystemAccessRequests_=Gx;ox(Dx,-1);function Hx(){}function Ix(){var a=Id();window.MediaSource&&(
|
|
1094
|
-
function Kx(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function Lx(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function
|
|
1095
|
-
function
|
|
1096
|
-
function
|
|
1097
|
-
function
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
function
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
function
|
|
1094
|
+
!0,b.keySystemAccess=B);case 2:return A.return(b)}})}nx.MediaCapabilities=Cx;Cx.install=Dx;var Ex=null;Cx.originalMcap=Ex;var Gx={};Cx.memoizedMediaKeySystemAccessRequests_=Gx;ox(Dx,-1);function Hx(){}function Ix(){var a=Id();window.MediaSource&&(Bd()?Jx():a?10>=a?window.MediaSource=null:12>=a?(Kx(),Lx()):15>=a&&Kx():ud()?Jx():(zd()||yd()||wd("Tizen 4"))&&Mx());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Nx()}
|
|
1095
|
+
function Kx(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function Lx(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Jx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
|
|
1096
|
+
function Mx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Mc(b)&&a(b)}}
|
|
1097
|
+
function Nx(){var a=MediaSource.isTypeSupported;wd("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}nx.MediaSource=Hx;Hx.install=Ix;ox(Ix);function Ox(){}function Px(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Qx():void 0!=window.orientation&&Rx())}function Qx(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1098
|
+
function Rx(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Sx;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}nx.Orientation=Ox;Ox.install=Px;function Sx(){jf.call(this);this.type="";this.angle=0}oa(Sx,jf);
|
|
1099
|
+
Sx.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
1100
|
+
Sx.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};ox(Px);function Tx(){}var Ux,Vx,Wx,Xx,Yx,Zx;function $x(a,b){try{var c=new ay(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function by(a){var b=this.mediaKeys;b&&b!=a&&cy(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?cy(a,this):Promise.resolve()}
|
|
1101
|
+
function dy(a){a=hb(a.initData);if(nb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Of(a.subarray(4),!0);a=Rf(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=kb(a);this.dispatchEvent(b)}nx.PatchedMediaKeysApple=Tx;
|
|
1102
|
+
Tx.uninstall=function(){Ux&&(Ux=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Vx),HTMLMediaElement.prototype.setMediaKeys=Wx,window.MediaKeys=Xx,window.MediaKeySystemAccess=Yx,navigator.requestMediaKeySystemAccess=Zx,Vx=Zx=Wx=Yx=Xx=null,window.shakaMediaKeysPolyfill=!1)};
|
|
1103
|
+
Tx.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Ux=!0,Vx=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Wx=HTMLMediaElement.prototype.setMediaKeys,Xx=window.MediaKeys,Yx=window.MediaKeySystemAccess,Zx=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=by;window.MediaKeys=ey;window.MediaKeySystemAccess=ay;navigator.requestMediaKeySystemAccess=
|
|
1104
|
+
$x;window.shakaMediaKeysPolyfill=!0}};
|
|
1105
|
+
function ay(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1105
1106
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1106
|
-
|
|
1107
|
-
function
|
|
1108
|
-
r.generateRequest=function(a,b){var c=this;this.h=new Ze;try{var d=this.l.createSession("video/mp4",hb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Pb()?"license-request":"license-renewal").set("message",kb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(
|
|
1109
|
-
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
1110
|
-
r.update=function(a){this.g=new Ze;try{this.i.update(hb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Za()}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
|
|
1111
|
-
function
|
|
1112
|
-
function
|
|
1113
|
-
|
|
1114
|
-
function
|
|
1115
|
-
function
|
|
1116
|
-
function
|
|
1107
|
+
ay.prototype.createMediaKeys=function(){var a=new ey(this.keySystem);return Promise.resolve(a)};ay.prototype.getConfiguration=function(){return this.g};function ey(a){this.h=new WebKitMediaKeys(a);this.g=new Af}ey.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new fy(this.h,a)};ey.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1108
|
+
function cy(a,b){a.g.Za();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",dy);try{return qj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}ey.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function fy(a){jf.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new Af;this.sessionId="";this.expiration=NaN;this.closed=new Ze;this.keyStatuses=new gy}oa(fy,jf);r=fy.prototype;
|
|
1109
|
+
r.generateRequest=function(a,b){var c=this;this.h=new Ze;try{var d=this.l.createSession("video/mp4",hb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Pb()?"license-request":"license-renewal").set("message",kb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(hy(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1110
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:hy(c,"output-not-allowed");break;default:hy(c,"internal-error")}});hy(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1111
|
+
r.update=function(a){this.g=new Ze;try{this.i.update(hb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Za()}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 hy(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
|
|
1112
|
+
function gy(){this.size=0;this.g=void 0}r=gy.prototype;r.Pb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,xh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=xh.value();return this.g&&fb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function iy(){}function jy(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=ky,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ly,window.MediaKeys=my,window.MediaKeySystemAccess=ny,window.shakaMediaKeysPolyfill=!0)}function ky(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1113
|
+
function ly(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}nx.PatchedMediaKeysNop=iy;iy.install=jy;function my(){throw new TypeError("Illegal constructor.");}my.prototype.createSession=function(){};my.prototype.setServerCertificate=function(){};my.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function ny(){this.keySystem="";throw new TypeError("Illegal constructor.");}ny.prototype.getConfiguration=function(){};
|
|
1114
|
+
ny.prototype.createMediaKeys=function(){};ox(jy,-10);function oy(){}
|
|
1115
|
+
function py(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)qy="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=ry;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=sy;window.MediaKeys=ty;window.MediaKeySystemAccess=uy;window.shakaMediaKeysPolyfill=!0}}
|
|
1116
|
+
function vy(a){var b=qy;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function ry(a,b){try{var c=new uy(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function sy(a){var b=this.mediaKeys;b&&b!=a&&wy(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&wy(a,this);return Promise.resolve()}nx.PatchedMediaKeysWebkit=oy;oy.install=py;
|
|
1117
|
+
function uy(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
|
|
1117
1118
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
1118
|
-
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1119
|
-
function
|
|
1120
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=
|
|
1121
|
-
|
|
1122
|
-
function
|
|
1123
|
-
function
|
|
1124
|
-
function
|
|
1125
|
-
function
|
|
1126
|
-
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=
|
|
1127
|
-
r.forEach=function(a){this.g&&a(this.g,xh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=xh.value();return this.g&&fb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var
|
|
1128
|
-
function
|
|
1129
|
-
function
|
|
1130
|
-
function
|
|
1131
|
-
N("shaka.text.LrcTextParser",
|
|
1132
|
-
|
|
1133
|
-
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{Kb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?sg(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new zb;var v=u.getAttribute("xml:id");if(v){p.id=v;var x=null;n&&(x=
|
|
1134
|
-
null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=v&&(p.width=100*p.width/v),null!=x&&(p.height=100*p.height/x)),p.widthUnits=z||null!=v?Sb:0,p.heightUnits=z||null!=x?Sb:0)}if(u=
|
|
1135
|
-
v)),p.viewportAnchorUnits=z||null!=v?Sb:0}else p=null;p&&k.push(p)}if(pg(d,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");n=t(pg(d,"div"));for(q=n.next();!q.done;q=n.next())if(pg(q.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(b=
|
|
1136
|
-
function
|
|
1137
|
-
(h?"default":"preserve"));z=Array.from(p.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var y=t(p.childNodes),B=y.next();!B.done;B=y.next())(B=
|
|
1138
|
-
y.end,q=q.parentNode;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);if(!B&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==p.tagName)return e=new yb(n,y,""),e.lineBreak=!0,e;b="";z&&(b=p.textContent,x&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new yb(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=
|
|
1139
|
-
if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var A=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==A})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&(g=
|
|
1140
|
-
function
|
|
1141
|
-
g))a.backgroundColor=h;if(h=
|
|
1142
|
-
"bold"==h&&(a.fontWeight=700);h=
|
|
1143
|
-
c,f,"textOutline",g))d=d.split(" "),d[0].match(
|
|
1119
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}uy.prototype.createMediaKeys=function(){var a=new ty(this.g);return Promise.resolve(a)};uy.prototype.getConfiguration=function(){return this.h};function ty(a){this.l=a;this.h=null;this.g=new Af;this.i=[];this.j=new Map}
|
|
1120
|
+
function wy(a,b){a.h=b;a.g.Za();var c=qy;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=kb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=xy(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Pb()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=xy(a,d.sessionId))yy(d,"usable"),
|
|
1121
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=xy(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?yy(e,"output-restricted"):1==f?yy(e,"expired"):yy(e,"internal-error"))}}))}
|
|
1122
|
+
ty.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 zy(b,this.l,a);this.i.push(a);return a};ty.prototype.setServerCertificate=function(){return Promise.resolve(!1)};ty.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1123
|
+
function xy(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 zy(a,b,c){jf.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 Ze;this.keyStatuses=new Ay}oa(zy,jf);
|
|
1124
|
+
function By(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=hb(Rf("LOAD_SESSION|"+c));else{var e=Rf("PERSISTENT|");d=lg(e,b)}else d=hb(b)}catch(g){return Promise.reject(g)}a.h=new Ze;var f=vy("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new qd(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
|
|
1125
|
+
function Cy(a,b,c){if(a.g)a.g.then(function(){return Cy(a,b,c)}).catch(function(){return Cy(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Nf(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=ig(e.keys[0].k);e=ig(e.keys[0].kid)}else d=hb(c),e=null;var f=vy("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1126
|
+
function yy(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}r=zy.prototype;r.generateRequest=function(a,b){return By(this,b,null)};r.load=function(a){return"persistent-license"==this.l?By(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Ze;Cy(this,b,a);return b};
|
|
1127
|
+
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=vy("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Ay(){this.size=0;this.g=void 0}r=Ay.prototype;r.Pb=function(){return this.g};
|
|
1128
|
+
r.forEach=function(a){this.g&&a(this.g,xh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=xh.value();return this.g&&fb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var qy="";ox(py);function Dy(){}function Ey(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Fy,Object.defineProperty(a,"disablePictureInPicture",{get:Gy,set:Hy,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Iy,document.addEventListener("webkitpresentationmodechanged",Jy,!0))}}
|
|
1129
|
+
function Jy(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
1130
|
+
function Fy(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Iy(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1131
|
+
function Gy(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Hy(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}nx.PiPWebkit=Dy;Dy.install=Ey;ox(Ey);function Ky(){}function Ly(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=My))}function My(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}nx.RandomUUID=Ky;Ky.install=Ly;ox(Ly);function Ny(){}function Oy(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Py)}function Py(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}nx.StorageEstimate=Ny;Ny.install=Oy;ox(Oy);function Qy(){}function Ry(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Sy})}function Sy(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}nx.Symbol=Qy;Qy.install=Ry;ox(Ry);function Ty(){}function Uy(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}nx.VideoPlayPromise=Ty;Ty.install=Uy;ox(Uy);function Vy(){}function Wy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Ad())&&(a.getVideoPlaybackQuality=Xy)}}function Xy(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}nx.VideoPlaybackQuality=Vy;Vy.install=Wy;ox(Wy);function Yy(){}function Zy(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=$y;else if(6==b)a=az;else{try{var c=!!$y(1,2,"")}catch(d){c=!1}c&&(a=$y)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function $y(a,b,c){return new window.TextTrackCue(a,b,c)}function az(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}nx.VTTCue=Yy;Yy.install=Zy;ox(Zy);function bz(){}bz.prototype.parseInit=function(){};bz.prototype.setSequenceMode=function(){};bz.prototype.setManifestType=function(){};bz.prototype.parseMedia=function(a,b){var c=null,d=[];a=Nf(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=cz.exec(e))){var f=dz.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new yb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1132
|
+
N("shaka.text.LrcTextParser",bz);bz.prototype.parseMedia=bz.prototype.parseMedia;bz.prototype.setManifestType=bz.prototype.setManifestType;bz.prototype.setSequenceMode=bz.prototype.setSequenceMode;bz.prototype.parseInit=bz.prototype.parseInit;var cz=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,dz=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Rc["application/x-subtitle-lrc"]=function(){return new bz};function ez(){}ez.prototype.parseInit=function(){};ez.prototype.setSequenceMode=function(){};ez.prototype.setManifestType=function(){};
|
|
1133
|
+
ez.prototype.parseMedia=function(a,b,c){var d=Nf(a);a=[];if(""==d)return a;var e=Hg(d,"tt");if(!e)throw new O(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=ug(e,fz,"frameRate"),g=ug(e,fz,"subFrameRate"),h=ug(e,fz,"frameRateMultiplier"),k=ug(e,fz,"tickRate"),l=ug(e,fz,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=ug(e,gz,"extent");if("default"!=m&&"preserve"!=m)throw new O(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new hz(f,
|
|
1134
|
+
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{Kb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?sg(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new zb;var v=u.getAttribute("xml:id");if(v){p.id=v;var x=null;n&&(x=iz.exec(n)||jz.exec(n));v=x?Number(x[1]):null;x=x?Number(x[2]):null;var z,y=kz(u,h,"extent");if(y){var B=(z=iz.exec(y))||jz.exec(y);
|
|
1135
|
+
null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=v&&(p.width=100*p.width/v),null!=x&&(p.height=100*p.height/x)),p.widthUnits=z||null!=v?Sb:0,p.heightUnits=z||null!=x?Sb:0)}if(u=kz(u,h,"origin"))if(B=(z=iz.exec(u))||jz.exec(u),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?y||(p.width=100-p.viewportAnchorX,p.widthUnits=Sb,p.height=100-p.viewportAnchorY,p.heightUnits=Sb):(null!=x&&(p.viewportAnchorY=100*p.viewportAnchorY/x),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/
|
|
1136
|
+
v)),p.viewportAnchorUnits=z||null!=v?Sb:0}else p=null;p&&k.push(p)}if(pg(d,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");n=t(pg(d,"div"));for(q=n.next();!q.done;q=n.next())if(pg(q.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(b=lz(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1137
|
+
function lz(a,b,c,d,e,f,g,h,k,l,m,n){var q=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var u=null,v=t(mz),x=v.next();!x.done&&!(u=nz(p,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=null;var z=ug(p,mz,"backgroundImage");n&&z&&!z.startsWith("#")&&(x=new fc(n),z=new fc(z),(x=x.resolve(z).toString())&&(v=x));if("p"==a.nodeName||u||v)m=!0;a=m;x="default"==(p.getAttribute("xml:space")||
|
|
1138
|
+
(h?"default":"preserve"));z=Array.from(p.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var y=t(p.childNodes),B=y.next();!B.done;B=y.next())(B=lz(B.value,b,c,d,e,f,g,x,k,p,m,n))&&h.push(B);d=null!=l;n=/\S/.test(p.textContent);B=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(B||n||"br"==p.tagName||0!=h.length||d&&!x))return null;y=oz(p,c);n=y.start;for(y=y.end;q&&q.nodeType==Node.ELEMENT_NODE&&"tt"!=q.tagName;)y=pz(q,c,n,y),n=y.start,y=
|
|
1139
|
+
y.end,q=q.parentNode;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);if(!B&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==p.tagName)return e=new yb(n,y,""),e.lineBreak=!0,e;b="";z&&(b=p.textContent,x&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new yb(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=nz(p,"region",f,"")[0];
|
|
1140
|
+
if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var A=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==A})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&(g=nz(l,"region",f,"")[0]);qz(b,p,g,u,v,e,a,0==h.length);return b}
|
|
1141
|
+
function qz(a,b,c,d,e,f,g,h){g=g||h;"rtl"==rz(b,c,f,"direction",g)&&(a.direction="rtl");h=rz(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Db);(h=rz(b,c,f,"textAlign",!0))?(a.positionAlign=sz[h],a.lineAlign=tz[h],a.textAlign=Mb[h.toUpperCase()]):a.textAlign=Bb;if(h=rz(b,c,f,"displayAlign",!0))a.displayAlign=Nb[h.toUpperCase()];if(h=rz(b,c,f,"color",g))a.color=h;if(h=rz(b,c,f,"backgroundColor",
|
|
1142
|
+
g))a.backgroundColor=h;if(h=rz(b,c,f,"border",g))a.border=h;if(h=rz(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=rz(b,c,f,"fontWeight",g))&&
|
|
1143
|
+
"bold"==h&&(a.fontWeight=700);h=rz(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=rz(b,c,f,"lineHeight",g))&&h.match(uz)&&(a.lineHeight=h);(h=rz(b,c,f,"fontSize",g))&&(h.match(uz)||h.match(vz))&&(a.fontSize=h);if(h=rz(b,c,f,"fontStyle",g))a.fontStyle=Rb[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=rz(b,
|
|
1144
|
+
c,f,"textOutline",g))d=d.split(" "),d[0].match(uz)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(uz)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=rz(b,c,f,"letterSpacing",g))&&d.match(uz)&&(a.letterSpacing=d);(d=rz(b,c,f,"linePadding",g))&&d.match(uz)&&(a.linePadding=d);if(d=rz(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=kz(c,f,"textDecoration"))&&wz(a,d);(d=xz(b,f,"textDecoration"))&&wz(a,d);if(d=rz(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(rz(b,c,f,
|
|
1144
1145
|
"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
|
|
1145
|
-
function
|
|
1146
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&tb(a.textDecoration,"overline")}}function
|
|
1147
|
-
function
|
|
1148
|
-
function
|
|
1149
|
-
function
|
|
1150
|
-
function
|
|
1151
|
-
function
|
|
1152
|
-
function
|
|
1153
|
-
var
|
|
1154
|
-
end:"end"},
|
|
1155
|
-
|
|
1156
|
-
Rc['application/mp4; codecs="stpp.ttml"']=function(){return new
|
|
1157
|
-
|
|
1146
|
+
function wz(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&tb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&tb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1147
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&tb(a.textDecoration,"overline")}}function rz(a,b,c,d,e){e=void 0===e?!0:e;return(a=xz(a,c,d))?a:e?kz(b,c,d):null}function kz(a,b,c){if(!a)return null;var d=ug(a,gz,c);return d?d:yz(a,b,c)}function xz(a,b,c){var d=ug(a,gz,c);return d?d:yz(a,b,c)}
|
|
1148
|
+
function yz(a,b,c){a=nz(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=tg(a[e],"urn:ebu:tt:style",c);f||(f=ug(a[e],gz,c));f||(f=xz(a[e],b,c));f&&(d=f)}return d}
|
|
1149
|
+
function nz(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?tg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function pz(a,b,c,d){a=oz(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
|
|
1150
|
+
function oz(a,b){var c=zz(a.getAttribute("begin"),b),d=zz(a.getAttribute("end"),b);a=zz(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1151
|
+
function zz(a,b){var c=null;if(Az.test(a)){a=Az.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(Bz.test(a))c=Cz(Bz,a);else if(Dz.test(a))c=Cz(Dz,a);else if(Ez.test(a))a=Ez.exec(a),c=Number(a[1])/b.frameRate;else if(Fz.test(a))a=Fz.exec(a),c=Number(a[1])/b.g;else if(Gz.test(a))c=Cz(Gz,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1152
|
+
function Cz(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}N("shaka.text.TtmlTextParser",ez);ez.prototype.parseMedia=ez.prototype.parseMedia;ez.prototype.setManifestType=ez.prototype.setManifestType;ez.prototype.setSequenceMode=ez.prototype.setSequenceMode;ez.prototype.parseInit=ez.prototype.parseInit;
|
|
1153
|
+
function hz(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
1154
|
+
var iz=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,vz=/^(\d{1,2}(?:\.\d+)?|100)%$/,uz=/^(\d+px|\d+em|\d*\.?\d+c)$/,jz=/^(\d+)px (\d+)px$/,Az=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Bz=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Dz=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Ez=/^(\d*(?:\.\d*)?)f$/,Fz=/^(\d*(?:\.\d*)?)t$/,Gz=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),tz={left:Gb,center:"center",right:"end",start:Gb,
|
|
1155
|
+
end:"end"},sz={left:"line-left",center:"center",right:"line-right"},fz=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],gz=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],mz=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Rc["application/ttml+xml"]=function(){return new ez};function Hz(){this.g=new ez}Hz.prototype.parseInit=function(a){var b=!1;(new Wf).box("moov",ag).box("trak",ag).box("mdia",ag).box("minf",ag).box("stbl",ag).O("stsd",cg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};Hz.prototype.setSequenceMode=function(){};Hz.prototype.setManifestType=function(){};
|
|
1156
|
+
Hz.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Wf).box("mdat",eg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new O(2,2,2007);return f};N("shaka.text.Mp4TtmlParser",Hz);Hz.prototype.parseMedia=Hz.prototype.parseMedia;Hz.prototype.setManifestType=Hz.prototype.setManifestType;Hz.prototype.setSequenceMode=Hz.prototype.setSequenceMode;Hz.prototype.parseInit=Hz.prototype.parseInit;Rc['application/mp4; codecs="stpp"']=function(){return new Hz};
|
|
1157
|
+
Rc['application/mp4; codecs="stpp.ttml"']=function(){return new Hz};Rc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Hz};Rc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Hz};function Iz(){this.h=!1;this.g="UNKNOWN"}Iz.prototype.parseInit=function(){};Iz.prototype.setSequenceMode=function(a){this.h=a};Iz.prototype.setManifestType=function(a){this.g=a};
|
|
1158
|
+
Iz.prototype.parseMedia=function(a,b){a=Nf(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new O(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.h){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Jz(new $s(d[1]));if(null==a)throw new O(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
|
|
1158
1159
|
e/9E4-a}}else c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g&&(a=b.segmentStart);b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new $s(d);var f=new zb;ct(d);at(d);for(var g=ct(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=
|
|
1159
|
-
Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");at(d);g=ct(d)}b.push(f)}e=new Map;
|
|
1160
|
+
Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");at(d);g=ct(d)}b.push(f)}e=new Map;Kz(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=
|
|
1160
1161
|
t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new yb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var p=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=p;break;case "color":m=!0;l.color=p;break;case "font-family":m=!0;l.fontFamily=p;break;
|
|
1161
1162
|
case "font-size":m=!0;l.fontSize=p;break;case "font-weight":if(700<=parseInt(p,10)||"bold"==p)m=!0,l.fontWeight=700;break;case "font-style":switch(p){case "normal":m=!0;l.fontStyle=Jb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(p);break;case "text-combine-upright":m=!0;l.textCombineUpright=p;break;case "text-shadow":m=!0;l.textShadow=p;break;case "white-space":m=!0,l.wrapLine="noWrap"!=p}}}m&&e.set(g,
|
|
1162
|
-
l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new $s(f[0]),k=
|
|
1163
|
-
m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function
|
|
1164
|
-
function
|
|
1165
|
-
0<f&&(f=d.substr(f,e-f),f.match(
|
|
1166
|
-
e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=Hg("<span>"+a+"</span>","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=
|
|
1167
|
-
function
|
|
1168
|
-
function
|
|
1169
|
-
d.fontFamily),d.fontSize=
|
|
1170
|
-
if(!f)break;if(f=
|
|
1171
|
-
function
|
|
1172
|
-
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Ab);else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
1173
|
-
function
|
|
1174
|
-
function
|
|
1175
|
-
var
|
|
1176
|
-
|
|
1177
|
-
q.value;var p=q.hf||l,u=q.Wd?c+q.Wd:a;a=u+(p||0);var v=0;do{var x=m.L();v+=x;var z=m.L(),y=null;"vttc"==$f(z)?8<x&&(y=m.ub(x-8)):m.skip(x-8);p&&y&&(x=
|
|
1178
|
-
function
|
|
1179
|
-
function
|
|
1180
|
-
function
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={ee:e.ee},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=
|
|
1184
|
-
function
|
|
1163
|
+
l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new $s(f[0]),k=Jz(g),n=bt(g,/[ \t]+--\x3e[ \t]+/g),l=Jz(g),null==k||null==n||null==l)Sa("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new yb(k,l,"");at(g);for(k=ct(g);k;)Lz(m,k,b),at(g),k=ct(g);Mz(f,
|
|
1164
|
+
m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function Kz(a){for(var b=t(Object.entries(Pb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new yb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Qb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new yb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1165
|
+
function Mz(a,b,c){if(a.includes("<")){0===c.size&&Kz(c);a:{for(var d=[],e=-1,f="",g=0;g<a.length;g++)if("/"===a[g]&&0<g&&"<"===a[g-1]){var h=a.indexOf(">",g);if(h<=g)break a;if((h=a.substring(g+1,h))&&"c"===h){var k=d.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=a[g]:f+=a[g]}else f+=a[g]}else"<"===a[g]?(e=g+1,"c"!=a[e]&&(e=-1)):">"===a[g]&&0<e&&(d.push(a.substr(e,g-e)),e=-1),f+=a[g];a=f}d=a;a=[];f=-1;for(e=0;e<d.length;e++)"<"===d[e]?f=e+1:">"===d[e]&&
|
|
1166
|
+
0<f&&(f=d.substr(f,e-f),f.match(Nz)&&a.push(f),f=-1);a=t(a);for(e=a.next();!e.done;e=a.next())e=e.value,d=d.replace("<"+e+">",'<div time="'+e+'">'),d+="</div>";a=d;a:{e=a;f=[];g=-1;a="";d=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){d=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=e[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=e[h]}else a+=e[h]}else"<"===e[h]?(g=h+1,"v"!=
|
|
1167
|
+
e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=Hg("<span>"+a+"</span>","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=Oz(a);return}a=t(d);for(d=a.next();!d.done;d=a.next())Pz(d.value,b,c)}else b.payload=Oz(a)}else b.payload=Oz(a)}
|
|
1168
|
+
function Qz(a,b){return a&&0<a.length?a:b}
|
|
1169
|
+
function Pz(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new zb;d.position=null;d.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var e=t(a.nodeName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=Qz(g.backgroundColor,d.backgroundColor),d.color=Qz(g.color,d.color),d.fontFamily=Qz(g.fontFamily,
|
|
1170
|
+
d.fontFamily),d.fontSize=Qz(g.fontSize,d.fontSize),d.textShadow=Qz(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=Kb(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.getAttribute("color"))d.color=f;break;case "div":f=
|
|
1171
|
+
a.getAttribute("time");if(!f)break;if(f=Jz(new $s(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.childNodes;if(wg(a)||1==e.length&&wg(e[0]))for(e=!0,c=t(a.textContent.split("\n")),a=c.next();!a.done;a=c.next())a=a.value,e||(e=Kb(d.startTime,d.endTime),b.nestedCues.push(e)),0<a.length&&(e=d.clone(),e.payload=Oz(a),b.nestedCues.push(e)),e=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())Pz(a.value,d,c)}
|
|
1172
|
+
function Lz(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Bb:a.textAlign=Mb[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
1173
|
+
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Ab);else if(d=/^region:(.*)$/.exec(b)){if(b=Rz(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=Ob[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Fb,a.line=Number(c[1]),c[2]&&(a.lineAlign=Ob[c[2].toUpperCase()])}
|
|
1174
|
+
function Rz(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function Jz(a){a=bt(a,Nz);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}
|
|
1175
|
+
function Oz(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}N("shaka.text.VttTextParser",Iz);Iz.prototype.parseMedia=Iz.prototype.parseMedia;Iz.prototype.setManifestType=Iz.prototype.setManifestType;Iz.prototype.setSequenceMode=Iz.prototype.setSequenceMode;Iz.prototype.parseInit=Iz.prototype.parseInit;
|
|
1176
|
+
var Nz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Rc["text/vtt"]=function(){return new Iz};Rc['text/vtt; codecs="vtt"']=function(){return new Iz};Rc['text/vtt; codecs="wvtt"']=function(){return new Iz};function Sz(){this.g=null}Sz.prototype.parseInit=function(a){var b=this,c=!1;(new Wf).box("moov",ag).box("trak",ag).box("mdia",ag).O("mdhd",function(d){d=Yh(d.reader,d.version);b.g=d.timescale}).box("minf",ag).box("stbl",ag).O("stsd",cg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};Sz.prototype.setSequenceMode=function(){};Sz.prototype.setManifestType=function(){};
|
|
1177
|
+
Sz.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Wf).box("moof",ag).box("traf",ag).O("tfdt",function(B){g=!0;c=Xh(B.reader,B.version).baseMediaDecodeTime}).O("tfhd",function(B){l=Wh(B.reader,B.flags).Kf}).O("trun",function(B){h=!0;d=Zh(B.reader,B.version,B.flags).ig}).box("mdat",eg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);a=c;for(var m=new Tf(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=
|
|
1178
|
+
q.value;var p=q.hf||l,u=q.Wd?c+q.Wd:a;a=u+(p||0);var v=0;do{var x=m.L();v+=x;var z=m.L(),y=null;"vttc"==$f(z)?8<x&&(y=m.ub(x-8)):m.skip(x-8);p&&y&&(x=Tz(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(x))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(ad)};function Tz(a,b,c){var d,e,f;(new Wf).box("payl",eg(function(g){d=Nf(g)})).box("iden",eg(function(g){e=Nf(g)})).box("sttg",eg(function(g){f=Nf(g)})).parse(a);return d?Uz(d,e,f,b,c):null}
|
|
1179
|
+
function Uz(a,b,c,d,e){d=new yb(d,e,"");Mz(a,d,new Map);b&&(d.id=b);if(c)for(a=new $s(c),b=ct(a);b;)Lz(d,b,[]),at(a),b=ct(a);return d}N("shaka.text.Mp4VttParser",Sz);Sz.prototype.parseMedia=Sz.prototype.parseMedia;Sz.prototype.setManifestType=Sz.prototype.setManifestType;Sz.prototype.setSequenceMode=Sz.prototype.setSequenceMode;Sz.prototype.parseInit=Sz.prototype.parseInit;Rc['application/mp4; codecs="wvtt"']=function(){return new Sz};function Vz(){}Vz.prototype.parseInit=function(){};Vz.prototype.setSequenceMode=function(){};Vz.prototype.setManifestType=function(){};Vz.prototype.parseMedia=function(a){var b=Nf(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new $s(c[0]),e=Wz(d),f=bt(d,/,/g);d=Wz(d);if(null==e||null==f||null==d)throw new O(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new yb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1180
|
+
function Wz(a){a=bt(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}N("shaka.text.SbvTextParser",Vz);Vz.prototype.parseMedia=Vz.prototype.parseMedia;Vz.prototype.setManifestType=Vz.prototype.setManifestType;Vz.prototype.setSequenceMode=Vz.prototype.setSequenceMode;Vz.prototype.parseInit=Vz.prototype.parseInit;Rc["text/x-subviewer"]=function(){return new Vz};function Xz(){this.g=new Iz}Xz.prototype.parseInit=function(){};Xz.prototype.setSequenceMode=function(){};Xz.prototype.setManifestType=function(){};Xz.prototype.parseMedia=function(a,b,c){a=Nf(a);a=Yz(a);a=hb(Rf(a));return this.g.parseMedia(a,b,c)};
|
|
1181
|
+
function Yz(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}N("shaka.text.SrtTextParser",Xz);Xz.srt2webvtt=Yz;Xz.prototype.parseMedia=Xz.prototype.parseMedia;
|
|
1182
|
+
Xz.prototype.setManifestType=Xz.prototype.setManifestType;Xz.prototype.setSequenceMode=Xz.prototype.setSequenceMode;Xz.prototype.parseInit=Xz.prototype.parseInit;Rc["text/srt"]=function(){return new Xz};function Zz(){}Zz.prototype.parseInit=function(){};Zz.prototype.setSequenceMode=function(){};Zz.prototype.setManifestType=function(){};
|
|
1183
|
+
Zz.prototype.parseMedia=function(a){var b="",c="";a=Nf(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=$z.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=aA.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(bA);else if("Style"==e){e=f.split(bA);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
1184
|
+
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={ee:e.ee},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=aA.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(bA);else if("Dialogue"==f){g=g.split(bA);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=cA(f.Start);var k=cA(f.End);g=new yb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.ee=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.ee}}(e)))&&dA(g,f);d.push(g)}return d};
|
|
1185
|
+
function dA(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=eA(c))a.color=c;if(c=b.BackColour)if(c=eA(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Hb;a.textAlign="start";break;case 2:a.displayAlign=Hb;a.textAlign=Bb;break;case 3:a.displayAlign=Hb;a.textAlign="end";
|
|
1185
1186
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Bb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Bb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1186
|
-
function
|
|
1187
|
-
var
|
|
1188
|
-
function
|
|
1189
|
-
function
|
|
1190
|
-
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function
|
|
1191
|
-
r.transmux=function(a,b,c,d){for(var e=hb(a),f=Vh(e),g=f.length;g<e.length&&!
|
|
1192
|
-
duration:1024,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.ha,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:a,Oa:f},stream:b};a=new Cu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Iu(a),this.g.set(b.id,d));b=Zu(a);this.h++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.AacTransmuxer",
|
|
1193
|
-
|
|
1187
|
+
function eA(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function cA(a){a=fA.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",Zz);Zz.prototype.parseMedia=Zz.prototype.parseMedia;Zz.prototype.setManifestType=Zz.prototype.setManifestType;Zz.prototype.setSequenceMode=Zz.prototype.setSequenceMode;Zz.prototype.parseInit=Zz.prototype.parseInit;
|
|
1188
|
+
var $z=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,aA=/^\s*([^:]+):\s*(.*)/,bA=/\s*,\s*/,fA=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Rc["text/x-ssa"]=function(){return new Zz};function gA(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Hd:c,S:a}:null}function hA(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,ha:"mp4a.40."+e}}
|
|
1189
|
+
function iA(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
1190
|
+
function jA(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
1191
|
+
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function kA(a){this.i=a;this.h=0;this.g=new Map}r=kA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?Za(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Oc(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1192
|
+
r.transmux=function(a,b,c,d){for(var e=hb(a),f=Vh(e),g=f.length;g<e.length&&!iA(e,g);g++);a=1E3*c.endTime;f=Uh(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=hA(e,g);if(!c)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=gA(e,g);if(!h)return Promise.reject(new O(2,3,3018));var k=h.Hd+h.S;g+k<=e.length&&f.push({data:e.subarray(g+h.Hd,g+k),size:h.S,
|
|
1193
|
+
duration:1024,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.ha,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:a,Oa:f},stream:b};a=new Cu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Iu(a),this.g.set(b.id,d));b=Zu(a);this.h++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.AacTransmuxer",kA);
|
|
1194
|
+
kA.prototype.transmux=kA.prototype.transmux;kA.prototype.getOriginalMimeType=kA.prototype.getOriginalMimeType;kA.prototype.convertCodecs=kA.prototype.convertCodecs;kA.prototype.isSupported=kA.prototype.isSupported;kA.prototype.destroy=kA.prototype.destroy;Yb("audio/aac",function(){return new kA("audio/aac")},dc);function lA(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1194
1195
|
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,fa:a,S:e}}
|
|
1195
|
-
function
|
|
1196
|
-
r.transmux=function(a,b,c,d){a=hb(a);for(var e=Vh(a),f=e.length;f<a.length&&!
|
|
1197
|
-
La:0,Ja:0,Ha:0,Ia:2,Va:0}});f+=k.S}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ra:[],fa:e,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new Cu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Iu(a),this.g.set(b.id,d));b=Zu(a);this.h++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ac3Transmuxer",
|
|
1198
|
-
|
|
1199
|
-
r.transmux=function(a,b,c,d){a=hb(a);for(var e=Vh(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Uh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=
|
|
1200
|
-
Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}});f+=k.S}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ra:[],fa:e,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new Cu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Iu(a),this.g.set(b.id,d));b=Zu(a);this.h++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ec3Transmuxer",
|
|
1201
|
-
|
|
1196
|
+
function mA(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function nA(a){this.i=a;this.h=0;this.g=new Map}r=nA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?Za(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1197
|
+
r.transmux=function(a,b,c,d){a=hb(a);for(var e=Vh(a),f=e.length;f<a.length&&!mA(a,f);f++);var g=1E3*c.endTime;e=Uh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=lA(a,f);if(!k)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.fa;h.push({data:a.subarray(f,f+k.S),size:k.S,duration:1536,Ta:0,flags:{Ua:0,
|
|
1198
|
+
La:0,Ja:0,Ha:0,Ia:2,Va:0}});f+=k.S}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ra:[],fa:e,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new Cu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Iu(a),this.g.set(b.id,d));b=Zu(a);this.h++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ac3Transmuxer",nA);nA.prototype.transmux=nA.prototype.transmux;
|
|
1199
|
+
nA.prototype.getOriginalMimeType=nA.prototype.getOriginalMimeType;nA.prototype.convertCodecs=nA.prototype.convertCodecs;nA.prototype.isSupported=nA.prototype.isSupported;nA.prototype.destroy=nA.prototype.destroy;Yb("audio/ac3",function(){return new nA("audio/ac3")},dc);function oA(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new di(a.subarray(b+2));fi(c,2);fi(c,3);var d=gi(c,11)+1<<1,e=gi(c,2);if(3==e){e=gi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=gi(c,2);var g=gi(c,3),h=gi(c,1);c=gi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,fa:a,S:d}};function pA(a){this.i=a;this.h=0;this.g=new Map}r=pA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?Za(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1200
|
+
r.transmux=function(a,b,c,d){a=hb(a);for(var e=Vh(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Uh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=oA(a,f);if(!k)return Promise.reject(new O(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.fa;h.push({data:a.subarray(f,f+k.S),size:k.S,duration:1536,
|
|
1201
|
+
Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}});f+=k.S}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ra:[],fa:e,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new Cu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Iu(a),this.g.set(b.id,d));b=Zu(a);this.h++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ec3Transmuxer",pA);pA.prototype.transmux=pA.prototype.transmux;
|
|
1202
|
+
pA.prototype.getOriginalMimeType=pA.prototype.getOriginalMimeType;pA.prototype.convertCodecs=pA.prototype.convertCodecs;pA.prototype.isSupported=pA.prototype.isSupported;pA.prototype.destroy=pA.prototype.destroy;Yb("audio/ec3",function(){return new pA("audio/ec3")},dc);function qA(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new di(b.data),d=ki(c);ki(c);ki(c);ii(c);if(rA.includes(d)&&(d=T(c),3===d&&fi(c,1),ii(c),ii(c),fi(c,1),U(c))){d=3!==d?8:12;for(var e=0;e<d;e++)U(c)&&(6>e?li(c,16):li(c,64))}ii(c);d=T(c);if(0===d)T(c);else if(1===d)for(fi(c,1),ii(c),ii(c),d=T(c),e=0;e<d;e++)ii(c);ii(c);fi(c,1);var f=T(c),g=T(c),h=gi(c,1);0===h&&fi(c,1);fi(c,1);var k=0,l=0,m=0,n=0;U(c)&&
|
|
1202
1203
|
(k=T(c),l=T(c),m=T(c),n=T(c));e=d=1;if(U(c)&&U(c)){var q=ki(c),p=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<q&&16>q?(d=p[q-1],e=u[q-1]):255===q&&(d=gi(c,16),e=gi(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,w(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,w(a));a=new Uint8Array([1,k[3],k[4],k[5],255,225].concat(k,
|
|
1203
1204
|
[1],b));return{height:c,width:f,la:a,sa:d,ua:e}}
|
|
1204
|
-
function
|
|
1205
|
-
f.fullData)))}return c.length?{data:lg.apply(fg,w(c)),Vc:b}:null}var
|
|
1206
|
-
la:b,sa:a.Uh,ua:a.Th}}function
|
|
1207
|
-
function
|
|
1205
|
+
function sA(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=mi(new di(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(lg(h,
|
|
1206
|
+
f.fullData)))}return c.length?{data:lg.apply(fg,w(c)),Vc:b}:null}var rA=[100,110,122,244,44,83,86,118,128,138,139,134];function tA(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=uA(b.fullData);a=vA(c.fullData);var f=wA(d.fullData);b=xA(b.fullData,c.fullData,d.fullData,{Ze:e.Ze,uf:e.uf,De:a.De,Ee:a.Ee,xe:a.xe,Ce:a.Ce,ye:a.ye,ze:a.ze,Ae:a.Ae,Be:a.Be,re:a.re,se:a.se,te:a.te,ue:a.ue,ve:a.ve,we:a.we,oe:a.oe,Rd:a.Rd,ne:a.ne,me:a.me,le:a.le,bf:f.bf});return{height:a.height,width:a.width,
|
|
1207
|
+
la:b,sa:a.Uh,ua:a.Th}}function uA(a){var b=new di(a,!0);ki(b);ki(b);gi(b,4);gi(b,2);gi(b,6);a=gi(b,3);b=U(b);return{Ze:a+1,uf:b}}
|
|
1208
|
+
function vA(a){a=new di(a,!0);ki(a);ki(a);var b=0,c=0,d=0,e=0;gi(a,4);var f=gi(a,3);U(a);for(var g=gi(a,2),h=gi(a,1),k=gi(a,5),l=ki(a),m=ki(a),n=ki(a),q=ki(a),p=ki(a),u=ki(a),v=ki(a),x=ki(a),z=ki(a),y=ki(a),B=ki(a),A=[],D=[],F=0;F<f;F++)A.push(U(a)),D.push(U(a));if(0<f)for(F=f;8>F;F++)gi(a,2);for(F=0;F<f;F++)A[F]&&gi(a,88),D[F]&&ki(a);T(a);A=T(a);3==A&&gi(a,1);D=T(a);F=T(a);U(a)&&(b+=T(a),c+=T(a),d+=T(a),e+=T(a));var J=T(a),G=T(a),H=T(a);if(U(a))for(var I=0;I<=f;I++)T(a),T(a),T(a);else T(a),T(a),
|
|
1208
1209
|
T(a);T(a);T(a);T(a);T(a);T(a);T(a);if(U(a)&&U(a))for(I=0;4>I;I++)for(var L=0;L<(3===I?2:6);L++)if(U(a)){var M=Math.min(64,1<<4+(I<<1));1<I&&ji(a);for(var P=0;P<M;P++)ji(a)}else T(a);U(a);U(a);U(a)&&(ki(a),T(a),T(a),U(a));I=T(a);for(M=L=0;M<I;M++)if(P=!1,0!==M&&(P=U(a)),P){M===I&&T(a);U(a);T(a);for(var V=P=0;V<=L;V++){var X=U(a),ba=!1;X||(ba=U(a));(X||ba)&&P++}L=P}else{V=T(a);P=T(a);L=V+P;for(X=0;X<V;X++)T(a),U(a);for(V=0;V<P;V++)T(a),U(a)}if(U(a))for(I=T(a),L=0;L<I;L++){for(M=0;M<H+4;M++)gi(a,1);
|
|
1209
1210
|
gi(a,1)}I=H=1;L=0;U(a);U(a);if(U(a)){U(a)&&(M=ki(a),P=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],V=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>M?(H=P[M-1],I=V[M-1]):255===M&&(H=gi(a,16),I=gi(a,16)));U(a)&&U(a);U(a)&&(gi(a,3),U(a),U(a)&&(ki(a),ki(a),ki(a)));U(a)&&(T(a),T(a));U(a);U(a);U(a);if(M=U(a))T(a),T(a),T(a),T(a);if(U(a)&&(gi(a,32),gi(a,32),U(a)&&T(a),U(a))){V=!1;M=U(a);P=U(a);if(M||P){if(V=U(a))ki(a),gi(a,5),U(a),gi(a,5);gi(a,4);gi(a,4);V&&gi(a,4);gi(a,5);gi(a,5);gi(a,5)}for(X=
|
|
1210
1211
|
0;X<=f;X++){var R=!0;ba=1;U(a)||(R=U(a));var Oa=!1;R?T(a):Oa=U(a);Oa||(ba=T(a)+1);if(M){for(R=0;R<ba;R++)T(a),T(a),V&&(T(a),T(a));U(a)}if(P){for(R=0;R<ba;R++)T(a),T(a),V&&(T(a),T(a));U(a)}}}U(a)&&(U(a),U(a),U(a),L=T(a),T(a),T(a),T(a),T(a))}return{xe:B,De:g,Ee:h,Ce:k,ye:l,ze:m,Ae:n,Be:q,re:p,se:u,te:v,ue:x,ve:z,we:y,Rd:L,oe:0,ne:A,me:J,le:G,width:D-(b+c)*(1===A||2===A?2:1),height:F-(d+e)*(1===A?2:1),Uh:H,Th:I}}
|
|
1211
|
-
function
|
|
1212
|
-
function
|
|
1213
|
-
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function
|
|
1214
|
-
function
|
|
1215
|
-
r.transmux=function(a,b,c,d){a=hb(a);for(c=Vh(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&
|
|
1216
|
-
type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:a,Oa:e},stream:b};h=new Cu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Iu(h),this.g.set(b.id,d));b=Zu(h);this.h++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Mp3Transmuxer",
|
|
1217
|
-
|
|
1218
|
-
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new ni;a=hb(a);a=this.g.parse(a);if("mp3"!=a.
|
|
1219
|
-
|
|
1212
|
+
function wA(a){var b=new di(a,!0);ki(b);ki(b);T(b);T(b);U(b);U(b);gi(b,3);U(b);U(b);T(b);T(b);ji(b);U(b);U(b);U(b)&&T(b);ji(b);ji(b);U(b);U(b);U(b);U(b);a=U(b);b=U(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{bf:c}}
|
|
1213
|
+
function xA(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.De&3)<<6|(d.Ee?1:0)<<5|d.Ce&31;e[2]=d.ye;e[3]=d.ze;e[4]=d.Ae;e[5]=d.Be;e[6]=d.re;e[7]=d.se;e[8]=d.te;e[9]=d.ue;e[10]=d.ve;e[11]=d.we;e[12]=d.xe;e[13]=240|(d.Rd&3840)>>8;e[14]=d.Rd&255;e[15]=252|d.bf&3;e[16]=252|d.ne&3;e[17]=248|d.me&7;e[18]=248|d.le&7;e[19]=0;e[20]=0;e[21]=(d.oe&3)<<6|(d.Ze&7)<<3|(d.uf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1214
|
+
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function yA(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*zA[14*(3===c?3-d:3===d?3:4)+e-1];f=AA[3*(3===c?0:2===c?1:2)+f];c=BA[c][d];var h=CA[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,S:k,Sh:8*c*h}}return null}
|
|
1215
|
+
function DA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var zA=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],AA=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],BA=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],CA=[0,1,1,4];function EA(a){this.i=a;this.h=0;this.g=new Map}r=EA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?Za(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1216
|
+
r.transmux=function(a,b,c,d){a=hb(a);for(c=Vh(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&DA(a,e)){var f=yA(a,e),g=4;f&&f.S&&(g=f.S);e+=g;e=e===a.length||e+1<a.length&&DA(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=yA(a,c);if(!f)return Promise.reject(new O(2,3,3018));h||(h=f);c+f.S<=a.length&&e.push({data:a.subarray(c,c+f.S),size:f.S,duration:1152,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}});c+=f.S}if(!h)return Promise.reject(new O(2,3,3018));a=9E4*h.Sh/h.sampleRate*this.h;d={id:b.id,
|
|
1217
|
+
type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.h,baseMediaDecodeTime:a,Oa:e},stream:b};h=new Cu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Iu(h),this.g.set(b.id,d));b=Zu(h);this.h++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Mp3Transmuxer",EA);EA.prototype.transmux=EA.prototype.transmux;EA.prototype.getOriginalMimeType=EA.prototype.getOriginalMimeType;
|
|
1218
|
+
EA.prototype.convertCodecs=EA.prototype.convertCodecs;EA.prototype.isSupported=EA.prototype.isSupported;EA.prototype.destroy=EA.prototype.destroy;Yb("audio/mpeg",function(){return new EA("audio/mpeg")},dc);function FA(a){this.h=a;this.g=null}r=FA.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Oc(a).split(","),c=Bc("audio",b);b=Bc("video",b);return!c||b||"mp3"!=Kc(c)?!1:Za(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
|
|
1219
|
+
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new ni;a=hb(a);a=this.g.parse(a);if("mp3"!=a.Pc().audio||"audio"!=e)return Promise.reject(new O(2,3,3018));e=new Uint8Array([]);a=t(a.Mb());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=yA(b,c))?(c+d.S<=b.length&&(e=lg(e,b.subarray(c,c+d.S))),c+=d.S):c++;return Promise.resolve(e)};N("shaka.transmuxer.MpegTsTransmuxer",FA);FA.prototype.transmux=FA.prototype.transmux;FA.prototype.getOriginalMimeType=FA.prototype.getOriginalMimeType;
|
|
1220
|
+
FA.prototype.convertCodecs=FA.prototype.convertCodecs;FA.prototype.isSupported=FA.prototype.isSupported;FA.prototype.destroy=FA.prototype.destroy;Yb("video/mp2t",function(){return new FA("video/mp2t")},cc);/*
|
|
1220
1221
|
@license
|
|
1221
1222
|
MSS Transmuxer
|
|
1222
1223
|
Copyright 2015 Dash Industry Forum
|
|
1223
1224
|
SPDX-License-Identifier: BSD-3-Clause
|
|
1224
1225
|
*/
|
|
1225
|
-
function
|
|
1226
|
-
function
|
|
1226
|
+
function GA(a){this.h=a;(this.g=Ls.get("ISOBoxer")())&&HA(this)}
|
|
1227
|
+
function HA(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
|
|
1227
1228
|
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1228
|
-
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==
|
|
1229
|
+
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==IA[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=GA.prototype;r.destroy=function(){};
|
|
1229
1230
|
r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return Za(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Za(b)||Za(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
|
|
1230
1231
|
r.transmux=function(a,b,c){if(!c)return Promise.resolve(hb(a));if(!b.mssPrivateData)return Promise.reject(new O(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),
|
|
1231
1232
|
1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var p=this.g.createFullBox("saiz",h);p.version=0;p.flags=0;p.sample_count=n.sample_count;p.default_sample_info_size=0;p.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)p.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else p.default_sample_info_size=8}}f.flags&=16777214;f.flags|=131072;k.flags|=
|
|
1232
|
-
1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=
|
|
1233
|
-
|
|
1233
|
+
1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=JA(u,"traf")+JA(h,"senc")+16);var x=hb(e.write());return Promise.resolve(x)}catch(z){return z instanceof O?Promise.reject(z):Promise.reject(new O(2,3,3022))}};function JA(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}N("shaka.transmuxer.MssTransmuxer",GA);GA.prototype.transmux=GA.prototype.transmux;GA.prototype.getOriginalMimeType=GA.prototype.getOriginalMimeType;
|
|
1234
|
+
GA.prototype.convertCodecs=GA.prototype.convertCodecs;GA.prototype.isSupported=GA.prototype.isSupported;GA.prototype.destroy=GA.prototype.destroy;var IA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Yb("mss/audio/mp4",function(){return new GA("mss/audio/mp4")},dc);Yb("mss/video/mp4",function(){return new GA("mss/video/mp4")},dc);function KA(a){this.j=a;this.g=0;this.h=new Map;this.i=null}r=KA.prototype;r.destroy=function(){this.h.clear()};r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Oc(c).split(",");c=Bc("audio",d);d=Bc("video",d);if(c&&(c=Kc(c),!LA.includes(c))||d&&(c=Kc(d),!MA.includes(c)))return!1;if(b)return Za(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Za(b)||Za(a)};
|
|
1234
1235
|
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Oc(b).replace("mp4a.40.34","mp3").split(",").map(this.Sg).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.Sg=function(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}return a};r.getOriginalMimeType=function(){return this.j};
|
|
1235
|
-
r.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new ni;a=hb(a);var f=this.i.parse(a);a=[];var g=f.
|
|
1236
|
-
duration:x,Ta:Math.round((p.pts||0)-(p.dts||0)),flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:v.Vc?2:1,Va:v.Vc?0:1}})}}var z=
|
|
1236
|
+
r.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new ni;a=hb(a);var f=this.i.parse(a);a=[];var g=f.Pc();try{var h=null;if("video"==e){switch(g.video){case "avc":var k=[],l=null,m=[],n=f.kc();if(!n.length)throw new O(2,3,3023);for(var q=0;q<n.length;q++){var p=n[q],u=p.nalus;m.push.apply(m,w(u));var v=sA(u);if(v){null==l&&(l=p.dts);var x=void 0;x=q+1<n.length?(n[q+1].dts||0)-(p.dts||0):1<n.length?(p.dts||0)-(n[q-1].dts||0):9E4*(c.endTime-c.startTime);k.push({data:v.data,size:v.data.byteLength,
|
|
1237
|
+
duration:x,Ta:Math.round((p.pts||0)-(p.dts||0)),flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:v.Vc?2:1,Va:v.Vc?0:1}})}}var z=qA(m);if(!z||null==l)throw new O(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ra:[],fa:new Uint8Array([]),la:z.la,sa:z.sa,ua:z.ua,data:{gb:this.g,baseMediaDecodeTime:l,Oa:k},stream:b};break;case "hvc":n=[];p=null;u=[];k=f.kc();if(!k.length)throw new O(2,3,3023);for(v=0;v<k.length;v++){l=
|
|
1237
1238
|
k[v];m=l.nalus;u.push.apply(u,w(m));z=!1;var y=[],B=!1;q=t(m);for(x=q.next();!x.done;x=q.next()){var A=x.value;switch(A.type){case 1:case 0:var D=B=!0;break;case 19:case 20:case 21:z=D=B=!0;break;case 32:D=!0;break;case 33:D=!0;break;case 34:D=!0;break;case 35:B=D=!0;break;case 39:case 40:D=!0;break;default:D=!1}if(B&&D){var F=A.fullData.byteLength,J=new Uint8Array(4);J[0]=F>>24&255;J[1]=F>>16&255;J[2]=F>>8&255;J[3]=F&255;y.push(lg(J,A.fullData))}}var G=y.length?{data:lg.apply(fg,w(y)),Vc:z}:null;
|
|
1238
|
-
G&&(null==p&&null!=l.dts&&(p=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,Ta:Math.round((l.pts||0)-(l.dts||0)),flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:G.Vc?2:1,Va:G.Vc?0:1}}))}var H=
|
|
1239
|
-
la:H.la,sa:H.sa,ua:H.ua,data:{gb:this.g,baseMediaDecodeTime:p,Oa:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var I=[],L,M=null,P=t(f.Mb()),V=P.next();!V.done;V=P.next()){var X=V.value,ba=X.data;if(ba){var R=0;L=
|
|
1240
|
-
duration:1024,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}});R+=ab}else R++}}}if(!L||null==M){if(!f.
|
|
1239
|
+
G&&(null==p&&null!=l.dts&&(p=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,Ta:Math.round((l.pts||0)-(l.dts||0)),flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:G.Vc?2:1,Va:G.Vc?0:1}}))}var H=tA(u);if(!H||null==p)throw new O(2,3,3018);b.height=H.height;b.width=H.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ra:[],fa:new Uint8Array([]),
|
|
1240
|
+
la:H.la,sa:H.sa,ua:H.ua,data:{gb:this.g,baseMediaDecodeTime:p,Oa:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var I=[],L,M=null,P=t(f.Mb()),V=P.next();!V.done;V=P.next()){var X=V.value,ba=X.data;if(ba){var R=0;L=hA(ba,R);if(!L)throw new O(2,3,3018);b.audioSamplingRate=L.sampleRate;b.channelsCount=L.channelCount;null==M&&null!==X.pts&&(M=X.pts);for(;R<ba.length;){var Oa=gA(ba,R);if(Oa){var ab=Oa.Hd+Oa.S;R+ab<=ba.length&&I.push({data:ba.subarray(R+Oa.Hd,R+ab),size:Oa.S,
|
|
1241
|
+
duration:1024,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}});R+=ab}else R++}}}if(!L||null==M){if(!f.kc().length)throw new O(2,3,3018);M=9E4*c.startTime;var vb=Bc("audio",b.codecs.split(","));if(!vb||!b.channelsCount||!b.audioSamplingRate)throw new O(2,3,3018);L={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,ha:vb};var Tb=jA(vb,b.channelsCount);if(!Tb)throw new O(2,3,3018);var Cb=M+9E4*(c.endTime-c.startTime);for(f=M;f<Cb;)I.push({data:Tb,size:Tb.byteLength,duration:1024,Ta:0,flags:{Ua:0,
|
|
1241
1242
|
La:0,Ja:0,Ha:0,Ia:2,Va:0}}),f+=1024/L.sampleRate*9E4}var xa=L.sampleRate;f=M/9E4*xa;h={id:b.id,type:"audio",codecs:L.ha,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:f,Oa:I},stream:b};break;case "ac3":L=[];xa=0;I=new Uint8Array([]);M=null;R=t(f.Mb());for(var ib=R.next();!ib.done;ib=R.next()){var wb=ib.value,Ub=wb.data;null==M&&null!==wb.pts&&(M=wb.pts);for(f=0;f<Ub.length;){var Vb=
|
|
1242
|
-
|
|
1243
|
-
[];xa=0;M=new Uint8Array([]);I=null;for(var jb=t(f.Mb()),Ed=jb.next();!Ed.done;Ed=jb.next()){var hd=Ed.value,Fd=hd.data;null==I&&null!==hd.pts&&(I=hd.pts);for(f=0;f<Fd.length;){var tc=
|
|
1244
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Ra:[],fa:M,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:f,Oa:L},stream:b};break;case "mp3":L=[];var Gd;xa=null;for(var
|
|
1243
|
+
lA(Ub,f);Vb?(b.audioSamplingRate=Vb.sampleRate,b.channelsCount=Vb.channelCount,xa=Vb.sampleRate,I=Vb.fa,L.push({data:Ub.subarray(f,f+Vb.S),size:Vb.S,duration:1536,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),f+=Vb.S):f++}}if(0==xa||0==I.byteLength||null==M)throw new O(2,3,3018);f=M/9E4*xa;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Ra:[],fa:I,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:f,Oa:L},stream:b};break;case "ec3":L=
|
|
1244
|
+
[];xa=0;M=new Uint8Array([]);I=null;for(var jb=t(f.Mb()),Ed=jb.next();!Ed.done;Ed=jb.next()){var hd=Ed.value,Fd=hd.data;null==I&&null!==hd.pts&&(I=hd.pts);for(f=0;f<Fd.length;){var tc=oA(Fd,f);tc?(b.audioSamplingRate=tc.sampleRate,b.channelsCount=tc.channelCount,xa=tc.sampleRate,M=tc.fa,L.push({data:Fd.subarray(f,f+tc.S),size:tc.S,duration:1536,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),f+=tc.S):f++}}if(0==xa||0==M.byteLength||null==I)throw new O(2,3,3018);f=I/9E4*xa;h={id:b.id,type:"audio",codecs:"ec-3",
|
|
1245
|
+
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xa,duration:d,Ra:[],fa:M,la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:f,Oa:L},stream:b};break;case "mp3":L=[];var Gd;xa=null;for(var Bh=t(f.Mb()),Fe=Bh.next();!Fe.done;Fe=Bh.next()){var Hd=Fe.value,Ac=Hd.data;if(Ac)for(null==xa&&null!==Hd.pts&&(xa=Hd.pts),f=0;f<Ac.length;){var Wc=yA(Ac,f);Wc?(Gd||(Gd=Wc),f+Wc.S<=Ac.length&&L.push({data:Ac.subarray(f,f+Wc.S),size:Wc.S,duration:1152,Ta:0,flags:{Ua:0,La:0,Ja:0,Ha:0,Ia:2,Va:0}}),
|
|
1245
1246
|
f+=Wc.S):f++}}if(!Gd||null==xa)throw new O(2,3,3018);var Lf=Gd.sampleRate;f=xa/9E4*Lf;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Lf,duration:d,Ra:[],fa:new Uint8Array([]),la:new Uint8Array([]),sa:0,ua:0,data:{gb:this.g,baseMediaDecodeTime:f,Oa:L},stream:b}}h&&a.push(h)}}catch(Mf){return Mf&&3023==Mf.code?Promise.resolve(new Uint8Array([])):Promise.reject(Mf)}if(!a.length)return Promise.reject(new O(2,3,3018));a=new Cu(a);this.h.has(b.id)?d=this.h.get(b.id):
|
|
1246
|
-
(d=Iu(a),this.h.set(b.id,d));b=Zu(a);this.g++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.TsTransmuxer",
|
|
1247
|
+
(d=Iu(a),this.h.set(b.id,d));b=Zu(a);this.g++;b=lg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.TsTransmuxer",KA);KA.prototype.transmux=KA.prototype.transmux;KA.prototype.getOriginalMimeType=KA.prototype.getOriginalMimeType;KA.prototype.convertCodecs=KA.prototype.convertCodecs;KA.prototype.isSupported=KA.prototype.isSupported;KA.prototype.destroy=KA.prototype.destroy;var LA=["aac","ac-3","ec-3","mp3"],MA=["avc","hevc"];Yb("video/mp2t",function(){return new KA("video/mp2t")},bc);/*
|
|
1247
1248
|
@license
|
|
1248
1249
|
EME Encryption Scheme Polyfill
|
|
1249
1250
|
Copyright 2019 Google LLC
|
|
1250
1251
|
SPDX-License-Identifier: Apache-2.0
|
|
1251
1252
|
*/
|
|
1252
|
-
function
|
|
1253
|
-
function
|
|
1253
|
+
function NA(){}var OA;function PA(){OA?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(OA=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=QA):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
1254
|
+
function QA(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,OA.call(c,a,b),2);d=e.h;if(RA(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=OA,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=SA;return e.return(SA.call(c,
|
|
1254
1255
|
a,b))})}
|
|
1255
|
-
function
|
|
1256
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,
|
|
1257
|
-
function
|
|
1258
|
-
function
|
|
1259
|
-
navigator.mediaCapabilities.decodingInfo
|
|
1260
|
-
function
|
|
1261
|
-
new
|
|
1262
|
-
function
|
|
1263
|
-
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}N("McEncryptionSchemePolyfill",
|
|
1264
|
-
|
|
1265
|
-
function
|
|
1266
|
-
function
|
|
1256
|
+
function SA(a,b){var c=this,d,e,f,g,h,k,l,m,n,q;return K(function(p){if(1==p.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=TA(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=UA(h.videoCapabilities,d),l=UA(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
1257
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,OA.call(c,a,e),2)}q=p.h;return p.return(new VA(q,d))})}function UA(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",NA);NA.install=PA;function WA(){}var XA;
|
|
1258
|
+
function YA(){XA?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(XA=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=ZA):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1259
|
+
function ZA(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,XA.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&RA(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=XA,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1260
|
+
navigator.mediaCapabilities.decodingInfo=$A;if(d){f.B(3);break}e=c;return C(f,aB(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return($A.call(b,a))}})}
|
|
1261
|
+
function $A(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=TA(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,XA.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1262
|
+
new VA(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return C(m,aB(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
1263
|
+
function aB(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return C(d,
|
|
1264
|
+
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}N("McEncryptionSchemePolyfill",WA);WA.install=YA;function VA(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
1265
|
+
VA.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};VA.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
1266
|
+
function TA(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function RA(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
1267
|
+
function bB(){}function yx(){PA();YA()}N("EncryptionSchemePolyfills",bB);bB.install=yx;"undefined"!==typeof module&&module.exports&&(module.exports=bB);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
1267
1268
|
|
|
1268
1269
|
//# sourceMappingURL=shaka-player.compiled.map
|