shaka-player 4.2.12 → 4.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.md +11 -0
- package/.github/workflows/build-and-test.yaml +15 -0
- package/.github/workflows/selenium-lab-tests.yaml +3 -2
- package/.github/workflows/update-issues.yaml +1 -0
- package/CHANGELOG.md +17 -0
- package/dist/deps.js +1 -1
- package/dist/locales.js +31 -31
- package/dist/shaka-player.compiled.debug.js +23 -24
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +368 -369
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +27 -29
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +383 -383
- package/dist/shaka-player.ui.map +2 -2
- package/docs/tutorials/selenium-grid-config.md +60 -8
- package/karma.conf.js +50 -7
- package/lib/abr/simple_abr_manager.js +5 -5
- package/lib/player.js +1 -5
- package/lib/polyfill/orientation.js +34 -7
- package/lib/text/vtt_text_parser.js +1 -0
- package/lib/util/manifest_parser_utils.js +4 -2
- package/lib/util/platform.js +14 -0
- package/lib/util/stream_utils.js +69 -26
- package/package.json +2 -2
- package/test/cast/cast_utils_unit.js +4 -1
- package/test/hls/hls_parser_unit.js +72 -0
- package/test/media/drm_engine_integration.js +2 -2
- package/test/media/segment_index_unit.js +3 -3
- package/test/media/streaming_engine_integration.js +14 -11
- package/test/offline/offline_integration.js +6 -3
- package/test/player_external.js +19 -16
- package/test/player_integration.js +35 -48
- package/test/player_src_equals_integration.js +9 -5
- package/test/test/util/fake_demo_main.js +7 -3
- package/test/test/util/layout_tests.js +2 -2
- package/test/test/util/ui_utils.js +9 -2
- package/test/test/util/util.js +6 -27
- package/test/test/util/waiter.js +73 -3
- package/test/ui/ad_ui_unit.js +9 -9
- package/test/util/stream_utils_unit.js +46 -0
- package/ui/range_element.js +5 -0
package/dist/shaka-player.ui.js
CHANGED
|
@@ -15,7 +15,7 @@ ha("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
|
|
|
15
15
|
ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ba(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
16
|
function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ba(a)}}function ja(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}la=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=la;
|
|
18
|
-
function u(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.
|
|
18
|
+
function u(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.hj=b.prototype}function ra(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}ra.prototype.B=function(a){this.h=a};
|
|
19
19
|
function ta(a,b){a.i={wf:b,Ff:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function A(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function B(a){a.g=0}function F(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b,c){a.g=b;a.m=c||0}function I(a,b){a.m=b||0;b=a.i.wf;a.i=null;return b}function wa(a){a.C=[a.i];a.m=0;a.j=0}
|
|
20
20
|
function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Ff?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new ra;this.h=a}function za(a,b){sa(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ba(a)}
|
|
21
21
|
function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Ff)throw b.wf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
@@ -82,7 +82,7 @@ FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_RE
|
|
|
82
82
|
ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,
|
|
83
83
|
MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function xb(a,b){return a.concat(b)}function yb(){}function zb(a){return null!=a};function Ab(a,b){if(0==b.length)return a;var c=b.map(function(d){return new jb(d)});return a.map(function(d){return new jb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(xb,[]).map(function(d){return d.toString()})}function Bb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
84
84
|
function Cb(a,b){if(1==b.length)return b[0];a=Db(a,b);if(null!=a)return a;throw new O(2,4,4025,b);}function Db(a,b){for(var c=r(Fb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Gb?"":null}
|
|
85
|
-
var Gb="text",Hb={La:"video",Gb:"audio",ia:Gb,Bc:"image",Jh:"application"},Fb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ib(){}function Jb(a,b){a=Kb(a);b=Kb(b);return a.split("-")[0]==b.split("-")[0]}function Lb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Mb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Kb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Nb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ob(a,b){var c=Pb(a),d=Pb(b);return a!=c&&b!=d&&c==d}
|
|
85
|
+
var Gb="text",Hb={La:"video",Gb:"audio",ia:Gb,Bc:"image",Jh:"application"},Fb={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ib(){}function Jb(a,b){a=Kb(a);b=Kb(b);return a.split("-")[0]==b.split("-")[0]}function Lb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Mb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Kb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Nb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ob(a,b){var c=Pb(a),d=Pb(b);return a!=c&&b!=d&&c==d}
|
|
86
86
|
function Qb(a,b){a=Kb(a);b=Kb(b);return b==a?4:Lb(b,a)?3:Mb(b,a)?2:Lb(a,b)?1:0}function Pb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Nb.get(a)||a}function Rb(a){return a.language?Kb(a.language):a.audio&&a.audio.language?Kb(a.audio.language):a.video&&a.video.language?Kb(a.video.language):"und"}
|
|
87
87
|
function Sb(a,b){a=Kb(a);var c=new Set,d=r(b);for(b=d.next();!b.done;b=d.next())c.add(Kb(b.value));d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Lb(b,a))return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Mb(b,a))return b;c=r(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Lb(a,b))return b;return null}L("shaka.util.LanguageUtils",Ib);Ib.findClosestLocale=Sb;Ib.getLocaleForVariant=Rb;
|
|
88
88
|
Ib.getLocaleForText=function(a){return Kb(a.language||"und")};Ib.getBase=Pb;Ib.relatedness=Qb;Ib.areSiblings=Ob;Ib.normalize=Kb;Ib.isSiblingOf=Mb;Ib.isParentOf=Lb;Ib.areLanguageCompatible=Jb;Ib.areLocaleCompatible=function(a,b){a=Kb(a);b=Kb(b);return a==b};
|
|
@@ -96,8 +96,8 @@ q.nf=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a
|
|
|
96
96
|
q.ka=function(a,b,c){a=Kb(a);void 0===c&&(c=Vb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Vb||d.set(f,e)});this.h.set(a,d);Ub(this);this.dispatchEvent(new N("locale-updated"));return this};q.qh=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new N("unknown-localization",a));return""};
|
|
97
97
|
function Ub(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Yb:f.Yb},h=g.next()){f.Yb=h.value;e.add(f.Yb);e.add(Pb(f.Yb));h=hb(b.keys(),function(l){return function(m){return Ob(m,l.Yb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Pb(m)==l.Yb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
|
|
98
98
|
c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Wb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new N("missing-localizations",d)))}function Wb(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}L("shaka.ui.Localization",Tb);Tb.prototype.resolve=Tb.prototype.resolve;
|
|
99
|
-
Tb.prototype.resolveDictionary=Tb.prototype.qh;Tb.prototype.insert=Tb.prototype.ka;Tb.prototype.changeLocale=Tb.prototype.nf;Tb.prototype.release=Tb.prototype.release;var Vb=1;Tb.ConflictResolution={USE_OLD:0,USE_NEW:Vb};Tb.UNKNOWN_LOCALES="unknown-locales";Tb.UNKNOWN_LOCALIZATION="unknown-localization";Tb.MISSING_LOCALIZATIONS="missing-localizations";Tb.LOCALE_CHANGED="locale-changed";Tb.LOCALE_UPDATED="locale-updated";var Xb={
|
|
100
|
-
|
|
99
|
+
Tb.prototype.resolveDictionary=Tb.prototype.qh;Tb.prototype.insert=Tb.prototype.ka;Tb.prototype.changeLocale=Tb.prototype.nf;Tb.prototype.release=Tb.prototype.release;var Vb=1;Tb.ConflictResolution={USE_OLD:0,USE_NEW:Vb};Tb.UNKNOWN_LOCALES="unknown-locales";Tb.UNKNOWN_LOCALIZATION="unknown-localization";Tb.MISSING_LOCALIZATIONS="missing-localizations";Tb.LOCALE_CHANGED="locale-changed";Tb.LOCALE_UPDATED="locale-updated";var Xb={Ki:"SKIP_TO_LIVE",Qh:"CAST",Xh:"EXIT_FULL_SCREEN",ri:"NOT_APPLICABLE",Zh:"EXIT_PICTURE_IN_PICTURE",Ph:"CAPTIONS",Ai:"PICTURE_IN_PICTURE",Yi:"UNMUTE",Yh:"EXIT_LOOP_MODE",Kh:"AUTO_QUALITY",li:"MORE_SETTINGS",ci:"FULL_SCREEN",Xi:"UNDETERMINED_LANGUAGE",Mi:"STATISTICS",Hh:"AD_TIME",Gh:"AD_DURATION",Ih:"AIRPLAY",Ji:"SKIP_AD",ti:"ON",si:"OFF",zi:"PAUSE",ef:"LIVE",bi:"FAST_FORWARD",Yf:"SUBTITLE_FORCED",Uh:"ENTER_LOOP_MODE",Ii:"SEEK",Di:"QUALITY",Bi:"PLAY",mi:"MULTIPLE_LANGUAGES",Fi:"RESOLUTION",
|
|
100
|
+
gi:"LOOP",AD_PROGRESS:"AD_PROGRESS",Gi:"REWIND",Ei:"REPLAY",ei:"LANGUAGE",Vh:"ENTER_PICTURE_IN_PICTURE",Zi:"UNRECOGNIZED_LANGUAGE",BACK:"BACK",aj:"VOLUME",ni:"MUTE",Ci:"PLAYBACK_RATE"};function Yb(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Yb.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Zb(a){return a.h/(1-Math.pow(a.g,a.i))};function $b(){this.h=new Yb(2);this.j=new Yb(5);this.g=0;this.i=128E3;this.l=16E3}$b.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};$b.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};$b.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Zb(this.h),Zb(this.j))};function ac(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function bc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function cc(a,b,c){c||(c=ac);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Rd:d.Rd},e=a.next()){d.Rd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Rd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
101
101
|
function dc(a,b,c){c||(c=ac);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function ec(a,b,c){this.startTime=a;this.direction=fc;this.endTime=b;this.payload=c;this.region=new gc;this.position=null;this.positionAlign=ic;this.size=0;this.textAlign=jc;this.writingMode=kc;this.lineInterpretation=lc;this.line=null;this.lineHeight="";this.lineAlign=mc;this.displayAlign=nc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=oc;this.fontStyle=pc;this.linePadding=this.letterSpacing=
|
|
102
102
|
this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}ec.prototype.clone=function(){var a=new ec(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
103
103
|
function qc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!dc(a.nestedCues,b.nestedCues,qc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!dc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}L("shaka.text.Cue",ec);var ic="auto";
|
|
@@ -105,7 +105,7 @@ ec.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ic};v
|
|
|
105
105
|
ec.lineInterpretation={LINE_NUMBER:lc,PERCENTAGE:1};var mc="start",tc={CENTER:"center",START:mc,END:"end"};ec.lineAlign=tc;var uc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ec.defaultTextColor=uc;var wc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ec.defaultTextBackgroundColor=wc;var oc=400;ec.fontWeight={NORMAL:oc,BOLD:700};
|
|
106
106
|
var pc="normal",xc={NORMAL:pc,ITALIC:"italic",OBLIQUE:"oblique"};ec.fontStyle=xc;ec.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function gc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=yc;this.scroll=zc}L("shaka.text.CueRegion",gc);var yc=1;gc.units={PX:0,PERCENTAGE:yc,LINES:2};var zc="";gc.scrollMode={NONE:zc,UP:"up"};function Ac(){}function Bc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Cc(a)==Cc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Dc(a);b=Dc(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Cc(a){return a instanceof ArrayBuffer?a:a.buffer}function Ec(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
107
107
|
function Dc(a,b,c){c=void 0===c?Infinity:c;return Fc(a,void 0===b?0:b,c,Uint8Array)}function Gc(a,b,c){c=void 0===c?Infinity:c;return Fc(a,void 0===b?0:b,c,DataView)}function Fc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Cc(a),b,Math.min(b+Math.max(c,0),e)-b)}L("shaka.util.BufferUtils",Ac);Ac.toDataView=Gc;Ac.toUint8=Dc;Ac.toArrayBuffer=Ec;Ac.equal=Bc;function Hc(){}L("shaka.dependencies",Hc);Hc.has=function(a){return Ic.has(a)};Hc.add=function(a,b){if(!Jc[a])throw Error(a+" is not supported");Ic.set(a,function(){return b})};var Jc={muxjs:"muxjs"};Hc.Allowed=Jc;var Ic=new Map([["muxjs",function(){return window.muxjs}]]);function Kc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Kc.prototype.resolve=function(){};Kc.prototype.reject=function(){};function Lc(a){this.h=a;this.g=void 0}Lc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Mc(a){this.h=a;this.g=null}Mc.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Mc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.Aa=function(){this.stop();this.h();return this};P.prototype.S=function(a){var b=this;this.stop();this.g=(new Mc(function(){b.h()})).S(a);return this};P.prototype.na=function(a){var b=this;this.stop();this.g=(new Mc(function(){b.g.S(a);b.h()})).S(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};L("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.na;P.prototype.tickAfter=P.prototype.S;
|
|
108
|
-
P.prototype.tickNow=P.prototype.Aa;function Nc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Oc(a){return""!=Pc().canPlayType(a)}function Qc(){return Rc("Xbox One")}function Sc(){return Rc("Tizen")}function
|
|
108
|
+
P.prototype.tickNow=P.prototype.Aa;function Nc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Oc(a){return""!=Pc().canPlayType(a)}function Qc(){return Rc("Xbox One")}function Sc(){return Rc("Tizen")}function Vc(){return Rc("Web0S")&&Rc("Chrome/38.0.2125.122 Safari/537.36")}function Wc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Sc()&&!Rc("PC=EOS")&&!Rc("VirginMedia")&&!Xc()&&!Rc("AFT")}function Xc(){return Rc("PlayStation 4")}
|
|
109
109
|
function Yc(){if(!Wc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Rc(a){return(navigator.userAgent||"").includes(a)}function Pc(){if(Zc)return Zc;$c||($c=new P(function(){Zc=null}));(Zc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Zc=document.createElement("video"));$c.S(1);return Zc}var $c=null,Zc=null;function ad(){}
|
|
110
110
|
function bd(a){if(!a)return"";a=Dc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Xc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ta('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
111
111
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
@@ -134,11 +134,11 @@ function be(a,b){return K(function(c){if(1==c.g)return A(c,fe(a.variants,b,!1),2
|
|
|
134
134
|
f.codecs=g}if(Qc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(ie(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||Za(ie(d));return e});B(c)})}
|
|
135
135
|
function fe(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return K(function(y){if(d=a.some(function(x){return x.decodingInfos.length}))return y.return();e=navigator.mediaCapabilities;f=[];g=function(x,v){var w;return K(function(D){if(1==D.g)return F(D,2),A(D,e.decodingInfo(v),4);if(2!=D.g)return w=D.h,x.decodingInfos.push(w),va(D,0);I(D);JSON.stringify(v);B(D)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=je(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return A(y,Promise.all(f),
|
|
136
136
|
0)})}
|
|
137
|
-
function je(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Cb("video",g);f=ge(f);g=Cb("audio",g);g=vd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ge(f);f=vd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
137
|
+
function je(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Cb("video",g);f=ge(f);g=Cb("audio",g);g=he(g);g=vd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ge(f);f=vd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
138
138
|
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=he(d.codecs),f=vd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
|
|
139
139
|
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),y=t.next();!y.done;y=t.next())n.add(y.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
140
140
|
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
|
|
141
|
-
function he(a){return
|
|
141
|
+
function he(a){return"fLaC"===a?"flac":"Opus"===a?"opus":Sc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function ge(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)}else if("vp9"==a)return"vp09.00.41.08";return a}function ce(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ke(d,a.audio)||c&&a&&a.video&&!ke(c,a.video)?!1:!0})}
|
|
142
142
|
function de(a){a.textStreams=a.textStreams.filter(function(b){return Ad(ud(b.mimeType,b.codecs))})}function ee(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.D(4);break}e=d.value;f=e.mimeType;if(le.has(f)){l.D(5);break}g=me.get(f);if(!g){le.set(f,!1);l.D(5);break}return A(l,ne(g),7);case 7:h=l.h,le.set(f,h);case 5:(k=le.get(f))&&b.push(e);d=c.next();l.D(2);break;case 4:a.imageStreams=b,B(l)}})}
|
|
143
143
|
function ne(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function ke(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
144
144
|
function oe(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=r(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=r(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
@@ -148,16 +148,16 @@ function pe(a){return{id:a.id,active:!1,type:Gb,bandwidth:0,language:a.language,
|
|
|
148
148
|
originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
|
|
149
149
|
function qe(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
|
|
150
150
|
audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function re(a){a.__shaka_id||(a.__shaka_id=se++);return a.__shaka_id}
|
|
151
|
-
function te(a){var b=ue(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ve(a){var b=ue(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
|
|
152
|
-
function ue(a){return{id:re(a),active:!1,type:"",bandwidth:0,language:Kb(
|
|
153
|
-
originalTextId:null,originalImageId:null}}function we(a){return a.allowedByApplication&&a.allowedByKeySystem}function xe(a){return a.filter(function(b){return we(b)})}
|
|
151
|
+
function te(a){var b=ue(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ve(a){var b=ue(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
|
|
152
|
+
function ue(a){var b=a.language;return{id:re(a),active:!1,type:"",bandwidth:0,language:Kb(b||"und"),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
|
|
153
|
+
originalTextId:null,originalImageId:null,fj:b}}function we(a){return a.allowedByApplication&&a.allowedByKeySystem}function xe(a){return a.filter(function(b){return we(b)})}
|
|
154
154
|
function Od(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;a=c.filter(function(g){return g<=b});return a.length?d.get(Math.max.apply(Math,ja(a))):d.get(Math.min.apply(Math,ja(c)))}
|
|
155
155
|
function ye(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Sb(Kb(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Kb(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ze(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(xb,[]);return a.length?
|
|
156
156
|
ze(e,a[0]):e}function ze(a,b){return a.filter(function(c){return c.roles.includes(b)})}function ie(a){var b=[];a.audio&&b.push(Ae(a.audio));a.video&&b.push(Ae(a.video));return b.join(", ")}
|
|
157
157
|
function Ae(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
|
|
158
|
-
var se=0,Td="smooth",Ud="powerEfficient",Wd="bandwidth",le=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),me=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Be(){var a=this;this.m=null;this.l=!1;this.i=new $b;navigator.connection&&navigator.connection.addEventListener&&(this.C=function(){if(a.l&&a.g.useNetworkInformation){a.i=new $b;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.m(b)}},navigator.connection.addEventListener("change",this.C));this.s=[];this.F=1;this.H=!1;this.
|
|
158
|
+
var se=0,Td="smooth",Ud="powerEfficient",Wd="bandwidth",le=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),me=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Be(){var a=this;this.m=null;this.l=!1;this.i=new $b;this.C=null;navigator.connection&&navigator.connection.addEventListener&&(this.C=function(){if(a.l&&a.g.useNetworkInformation){a.i=new $b;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.m(b)}},navigator.connection.addEventListener("change",this.C));this.s=[];this.F=1;this.H=!1;this.h=this.j=this.g=this.B=null;this.G=new P(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.m(b)}})}q=Be.prototype;
|
|
159
159
|
q.stop=function(){this.m=null;this.l=!1;this.s=[];this.F=1;this.j=this.B=null;this.h&&(this.h.disconnect(),this.h=null);this.G.stop()};q.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.C),this.C=null);this.G=null};q.init=function(a){this.m=a};
|
|
160
|
-
q.chooseVariant=function(){var a=Infinity,b=Infinity;this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.
|
|
160
|
+
q.chooseVariant=function(){var a=Infinity,b=Infinity;this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientHeight*b,b*=this.j.clientWidth);a=Ce(this.g.restrictions,this.s,a,b);b=this.i.getBandwidthEstimate(De(this));this.s.length&&!a.length&&(a=Ce(null,this.s,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.F)?1:Math.abs(this.F),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},
|
|
161
161
|
k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.B=Date.now();return c};q.enable=function(){this.l=!0};q.disable=function(){this.l=!1};
|
|
162
162
|
q.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.B&&this.l)a:{if(!this.H){a=this.i;if(!(a.g>=a.i))break a;this.H=!0}else if(Date.now()-this.B<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(De(this));a&&this.m(a)}};q.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(De(this))};q.setVariants=function(a){this.s=a};q.playbackRateChanged=function(a){this.F=a};
|
|
163
163
|
q.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.S(Ee)}),this.h.observe(this.j))};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function De(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
|
|
@@ -198,13 +198,13 @@ function eg(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-
|
|
|
198
198
|
function fg(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function gg(a){a=Number(a);return 0===a%1?a:null}function hg(a){a=Number(a);return 0===a%1&&0<a?a:null}function ig(a){a=Number(a);return 0===a%1&&0<=a?a:null}function jg(a){a=Number(a);return isNaN(a)?null:a}function kg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
199
199
|
function lg(a,b){var c=new DOMParser,d=mg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function ng(a,b){try{var c=bd(a);return lg(c,b)}catch(d){return null}}
|
|
200
200
|
var mg=new Lc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function og(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.ea=this.aa=!1;this.J=0;this.g=null;this.B=new yf;this.i=new Map;this.F=[];this.s=new Kc;this.h=null;this.m=function(d){c.s.reject(d);a.onError(d)};this.ha=new Map;this.va=new Map;this.Z=new P(function(){return pg(c)});this.P=!1;this.N=[];this.T=!1;this.ba=(new P(function(){qg(c)})).na(b);this.s.catch(function(){});this.j=new wf(function(){return rg(c)});this.$=!1;this.K=this.H=null}q=og.prototype;
|
|
201
|
-
q.destroy=function(){return this.j.destroy()};function rg(a){return K(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.s.reject(),a.ba.stop(),a.ba=null,a.Z.stop(),a.Z=null,A(b,
|
|
201
|
+
q.destroy=function(){return this.j.destroy()};function rg(a){return K(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.s.reject(),a.ba.stop(),a.ba=null,a.Z.stop(),a.Z=null,A(b,sg(a),2);case 2:if(!a.l){b.D(3);break}F(b,4);return A(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:I(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.C=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.$=!1,a.H=null,B(b)}})}q.configure=function(a){this.h=a};
|
|
202
202
|
function vg(a,b,c){a.ea=!0;a.F=[];a.P=c;return wg(a,b)}function xg(a,b,c){a.F=c;a.P=0<c.length;return wg(a,b)}
|
|
203
203
|
function yg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return zg(a,g,[])}
|
|
204
204
|
function wg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D;return K(function(z){if(1==z.g){if(c=Ag(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(C){return C.video&&C.video.drmInfos.length||C.audio&&C.audio.drmInfos.length?!0:!1});g||(h=Df(a.h.servers),Bg(b,h));k=new Set;l=r(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,p=Cg(m),n=r(p),t=n.next();!t.done;t=n.next())y=t.value,k.add(y);x=r(k);for(t=x.next();!t.done;t=
|
|
205
205
|
x.next())v=t.value,Dg(v,Df(a.h.servers),Df(a.h.advanced||{}),a.h.keySystemsMapping);return A(z,fe(b,a.P,a.$),2)}w=g||Object.keys(a.h.servers).length;if(!w)return a.aa=!0,z.return(Promise.resolve());D=zg(a,void 0,b);return z.return(g?D:D.catch(function(){}))})}
|
|
206
206
|
function Eg(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.H){c.D(2);break}return A(c,a.H,3);case 3:return xf(a.j),c.return();case 2:return F(c,4),a.H=a.l.setMediaKeys(a.C),A(c,a.H,6);case 6:va(c,5);break;case 4:b=I(c),a.m(new O(2,6,6003,b.message));case 5:xf(a.j),B(c)}})}function Fg(a,b){return K(function(c){if(1==c.g)return A(c,Eg(a),2);Gg(a,b.initDataType,Dc(b.initData));B(c)})}
|
|
207
|
-
q.Cc=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.C)return b.B.ya(a,"encrypted",function(){b.m(new O(2,6,6010))}),c.return();b.l=a;b.B.ya(b.l,"play",function(){for(var d=r(b.N),e=d.next();!e.done;e=d.next())Hg(b,e.value);b.T=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.B.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return
|
|
207
|
+
q.Cc=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.C)return b.B.ya(a,"encrypted",function(){b.m(new O(2,6,6010))}),c.return();b.l=a;b.B.ya(b.l,"play",function(){for(var d=r(b.N),e=d.next();!e.done;e=d.next())Hg(b,e.value);b.T=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.B.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return sg(b)});b.K=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.K||"com.apple.fps"!==b.g.keySystem||
|
|
208
208
|
b.F.length?A(c,Eg(b),2):c.D(2)}Ig(b);b.K||b.F.length||b.h.parseInbandPsshEnabled||b.B.o(b.l,"encrypted",function(d){return Fg(b,d)});B(c)})};
|
|
209
209
|
function Jg(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.C||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=pf([a.g.serverCertificateUri],a.h.retryParameters);F(g,3);c=a.G.Pb.request(5,b);return A(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Dc(d.data);va(g,4);break;case 3:throw e=I(g),new O(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
210
210
|
F(g,6);return A(g,a.C.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=I(g),new O(2,6,6004,f.message);}})}function Kg(a,b){var c,d,e;return K(function(f){if(1==f.g)return A(f,Lg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.eb=new Kc,d.push(e.eb);d.push(c.remove());return A(f,Promise.all(d),3)}a.i.delete(c);B(f)})}
|
|
@@ -233,7 +233,7 @@ b.close().catch(function(){}));Mg(a)&&(a.s.resolve(),a.Z.S(Wg))}function pg(a){v
|
|
|
233
233
|
function Xg(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,p,
|
|
234
234
|
n;return K(function(t){switch(t.g){case 1:F(t,2);if("org.w3.clearkey"===l&&Yc())throw Error("Unsupported keySystem");return A(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,Rc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),A(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:I(t),f.set(l,null),B(t)}})},h=a.map(function(l){return g(l)}),A(k,Promise.all(h),2)):k.return(Ef(f))})}
|
|
235
235
|
function Yg(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).S(Zg)}),F(c,2),A(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);I(c);B(c)})}
|
|
236
|
-
function
|
|
236
|
+
function sg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return A(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return F(g,2),a.ea||a.F.includes(e.sessionId)||"persistent-license"!==f.type?A(g,Yg(e),5):A(g,e.remove(),5);if(2!=g.g)return va(g,0);I(g);B(g)})})),0)})}
|
|
237
237
|
function $g(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=r(b),g=f.next();!g.done;e={Wa:e.Wa},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Wa=[];e.Wa=e.Wa.concat(d.initData||[]);e.Wa=e.Wa.concat(g.initData||[]);e.Wa=e.Wa.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Wa.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ja(d.keyIds),ja(g.keyIds))):
|
|
238
238
|
d.keyIds||g.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||g.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||g.persistentStateRequired,videoRobustness:d.videoRobustness||g.videoRobustness,audioRobustness:d.audioRobustness||g.audioRobustness,serverCertificate:d.serverCertificate||g.serverCertificate,serverCertificateUri:d.serverCertificateUri||g.serverCertificateUri,
|
|
239
239
|
initData:e.Wa,keyIds:f});break}}return c}function Cg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function qg(a){a.i.forEach(function(b,c){var d=b.we,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.we=e)})}function Mg(a){a=a.i.values();return fb(a,function(b){return b.loaded})}
|
|
@@ -267,7 +267,7 @@ f-1),sh(b,b.g,15-b.g),c.j=a);break;case 46:sh(c.l,0,15);break;case 47:b=null,c.h
|
|
|
267
267
|
function li(a,b){var c=[];try{for(;b.Ea();){var d=Zh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Zh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new $h(e));for(var g=a.j.get(e),h=b.qa();b.qa()-h<f;){e=b;var k=Zh(e),l=k.value,m=k.pts;if(16===l){var p=Zh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Sh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Th(t,n,g.i));if(t.h+1>=t.H){n=t;for(var y=0,x=1;16>x;x++,
|
|
268
268
|
y++)n.i[y]=n.i[x];for(x=0;1>x;x++,y++)n.i[y]=Qh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Th(t,n,g.i));t.i[t.h]=Qh();t.g=0;break;case 12:t.isVisible()&&(e=Th(t,n,g.i)),Ph(t),n=t,n.h=0,n.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=ai(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Rh(g.g,"\u266a"):Rh(g.g,
|
|
269
269
|
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Rh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(gi.has(e)){var w=gi.get(e);Rh(g.g,w)}else Rh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Rh(g.g,"_"):Rh(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(D){if(D instanceof O&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function mi(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ni(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(ja(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function oi(a,b){var c=null,d=null,e=a.R();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:e,uf:c,lg:d}}function pi(a,b){return{hf:1==b?a.qc():a.R()}}function qi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.R()}}
|
|
270
|
-
function ri(a,b,c){var d=a.R(),e=[],f=null;c&1&&(f=a.R());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={De:null,sampleSize:null,Hd:null};c&256&&(h.De=a.R());c&512&&(h.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(h.Hd=0==b?a.R():a.Jf());e.push(h)}return{
|
|
270
|
+
function ri(a,b,c){var d=a.R(),e=[],f=null;c&1&&(f=a.R());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={De:null,sampleSize:null,Hd:null};c&256&&(h.De=a.R());c&512&&(h.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(h.Hd=0==b?a.R():a.Jf());e.push(h)}return{gj:d,Lf:e,kg:f}};function si(){this.i=new Map;this.h=this.g=0}
|
|
271
271
|
si.prototype.init=function(a){var b=this,c=[],d=[];(new Jf).box("moov",Nf).box("mvex",Nf).X("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.R();f=f.R();b.g=e;b.h=f}).box("trak",Nf).X("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.R();c.push(e)}).box("mdia",Nf).X("mdhd",function(e){e=qi(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new O(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
272
272
|
si.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=0,g=[],h=null,k=9E4;(new Jf).box("moof",function(l){f=l.start;g=[];Nf(l)}).box("traf",Nf).X("trun",function(l){l=ri(l.reader,l.version,l.flags);g.push(l)}).X("tfhd",function(l){l=oi(l.reader,l.flags);d=l.uf||b.g;e=l.lg||b.h;l=l.trackId;b.i.has(l)&&(k=b.i.get(l))}).X("tfdt",function(l){h=pi(l.reader,l.version).hf}).box("mdat",function(l){if(null===h)throw Ua("Unable to find base media decode time for CEA captions!"),new O(2,2,2010);
|
|
273
273
|
ti(l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
@@ -422,82 +422,81 @@ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},upda
|
|
|
422
422
|
function Rl(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=nm(a,{Pb:a.H,onError:function(f){fm(a,f)},Bd:function(f){om(a,f)},onExpirationUpdated:function(f,g){pm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.s.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),A(e,xg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?A(e,a.m.Cc(b.O),3):A(e,km(a,a.i),0)})}
|
|
423
423
|
function Sl(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y;return K(function(x){switch(x.g){case 1:b.startTime=c.startTime;null!=a.Nc&&(b.startTime=a.Nc,a.Nc=null);d=b.O;e=b.uri;a.hb=e;a.I=new Hj({rd:function(){return d.playbackRate},od:function(){return d.defaultPlaybackRate},Me:function(v){d.playbackRate=v},Hf:function(v){d.currentTime+=v}});f=function(){return qm(a)};g=function(){return rm(a)};a.C.o(d,"playing",f);a.C.o(d,"pause",f);a.C.o(d,"ended",f);a.C.o(d,"ratechange",g);h=a.h.abrFactory;a.B&&a.ye==h||
|
|
424
424
|
(a.ye=h,a.B=h(),"function"!=typeof a.B.setMediaElement&&(Ge(),a.B.setMediaElement=function(){}),a.B.configure(a.h.abr));a.Ba=new Pe(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Oa=a.h.preferredTextLanguage;a.Fc=a.h.preferredTextRole;a.wb=a.h.preferForcedSubs;sm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(v,w,D){a.j&&v!=a.j.l&&tm(a,v,!0,void 0===w?!1:w,void 0===D?0:D)});a.B.setMediaElement(d);a.F=um(a,b.startTime);a.$a=vm(a,
|
|
425
|
-
b.Jd);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);wm(a,k);Ld(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=xm(a);a.j.configure(a.h.streaming);a.l=ym;d.textTracks&&a.C.o(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":zm(a,v)}});a.dispatchEvent(Wl("streaming"));l=null;if(m=a.Sa().find(function(v){return v.active})){x.D(2);break}l=Xl(a);tm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.D(
|
|
426
|
-
break}p=a.F.gd();return A(x,Am(l,p),4);case 4:n=x.h,a.F.ee(n);case
|
|
425
|
+
b.Jd);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);wm(a,k);Ld(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=xm(a);a.j.configure(a.h.streaming);a.l=ym;d.textTracks&&a.C.o(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":zm(a,v)}});a.dispatchEvent(Wl("streaming"));l=null;if(m=a.Sa().find(function(v){return v.active})){x.D(2);break}l=Xl(a);tm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.D(2);
|
|
426
|
+
break}p=a.F.gd();return A(x,Am(l,p),4);case 4:n=x.h,a.F.ee(n);case 2:return a.F.ce(),t=a.Ab().find(function(v){return v.active}),t||((y=ye(a.i.textStreams,a.Oa,a.Fc,a.wb)[0]||null)&&Gl(a.s.h,y,!0),l&&(y?(l.audio&&Bm(a,l.audio,y)&&(a.aa=!0),a.aa&&a.K.m.setTextVisibility(!0),Cm(a)):a.aa=!1),y&&(a.h.streaming.alwaysStreamText||a.Ob())&&ik(a.j,y)),A(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),Dm(a)),ce(a.j?a.j.l:null,a.i),Em(a.i),Fm(a),Gm(a),a.i.variants.some(function(v){return v.primary}),
|
|
427
427
|
a.C.ya(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Jd}),B(x)}})}
|
|
428
428
|
function Tl(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=Hb,e=Date.now()/1E3,f=!0,a.m=nm(a,{Pb:a.H,onError:function(p){fm(a,p)},Bd:function(p){om(a,p)},onExpirationUpdated:function(p,n){pm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=eh(g),k=dm[h],"application/x-mpegurl"==k&&Wc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
|
|
429
429
|
primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?yd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
430
430
|
a.m.$=!0,A(m,xg(a.m,[l],[]),2)):A(m,a.m.Cc(b.O),0)})}
|
|
431
431
|
function Ul(a,b,c){function d(){return qm(a)}b.uri=c.uri;b.startTime=c.startTime;a.hb=b.uri;var e=b.O;a.F=new wj(e);var f=!1;a.ib.push(function(){f=!0});null!=b.startTime&&a.F.ee(b.startTime);a.I=new Hj({rd:function(){return e.playbackRate},od:function(){return e.defaultPlaybackRate},Me:function(k){e.playbackRate=k},Hf:function(k){e.currentTime+=k}});wm(a,a.h.streaming.rebufferingGoal);a.C.o(e,"playing",d);a.C.o(e,"pause",d);a.C.o(e,"ended",d);a.C.o(e,"ratechange",function(){return rm(a)});"none"!=
|
|
432
|
-
e.preload&&a.C.ya(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Jd});e.audioTracks&&(a.C.o(e.audioTracks,"addtrack",function(){return
|
|
433
|
-
"change",function(){return
|
|
434
|
-
2);if(f)return l.return();
|
|
435
|
-
function
|
|
436
|
-
function
|
|
432
|
+
e.preload&&a.C.ya(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Jd});e.audioTracks&&(a.C.o(e.audioTracks,"addtrack",function(){return Fm(a)}),a.C.o(e.audioTracks,"removetrack",function(){return Fm(a)}),a.C.o(e.audioTracks,"change",function(){return Fm(a)}));e.textTracks&&(a.C.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Hm(a,k);break;case "chapters":zm(a,k);break;default:Fm(a)}}),a.C.o(e.textTracks,"removetrack",function(){return Fm(a)}),a.C.o(e.textTracks,
|
|
433
|
+
"change",function(){return Fm(a)}));var g=eh(b.uri);e.src=il(a.T,b.uri,dm[g]);(Sc()||Rc("Web0S"))&&e.load();a.l=Im;a.dispatchEvent(Wl("streaming"));var h=new Kc;nj(e,HTMLMediaElement.HAVE_METADATA,a.C,function(){a.F.ce();h.resolve()});nj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.C,function(){var k;return K(function(l){if(1==l.g)return Jm(a),k=Km(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.aa=!0),l.D(2)):A(l,new Promise(function(m){a.C.ya(e.textTracks,"change",m);(new P(m)).S(1)}),
|
|
434
|
+
2);if(f)return l.return();Lm(a);B(l)})});e.error?h.reject(em(a)):"none"==e.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.C.ya(e,"error",function(){h.reject(em(a))});return new $e(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})}
|
|
435
|
+
function Jm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Id(b);var c=a.h.preferredVariantRole;""!=c&&a.Id(b,c)}}function Lm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Fe(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Fe(b,d,c)}}
|
|
436
|
+
function Hm(a,b){if("metadata"==b.kind){b.mode="hidden";a.C.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,im(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new P(function(){var d=Mm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Aa().S(.5);a.ib.push(function(){c.stop()})}}
|
|
437
437
|
function im(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Wl("metadata",b))}function zm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).Aa().S(.5);a.ib.push(function(){c.stop()})}}function mm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function nm(a,b){return new og(b,a.h.drm.updateExpirationTime)}
|
|
438
438
|
function Kl(a){return new lf(function(b,c){a.B&&a.B.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Wl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Wl("downloadfailed",b))})}
|
|
439
|
-
function um(a,b){return new xj(a.g,a.i,a.h.streaming,b,function(){a.$a&&Kj(a.$a,!0);a.j&&a.j.Wc();a.N&&
|
|
440
|
-
function vm(a,b){b=new Qj(a.ha,a.U()||0<b);b.addEventListener("enter",function(d){jm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){jm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(jm(a,"timelineregionenter",e),jm(a,"timelineregionexit",e))});var c=new Jj(a.g);c.g.add(b);a.ea&&c.g.add(a.ea);return c}function wm(a,b){a.N=new Te;a.N.g=Ve;We(a.N,b,Math.min(.5,b/2));gm(a);a.vd=(new P(function(){
|
|
441
|
-
function
|
|
439
|
+
function um(a,b){return new xj(a.g,a.i,a.h.streaming,b,function(){a.$a&&Kj(a.$a,!0);a.j&&a.j.Wc();a.N&&Nm(a)},function(c){return a.dispatchEvent(c)})}
|
|
440
|
+
function vm(a,b){b=new Qj(a.ha,a.U()||0<b);b.addEventListener("enter",function(d){jm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){jm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(jm(a,"timelineregionenter",e),jm(a,"timelineregionexit",e))});var c=new Jj(a.g);c.g.add(b);a.ea&&c.g.add(a.ea);return c}function wm(a,b){a.N=new Te;a.N.g=Ve;We(a.N,b,Math.min(.5,b/2));gm(a);a.vd=(new P(function(){Nm(a)})).na(.25)}
|
|
441
|
+
function Nm(a){switch(a.l){case Im:if(a.g.ended)var b=!0;else{var c=Ci(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case ym:a:if(a.g.ended||Ni(a.K))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Jb();var d=Ci(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ei(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ue:Ve;c.g=d;b!=d&&gm(a)}function hm(a,b,c,d){return new Hi(a,b,c,d)}
|
|
442
442
|
function cm(a){return new Xk({getBandwidthEstimate:function(){return a.B?a.B.getBandwidthEstimate():NaN},kb:function(){return a.kb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Sa:function(){return a.Sa()},zb:function(){return a.zb()},U:function(){return a.U()}},a.h.cmcd)}
|
|
443
|
-
function xm(a){return new Wj(a.i,{qd:function(){return a.F.gd()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Yk(a.T,b,c)},V:a.K,Pb:a.H,onError:function(b){return fm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},fh:function(){a.J&&a.J.update&&a.J.update()},xe:function(){a.F&&a.F.If();
|
|
443
|
+
function xm(a){return new Wj(a.i,{qd:function(){return a.F.gd()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Yk(a.T,b,c)},V:a.K,Pb:a.H,onError:function(b){return fm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},fh:function(){a.J&&a.J.update&&a.J.update()},xe:function(){a.F&&a.F.If();Nm(a)},eh:function(b,c){(c=c.qe)&&a.ea&&Nj(a.ea,c,b)},jf:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.K&&["audio","video"].includes(b)){c=new Sf(Dc(c));
|
|
444
444
|
var e=0,f=r(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=r(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Gg(d,"cenc",e);d=d.s}}else d=Promise.resolve();return d}})}
|
|
445
|
-
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=sl(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Al(this.h,a,Jl(this));
|
|
446
|
-
function
|
|
447
|
-
c);a.We=b;a.j&&(b=a.j,(c=b.i.get(Gb))&&gk(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?a.B.enable():a.B.disable(),
|
|
448
|
-
q.pg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ka().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.ph=function(){for(var a in this.h)delete this.h[a];Al(this.h,Jl(this),Jl(this));
|
|
445
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=sl(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Al(this.h,a,Jl(this));Om(this);return c};
|
|
446
|
+
function Om(a){if(a.J){var b=gf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Pm(a,a.i)}catch(f){fm(a,f)}a.B&&Gm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Qm(a)}a.H&&a.H.Ke(a.h.streaming.forceHTTPS);if(a.K&&(a.K.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.We!=b)){var c=b(),d=a.K,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=
|
|
447
|
+
c);a.We=b;a.j&&(b=a.j,(c=b.i.get(Gb))&&gk(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?a.B.enable():a.B.disable(),Dm(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),We(a.N,b,Math.min(.5,b/2)));a.i&&sm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Jl(this);Al(a,this.h,Jl(this));return a};
|
|
448
|
+
q.pg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ka().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.ph=function(){for(var a in this.h)delete this.h[a];Al(this.h,Jl(this),Jl(this));Om(this)};q.ie=function(){return this.l};q.Hg=function(){return this.g};q.Ic=function(){return this.H};q.ge=function(){return this.hb};
|
|
449
449
|
q.nd=function(){return this.G?this.G:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Mb=function(){return this.i?this.i.presentationTimeline.Mb():!1};q.ic=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
450
450
|
q.Ka=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.ec(),end:a.mb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Sg=function(){this.U()&&(this.g.currentTime=this.Ka().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Hc=function(){return this.m?this.m.Hc():Infinity};q.pd=function(){return this.m?this.m.pd():{}};
|
|
451
|
-
q.Pc=function(){return this.N?this.N.g==Ve:!1};q.zb=function(){return this.g?this.I?this.I.i:1:0};q.Ve=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==ym&&(this.B.playbackRateChanged(a),fk(this.j,1<Math.abs(a))))};q.lf=function(){var a=this.I.od();this.l==
|
|
451
|
+
q.Pc=function(){return this.N?this.N.g==Ve:!1};q.zb=function(){return this.g?this.I?this.I.i:1:0};q.Ve=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==ym&&(this.B.playbackRateChanged(a),fk(this.j,1<Math.abs(a))))};q.lf=function(){var a=this.I.od();this.l==Im&&this.I.set(a);this.l==ym&&(this.I.set(a),this.B.playbackRateChanged(a),fk(this.j,!1))};
|
|
452
452
|
q.Sa=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,we(e)){var f=oe(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ve(g)}):[]};
|
|
453
|
-
q.Ab=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=pe(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?
|
|
453
|
+
q.Ab=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=pe(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Km(this).map(function(f){return te(f)}):[]};q.zg=function(){return this.i?this.i.imageStreams.map(function(a){return qe(a)}):[]};
|
|
454
454
|
q.Og=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,C;return K(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.D(3):A(G,d.createSegmentIndex(),3):G.return(null):G.D(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;y=m*p;x=f.j-
|
|
455
455
|
f.startTime;v=f.s||x/y;w=f.startTime;z=D=0;1<y&&(C=Math.floor((b-f.startTime)/v),w=f.startTime+C*v,D=C%m*n,z=Math.floor(C/m)*t);return G.return({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:z,startTime:w,duration:v,uris:f.Ra(),width:n})}return G.return(null)})};
|
|
456
|
-
q.Ge=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Gl(this.s.h,b,!1),ik(this.j,b),
|
|
457
|
-
q.He=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&we(d)&&(tm(this,d,!1,b,c),this.Ba=new Oe(d),
|
|
458
|
-
re(c)==a.id){
|
|
459
|
-
q.Id=function(a,b){if(this.i&&this.F){this.Ba=new Pe(a,b||"",0,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var c=this.Ba.create(this.i.variants),d=null;c=r(c.values());for(var e=c.next();!e.done;e=c.next())if(e=e.value,!d||b(d,a)>b(e,a))d=e;d?(b=oe(d),this.He(b,!0)):
|
|
460
|
-
r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=ve(f);Kb(g.language)==a&&(d=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?
|
|
461
|
-
q.Fe=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Oa=a,this.Fc=b||"",this.wb=c,(a=ye(this.i.textStreams,this.Oa,this.Fc,this.wb)[0]||null)&&a!=this.j.s&&(Gl(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.Ob()))ik(this.j,a),
|
|
462
|
-
q.sh=function(a){if(this.i&&this.F){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ba=new Pe(b.language,"",0,a),
|
|
463
|
-
q.Ob=function(){var a=this.aa;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?
|
|
464
|
-
q.rg=function(a){var b=Kb(a),c=
|
|
465
|
-
function
|
|
466
|
-
q.Pe=function(a){a=!!a;if(this.aa!=a){this.aa=a;if(this.l==ym)this.K.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=ye(this.i.textStreams,this.Oa,this.Fc,this.wb),0<a.length&&(ik(this.j,a[0]),
|
|
456
|
+
q.Ge=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Gl(this.s.h,b,!1),ik(this.j,b),Rm(this),this.Oa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Km(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,re(c)==a.id?c.mode=this.aa?"showing":"hidden":c.mode="disabled";Rm(this)}};
|
|
457
|
+
q.He=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&we(d)&&(tm(this,d,!1,b,c),this.Ba=new Oe(d),Gm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
458
|
+
re(c)==a.id){Sm(this,c);break}};q.og=function(){return Tm(this.Sa())};q.Ng=function(){return Tm(this.Ab())};q.ng=function(){return Array.from(Um(this.Sa()))};q.Mg=function(){return Array.from(Um(this.Ab()))};
|
|
459
|
+
q.Id=function(a,b){if(this.i&&this.F){this.Ba=new Pe(a,b||"",0,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var c=this.Ba.create(this.i.variants),d=null;c=r(c.values());for(var e=c.next();!e.done;e=c.next())if(e=e.value,!d||b(d,a)>b(e,a))d=e;d?(b=oe(d),this.He(b,!0)):Qm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);a=Kb(a);c=d=null;e=
|
|
460
|
+
r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=ve(f);Kb(g.language)==a&&(d=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Sm(this,c):d&&Sm(this,d)}};
|
|
461
|
+
q.Fe=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Oa=a,this.Fc=b||"",this.wb=c,(a=ye(this.i.textStreams,this.Oa,this.Fc,this.wb)[0]||null)&&a!=this.j.s&&(Gl(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.Ob()))ik(this.j,a),Rm(this)}else{var d=Kb(a);(a=this.Ab().find(function(e){return Kb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Ge(a)}};
|
|
462
|
+
q.sh=function(a){if(this.i&&this.F){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ba=new Pe(b.language,"",0,a),Qm(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Sm(this,b)}};
|
|
463
|
+
q.Ob=function(){var a=this.aa;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Km(this).some(function(b){return"showing"==b.mode}):a};q.yf=function(){return this.g&&this.g.src&&this.g.textTracks?Vm(this).map(function(a){return te(a)}):[]};
|
|
464
|
+
q.rg=function(a){var b=Kb(a),c=Vm(this).filter(function(h){return Kb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(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};
|
|
465
|
+
function Km(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Mm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Vm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
466
|
+
q.Pe=function(a){a=!!a;if(this.aa!=a){this.aa=a;if(this.l==ym)this.K.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=ye(this.i.textStreams,this.Oa,this.Fc,this.wb),0<a.length&&(ik(this.j,a[0]),Rm(this))):ek(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Km(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Cm(this)}};
|
|
467
467
|
q.Jg=function(){if(!this.U())return null;var a=this.ua.l,b=0;if(this.F)b=this.F.gd();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
468
|
-
q.Af=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.kb=function(){if(this.l==ym)return this.K.kb();var a={total:[],audio:[],video:[],text:[]};this.l==
|
|
469
|
-
q.getStats=function(){if(this.l!=ym&&this.l!=
|
|
468
|
+
q.Af=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.kb=function(){if(this.l==ym)return this.K.kb();var a={total:[],audio:[],video:[],text:[]};this.l==Im&&(a.total=Fi(this.g.buffered));return a};
|
|
469
|
+
q.getStats=function(){if(this.l!=ym&&this.l!=Im)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:[]};qm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=
|
|
470
470
|
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.s.P=this.F.cf(),this.s.T=this.F.df());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.K=d;this.s.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.s.B=c;if(this.l==ym){if(c=this.j.l)this.s.F=(this.I?this.I.i:1)*c.bandwidth;c&&c.video&&(b=this.s,d=c.video.height||NaN,b.s=c.video.width||NaN,b.l=d);this.U()&&(c=this.Af().valueOf()+
|
|
471
|
-
1E3*this.Ka().end,this.s.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.g);c=this.B.getBandwidthEstimate();this.s.C=c}this.l==
|
|
471
|
+
1E3*this.Ka().end,this.s.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.g);c=this.B.getBandwidthEstimate();this.s.C=c}this.l==Im&&(c=this.s,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var e=this.s;a=e.s;c=e.l;b=e.F;d=e.K;var f=e.N,g=e.J,h=e.T,k=e.P,l=e.C,m=e.i,p=e.m,n=e.H,t=e.j,y=Dl(e.g,"playing"),x=Dl(e.g,"paused"),v=Dl(e.g,"buffering"),w=e.B,D=e.G,z=e.I,C=El(e.g),G=[];e=r(e.h.g);for(var E=e.next();!E.done;E=e.next())E=E.value,G.push({timestamp:E.timestamp,
|
|
472
472
|
id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:y,pauseTime:x,bufferingTime:v,licenseTime:w,liveLatency:D,maxSegmentDuration:z,stateHistory:C,switchHistory:G}};
|
|
473
|
-
q.cg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,y,x,v,w,D;return K(function(z){switch(z.g){case 1:if(h.l!=ym&&h.l!=
|
|
474
|
-
Hb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new O(1,4,4033);if(!k.length){z.D(6);break}return A(z,
|
|
475
|
-
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=ud(v.mimeType,v.codecs);D=Ad(w);if(!D)throw new O(2,2,2014,d);h.i.textStreams.push(v);
|
|
476
|
-
q.ag=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=ym&&d.l!=
|
|
477
|
-
case 5:throw new O(1,2,2012);}})};function
|
|
478
|
-
function
|
|
479
|
-
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function
|
|
480
|
-
function
|
|
473
|
+
q.cg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,y,x,v,w,D;return K(function(z){switch(z.g){case 1:if(h.l!=ym&&h.l!=Im)throw new O(1,7,7004);if(d){z.D(2);break}return A(z,Wm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(C){}if(h.l!=Im){z.D(4);break}g&&(c="forced");return A(z,Xm(h,a,b,c,d,f||"",k),5);case 5:l=h.Ab();if(m=l.find(function(C){return C.language==b&&C.label==(f||"")&&C.kind==c}))return Fm(h),z.return(m);throw new O(1,2,2012);case 4:p=
|
|
474
|
+
Hb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new O(1,4,4033);if(!k.length){z.D(6);break}return A(z,Ym(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,y=Zm(h,t,d,k),x=new Blob([y],{type:"text/vtt"}),a=Ki(x),d="text/vtt";case 6:v={id:h.Xf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Fj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ia,primary:!1,trickModeVideo:null,
|
|
475
|
+
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=ud(v.mimeType,v.codecs);D=Ad(w);if(!D)throw new O(2,2,2014,d);h.i.textStreams.push(v);Fm(h);return z.return(pe(v))}})};
|
|
476
|
+
q.ag=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=ym&&d.l!=Im)throw new O(1,7,7004);if(c){k.D(2);break}return A(k,Wm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return A(k,Xm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.yf();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return A(k,new Promise(function(l,m){d.C.ya(f,"load",l);d.C.ya(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return k.return(h);
|
|
477
|
+
case 5:throw new O(1,2,2012);}})};function Wm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=eh(b);if(d=$m[c])return e.return(d);F(e,2);return A(e,gh(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:I(e);case 3:if(d)return e.return(d);throw new O(1,2,2011,c);}})}
|
|
478
|
+
function Xm(a,b,c,d,e,f,g){var h,k,l,m;return K(function(p){if(1==p.g)return"text/vtt"!=e||g.length?A(p,Ym(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=Zm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ki(l),e="text/vtt");m=document.createElement("track");var n=a.T,t=b;try{if(n.g.enabled){var y=jl(n);y.ot=pl;y.su=!0;var x=ll(y);var v=ml(t,x)}else v=t}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),v=t}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
479
|
+
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function Ym(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=vf;f=pf([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&hl(k,f,{ot:pl,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return A(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
480
|
+
function Zm(a,b,c,d){var e=Bd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Dc(b),b=c.parseMedia(b,a),Wk(b,d);throw new O(2,2,2014,c);}q.Le=function(a,b){this.Lc.width=a;this.Lc.height=b};q.Be=function(a){if(this.l==ym){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Mc||d.Ja||d.fb||(d.Mc=!1,dk(b,d,a));b=!0}}else b=!1;return b};
|
|
481
481
|
q.Eg=function(){Ua("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Fg=function(){return this.Fd};
|
|
482
482
|
function Jl(a){var b=yl();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Be(d))}};b.textDisplayFactory=function(){return a.td?new Ok(a.g,a.td):new Ik(a.g)};return b}q.Qe=function(a){this.td=a};
|
|
483
483
|
function lm(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Gj;h={id:a.Xf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
484
|
-
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function km(a,b){return K(function(c){if(1==c.g)return A(c,
|
|
485
|
-
function
|
|
486
|
-
function
|
|
484
|
+
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function km(a,b){return K(function(c){if(1==c.g)return A(c,an(a,b),2);Pm(a,b);B(c)})}
|
|
485
|
+
function an(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,A(d,ae(c,b),2);Em(b);B(d)})}
|
|
486
|
+
function Pm(a,b){if(a.l!=Yl){$d(b.variants,a.h.restrictions,a.Lc)&&a.j&&Fm(a);var c=a.m?a.m.g:null;if(c&&a.m.C)for(var d=r(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=r(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,Gg(a.m,g.initDataType,g.initData)}}bn(a,b)}}
|
|
487
487
|
function Am(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return K(function(t){if(1==t.g)return k?A(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.cc(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},A(h,e(c,b),2);if(3!=h.g)return f=h.h,A(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
|
|
488
488
|
function gm(a){var b=a.Pc();if(a.s&&a.N&&a.F){var c=a.I;c.j=b;Ij(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);qm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Wl("buffering",b))}function rm(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=Wl("ratechange"),a.dispatchEvent(b))}function qm(a){if(a.s&&a.N){var b=a.s.g;a.N.g==Ve?Cl(b,"buffering"):a.g.paused?Cl(b,"paused"):a.g.ended?Cl(b,"ended"):Cl(b,"playing")}}
|
|
489
|
-
function
|
|
490
|
-
function tm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&hk(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));hk(a.j,b,d,e,void 0,c);d=null;f&&(d=oe(f));b=oe(b);c?
|
|
491
|
-
function
|
|
492
|
-
function
|
|
493
|
-
function
|
|
494
|
-
function fm(a,b){if(a.l!=Yl)if(fn(a,b))b.handled=!0;else{var c=Wl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function jm(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(Wl(b,c))}
|
|
489
|
+
function Gm(a){try{bn(a,a.i)}catch(c){return fm(a,c),!1}var b=a.i.variants.filter(function(c){return we(c)});b=a.Ba.create(b);a.B.setVariants(Array.from(b.values()));return!0}function Xl(a){return Gm(a)?a.B.chooseVariant():null}function Qm(a){var b=Xl(a);b&&tm(a,b,!0,!0,0)}
|
|
490
|
+
function tm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&hk(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));hk(a.j,b,d,e,void 0,c);d=null;f&&(d=oe(f));b=oe(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),c=Wl("adaptation",c),cn(a,c)):dn(a,d,b)}}function Sm(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ve(c);b=ve(b);dn(a,c,b)}
|
|
491
|
+
function Bm(a,b,c){a=Kb(a.h.preferredTextLanguage);b=Kb(b.language);c=Kb(c.language);return Jb(c,a)&&!Jb(b,c)}function Fm(a){var b=Wl("trackschanged");cn(a,b)}function dn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Wl("variantchanged",b);cn(a,b)}function Rm(a){var b=Wl("textchanged");cn(a,b)}function Cm(a){var b=Wl("texttrackvisibility");cn(a,b)}function Dm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);cn(a,Wl("abrstatuschanged",b))}
|
|
492
|
+
function en(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||a.l!=ym||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Sa().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);$d(d.variants,a.h.restrictions,a.Lc);b=Xl(a);if(!b)return!1;d=a.kb().video.reduce(function(g,h){return g+h.end-h.start},0);tm(a,b,!1,!0,d);a.Wf.S(c);return!0}
|
|
493
|
+
function fm(a,b){if(a.l!=Yl)if(en(a,b))b.handled=!0;else{var c=Wl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function jm(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(Wl(b,c))}
|
|
495
494
|
function em(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new O(2,3,3016,b,c,a.g.error.message)}
|
|
496
|
-
function om(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!
|
|
497
|
-
(e=!0)}}}if(!e||
|
|
498
|
-
function
|
|
499
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new O(2,4,4012,a);}function
|
|
500
|
-
function
|
|
495
|
+
function om(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!fn.includes(l)}h!=f.allowedByKeySystem&&
|
|
496
|
+
(e=!0)}}}if(!e||Gm(a))(b=a.j.l)&&!b.allowedByKeySystem&&Qm(a),e&&Fm(a)}}function pm(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=Wl("expirationupdated");a.dispatchEvent(b)}function sm(a,b,c){0<b&&(a.U()||a.Qf(b));b=a.getDuration();c<b&&(a.U()||a.Ua(c))}
|
|
497
|
+
function bn(a,b){a=a.m?a.m.pd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var p=a[c?"00":m];p?fn.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
498
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new O(2,4,4012,a);}function Em(a){if(!a.variants.some(we))throw new O(2,4,4032);}function cn(a,b){K(function(c){if(1==c.g)return A(c,Promise.resolve(),2);a.l!=Yl&&a.dispatchEvent(b);B(c)})}function Um(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Kb(c.language)):b.add("und");return b}
|
|
499
|
+
function Tm(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Kb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(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=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var p=null;c.has(l)&&c.get(l).has(m)&&(p=c.get(l).get(m));
|
|
501
500
|
h.push({language:l,role:m,label:p})}});return h}function $l(){return new O(2,7,7E3)}function Vl(a,b,c,d,e,f){return d==a&&e.O==f.O&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Ak(){return{O:null,mimeType:null,startTime:null,Jd:NaN,uri:null}}function am(a){return new Promise(function(b,c){a.Rb=function(){return c($l())};a.zd=function(){return b()};a.onError=function(d){return c(d)};a.Cd=function(){return c($l())}})}L("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.Qe;
|
|
502
501
|
T.prototype.getManifestParserFactory=T.prototype.Fg;T.prototype.getManifest=T.prototype.Eg;T.prototype.retryStreaming=T.prototype.Be;T.prototype.setMaxHardwareResolution=T.prototype.Le;T.prototype.addChaptersTrack=T.prototype.ag;T.prototype.addTextTrackAsync=T.prototype.cg;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.kb;T.prototype.getPresentationStartTimeAsDate=T.prototype.Af;T.prototype.getPlayheadTimeAsDate=T.prototype.Jg;
|
|
503
502
|
T.prototype.setTextTrackVisibility=T.prototype.Pe;T.prototype.getChapters=T.prototype.rg;T.prototype.getChaptersTracks=T.prototype.yf;T.prototype.isTextTrackVisible=T.prototype.Ob;T.prototype.selectVariantsByLabel=T.prototype.sh;T.prototype.selectTextLanguage=T.prototype.Fe;T.prototype.selectAudioLanguage=T.prototype.Id;T.prototype.getTextLanguages=T.prototype.Mg;T.prototype.getAudioLanguages=T.prototype.ng;T.prototype.getTextLanguagesAndRoles=T.prototype.Ng;
|
|
@@ -506,343 +505,343 @@ T.prototype.getExpiration=T.prototype.Hc;T.prototype.drmInfo=T.prototype.drmInfo
|
|
|
506
505
|
T.prototype.getLoadMode=T.prototype.ie;T.prototype.resetConfiguration=T.prototype.ph;T.prototype.getBufferFullness=T.prototype.pg;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.Fh;T.prototype.unload=T.prototype.Xe;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.Cc;
|
|
507
506
|
T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?A(h,Xg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Nc()){for(var l in dh)k[l]=!0;for(var m in fh)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=Nc()?!!dh[p]:Oc(p);for(var n in l)k[n]=
|
|
508
507
|
Nc()?!!fh[n]:Oc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ja(gj));
|
|
509
|
-
k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Nc()?Ad(l)?!0:MediaSource.isTypeSupported(l)||pd(l):Oc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=
|
|
510
|
-
var
|
|
511
|
-
var
|
|
512
|
-
ssa:"text/x-ssa",ass:"text/x-ssa"};function
|
|
508
|
+
k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Nc()?Ad(l)?!0:MediaSource.isTypeSupported(l)||pd(l):Oc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=gn;for(g in f)e[g]=f[g]();return h.return(e)})};T.isBrowserSupported=Zl;T.setAdManagerFactory=function(a){Ll=a};T.registerSupportPlugin=function(a,b){gn[a]=b};T.prototype.destroy=T.prototype.destroy;var Yl=0,Il=1,ym=2,Im=3;T.LoadMode={DESTROYED:Yl,NOT_LOADED:Il,MEDIA_SOURCE:ym,SRC_EQUALS:Im};T.version="v4.2.13";
|
|
509
|
+
var hn=["4","2"];He=new function(a){this.g=a;this.i=Ie;this.h=Je}(new Fe(Number(hn[0]),Number(hn[1])));
|
|
510
|
+
var fn=["output-restricted","internal-error"],gn={},Ll=null,dm={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},$m={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
511
|
+
ssa:"text/x-ssa",ass:"text/x-ssa"};function jn(){this.h=[];this.j=this.i=this.g=0};function kn(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new yf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=kn.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
513
512
|
q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
|
|
514
513
|
q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
515
|
-
q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};L("shaka.ads.ClientSideAd",
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
function(f){
|
|
519
|
-
function
|
|
520
|
-
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,
|
|
521
|
-
null)}}function
|
|
522
|
-
function
|
|
523
|
-
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
514
|
+
q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};L("shaka.ads.ClientSideAd",kn);kn.prototype.release=kn.prototype.release;kn.prototype.getPositionInSequence=kn.prototype.getPositionInSequence;kn.prototype.getSequenceLength=kn.prototype.getSequenceLength;kn.prototype.setMuted=kn.prototype.setMuted;kn.prototype.resize=kn.prototype.resize;kn.prototype.isLinear=kn.prototype.isLinear;kn.prototype.isMuted=kn.prototype.isMuted;
|
|
515
|
+
kn.prototype.setVolume=kn.prototype.setVolume;kn.prototype.getVolume=kn.prototype.getVolume;kn.prototype.play=kn.prototype.play;kn.prototype.pause=kn.prototype.pause;kn.prototype.skip=kn.prototype.skip;kn.prototype.canSkipNow=kn.prototype.canSkipNow;kn.prototype.getTimeUntilSkippable=kn.prototype.getTimeUntilSkippable;kn.prototype.isSkippable=kn.prototype.isSkippable;kn.prototype.isPaused=kn.prototype.isPaused;kn.prototype.getRemainingTime=kn.prototype.getRemainingTime;
|
|
516
|
+
kn.prototype.getMinSuggestedDuration=kn.prototype.getMinSuggestedDuration;kn.prototype.getDuration=kn.prototype.getDuration;function ln(a,b,c,d){var e=this;this.s=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new yf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.2.13");this.g=null;this.h.ya(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){mn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
517
|
+
function(f){nn(e,f)});this.h.o(this.i,"ended",function(){e.m.contentComplete()})}ln.prototype.stop=function(){this.g&&this.g.stop();this.s&&Nk(this.s)};ln.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function nn(a,b){b.getError();on(a,null);a.l(new N("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
518
|
+
function mn(a,b){a.l(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new N("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new N("ad-cue-points-changed",(new Map).set("cuepoints",b)))}pn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,qn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
|
|
519
|
+
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,qn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,qn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,qn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.h.ya(a.i,"play",function(){a.g.start()})}catch(e){on(a,
|
|
520
|
+
null)}}function qn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
521
|
+
function pn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new N(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){nn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){rn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){rn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
522
|
+
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){on(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){on(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
524
523
|
a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.o(a.g,
|
|
525
524
|
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,google.ima.AdEvent.Type.AD_METADATA,
|
|
526
525
|
function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
527
|
-
function
|
|
526
|
+
function rn(a,b){var c=b.getAd();a.j=new kn(c,a.g,a.i);b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new N("ad-started",b));a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))}function on(a,b){a.l(new N("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.i.ended||a.i.play())};function sn(a,b){this.i=a;this.h=null;this.g=b}q=sn.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
528
527
|
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
529
|
-
q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};L("shaka.ads.ServerSideAd",
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new
|
|
528
|
+
q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};L("shaka.ads.ServerSideAd",sn);sn.prototype.release=sn.prototype.release;sn.prototype.getPositionInSequence=sn.prototype.getPositionInSequence;sn.prototype.getSequenceLength=sn.prototype.getSequenceLength;sn.prototype.setMuted=sn.prototype.setMuted;
|
|
529
|
+
sn.prototype.resize=sn.prototype.resize;sn.prototype.isLinear=sn.prototype.isLinear;sn.prototype.isMuted=sn.prototype.isMuted;sn.prototype.setVolume=sn.prototype.setVolume;sn.prototype.getVolume=sn.prototype.getVolume;sn.prototype.play=sn.prototype.play;sn.prototype.pause=sn.prototype.pause;sn.prototype.skip=sn.prototype.skip;sn.prototype.canSkipNow=sn.prototype.canSkipNow;sn.prototype.getTimeUntilSkippable=sn.prototype.getTimeUntilSkippable;sn.prototype.isSkippable=sn.prototype.isSkippable;
|
|
530
|
+
sn.prototype.isPaused=sn.prototype.isPaused;sn.prototype.getRemainingTime=sn.prototype.getRemainingTime;sn.prototype.getMinSuggestedDuration=sn.prototype.getMinSuggestedDuration;sn.prototype.getDuration=sn.prototype.getDuration;function tn(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.s=null;this.F="";this.G=[];this.h=new yf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new N("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){un(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
|
|
531
|
+
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new sn(f,e.l);e.C&&(e.m.h=e.C);e.i(new N("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
|
|
533
532
|
var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new N("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new N("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new N("ad-third-quartile"))});
|
|
534
533
|
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new N("ad-complete"));e.i(new N("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new N("ad-skipped"));e.i(new N("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
|
|
535
|
-
f;e.i(new N("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}
|
|
536
|
-
function
|
|
537
|
-
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new N("ad-stopped"));this.h=new
|
|
538
|
-
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new
|
|
539
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.2.
|
|
540
|
-
(c.H=!0),c.j=new Kc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.2.
|
|
534
|
+
f;e.i(new N("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}tn.prototype.stop=function(){this.F="";this.s=null;this.G=[]};tn.prototype.release=function(){this.stop();this.h&&this.h.release()};tn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
|
|
535
|
+
function un(a,b){a.i(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function U(){db.call(this);this.g=this.i=null;this.h=new jn;this.j=navigator.language}u(U,db);q=U.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.i&&this.i.release();this.i=new ln(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
536
|
+
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new N("ad-stopped"));this.h=new jn};q.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
|
|
537
|
+
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new tn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
538
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.2.13";c=this.g;c.j?a=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
539
|
+
(c.H=!0),c.j=new Kc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.2.13";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.G};
|
|
541
540
|
q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};L("shaka.ads.AdManager",U);
|
|
542
541
|
U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
|
|
543
542
|
U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";
|
|
544
543
|
U.AD_VOLUME_CHANGED="ad-volume-changed";U.AD_MUTED="ad-muted";U.AD_PAUSED="ad-paused";U.AD_RESUMED="ad-resumed";U.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";U.CUEPOINTS_CHANGED="ad-cue-points-changed";U.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";U.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";U.AD_CLICKED="ad-clicked";U.AD_PROGRESS="ad-progress";U.AD_BUFFERING="ad-buffering";U.AD_IMPRESSION="ad-impression";U.AD_DURATION_CHANGED="ad-duration-changed";U.AD_CLOSED="ad-closed";
|
|
545
|
-
U.AD_LOADED="ad-loaded";U.ALL_ADS_COMPLETED="all-ads-completed";U.AD_LINEAR_CHANGED="ad-linear-changed";U.AD_METADATA="ad-metadata";U.AD_RECOVERABLE_ERROR="ad-recoverable-error";U.AD_BREAK_READY="ad-break-ready";U.AD_INTERACTION="ad-interaction";Ll=function(){return new U};function
|
|
544
|
+
U.AD_LOADED="ad-loaded";U.ALL_ADS_COMPLETED="all-ads-completed";U.AD_LINEAR_CHANGED="ad-linear-changed";U.AD_METADATA="ad-metadata";U.AD_RECOVERABLE_ERROR="ad-recoverable-error";U.AD_BREAK_READY="ad-break-ready";U.AD_INTERACTION="ad-interaction";Ll=function(){return new U};function vn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof N){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
|
|
546
545
|
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(Fi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
|
|
547
|
-
function
|
|
548
|
-
function
|
|
549
|
-
var
|
|
550
|
-
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},
|
|
551
|
-
|
|
552
|
-
n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;
|
|
553
|
-
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Aa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.P,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(
|
|
554
|
-
|
|
555
|
-
function
|
|
556
|
-
q.get=function(a,b){var c=this;if("video"==a){if(
|
|
557
|
-
q.set=function(a,b,c){this.g[a][b]=c;
|
|
558
|
-
q.Kf=function(a,b){
|
|
559
|
-
function
|
|
560
|
-
function
|
|
561
|
-
q.destroy=function(a){a&&this.g.ac();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.B=this.l=this.i=null;db.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.dc=function(){return this.B};q.kf=function(){return this.g.m&&
|
|
562
|
-
q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=
|
|
563
|
-
q.pf=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.ac();return A(d,c.g.destroy(),2)}c.g=null;c.g=new
|
|
564
|
-
function
|
|
565
|
-
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
566
|
-
function
|
|
567
|
-
function
|
|
568
|
-
function
|
|
569
|
-
function
|
|
546
|
+
function wn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=xn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
547
|
+
function xn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
548
|
+
var yn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),zn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),An=["loop","playbackRate"],Bn=["pause","play"],Cn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
549
|
+
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Dn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},En={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Fn=[["getConfiguration","configure"]],Gn=[["isTextTrackVisible","setTextTrackVisibility"]],Hn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
550
|
+
In=["attach","detach","load","unload"];function Jn(a,b,c,d,e,f,g){var h=this;this.I=a;this.P=g;this.j=new P(b);this.T=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.s=null;this.F=function(){return Kn(h)};this.G=function(k,l){k=wn(l);switch(k.type){case "event":var m=k.targetName,p=Qa(k.event);h.B(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.C&&(h.T(),h.C=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new O(n.severity,n.category,
|
|
551
|
+
n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;Ln.add(this)}q=Jn.prototype;q.destroy=function(){Ln.delete(this);Mn(this);Nn&&On(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.ra=function(){return this.h};q.Gd=function(){return this.N};
|
|
552
|
+
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Aa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.P,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Ln),d=c.next();!d.done;d=c.next())Pn(d.value,b)},function(b){for(var c=r(Ln),d=c.next();!d.done;d=c.next())d=d.value,Qn="available"==b,d.j.Aa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Qn&&this.j.S(Rn);(a=Nn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
553
|
+
Pn(this,a):Nn=null}else window.__onGCastApiAvailable!==Sn&&(Tn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Sn)};q.Ie=function(a){this.s=a;this.h&&Un(this,{type:"appData",appData:this.s})};q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new O(1,8,8E3);if(!Qn)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Kc;chrome.cast.requestSession(function(d){return Vn(b,a,d)},function(d){return Wn(b,d)});return A(c,b.l,0)})};
|
|
554
|
+
function Xn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Vn(a,b,c)},function(c){return Wn(a,c)})}}q.ac=function(){if(this.h){Mn(this);if(Nn){On(this);try{Nn.stop(function(){},function(){})}catch(a){}Nn=null}Kn(this)}};
|
|
555
|
+
q.get=function(a,b){var c=this;if("video"==a){if(Bn.includes(b))return function(){return c.Kf.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))}}else if("player"==a){if(En[b]&&!this.get("player","isLive")())return function(){};if(Hn.includes(b))return function(){return c.Kf.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))};if(In.includes(b))return function(){return c.mh.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))};if(Cn[b]||Dn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
556
|
+
q.set=function(a,b,c){this.g[a][b]=c;Un(this,{type:"set",targetName:a,property:b,value:c})};function Vn(a,b,c){Nn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Kn(a);Un(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}function Wn(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))}
|
|
557
|
+
q.Kf=function(a,b){Un(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.mh=function(a,b){var c=Fa.apply(2,arguments),d=new Kc,e=this.J.toString();this.J++;this.i[e]=d;try{Un(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Pn(a,b){var c=a.K();a.l=new Kc;a.C=!0;Vn(a,c,b)}function On(a){var b=Nn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
558
|
+
function Kn(a){var b=Nn?"connected"==Nn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Mn(a)}a.h=b;a.N=b?Nn.receiver.friendlyName:"";a.j.Aa()}function Mn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function Un(a,b){b=vn(b);var c=Nn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new O(2,8,8005,d),c=new N("error",(new Map).set("detail",b)),a.B("player",c),a.ac(),b;}}var Rn=.02,Qn=!1,Nn=null,Tn=null,Ln=new Set;
|
|
559
|
+
function Sn(a){Tn?window.__onGCastApiAvailable=Tn:delete window.__onGCastApiAvailable;Tn=null;if(a)for(var b=r(Ln),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Yn(a,b,c,d){d=void 0===d?!1:d;db.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.B=this.l=null;this.G=c;this.F=d;this.C=new Map;this.g=new Jn(c,function(){return Zn(e)},function(){return $n(e)},function(f,g){return ao(e,f,g)},function(){return bo(e)},function(){return co(e)},d);eo(this)}u(Yn,db);q=Yn.prototype;
|
|
560
|
+
q.destroy=function(a){a&&this.g.ac();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.B=this.l=this.i=null;db.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.dc=function(){return this.B};q.kf=function(){return this.g.m&&Qn};q.ra=function(){return this.g.ra()};q.Gd=function(){return this.g.Gd()};
|
|
561
|
+
q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=co(a),A(c,a.g.cast(b),2)):a.h?A(c,a.h.Xe(),0):c.return()})};q.Ie=function(a){this.g.Ie(a)};q.Sf=function(){Xn(this.g)};q.ac=function(){this.g.ac()};
|
|
562
|
+
q.pf=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.ac();return A(d,c.g.destroy(),2)}c.g=null;c.g=new Jn(a,function(){return Zn(c)},function(){return $n(c)},function(e,f){return ao(c,e,f)},function(){return bo(c)},function(){return co(c)},b);c.g.init();B(d)})};
|
|
563
|
+
function eo(a){a.g.init();a.m=new yf;for(var b=r(yn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.ra()||(f=Qa(f),a.j.dispatchEvent(f))});for(var d in Ra)a.m.o(a.h,Ra[d],function(f){a.g.ra()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.wc=e,Object.defineProperty(a.l,b.wc,{configurable:!1,enumerable:!0,get:function(f){return function(){return fo(a,f.wc)}}(b),set:function(f){return function(g){var h=f.wc;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={wc:b.wc};a.B={};go(a,
|
|
564
|
+
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return ho(a,f)}})});io(a);a.j=new db;a.j.wd=a.l;a.s=new db;a.s.wd=a.B}function io(a){var b=new Map;go(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
|
|
565
|
+
function go(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=r(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)}}
|
|
566
|
+
function co(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.ge(),startTime:null};a.i.pause();for(var c=r(An),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=r(Fn);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=r(Gn);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 Zn(a){var b=new N("caststatuschanged");a.dispatchEvent(b)}
|
|
567
|
+
function $n(a){var b=new N(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
568
|
+
function bo(a){for(var b=r(Fn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(An);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(An),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(Gn);for(k=
|
|
570
569
|
h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new N("error",h);a.h.dispatchEvent(h)})}
|
|
571
|
-
function
|
|
572
|
-
function
|
|
573
|
-
if("setVideoContainer"==b)return function(c){return a.h.Qe(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&(
|
|
574
|
-
function
|
|
575
|
-
|
|
570
|
+
function fo(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
571
|
+
function ho(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.nd()};
|
|
572
|
+
if("setVideoContainer"==b)return function(c){return a.h.Qe(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&(Cn[b]||Dn[b])||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
573
|
+
function ao(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}L("shaka.cast.CastProxy",Yn);Yn.prototype.changeReceiverId=Yn.prototype.pf;Yn.prototype.forceDisconnect=Yn.prototype.ac;Yn.prototype.suggestDisconnect=Yn.prototype.Sf;Yn.prototype.setAppData=Yn.prototype.Ie;Yn.prototype.cast=Yn.prototype.cast;Yn.prototype.receiverName=Yn.prototype.Gd;Yn.prototype.isCasting=Yn.prototype.ra;Yn.prototype.canCast=Yn.prototype.kf;Yn.prototype.getPlayer=Yn.prototype.dc;
|
|
574
|
+
Yn.prototype.getVideo=Yn.prototype.Bb;Yn.prototype.destroy=Yn.prototype.destroy;function jo(a,b,c,d){db.call(this);var e=this;this.g=a;this.h=b;this.j=new yf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new P(function(){ko(e)});lo(this)}u(jo,db);q=jo.prototype;q.isConnected=function(){return this.H};q.Vg=function(){return this.s};q.wh=function(a){this.i=a};q.ig=function(){this.i=null};
|
|
576
575
|
q.xh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.vh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.uh=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
577
576
|
q.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.s=!0,a.l=null,a.B=null,db.prototype.release.call(a),A(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();B(d)})};
|
|
578
|
-
function
|
|
579
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
580
|
-
!1;
|
|
581
|
-
function
|
|
582
|
-
function
|
|
583
|
-
a.g.autoplay=f;b.manifest&&(a.g.play(),
|
|
584
|
-
function
|
|
585
|
-
1);
|
|
586
|
-
function
|
|
587
|
-
"player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return
|
|
588
|
-
function
|
|
589
|
-
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||
|
|
590
|
-
function
|
|
591
|
-
L("shaka.cast.CastReceiver",
|
|
592
|
-
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{tf:g,cj:e,drmInfos:a,xf:!0}}function
|
|
593
|
-
function
|
|
594
|
-
function
|
|
595
|
-
function
|
|
596
|
-
226,251,75]),m=new Uint8Array([]);k=[{initData:Tf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Bb(g,f.init||a||h||k);if(g=
|
|
597
|
-
function
|
|
598
|
-
var
|
|
577
|
+
function lo(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return mo(a)};b.onSenderDisconnected=function(){return mo(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&no(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);no(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return oo(a,
|
|
578
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return po(a,e)};b.start();b=r(yn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return qo(a,"video",e)});for(var d in Ra)a.j.o(a.h,Ra[d],function(e){return qo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Le(3840,2160):a.h.Le(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.s=
|
|
579
|
+
!1;ro(a)});a.j.o(a.g,"playing",function(){a.s=!1;ro(a)});a.j.o(a.g,"pause",function(){ro(a)});a.j.o(a.h,"unloading",function(){a.s=!0;ro(a)});a.j.o(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.s=!0,ro(a))})).S(so)})}function mo(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;ro(a)}
|
|
580
|
+
function ro(a){var b;K(function(c){if(1==c.g)return A(c,Promise.resolve(),2);if(!a.h)return c.return();b=new N("caststatuschanged");a.dispatchEvent(b);to(a)||uo(a);B(c)})}
|
|
581
|
+
function vo(a,b,c){var d,e,f,g,h,k,l,m,p,n;K(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,F(t,5),A(t,a.h.load(b.manifest,b.startTime),7)):A(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=I(t),h=(new Map).set("detail",g),k=new N("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
|
|
582
|
+
a.g.autoplay=f;b.manifest&&(a.g.play(),uo(a));B(t)}})}function qo(a,b,c){a.h&&(ko(a),no(a,{type:"event",targetName:b,event:c},a.l))}
|
|
583
|
+
function ko(a){a.I.S(wo);for(var b={video:{},player:{}},c=r(zn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in En)0==a.m%En[e]&&(b.player[e]=a.h[e]());for(var f in Cn)0==a.m%Cn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;no(a,{type:"update",update:b},a.l);for(var g in Dn)0==a.m%Dn[g]&&(b={player:{}},b.player[g]=a.h[g](),no(a,{type:"update",update:b},a.l));a.F&&(a.m+=
|
|
584
|
+
1);to(a)}function to(a){return a.C&&(a.g.duration||a.h.U())?(xo(a),a.C=!1,!0):!1}function xo(a,b){var c={contentId:a.h.ge(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);uo(a,void 0===b?0:b,c)}
|
|
585
|
+
function po(a,b){var c=wn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;vo(a,c.initState,c.appData);ko(a);break;case "appData":a.G(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.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
586
|
+
"player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return yo(a,g,f,null)},function(h){return yo(a,g,f,h)})}}
|
|
587
|
+
function oo(a,b){var c=wn(b.data);switch(c.type){case "PLAY":a.g.play();uo(a);break;case "PAUSE":a.g.pause();uo(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(),uo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),uo(a));break;case "STOP":a.h.Xe().then(function(){a.h&&uo(a)});break;case "GET_STATUS":xo(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));
|
|
588
|
+
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||uo(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&xo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");no(a,{requestId:Number(c.requestId),type:h},a.B)});break;default:no(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
|
|
589
|
+
function yo(a,b,c,d){a.h&&no(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function no(a,b,c,d){a.H&&(a=vn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function uo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?zo:a.h.Pc()?Ao:a.g.paused?Bo:Co,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);no(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
|
|
590
|
+
L("shaka.cast.CastReceiver",jo);jo.prototype.destroy=jo.prototype.destroy;jo.prototype.setContentArtist=jo.prototype.uh;jo.prototype.setContentImage=jo.prototype.vh;jo.prototype.setContentTitle=jo.prototype.xh;jo.prototype.clearContentMetadata=jo.prototype.ig;jo.prototype.setContentMetadata=jo.prototype.wh;jo.prototype.isIdle=jo.prototype.Vg;jo.prototype.isConnected=jo.prototype.isConnected;var wo=.5,so=5,zo="IDLE",Co="PLAYING",Ao="BUFFERING",Bo="PAUSED";function Do(a,b,c){var d=Eo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g.delete(null);if(1<g.size)throw new O(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Ee?(e=h.init||e,!1):!0}),f.length&&(a=Fo(e,f,c,g),0==a.length&&(a=[Bb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Bb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
|
|
591
|
+
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{tf:g,cj:e,drmInfos:a,xf:!0}}function Go(a,b,c,d){var e=Do(a,c,d);if(b.xf){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.xf=!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.tf||b.tf}
|
|
592
|
+
function Ho(a){var b=0,c=Gc(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=Dc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
593
|
+
function Io(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Jo(a){a=Wf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=kd(a.textContent);a=Ho(a).filter(function(b){return b.type===Ko})[0];if(!a)return"";a=cd(a.value,!0);return(a=lg(a,"WRMHEADER"))?Io(a):""}
|
|
594
|
+
function Fo(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Ee];if(g){var h;if(h=Wf(f.node,"urn:microsoft:playready","pro")){h=kd(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Tf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Ee)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
|
|
595
|
+
226,251,75]),m=new Uint8Array([]);k=[{initData:Tf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Bb(g,f.init||a||h||k);if(g=Lo.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Eo(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Mo(c.value))&&b.push(c);return b}
|
|
596
|
+
function Mo(a){var b=a.getAttribute("schemeIdUri"),c=Zf(a,"urn:mpeg:cenc:2013","default_KID"),d=Xf(a,"urn:mpeg:cenc:2013","pssh").map(ag);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:kd(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,Ee:b,keyId:c,init:0<e.length?e:null}}
|
|
597
|
+
var Ko=1,Lo=(new Map).set("com.widevine.alpha",function(a){return(a=Wf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Jo).set("com.microsoft.playready.recommendation",Jo).set("com.microsoft.playready.software",Jo).set("com.microsoft.playready.hardware",Jo).set("org.w3.clearkey",function(a){return(a=Wf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function No(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
|
|
599
598
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
600
|
-
function
|
|
601
|
-
m)if(p){p=cg(p,"t",ig);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Dh:n}),n=k}b=h}return{timescale:d,za:c,rc:g,rb:e/d||0,Ye:e,timeline:b}}function
|
|
602
|
-
function
|
|
603
|
-
function
|
|
604
|
-
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return
|
|
605
|
-
function
|
|
606
|
-
function
|
|
607
|
-
function
|
|
608
|
-
d)}function
|
|
609
|
-
function
|
|
610
|
-
function
|
|
611
|
-
function
|
|
612
|
-
function
|
|
613
|
-
J=new
|
|
614
|
-
function
|
|
615
|
-
function
|
|
616
|
-
Infinity,b);f&&(f.segmentIndex=e);return{bc:function(){e&&0!=e.L.length||e.Sc(g);return Promise.resolve(e)}}}function
|
|
617
|
-
function
|
|
618
|
-
function
|
|
619
|
-
Infinity,n=!(a.xb&&a.Y.je);l?(n&&(new Dj(m)).yb(c,p,!0),l.lc(m,a.presentationTimeline.ob())):l=new Dj(m);a.presentationTimeline.mc(m);n&&l.yb(c,p);d&&a.xb&&(d.segmentIndex=l);return{bc:function(){l&&0!=l.L.length||l.Sc(m);return Promise.resolve(l)}}}function
|
|
620
|
-
function
|
|
621
|
-
function
|
|
599
|
+
function Oo(a,b){var c=Po(a,b,"timescale"),d=1;c&&(d=hg(c)||1);var e=Po(a,b,"duration");c=hg(e||"");"image"==a.M.contentType&&(c=jg(e||""));c&&(c/=d);var f=Po(a,b,"startNumber");e=Number(Po(a,b,"presentationTimeOffset"))||0;var g=ig(f||"");if(null==f||null==g)g=1;f=Qo(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.Y.duration||Infinity;f=Vf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=cg(m,"t",ig),t=cg(m,"d",ig);m=cg(m,"r",gg);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
|
|
600
|
+
m)if(p){p=cg(p,"t",ig);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Dh:n}),n=k}b=h}return{timescale:d,za:c,rc:g,rb:e/d||0,Ye:e,timeline:b}}function Po(a,b,c){return[b(a.M),b(a.wa),b(a.sa)].filter(zb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
601
|
+
function Qo(a,b,c){return[b(a.M),b(a.wa),b(a.sa)].filter(zb).map(function(d){return Uf(d,c)}).reduce(function(d,e){return d||e})}
|
|
602
|
+
function Ro(a,b,c,d,e,f){for(var g=Zf(a,"http://www.w3.org/1999/xlink","href"),h=Zf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return af(new O(2,4,4028));if("onLoad"!=h)return af(new O(2,4,4027));var m=Ab([d],[g]);return e.request(0,pf(m,b)).oa(function(p){p=ng(p.data,a.tagName);if(!p)return af(new O(2,4,4001,g));
|
|
603
|
+
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return So(a,b,c,m[0],e,f+1)})}
|
|
604
|
+
function So(a,b,c,d,e,f){f=void 0===f?0:f;if(Zf(a,"http://www.w3.org/1999/xlink","href")){var g=Ro(a,b,c,d,e,f);c&&(g=g.oa(void 0,function(){return So(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Zf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(So(k,b,c,d,e,f)));return ef(g).oa(function(){return a})};function To(a,b,c,d,e,f,g){var h,k=(new Jf).X("sidx",function(l){h=Uo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
|
|
605
|
+
function Uo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.qc(),m=g.reader.qc();g.reader.skip(2);var p=g.reader.ze();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.R(),t=(n&2147483648)>>>31;n&=2147483647;var y=g.reader.R();g.reader.skip(4);if(1==t)throw new O(2,3,3006);h.push(new yi(l/k+c,(l+y)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=y;a+=n}g.parser.stop();return h};function Vo(a){this.h=Gc(a);this.g=new Gf(this.h,0)}Vo.prototype.Ea=function(){return this.g.Ea()};
|
|
606
|
+
function Wo(a){var b=Xo(a);if(7<b.length)throw new O(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Xo(a);a:{d=r(Yo);for(var e=d.next();!e.done;e=d.next())if(Bc(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=Gc(a.h,a.g.qa(),b);a.g.skip(b);return new Zo(c,
|
|
607
|
+
d)}function Xo(a){var b=a.g.qa(),c=a.g.qb();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Dc(a.h,b,c)}var Yo=[[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 Zo(a,b){this.id=a;this.g=b}
|
|
608
|
+
function $o(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 ap(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Vo(a.g);for(var p=null,n=null;a.Ea();){var t=Wo(a);if(187==t.id){var y=bp(t);y&&(t=c*y.Eh,y=b+y.lh,null!=p&&m.push(new yi(p+g,t+g,l,n,y-1,f,g,h,k)),p=t,n=y)}}null!=p&&m.push(new yi(p+g,d+g,l,n,null,f,g,h,k));return m}
|
|
609
|
+
function bp(a){var b=new Vo(a.g);a=Wo(b);if(179!=a.id)throw new O(2,3,3013);a=$o(a);b=Wo(b);if(183!=b.id)throw new O(2,3,3012);b=new Vo(b.g);for(var c=0;b.Ea();){var d=Wo(b);if(241==d.id){c=$o(d);break}}return{Eh:a,lh:c}};function cp(a,b){b=Qo(a,b,"Initialization");if(!b)return null;var c=a.M.Pa,d=b.getAttribute("sourceURL");d&&(c=Ab(a.M.Pa,[d]));d=0;var e=null;if(b=cg(b,"range",fg))d=b.start,e=b.end;return new wi(function(){return c},d,e,dp(a))}
|
|
610
|
+
function ep(a,b){var c=Number(Po(a,fp,"presentationTimeOffset"))||0,d=Po(a,fp,"timescale"),e=1;d&&(e=hg(d)||1);var f=c/e||0,g=cp(a,fp);ip(a,g);var h=hf(a);return{bc:function(){var k=Qo(h,fp,"RepresentationIndex"),l=h.M.Pa;k&&(k=k.getAttribute("sourceURL"))&&(l=Ab(h.M.Pa,[k]));k=jp(h);return kp(h,b,g,l,k.start,k.end,f)}}}
|
|
611
|
+
function kp(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,D,z,C,G;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.xb||!a.Y.je,l=a.Y.start,m=a.Y.duration,p=a.M.mimeType.split("/")[1],n=b,t=null,y=[n(d,e,f),"webm"==p?n(c.Ra(),c.Va,c.Da):null],n=null,A(E,Promise.all(y),2);x=E.h;v=x[0];w=x[1]||null;D=null;z=l-g;C=l;G=m?l+m:Infinity;if("mp4"==p)var H=To(v,e,d,c,z,C,G);else{H=new Vo(w);if(440786851!=Wo(H).id)throw new O(2,3,3008);var J=Wo(H);if(408125543!=J.id)throw new O(2,3,3009);H=J.g.byteOffset;
|
|
612
|
+
J=new Vo(J.g);for(var M=null;J.Ea();){var Q=Wo(J);if(357149030==Q.id){M=Q;break}}if(!M)throw new O(2,3,3010);M=new Vo(M.g);Q=1E6;for(J=null;M.Ea();){var V=Wo(M);if(2807729==V.id)Q=$o(V);else if(17545==V.id)if(4==V.g.byteLength)J=V.g.getFloat32(0);else if(8==V.g.byteLength)J=V.g.getFloat64(0);else throw new O(2,3,3003);}if(null==J)throw new O(2,3,3011);M=Q/1E9;J*=M;Q=Wo(new Vo(v));if(475249515!=Q.id)throw new O(2,3,3007);H=ap(Q,H,M,J,d,c,z,C,G)}D=H;h.mc(D);t=new Dj(D);k&&t.yb(C,G,!0);return E.return(t)})}
|
|
613
|
+
function fp(a){return a.Xc}function jp(a){var b=Qo(a,fp,"RepresentationIndex");a=Po(a,fp,"indexRange");a=fg(a||"");b&&(a=cg(b,"range",fg,a));return a}function ip(a,b){lp(a,b);if(!jp(a))throw new O(2,4,4002);}function lp(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=Gb&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
|
|
614
|
+
function dp(a){var b=a.M;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.xd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function mp(a,b){var c=cp(a,np),d=op(a);if(!d.za&&!d.timeline&&1<d.kc.length)throw new O(2,4,4002);if(!d.za&&!a.Y.duration&&!d.timeline&&1==d.kc.length)throw new O(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new O(2,4,4002);var e=null,f=null;a.sa.id&&a.M.id&&(f=b[a.sa.id+","+a.M.id])&&(e=f.segmentIndex);var g=pp(a.Y.start,a.Y.duration,a.M.Pa,d,c);b=!e;e?e.lc(g,a.presentationTimeline.ob()):e=new Dj(g);a.presentationTimeline.mc(g);a.xb&&a.Y.je||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
|
|
615
|
+
Infinity,b);f&&(f.segmentIndex=e);return{bc:function(){e&&0!=e.L.length||e.Sc(g);return Promise.resolve(e)}}}function np(a){return a.Db}function op(a){var b=qp(a);a=Oo(a,np);var c=a.rc;0==c&&(c=1);var d=0;a.za?d=a.za*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{za:a.za,startTime:d,rc:c,rb:a.rb,timeline:a.timeline,kc:b}}
|
|
616
|
+
function pp(a,b,c,d,e){var f=d.kc.length;d.timeline&&d.timeline.length!=d.kc.length&&(f=Math.min(d.timeline.length,d.kc.length));for(var g=a-d.rb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Td:m.Td},p++){var n=d.kc[p];m.Td=Ab(c,[n.bh]);var t=void 0;t=null!=d.za?l+d.za:d.timeline?d.timeline[p].end:l+b;k.push(new yi(a+l,a+t,function(y){return function(){return y.Td}}(m),n.start,n.end,e,g,a,h));l=t}return k}
|
|
617
|
+
function qp(a){return[a.M.Db,a.wa.Db,a.sa.Db].filter(zb).map(function(b){return Vf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ef&&(a.Ef=!0);var c=b.getAttribute("media");b=cg(b,"mediaRange",fg,{start:0,end:null});return{bh:c,start:b.start,end:b.end}})};function rp(a,b,c,d,e,f){var g=sp(a),h=tp(a);up(h);var k=hf(a);if(h.Oc)return lp(a,g),{bc:function(){var t=No(h.Oc,k.M.id,null,k.bandwidth||null,null);t=Ab(k.M.Pa,[t]);return kp(k,b,g,t,0,null,h.rb)}};if(h.za)return d||"image"===a.wa.contentType||(a.presentationTimeline.ue(h.za),a.presentationTimeline.ve(a.Y.start)),{bc:function(){return vp(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.M.id&&(d=a.sa.id+","+a.M.id,d=c[d])&&(l=d.segmentIndex);var m=wp(k,h,g);c=a.Y.start;var p=a.Y.duration?a.Y.start+a.Y.duration:
|
|
618
|
+
Infinity,n=!(a.xb&&a.Y.je);l?(n&&(new Dj(m)).yb(c,p,!0),l.lc(m,a.presentationTimeline.ob())):l=new Dj(m);a.presentationTimeline.mc(m);n&&l.yb(c,p);d&&a.xb&&(d.segmentIndex=l);return{bc:function(){l&&0!=l.L.length||l.Sc(m);return Promise.resolve(l)}}}function xp(a){return a.Yc}function tp(a){var b=Oo(a,xp),c=Po(a,xp,"media");a=Po(a,xp,"index");return{za:b.za,timescale:b.timescale,rc:b.rc,rb:b.rb,Ye:b.Ye,timeline:b.timeline,re:c,Oc:a}}
|
|
619
|
+
function up(a){var b=a.Oc?1:0;b+=a.timeline?1:0;b+=a.za?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Oc&&(a.timeline=null),a.za=null);if(!a.Oc&&!a.re)throw new O(2,4,4002);}
|
|
620
|
+
function vp(a,b,c,d,e){function f(M){var Q=(M-t)*n,V=Q+b.rb,aa=Q+l;Q=aa+n;var ea=Math.min(Q,h());aa=new yi(aa,ea,function(){var ma=No(x,w,M,v,V*y);return Ab(D,[ma])},0,null,d,z,l,h());aa.j=Q;return aa}function g(){var M=[Math.max(k.ob(),l),Math.min(k.Jb(),h())].map(function(Q){return Q-l});return[Math.ceil(M[0]/n),Math.ceil(M[1]/n)-1].map(function(Q){return Q+t})}function h(){var M=null!=m&&e[m]||p;return M?l+M:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,p=a.Y.duration,n=b.za,t=b.rc,
|
|
622
621
|
y=b.timescale,x=b.re,v=a.bandwidth||null,w=a.M.id,D=a.M.Pa,z=l-b.rb,C=g();a=a.xb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var G=a;G<=C;++G){var E=f(G);c.push(E)}var H=new Dj(c);c=k.Jb()<h();G=k.U();if(c||G){var J=Math.max(a,C+1);H.Kd(n,function(){var M=k.ob();H.Hb(M);var Q=r(g());Q.next();Q=Q.next().value;for(var V=[];J<=Q;){var aa=f(J);V.push(aa);J++}return M>h()&&!V.length?null:V})}return Promise.resolve(H)}
|
|
623
|
-
function
|
|
624
|
-
function
|
|
625
|
-
function
|
|
626
|
-
n=r(m);for(t=n.next();!t.done;t=n.next())y=t.value,y.push(
|
|
622
|
+
function wp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.rb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Sd:h.Sd,Wd:h.Wd,Zd:h.Zd,Pd:h.Pd,ae:h.ae,Qd:h.Qd},k++){var l=b.timeline[k],m=l.start,p=l.Dh;l=l.end;h.Zd=k+b.rc;h.ae=p+b.Ye;h.Wd=a.M.id;h.Pd=a.bandwidth||null;h.Sd=b.re;h.Qd=a.M.Pa;g.push(new yi(d+m,d+l,function(n){return function(){var t=No(n.Sd,n.Wd,n.Zd,n.Pd||null,n.ae);return Ab(n.Qd,[t]).map(function(y){return y.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
623
|
+
function sp(a){var b=Po(a,xp,"initialization");if(!b)return null;var c=a.M.id,d=a.bandwidth||null,e=a.M.Pa;return new wi(function(){var f=No(b,c,null,d,null);return Ab(e,[f])},0,null,dp(a))};function yp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}yp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
|
|
624
|
+
function zp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,C,G,E,H,J,M,Q,V,aa,ea,ma,Ca,Ia;return K(function(Ja){switch(Ja.g){case 1:d=Hb;Ap(b);Bp(b);Cp(b);Dp(b);if(!c&&1==b.length){e=b[0];a.g=e.jd;a.h=e.Md;a.j=e.textStreams;a.i=e.imageStreams;Ja.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ja.return();k=b.map(function(Na){return Na.jd});l=b.map(function(Na){return Na.Md});m=b.map(function(Na){return Na.textStreams});p=b.map(function(Na){return Na.imageStreams});
|
|
625
|
+
n=r(m);for(t=n.next();!t.done;t=n.next())y=t.value,y.push(Ep(d.ia));x=r(p);for(v=x.next();!v.done;v=x.next())w=v.value,w.push(Ep(d.Bc));return A(Ja,Fp(a.g,k,f,Gp,Hp),3);case 3:return A(Ja,Fp(a.h,l,f,Gp,Hp),4);case 4:return A(Ja,Fp(a.j,m,f,Gp,Hp),5);case 5:return A(Ja,Fp(a.i,p,f,Gp,Hp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(M=r(a.g),Q=M.next();!Q.done;Q=M.next())for(V=Q.value,aa=r(a.h),ea=aa.next();!ea.done;ea=aa.next())ma=ea.value,Ca=$g(V.drmInfos,ma.drmInfos),V.drmInfos.length&&ma.drmInfos.length&&
|
|
627
626
|
!Ca.length||(Ia=D++,z.push({id:Ia,language:V.language,primary:V.primary,audio:V,video:ma,bandwidth:(V.bandwidth||0)+(ma.bandwidth||0),drmInfos:Ca,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(C=a.h.concat(a.g),G=r(C),E=G.next();!E.done;E=G.next())H=E.value,J=D++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.La?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
628
|
-
a.l=z;B(Ja)}})}function
|
|
629
|
-
function
|
|
630
|
-
function
|
|
631
|
-
function
|
|
632
|
-
function
|
|
633
|
-
h.value,k.push(
|
|
627
|
+
a.l=z;B(Ja)}})}function Ap(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.jd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&cc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.jd=c}}
|
|
628
|
+
function Cp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&cc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
629
|
+
function Bp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Md),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&cc(e.roles,h.roles)&&Ff(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Md=c}}
|
|
630
|
+
function Dp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
|
|
631
|
+
function Ip(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,C,G,E,H,J,M,Q,V;return K(function(aa){switch(aa.g){case 1:b=Hb;if(1==a.length)return aa.return(a[0]);c=a.map(function(ea){return ea.filter(function(ma){return ma.type==b.Gb})});d=a.map(function(ea){return ea.filter(function(ma){return ma.type==b.La})});e=a.map(function(ea){return ea.filter(function(ma){return ma.type==b.ia})});f=a.map(function(ea){return ea.filter(function(ma){return ma.type==b.Bc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
|
|
632
|
+
h.value,k.push(Jp(b.ia));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(Jp(b.Bc));return A(aa,Fp([],c,0,Kp,Lp),2);case 2:return n=aa.h,A(aa,Fp([],d,0,Kp,Lp),3);case 3:return t=aa.h,A(aa,Fp([],e,0,Kp,Lp),4);case 4:return y=aa.h,A(aa,Fp([],f,0,Kp,Lp),5);case 5:x=aa.h;v=0;if(t.length&&n.length)for(G=r(n),E=G.next();!E.done;E=G.next())for(H=E.value,J=r(t),M=J.next();!M.done;M=J.next())Q=M.value,V=v++,Q.variantIds.push(V),H.variantIds.push(V);else for(w=t.concat(n),D=r(w),z=D.next();!z.done;z=
|
|
634
633
|
D.next())C=z.value,C.variantIds=[v++];return aa.return(t.concat(n).concat(y).concat(x))}})}
|
|
635
|
-
function
|
|
634
|
+
function Fp(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,C,G,E,H,J,M;return K(function(Q){switch(Q.g){case 1:f=Hb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){Q.D(4);break}m=l.value;return A(Q,Mp(m,b,c,e,g),5);case 5:p=Q.h;if(!p)throw new O(2,4,4037);l=k.next();Q.D(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(y=t.value,x=r(y),v=x.next();!v.done;v=x.next())w=v.value,(D=Np(w,b,d,e,g))&&a.push(D);z=r(g);for(t=z.next();!t.done;t=
|
|
636
635
|
z.next())for(C=t.value,G={},E=r(C),v=E.next();!v.done;G={vb:G.vb},v=E.next())if(G.vb=v.value,H=G.vb.type==f.ia&&!G.vb.language,J=G.vb.type==f.Bc&&!G.vb.tilesLayout,!H&&!J&&(M=a.some(function(V){return function(aa){return aa.mimeType==V.vb.mimeType&&wd(aa.codecs)==wd(V.vb.codecs)}}(G))))throw new O(2,4,4037);return Q.return(a)}})}
|
|
637
|
-
function
|
|
638
|
-
function
|
|
639
|
-
function
|
|
640
|
-
function
|
|
641
|
-
function
|
|
642
|
-
function
|
|
643
|
-
(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=
|
|
644
|
-
function
|
|
645
|
-
function
|
|
646
|
-
function
|
|
647
|
-
function
|
|
648
|
-
d=
|
|
649
|
-
function
|
|
650
|
-
function
|
|
651
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
652
|
-
function
|
|
653
|
-
function
|
|
654
|
-
q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.s.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return F(c,2),A(c,
|
|
655
|
-
function
|
|
656
|
-
function
|
|
657
|
-
function
|
|
636
|
+
function Mp(a,b,c,d,e){return K(function(f){if(1==f.g)return Op(b,a),a.matchedStreams?a.segmentIndex?A(f,Pp(a,c),2):f.D(2):f.return(!1);Qp(a,c,d,e);return f.return(!0)})}
|
|
637
|
+
function Pp(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return A(l,Promise.all(c),2)}if(a.segmentIndex instanceof Gj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.j.push(k.segmentIndex);B(l)})}
|
|
638
|
+
function Np(a,b,c,d,e){var f=c(a);Op(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Gj;return A(g,Pp(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;Qp(f,0,d,e);return f}function Qp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Qb(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
|
|
639
|
+
function Gp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
|
|
640
|
+
function Kp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
641
|
+
function Hp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ja(f),ja(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=$g(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new O(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
|
|
642
|
+
(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Gp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Hp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Hp(a.trickModeVideo,b)}
|
|
643
|
+
function Lp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ja(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
|
|
644
|
+
function Op(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Rp,video:Rp,text:Sp,image:Tp}[e.type],g={audio:Up,video:Vp,text:Wp,image:Xp}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function Rp(a,b){var c;!(c=b.mimeType!=a.mimeType||wd(b.codecs)!=wd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<$g(a,b).length:1));return c?!1:!0}
|
|
645
|
+
function Sp(a,b){return a.language?b.language?0==Qb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Tp(a){return a.tilesLayout?!0:!1}
|
|
646
|
+
function Up(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
|
|
647
|
+
d=Yp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Zp)return!0;if(d==$p)return!1;d=Yp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Zp?!0:d==$p?!1:a.bandwidth&&aq(a.bandwidth,b.bandwidth,c.bandwidth)==Zp?!0:!1}
|
|
648
|
+
function Vp(a,b,c){if(a.id==c.id)return!0;var d=Yp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Zp)return!0;if(d==$p)return!1;if(a.frameRate){d=Yp(a.frameRate,b.frameRate,c.frameRate);if(d==Zp)return!0;if(d==$p)return!1}return a.bandwidth&&aq(a.bandwidth,b.bandwidth,c.bandwidth)==Zp?!0:!1}
|
|
649
|
+
function Wp(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
|
|
650
|
+
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Xp(a,b,c){return a.id==c.id?!0:Yp(a.width*a.height,b.width*b.height,c.width*c.height)==Zp?!0:!1}function Jp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
651
|
+
function Ep(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
652
|
+
function Yp(a,b,c){if(b==a&&a!=c)return $p;if(c==a&&a!=b)return Zp;if(b>a){if(c<=a||c-a<b-a)return Zp;if(c-a>b-a)return $p}else{if(c>a)return $p;if(a-c<a-b)return Zp;if(a-c>a-b)return $p}return bq}function aq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Zp:b<a?$p:bq}var Zp=1,bq=0,$p=-1;function cq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new yp;this.H=0;this.J=new Yb(5);this.G=new P(function(){dq(a)});this.s=new jf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=cq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,A(e,eq(c),2);d=e.h;c.h&&fq(c,d);if(!c.h)throw new O(2,7,7001);return e.return(c.i)})};
|
|
653
|
+
q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.s.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return F(c,2),A(c,eq(a),4);if(2!=c.g)return va(c,0);b=I(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
|
|
654
|
+
function eq(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=pf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),kf(a.s,e),A(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return A(k,gq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
|
|
655
|
+
function gq(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=ng(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(hq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=So(d,a.g.retryParameters,f,c,a.h.networkingEngine);kf(a.s,g);return A(k,g.promise,2)}h=k.h;return k.return(hq(a,h,c))})}
|
|
656
|
+
function hq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,C,G,E,H,J,M,Q,V,aa,ea,ma,Ca,Ia,Ja,Na;return K(function(Oa){switch(Oa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Vf(b,"Location").map(ag).filter(zb);0<f.length&&(g=Ab(e,f),e=a.m=g);h=Vf(b,"BaseURL");k=h.map(ag);l=Ab(e,k);m=0;h&&h.length&&(m=cg(h[0],"availabilityTimeOffset",jg)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=cg(b,"minBufferTime",eg)||0);a.H=cg(b,"minimumUpdatePeriod",eg,-1);t=cg(b,"availabilityStartTime",dg);y=cg(b,
|
|
658
657
|
"timeShiftBufferDepth",eg);x=a.g.dash.ignoreSuggestedPresentationDelay;v=null;x||(v=cg(b,"suggestedPresentationDelay",eg));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=cg(b,"maxSegmentDuration",eg));z=b.getAttribute("type")||"static";if(a.i)for(C=a.i.presentationTimeline,G=r(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.Hb(C.ob());else J=a.g.defaultPresentationDelay||1.5*n,M=null!=v?v:J,C=new R(t,M,a.g.dash.autoCorrectDrift);C.Zc("static"==z);(Q=C.U())&&
|
|
659
|
-
!isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);C.Oe(y);V=b.getAttribute("profiles")||"";aa={xb:"static"!=z,presentationTimeline:C,sa:null,Y:null,wa:null,M:null,bandwidth:0,Ef:!1,$b:m,profiles:V.split(",")};ea=
|
|
660
|
-
C.ue(D||1);return A(Oa,
|
|
661
|
-
function
|
|
658
|
+
!isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);C.Oe(y);V=b.getAttribute("profiles")||"";aa={xb:"static"!=z,presentationTimeline:C,sa:null,Y:null,wa:null,M:null,bandwidth:0,Ef:!1,$b:m,profiles:V.split(",")};ea=iq(a,aa,l,b);ma=ea.duration;Ca=ea.periods;"static"!=z&&ea.vf||C.Ua(ma||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?C.Mf(a.C):a.C&&Ua("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
659
|
+
C.ue(D||1);return A(Oa,zp(a.j,Ca,aa.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Oa.D(3);break}a.i={presentationTimeline:C,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!C.Uf()){Oa.D(4);break}Ja=Vf(b,"UTCTiming");return A(Oa,jq(a,l,Ja),5);case 5:Na=Oa.h;if(!a.h)return Oa.return();C.Nf(Na);case 4:C.pe();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),B(Oa)}})}
|
|
660
|
+
function iq(a,b,c,d){var e=cg(d,"mediaPresentationDuration",eg),f=[],g=0;d=Vf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=cg(k,"start",eg,g),p=k.id,n=cg(k,"duration",eg),t=null;if(l){var y=cg(l,"start",eg);null!=y&&(t=y-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=kq(a,b,c,{start:m,duration:t,node:k,je:null==t||!l});f.push(g);b.sa.id&&t&&(a.N[b.sa.id]=t);if(null==t){g=
|
|
662
661
|
null;break}g=m+t}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,vf:!1}:{periods:f,duration:g,vf:!0}}
|
|
663
|
-
function
|
|
664
|
-
}d=c.filter(function(m){return!m.Ue});c=c.filter(function(m){return m.Ue});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ue.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={fd:h.fd},l=k.next())h.fd=l.value,h.fd.trickModeVideo=e.streams.find(function(m){return function(p){return wd(m.fd.codecs)==wd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:
|
|
665
|
-
[]:
|
|
666
|
-
function
|
|
667
|
-
function
|
|
662
|
+
function kq(a,b,c,d){b.sa=lq(d.node,null,c);b.Y=d;b.sa.$b=b.$b;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=Vf(d.node,"EventStream");c=b.presentationTimeline.ob();e=r(e);for(var f=e.next();!f.done;f=e.next())mq(a,d.start,d.duration,f.value,c);c=Vf(d.node,"AdaptationSet").map(function(m){return nq(a,b,m)}).filter(zb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.oh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018);
|
|
663
|
+
}d=c.filter(function(m){return!m.Ue});c=c.filter(function(m){return m.Ue});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ue.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={fd:h.fd},l=k.next())h.fd=l.value,h.fd.trickModeVideo=e.streams.find(function(m){return function(p){return wd(m.fd.codecs)==wd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:oq(d,"audio");g=a.g.disableVideo?[]:oq(d,"video");f=a.g.disableText?
|
|
664
|
+
[]:oq(d,Gb);c=a.g.disableThumbnails?[]:oq(d,"image");if(!g.length&&!e.length)throw new O(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.sa.id,jd:d,Md:e,textStreams:g,imageStreams:f}}
|
|
665
|
+
function oq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
666
|
+
function nq(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.wa=lq(c,b.sa,null);var e=!1,f=Vf(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(zb),h=void 0,k=b.wa.contentType==Gb;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
668
667
|
l}}var p;m=Vf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=t&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=t&&(l=!0)}m=Vf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
|
|
669
668
|
n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),10)));m=Vf(c,"Accessibility");var y=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var x=r(t),v=x.next();!v.done;v=x.next()){var w=v.value,D=v=void 0;w.includes("=")?(w=w.split("="),v=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(v="CC"+n,2==t.length?n+=2:n++,D=w);y.set(v,Kb(D))}}else y.set("CC1",
|
|
670
|
-
"und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=1,null!=t)for(t=r(t.split(";")),v=t.next();!v.done;v=t.next())v=v.value,w=x=void 0,v.includes("=")?(v=v.split("="),x="svc"+v[0],w=v[1].split(",")[0].split(":").pop()):(x="svc"+n,n++,w=v),y.set(x,Kb(w));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Vf(c,"ContentProtection");var z=
|
|
671
|
-
G=c.getAttribute("label");(l=Vf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(G=l.textContent));l=Vf(c,"Representation");c=l.map(function(E){if(E=
|
|
669
|
+
"und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=1,null!=t)for(t=r(t.split(";")),v=t.next();!v.done;v=t.next())v=v.value,w=x=void 0,v.includes("=")?(v=v.split("="),x="svc"+v[0],w=v[1].split(",")[0].split(":").pop()):(x="svc"+n,n++,w=v),y.set(x,Kb(w));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Vf(c,"ContentProtection");var z=Do(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),C=Kb(c.getAttribute("lang")||"und"),
|
|
670
|
+
G=c.getAttribute("label");(l=Vf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(G=l.textContent));l=Vf(c,"Representation");c=l.map(function(E){if(E=pq(a,b,z,h,C,G,e,g,y,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.wa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.wa.contentType||"application"==b.wa.contentType)for(b.wa.contentType=qq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=
|
|
672
671
|
b.wa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ja(t.keyIds),ja(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(zb);return{id:b.wa.id||"__fake__"+a.I++,contentType:b.wa.contentType,language:C,dj:e,streams:c,drmInfos:z.drmInfos,Ue:f,oh:k}}
|
|
673
|
-
function
|
|
674
|
-
throw E;}t=Vf(l,"ContentProtection");t=
|
|
672
|
+
function pq(a,b,c,d,e,f,g,h,k,l){b.M=lq(l,b.wa,null);a.C=Math.min(a.C,b.M.$b);if(!rq(b.M))return null;var m=b.Y.start;b.bandwidth=cg(l,"bandwidth",hg)||0;var p=b.M.contentType,n=p==Gb||"application"==p;p="image"==p;try{var t=function(E,H,J){return sq(a,E,H,J)};if(b.M.Xc)var y=ep(b,t);else if(b.M.Db)y=mp(b,a.l);else if(b.M.Yc)y=rp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var x=b.M.Pa,v=b.Y.duration||0;y={bc:function(){return Promise.resolve(Fj(m,v,x))}}}}catch(E){if((n||p)&&4002==E.code)return null;
|
|
673
|
+
throw E;}t=Vf(l,"ContentProtection");t=Go(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Vf(l,"SupplementalProperty").some(function(E){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==E.getAttribute("schemeIdUri")&&"JOC"==E.getAttribute("value")})&&(w=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Vf(l,"EssentialProperty").find(function(E){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(E.getAttribute("schemeIdUri"))}))&&
|
|
675
674
|
(z=l.getAttribute("value")),!z))return null;var C;l=b.M.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(C="PQ");l=b.M.id?b.sa.id+","+b.M.id:"";var G=l&&a.l[l]?a.l[l]:{id:a.I++,originalId:b.M.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType,codecs:b.M.codecs,
|
|
676
675
|
frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.wa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.M.xd,audioSamplingRate:b.M.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:C,tilesLayout:z,matchedStreams:[]};G.createSegmentIndex=function(){var E;return K(function(H){if(1==
|
|
677
|
-
H.g){if(G.segmentIndex)return H.D(0);E=G;return A(H,y.bc(),3)}E.segmentIndex=H.h;B(H)})};l&&b.xb&&!a.l[l]&&(a.l[l]=G);return G}function
|
|
678
|
-
function
|
|
679
|
-
m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Vf(a,"AudioChannelConfiguration");m=
|
|
676
|
+
H.g){if(G.segmentIndex)return H.D(0);E=G;return A(H,y.bc(),3)}E.segmentIndex=H.h;B(H)})};l&&b.xb&&!a.l[l]&&(a.l[l]=G);return G}function dq(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,F(d,2),A(d,eq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=I(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();fq(a,b);B(d)}})}function fq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,Zb(a.J)))}
|
|
677
|
+
function lq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,xd:null,audioSamplingRate:null,$b:0};c=c||b.Pa;var d=Vf(a,"BaseURL"),e=d.map(ag),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=cg(a,"frameRate",kg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Vf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
|
|
678
|
+
m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Vf(a,"AudioChannelConfiguration");m=tq(m)||b.xd;n=cg(a,"audioSamplingRate",ig)||b.audioSamplingRate;f||(f=qq(g,h));var t=Uf(a,"SegmentBase"),y=Uf(a,"SegmentTemplate"),x=t?cg(t,"availabilityTimeOffset",jg)||0:0,v=y?cg(y,"availabilityTimeOffset",jg)||0:0;d=d&&d.length?cg(d[0],"availabilityTimeOffset",jg)||0:0;d=b.$b+d+x+v;return{Pa:Ab(c,e),Xc:t||b.Xc,Db:Uf(a,"SegmentList")||b.Db,Yc:y||b.Yc,width:cg(a,"width",ig)||b.width,height:cg(a,
|
|
680
679
|
"height",ig)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),xd:m,audioSamplingRate:n,$b:d}}
|
|
681
|
-
function
|
|
682
|
-
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function
|
|
683
|
-
function
|
|
684
|
-
function
|
|
685
|
-
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}p.D(9);break;case 7:return A(p,
|
|
680
|
+
function tq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
681
|
+
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function rq(a){var b=a.Xc?1:0;b+=a.Db?1:0;b+=a.Yc?1:0;if(0==b)return a.contentType==Gb||"application"==a.contentType?!0:!1;1!=b&&(a.Xc&&(a.Db=null),a.Yc=null);return!0}
|
|
682
|
+
function uq(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=Ab(b,[c]),f=pf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),kf(a.s,g),A(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=bd(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
|
|
683
|
+
function jq(a,b,c){var d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){p.D(4);break}h=g.value;F(p,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return p.D(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return p.D(8);
|
|
684
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}p.D(9);break;case 7:return A(p,uq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return A(p,uq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:va(p,
|
|
686
685
|
3);break;case 5:I(p);case 3:g=f.next();p.D(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p.return(0)}})}
|
|
687
|
-
function
|
|
688
|
-
function
|
|
689
|
-
|
|
690
|
-
function
|
|
691
|
-
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=
|
|
692
|
-
(h&&g.push(h),e.push(new
|
|
693
|
-
var
|
|
694
|
-
function
|
|
695
|
-
q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,
|
|
696
|
-
q.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.m==
|
|
697
|
-
function
|
|
686
|
+
function mq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=cg(d,"timescale",ig)||1;d=r(Vf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=cg(k,"presentationTime",ig)||0,m=cg(k,"duration",ig)||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.h.onTimelineRegionAdded(k))}}
|
|
687
|
+
function sq(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=vf,f=Vj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),kf(a.s,h),A(l,h.promise,2);k=l.h;return l.return(k.data)})}function qq(a,b){return Ad(ud(a,b))?Gb:a.split("/")[0]}L("shaka.dash.DashParser",cq);fh.mpd=function(){return new cq};dh["application/dash+xml"]=function(){return new cq};dh["video/vnd.mpeg.dash.mpd"]=function(){return new cq};function vq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function wq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}wq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
|
|
688
|
+
wq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function W(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function xq(a,b){a=a.getAttribute(b);if(!a)throw new O(2,4,4023,b);return a.value}function yq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function zq(a,b){this.name=a;this.value=b};function Aq(a,b){return a.filter(function(c){return c.name==b})}function Bq(a,b){return a.filter(function(c){return xq(c,"TYPE")==b})}function Cq(a,b){a=Aq(a,b);return a.length?a[0]:null}function Dq(a,b){var c=0;c=void 0===c?0:c;return(a=Cq(a,b))?Number(a.value):c}function Eq(a,b){return Ab([a],[b])[0]};function Fq(a){this.h=a;this.g=0}function Gq(a){Hq(a,/[ \t]+/gm)}function Hq(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 Iq(a){return a.g==a.h.length?null:(a=Hq(a,/[^ \t\n]*/gm))?a[0]:null};function Jq(){this.g=0}
|
|
689
|
+
function Kq(a,b,c){b=bd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new O(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Lq(a,g),--a.g,Mq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Lq(a,h);if(Nq.includes(h.name)){if(1!=b)throw new O(2,4,4017);
|
|
690
|
+
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Lq(a,m),Mq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==W(m,"TYPE")?null!=W(m,"BYTERANGE-START")?null!=W(m,"BYTERANGE-LENGTH")&&k.push(m):k.push(m):"MAP"==W(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Eq(d,m.trim()),h&&g.push(h),e.push(new yq(m,g,k)),g=[],k=[]);k.length&&
|
|
691
|
+
(h&&g.push(h),e.push(new yq("",g,k)));return new vq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new zq("URI",k)),e=!0)}}return new vq(c,b,f)}function Lq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new O(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Fq(d);var f;(f=Hq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Hq(d,g);)c.push(new zq(f[1],f[2]||f[3])),Gq(d)}return new wq(a,b,c,e)}
|
|
692
|
+
var Mq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Nq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Oq(){}function Pq(a){try{var b=Qq(a);return cf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return af(c)}}
|
|
693
|
+
function Qq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=kd(a):e=fd(a);return{data:e,contentType:c}}L("shaka.net.DataUriPlugin",Oq);Oq.parse=Pq;mf("data",Pq);function Rq(){var a=this;this.g=this.i=null;this.Ba=1;this.s=new Map;this.C=new Map;this.ua=new Set;this.h=new Map;this.j=null;this.N="";this.aa=new Jq;this.ha=0;this.T=!1;this.P=null;this.$=Infinity;this.F=new P(function(){Sq(a)});this.m=Tq;this.J=null;this.ba=0;this.H=Infinity;this.Z=this.ea=0;this.G=new jf;this.I=[];this.K=new Map;this.B=new Map;this.va=new Map;this.l=!1}q=Rq.prototype;q.configure=function(a){this.g=a};
|
|
694
|
+
q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,Uq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,A(f,Vq(c,d.data,a),3);e=c.ha;0<e&&c.F.S(e);return f.return(c.J)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.i=null;this.ua.clear();this.J=null;this.h.clear();this.C.clear();this.B.clear();this.s.clear();return Promise.all(a)};
|
|
695
|
+
q.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.m==Tq)return h.return();b=[];c=Array.from(a.h.values());return c.length?A(h,Wq(a,c[0]),2):h.D(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Wq(a,c[d]));return A(h,Promise.all(b),4)}Xq(a);e=c.some(function(k){return 0==k.Bf});e||(f=Yq,Zq(a,f.Zf),g=c.map(function(k){return k.Qc}),a.j.Ua(Math.min.apply(Math,ja(g))),a.i.updateDuration());B(h)})};
|
|
696
|
+
function Wq(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return K(function(y){if(1==y.g)return c=b.$f,d=new jb(c),a.l&&b.fg&&mb(d,new ob("_HLS_skip=YES")),A(y,Uq(a,d.toString()),2);e=y.h;f=Kq(a.aa,e.data,e.uri);if(1!=f.type)throw new O(2,4,4017);g=Aq(f.g,"EXT-X-DEFINE");h=$q(a,g);k=b.stream;l=ar(a,f,k.type,b.Rc,h);a.I.push(l);k.segmentIndex.lc(l,a.j.ob());l.length&&(m=Dq(f.g,"EXT-X-MEDIA-SEQUENCE"),p=b.Rc.get(m),k.segmentIndex.Hb(p));n=l[l.length-1];if(t=Cq(f.g,"EXT-X-ENDLIST"))b.Bf=!0,b.Qc=n.endTime;B(y)})}
|
|
698
697
|
q.onExpirationUpdated=function(){};
|
|
699
|
-
function
|
|
700
|
-
|
|
701
|
-
function
|
|
702
|
-
!0}}}function
|
|
703
|
-
function
|
|
704
|
-
p=
|
|
705
|
-
disabledUntilTime:0,primary:!0,audio:"audio"==H?Q.stream:null,video:"video"==H?Q.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?
|
|
706
|
-
0),a.j.Zc(!0));if(a.m!=
|
|
707
|
-
|
|
708
|
-
function
|
|
709
|
-
function
|
|
710
|
-
function
|
|
711
|
-
p.next())t=n.value,t.stream.codecs=l;return y.return(e.filter(function(x){return x}))})}function
|
|
712
|
-
function
|
|
713
|
-
function
|
|
698
|
+
function br(a){if(!a.T){for(var b=-1,c=new Map,d=r(a.h.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.L[0]||null))for(var g=r(e.Rc),h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.P=b;b=r(a.h.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)if(f=a.P-c.get(d),e.L.splice(0,f),e=e.L[0]||null)e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
699
|
+
cr(d,e);a.T=!0}}}
|
|
700
|
+
function dr(a){if(!a.T&&Infinity==a.$){for(var b=Infinity,c=r(a.h.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.L[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){a.$=b;c=r(a.h.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;if(null!=e){var f=e.L[0]||null;if(null==f.g)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.Ld,"Expect AV sync issues!");else for(cr(d,f.g-b-f.startTime),d=r(e),e=d.next();!e.done;e=d.next())e.value.Re(b)}}a.T=
|
|
701
|
+
!0}}}function cr(a,b){a.Qc+=b;for(var c=r(a.Rc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.Rc.set(d,e+b)}}
|
|
702
|
+
function Vq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,C,G,E,H,J,M,Q,V,aa,ea,ma,Ca,Ia,Ja,Na,Oa,Tc,Uc,vc,Id,Eb,Jd,hc,Kd;return K(function(Va){switch(Va.g){case 1:d=Kq(a.aa,b,a.N);e=Aq(d.g,"EXT-X-DEFINE");er(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],J=yd(G),M=new Map,A(Va,fr(a,d,c,c,J,H,"",!0,"Media Playlist",null,M,null,!1,!1,E),8);k=Aq(d.g,"EXT-X-MEDIA");l=Aq(d.g,"EXT-X-STREAM-INF");m=Aq(d.g,"EXT-X-IMAGE-STREAM-INF");gr(a,l);
|
|
703
|
+
p=Aq(d.g,"EXT-X-SESSION-DATA");n=r(p);for(t=n.next();!t.done;t=n.next())if(y=t.value,x=W(y,"DATA-ID"),v=W(y,"URI"),w=W(y,"LANGUAGE"),D=W(y,"VALUE"),z=(new Map).set("id",x),v&&z.set("uri",Eq(a.N,v)),w&&z.set("language",w),D&&z.set("value",D),C=new N("sessiondata",z),a.i)a.i.onEvent(C);return A(Va,hr(a,k),4);case 4:return ir(a,k),A(Va,jr(a,l),5);case 5:return f=Va.h,A(Va,kr(a,k),6);case 6:return g=Va.h,A(Va,lr(a,m),7);case 7:h=Va.h;Va.D(3);break;case 8:Q=Va.h,a.h.set(c,Q),f.push({id:0,language:"und",
|
|
704
|
+
disabledUntilTime:0,primary:!0,audio:"audio"==H?Q.stream:null,video:"video"==H?Q.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?br(a):dr(a);V=Infinity;aa=r(a.h.values());for(ea=aa.next();!ea.done;ea=aa.next())ma=ea.value,"text"!=ma.stream.type&&(V=Math.min(V,ma.Qc));a.m!=Tq?(a.j=new R(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.ba),a.j.Zc(!1)):(a.j=new R(null,
|
|
705
|
+
0),a.j.Zc(!0));if(a.m!=Tq)a.ha=a.H,Ca=Yq,a.m==Ca.ef&&(Ia=a.j.Ed,isNaN(a.g.availabilityWindowOverride)||(Ia=a.g.availabilityWindowOverride),a.j.Oe(Ia));else for(a.j.Ua(V),Ja=r(a.h.values()),ea=Ja.next();!ea.done;ea=Ja.next())Na=ea.value,Na.stream.segmentIndex.yb(0,V);a.I=[];Oa=[];Tc=r(f);for(Uc=Tc.next();!Uc.done;Uc=Tc.next())for(vc=Uc.value,Id=r([vc.video,vc.audio]),Eb=Id.next();!Eb.done;Eb=Id.next())(Jd=Eb.value)&&Oa.push(Jd);return A(Va,Promise.all(Oa.map(function(tg){return K(function(ug){return A(ug,
|
|
706
|
+
tg.createSegmentIndex(),0)})})),9);case 9:hc=r(Oa);for(Eb=hc.next();!Eb.done;Eb=hc.next())Kd=Eb.value,a.I.push(Kd.segmentIndex.L);Xq(a);a.j.pe();a.J={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.J);B(Va)}})}function er(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=W(d,"NAME");d=W(d,"VALUE");c&&d&&(a.s.has(c)||a.s.set(c,d))}}
|
|
707
|
+
function $q(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.s.get(e))&&c.set(e,d)}return c}
|
|
708
|
+
function gr(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"AUDIO");c=W(d,"VIDEO");var f=W(d,"SUBTITLES");d=mr(a,d);if(f){var g=Db(Gb,d);a.B.set(f,g);bc(d,g)}e&&(f=Db("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.B.set(e,f));c&&(e=Db("video",d),e||(e=a.g.hls.defaultVideoCodec),a.B.set(c,e))}}
|
|
709
|
+
function kr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return K(function(y){if(1==y.g)return c=Bq(b,"SUBTITLES"),d=c.map(function(x){var v,w,D;return K(function(z){if(1==z.g){if(v=a.g.disableText)return z.return(null);F(z,2);return A(z,nr(a,x),4)}if(2!=z.g)return w=z.h,z.return(w.stream);D=I(z);if(a.g.hls.ignoreTextStreamFailures)return z.return(null);throw D;})}),A(y,Promise.all(d),2);e=y.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=xq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(p=r(m),n=p.next();!n.done;n=
|
|
710
|
+
p.next())t=n.value,t.stream.codecs=l;return y.return(e.filter(function(x){return x}))})}function lr(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);F(l,2);return A(l,or(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=I(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),A(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
|
|
711
|
+
function hr(a,b){var c;return K(function(d){b=b.filter(function(e){var f=W(e,"URI")||"";return"SUBTITLES"!=W(e,"TYPE")&&""!=f});c=b.map(function(e){return nr(a,e)});return A(d,Promise.all(c),0)})}
|
|
712
|
+
function jr(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,p,n,t,y;return K(function(x){if(1==x.g)return h=W(g,"FRAME-RATE"),k=Number(W(g,"AVERAGE-BANDWIDTH"))||Number(xq(g,"BANDWIDTH")),l=W(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,t=W(g,"VIDEO-RANGE"),A(x,pr(a,g),2);y=x.h;for(var v=x.return,w=y.audio,D=y.video,z=r(D),C=z.next();!C.done;C=z.next())if(C=C.value.stream)C.width=Number(p)||void 0,C.height=Number(n)||void 0,
|
|
714
713
|
C.frameRate=Number(h)||void 0,C.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];w=r(w);for(C=w.next();!C.done;C=w.next()){C=C.value;for(var G=r(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=C?C.stream:null;var J=H?H.stream:null,M=C?C.stream.drmInfos:null,Q=H?H.stream.drmInfos:null;H=(H?H.Ld:"")+" - "+(C?C.Ld:"");E&&J&&M.length&&Q.length&&!(0<$g(M,Q).length)||a.ua.has(H)||(E={id:a.Ba++,language:E?E.language:"und",primary:!!E&&E.primary||
|
|
715
714
|
!!J&&J.primary,audio:E,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(E),a.ua.add(H))}}return v.call(x,z)})}),A(f,Promise.all(c),2);d=f.h;e=d.reduce(xb,[]);e=e.filter(function(g){return null!=g});return f.return(e)})}
|
|
716
|
-
function
|
|
717
|
-
function
|
|
718
|
-
function
|
|
719
|
-
function
|
|
720
|
-
"YES"==t;return A(v,
|
|
721
|
-
function
|
|
722
|
-
if(p=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function
|
|
723
|
-
function
|
|
724
|
-
function
|
|
725
|
-
ea=
|
|
726
|
-
"subtitle"!==Jd||hc.push("subtitle");
|
|
727
|
-
closedCaptions:m,hdr:void 0,tilesLayout:void 0};return Md.return({stream:
|
|
728
|
-
function
|
|
729
|
-
|
|
730
|
-
function
|
|
731
|
-
function
|
|
732
|
-
function
|
|
733
|
-
"EXTINF");if(!a.l)return null}var v=[];if(a.l){n={};for(var w=0;w<d.h.length;n={Ud:n.Ud},w++){var D=d.h[w],z=0==w?c:v[v.length-1],C=0==w?e:z.endTime,G=Number(W(D,"DURATION"))||a.ea;if(G){G=C+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(E=W(D,"BYTERANGE-START"))?Number(E):0:(E=W(D,"BYTERANGE"),H=r(
|
|
734
|
-
z),"EXT-X-PRELOAD-HINT"==D.name&&C.Gf(),v.push(C)}}}if(p){a=Number(p.value.split(",")[0]);if(0==a)return null;n=e+a}else n=v[v.length-1].endTime;(a=
|
|
735
|
-
function
|
|
736
|
-
function
|
|
737
|
-
!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(x=
|
|
715
|
+
function pr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){if(1==v.g)return c=Hb,d=mr(a,b),e=W(b,"AUDIO"),f=W(b,"VIDEO"),h=(g=e||f)&&a.C.has(g)?a.C.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=xq(b,"URI"),n=k.audio.find(function(w){return w&&w.Ld==p}),t=Db(c.La,d),(y=Db(c.Gb,d))&&!t?l=c.Gb:!h.length&&y&&t?(l=c.La,d=[[t,y].join()]):k.audio.length&&n?(l=c.Gb,m=!0):l=k.video.length&&!k.audio.length?c.Gb:c.La,m?v.D(2):A(v,qr(a,b,d,l),3);2!=v.g&&(x=v.h,k[x.stream.type]=[x]);rr(k);return v.return(k)})}
|
|
716
|
+
function mr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=W(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=xd(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function sr(a){a=W(a,"LANGUAGE")||"und";return Kb(a)}
|
|
717
|
+
function rr(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function ir(a,b){b=Bq(b,"CLOSED-CAPTIONS");b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=sr(d);var e=xq(d,"GROUP-ID");d=xq(d,"INSTREAM-ID");a.K.get(e)||a.K.set(e,new Map);a.K.get(e).set(d,c)}}
|
|
718
|
+
function nr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){if(1==v.g){c=xq(b,"GROUP-ID");d="";var w=xq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Gb);e=w;e!=Gb&&c&&a.B.has(c)&&(d=a.B.get(c));f=tr(xq(b,"URI"),a.s);if(a.h.has(f))return v.return(a.h.get(f));g=sr(b);h=W(b,"NAME");k=W(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=W(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=W(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;p=w;n=W(b,"CHARACTERISTICS");t=W(b,"FORCED");y=
|
|
719
|
+
"YES"==t;return A(v,ur(a,f,d,e,g,l,h,m,null,n,y,p),2)}x=v.h;a.C.has(c)?a.C.get(c).push(x):a.C.set(c,[x]);if(a.h.has(f))return v.return(a.h.get(f));a.h.set(f,x);return v.return(x)})}
|
|
720
|
+
function or(a,b){var c,d,e,f,g,h,k,l,m,p;return K(function(n){if(1==n.g){c=tr(xq(b,"URI"),a.s);d=W(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=sr(b);f=W(b,"NAME");g=W(b,"CHARACTERISTICS");return A(n,ur(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(a.h.has(c))return n.return(a.h.get(c));if(k=W(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*Number(m.split("x")[1]);
|
|
721
|
+
if(p=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function qr(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=tr(xq(b,"URI"),a.s);if(a.h.has(e))return k.return(a.h.get(e));var l=W(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=Cb(d,c);return A(k,ur(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(a.h.has(e))return k.return(a.h.get(e));a.h.set(e,h);return k.return(h)})}
|
|
722
|
+
function ur(a,b,c,d,e,f,g,h,k,l,m,p){var n,t,y;return K(function(x){if(1==x.g)return n=Eq(a.N,b),A(x,Uq(a,n),2);t=x.h;n=t.uri;y=Kq(a.aa,t.data,n);return x.return(fr(a,y,b,n,c,d,e,f,g,h,k,l,m,p))})}
|
|
723
|
+
function fr(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){var x,v,w,D,z,C,G,E,H,J,M,Q,V,aa,ea,ma,Ca,Ia,Ja,Na,Oa,Tc,Uc,vc,Id,Eb,Jd,hc,Kd,Va,tg,ug,gp,hp;return K(function(Md){if(1==Md.g){if(1!=b.type)throw new O(2,4,4017);x=Aq(b.g,"EXT-X-DEFINE");v=$q(a,x);vr(a,b);return y?Md.D(2):A(Md,wr(a,f,e,b,v),3)}2!=Md.g&&(y=Md.h);w=[];if(b.segments)for(D=r(b.segments),z=D.next();!z.done;z=D.next())C=z.value,G=Aq(C.g,"EXT-X-KEY"),w.push.apply(w,ja(G));H=E=!1;J=[];M=new Set;Q=r(w);for(V=Q.next();!V.done;V=Q.next())if(aa=V.value,
|
|
724
|
+
ea=xq(aa,"METHOD"),"NONE"!=ea)if(E=!0,"AES-128"==ea)H=!0;else if(ma=xq(aa,"KEYFORMAT"),Ia=(Ca=xr[ma])?Ca(aa,y):null){if(Ia.keyIds)for(Ja=r(Ia.keyIds),Na=Ja.next();!Na.done;Na=Ja.next())Oa=Na.value,M.add(Oa);J.push(Ia)}if(E&&!J.length&&!H)throw new O(2,4,4026);gj.includes(y)&&(e="");Tc=new Map;Uc=a.l;vc=ar(a,b,f,Tc,v);Uc!=a.l&&vr(a,b);Id=vc[vc.length-1].endTime;Eb=new Dj(vc);Jd=f==Gb?"subtitle":void 0;hc=[];if(p)for(Kd=r(p.split(",")),Va=Kd.next();!Va.done;Va=Kd.next())tg=Va.value,hc.push(tg);hc.length||
|
|
725
|
+
"subtitle"!==Jd||hc.push("subtitle");gp=(ug=Cq(b.g,"EXT-X-SERVER-CONTROL"))?null!=ug.getAttribute("CAN-SKIP-UNTIL"):!1;hp={id:a.Ba++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Eb,mimeType:y,codecs:e,kind:Jd,encrypted:E,drmInfos:J,keyIds:M,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:hc,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,
|
|
726
|
+
closedCaptions:m,hdr:void 0,tilesLayout:void 0};return Md.return({stream:hp,Ld:c,$f:d,Qc:Id,Rc:Tc,fg:gp,Bf:!1})})}
|
|
727
|
+
function yr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new O(2,4,4042);var d=0,e=W(b,"IV","");if(e){var f=ld(e.substr(2));if(16!=f.byteLength)throw new O(2,4,4043);}else d=Dq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Eq(c.h,xq(b,"URI"));var g=pf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return K(function(p){if(1==p.g)return A(p,
|
|
728
|
+
zr(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new O(2,4,4044);l={name:"AES-CBC"};m=h;return A(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;B(p)})}};return h}
|
|
729
|
+
function vr(a,b){var c=Cq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Cq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Zq(a,Tq);else{c?Zq(a,Ar):Zq(a,Br);d=Cq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Cq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ea=Number(xq(c,"PART-TARGET")),a.H=Math.min(a.ea,a.H),b=Cq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=b?Number(xq(b,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.ba=Math.max(d,a.ba)}}
|
|
730
|
+
function Cr(a,b,c,d){c=Cq(c,"EXT-X-MAP");if(!c)return null;var e=xq(c,"URI");d=tr(Eq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.va.has(b)||(c=Dr(d,c),a.va.set(b,c));return a.va.get(b)}function Dr(a,b){var c=0,d=null;if(b=W(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new wi(function(){return[a]},c,d)}
|
|
731
|
+
function Er(a,b,c,d,e,f,g,h,k){var l=d.g,m=tr(d.i,f),p=Cq(l,"EXTINF"),n=0;f=0;var t=null;d.h.length&&!a.l&&Ua("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var x=Cq(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(y=dg(x.value))}x=zi;Cq(l,"EXT-X-GAP")&&(x=2);if(!p){if(0==d.h.length)throw new O(2,4,4024,
|
|
732
|
+
"EXTINF");if(!a.l)return null}var v=[];if(a.l){n={};for(var w=0;w<d.h.length;n={Ud:n.Ud},w++){var D=d.h[w],z=0==w?c:v[v.length-1],C=0==w?e:z.endTime,G=Number(W(D,"DURATION"))||a.ea;if(G){G=C+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(E=W(D,"BYTERANGE-START"))?Number(E):0:(E=W(D,"BYTERANGE"),H=r(Fr(z,E)),E=H.next().value,H=H.next().value);if(z=W(D,"URI"))n.Ud=Eq(g,z),z=zi,"YES"==W(D,"GAP")&&(z=2),C=new yi(C,G,function(J){return function(){return[J.Ud]}}(n),E,H,b,0,0,Infinity,[],"",null,null,
|
|
733
|
+
z),"EXT-X-PRELOAD-HINT"==D.name&&C.Gf(),v.push(C)}}}if(p){a=Number(p.value.split(",")[0]);if(0==a)return null;n=e+a}else n=v[v.length-1].endTime;(a=Cq(l,"EXT-X-BYTERANGE"))?(t=r(Fr(c,a.value)),f=t.next().value,t=t.next().value):v.length&&(f=v[0].Va,t=v[v.length-1].Da);c="";a=null;"image"==h&&(c="1x1",h=Cq(l,"EXT-X-TILES"))&&(c=xq(h,"LAYOUT"),(h=W(h,"DURATION"))&&(a=Number(h)));return new yi(e,n,function(){return m.length?[m]:[]},f,t,b,0,0,Infinity,v,c,a,y,x,k)}
|
|
734
|
+
function Fr(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Da+1,d=c+b-1);return[c,d]}function Xq(a){if(a.j){for(var b=r(a.I),c=b.next();!c.done;c=b.next())a.j.mc(c.value);a.I=[]}}
|
|
735
|
+
function ar(a,b,c,d,e){var f=b.segments,g=void 0,h=Dq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Dq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Cq(b.g,"EXT-X-SKIP");l=l?Number(W(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;a.m!=Tq&&d.has(m)&&(p=d.get(m));for(var n=[],t=null,y=0;y<f.length;y++){var x=f[y],v=0==y?p:t.endTime;m=k+l+y;Cq(x.g,"EXT-X-DISCONTINUITY")&&h++;var w=r(x.g);for(var D=w.next();!D.done;D=w.next())D=D.value,"EXT-X-KEY"==D.name&&("AES-128"==xq(D,"METHOD")?g=yr(a,D,b):g=void 0);d.set(m,v);w=Cr(a,b.h,x.g,e);
|
|
736
|
+
!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(x=Er(a,w,t,x,v,e,b.h,c,g))t=x,x.l=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.P&&m<a.P||n.push(x)}if(b=n.some(function(z){return null!=z.g}))for(c={},d=0;d<n.length;c={vc:c.vc,uc:c.uc,$c:c.$c,sb:c.sb,tc:c.tc},d++)if(c.sb=n[d],null==c.sb.g)for(c.uc=0,c.vc=d,e=function(z){return function(){var C=n[z.vc];if(C){if(null!=C.g)return C.g+z.uc;z.uc-=C.endTime-C.startTime;z.vc+=1}return null}}(c),c.tc=0,c.$c=
|
|
738
737
|
d,f=function(z){return function(){var C=n[z.$c];if(C){C!=z.sb&&(z.tc+=C.endTime-C.startTime);if(null!=C.g)return C.g+z.tc;--z.$c}return null}}(c);null==c.sb.g;)c.sb.g=f(),null==c.sb.g&&(c.sb.g=e());if(b)for(c=r(n),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.$;if(b&&Infinity!=a)for(b=r(n),d=b.next();!d.done;d=b.next())d.value.Re(a);return n}
|
|
739
|
-
function
|
|
740
|
-
function
|
|
741
|
-
if(!x){if(b==f.ia)return w.return("text/vtt");v=p.mp4;return w.return(v)}return w.return(x.split(";")[0])})}function
|
|
742
|
-
function
|
|
743
|
-
var
|
|
744
|
-
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"}},
|
|
745
|
-
b=
|
|
746
|
-
|
|
747
|
-
function
|
|
748
|
-
if(!g){M.D(5);break}return A(M,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,p-n,v-p),n=p,t=J;H.done?G.close():(G.enqueue(H.value),E());B(M)}})}E()};new k({start:w});return A(C,l.arrayBuffer(),6);case 6:m=C.h;case 5:va(C,3);break;case 2:D=I(C);if(d.mf)throw new O(1,1,7001,a,b);if(d.Tf)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,D,b);case 3:return z=
|
|
749
|
-
function
|
|
750
|
-
function
|
|
738
|
+
function tr(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new O(2,4,4039,e);}}return a}
|
|
739
|
+
function wr(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,y,x,v;return K(function(w){if(1==w.g){f=Hb;g=vf;h=Math.trunc((d.segments.length-1)/2);k=tr(d.segments[h].i,e);l=new jb(k);m=l.Na.split(".").pop();p=Gr[b];if((n=p[m])||(n=Hr[m]))return w.return(n);if(b==f.ia){if("vtt"==c||"wvtt"==c)return w.return("text/vtt");if(c&&""!==c)return w.return("application/mp4")}if(b==f.Bc&&(!c||"jpeg"==c))return w.return("image/jpeg");t=pf([k],a.g.retryParameters);t.method="HEAD";return A(w,zr(a,t,g),2)}y=w.h;x=y.headers["content-type"];
|
|
740
|
+
if(!x){if(b==f.ia)return w.return("text/vtt");v=p.mp4;return w.return(v)}return w.return(x.split(";")[0])})}function Uq(a,b){b=pf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return zr(a,b,0)}function Sq(a){var b,c;K(function(d){if(1==d.g){if(!a.i)return d.return();F(d,2);return A(d,a.update(),4)}if(2!=d.g)return a.m!=Tq&&(b=a.ha,a.F.S(b)),va(d,0);c=I(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.F.S(.1);B(d)})}
|
|
741
|
+
function Zq(a,b){a.m=b;a.j&&a.j.Zc(a.m==Tq);a.m!=Tq||a.F.stop()}function zr(a,b,c){if(!a.G)throw new O(2,7,7001);b=a.i.networkingEngine.request(c,b);kf(a.G,b);return b.promise}L("shaka.hls.HlsParser",Rq);
|
|
742
|
+
var Hr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Gr={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",
|
|
743
|
+
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"}},xr={"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 Bb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=xq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
744
|
+
b=xq(a,"URI");b=Qq(b);b=Dc(b.data);b=Bb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=W(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=xq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=xq(a,"URI");a=Qq(a);a=Dc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Tf(a,b,new Set,0);return Bb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Tq="VOD",
|
|
745
|
+
Br="EVENT",Ar="LIVE",Yq={Zf:Tq,Wh:Br,ef:Ar};Rc("Tizen 3")||Rc("Tizen 2")||Vc()||(fh.m3u8=function(){return new Rq},dh["application/x-mpegurl"]=function(){return new Rq},dh["application/vnd.apple.mpegurl"]=function(){return new Rq});function Ir(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=ed(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Jr(){}function Kr(a,b,c,d,e){var f=new Lr;Df(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Mr,h={mf:!1,Tf:!1};a=Nr(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.mf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new P(function(){h.Tf=!0;g.abort()});k.S(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
746
|
+
function Nr(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,D,z;return K(function(C){switch(C.g){case 1:return h=Or,k=Pr,n=p=0,t=Date.now(),F(C,2),A(C,h(a,c),4);case 4:l=C.h;f(Qr(l.headers));if("HEAD"==c.method){C.D(5);break}y=l.clone().body.getReader();v=(x=l.headers.get("Content-Length"))?parseInt(x,10):0;w=function(G){function E(){var H,J;return K(function(M){switch(M.g){case 1:return F(M,2),A(M,y.read(),4);case 4:H=M.h;va(M,3);break;case 2:return I(M),M.return();case 3:if(H.done){M.D(5);break}p+=H.value.byteLength;
|
|
747
|
+
if(!g){M.D(5);break}return A(M,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,p-n,v-p),n=p,t=J;H.done?G.close():(G.enqueue(H.value),E());B(M)}})}E()};new k({start:w});return A(C,l.arrayBuffer(),6);case 6:m=C.h;case 5:va(C,3);break;case 2:D=I(C);if(d.mf)throw new O(1,1,7001,a,b);if(d.Tf)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,D,b);case 3:return z=Qr(l.headers),C.return(Ir(z,m,l.status,a,l.url,b))}})}function Qr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
748
|
+
function Rr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}L("shaka.net.HttpFetchPlugin",Jr);Jr.isSupported=Rr;Jr.parse=Kr;var Or=window.fetch,Mr=window.AbortController,Pr=window.ReadableStream,Lr=window.Headers;Rr()&&(mf("http",Kr,2,!0),mf("https",Kr,2,!0),mf("blob",Kr,2,!0));function Sr(){}
|
|
749
|
+
function Tr(a,b,c,d,e){var f=new Ur,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new O(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=Vr(f);e(t);p=!0}};f.onload=function(){var t=Vr(f),y=f.response;try{var x=Ir(t,y,f.status,a,f.responseURL,c);l(x)}catch(v){m(v)}};f.onerror=function(t){m(new O(1,1,1002,a,t,
|
|
751
750
|
c))};f.ontimeout=function(){m(new O(1,1,1003,a,c))};f.onprogress=function(t){var y=Date.now();if(100<y-g||t.lengthComputable&&t.loaded==t.total)d(y-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=y};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new $e(k,function(){f.abort();return Promise.resolve()})}
|
|
752
|
-
function
|
|
753
|
-
function
|
|
754
|
-
function
|
|
755
|
-
function
|
|
756
|
-
q.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
757
|
-
q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return A(d,
|
|
758
|
-
function
|
|
759
|
-
function
|
|
760
|
-
function
|
|
761
|
-
|
|
762
|
-
function
|
|
763
|
-
function
|
|
764
|
-
function
|
|
765
|
-
|
|
766
|
-
function
|
|
767
|
-
function
|
|
768
|
-
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}}
|
|
769
|
-
function
|
|
770
|
-
f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function
|
|
771
|
-
|
|
751
|
+
function Vr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}L("shaka.net.HttpXHRPlugin",Sr);Sr.parse=Tr;var Ur=window.XMLHttpRequest;mf("http",Tr,1,!0);mf("https",Tr,1,!0);mf("blob",Tr,1,!0);function Wr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Xr(a){return a.Ra().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Va+":"+a.Da}function Yr(a,b){return Vj(a.g.Ra(),a.g.Va,a.g.Da,b.streaming.retryParameters)};function Zr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function $r(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Zr.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function as(a){var b=this;this.s=a;this.j=new Map;this.i=new wf(function(){return bs(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Zr}as.prototype.destroy=function(){return this.i.destroy()};function cs(a,b,c){a.m=b;a.l=c}function bs(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
752
|
+
function ds(a,b,c,d,e,f){xf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return K(function(y){if(1==y.g)return A(y,es(a,c),2);h=y.h;if(a.i.g)throw new O(2,9,7001);if(e)for(m in k=Dc(h),l=new Sf(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,t);a.g.close(d,h.byteLength);var x=a.g;a.m(0==x.i?0:x.j/x.i,a.g.h);return y.return(f(h))})});a.j.set(b,g)}function fs(a){return K(function(b){return 1==b.g?A(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
753
|
+
function es(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=vf,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),A(g,d.promise,2);f=g.h;bc(a.h,e);return g.return(f.data)})};function gs(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Kc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}gs.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}F(b,2);return A(b,a.g,4)}if(2!=b.g)return va(b,0);I(b);B(b)})};
|
|
754
|
+
function hs(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 A(g,b(f.key,f.value,f),2)}f.continue();B(g)})}})}gs.prototype.store=function(){return this.h};gs.prototype.promise=function(){return this.g};function is(a){this.h=a;this.g=[]}is.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function js(a,b){return ks(a,b,"readwrite")}function ks(a,b,c){c=a.h.transaction([b],c);var d=new gs(c,b);a.g.push(d);d.promise().then(function(){bc(a.g,d)},function(){bc(a.g,d)});return d};function ls(a,b,c){this.h=new is(a);this.i=b;this.g=c}q=ls.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ms(this.i)};q.removeSegments=function(a,b){return ns(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return A(d,os(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.qf(e)}))})};q.addManifests=function(){return ms(this.g)};
|
|
755
|
+
q.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function ps(a,b,c){a=js(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=js(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()};q.removeManifests=function(a,b){return ns(this,this.g,a,b)};
|
|
756
|
+
q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return A(d,os(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Ec(e)})))})};q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=ks(a.h,a.g,"readonly"),c=new Map,A(d,hs(b,function(e,f){var g;return K(function(h){if(1==h.g)return A(h,a.Ec(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?A(d,b.promise(),3):d.return(c)})};q.qf=function(a){return a};q.Ec=function(a){return Promise.resolve(a)};
|
|
757
|
+
function ms(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=js(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={ed:g.ed},k=h.next())l=k.value,g.ed=e.add(l),g.ed.onsuccess=function(p){return function(){f.push(p.ed.result)}}(g);return A(m,d.promise(),2)}return m.return(f)})};
|
|
758
|
+
function ns(a,b,c,d){a=js(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={dd:e.dd},f=c.next())e.dd=f.value,b.delete(e.dd).onsuccess=function(g){return function(){return d(g.dd)}}(e);return a.promise()}
|
|
759
|
+
function os(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=ks(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Ac:h.Ac,xc:h.xc},l=k.next())h.xc=l.value,h.Ac=e.get(h.xc),h.Ac.onsuccess=function(p){return function(){void 0==p.Ac.result&&g.push(p.xc);f[p.xc]=p.Ac.result}}(h);return A(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(p){return f[p]}))})};function qs(a){this.g=new is(a)}qs.prototype.destroy=function(){return this.g.destroy()};qs.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=ks(a.g,"session-ids","readonly"),c=[],A(d,hs(b,function(e,f){c.push(f)}),2)):3!=d.g?A(d,b.promise(),3):d.return(c)})};qs.prototype.add=function(a){var b=js(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
760
|
+
qs.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=js(b.g,"session-ids"),A(d,hs(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):A(d,c.promise(),0)})};function rs(){this.g=new Map}rs.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};rs.prototype.init=function(){var a=this;ss.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
761
|
+
function ts(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ta:d,Ca:f},Ca:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function us(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ta:d,Ca:f},e)})})}
|
|
762
|
+
function vs(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 ws(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function xs(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()}
|
|
763
|
+
function ys(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=ss,d.forEach(function(f){(f=f())&&b.push(f)})),A(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):A(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function zs(a,b){ss.set(a,b)}L("shaka.offline.StorageMuxer",rs);rs.unregister=function(a){ss.delete(a)};rs.register=zs;rs.prototype.destroy=rs.prototype.destroy;var ss=new Map;function As(){ls.apply(this,arguments)}u(As,ls);As.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=js(c.h,c.g);e=d.store();f=new Kc;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 A(g,Promise.all([d.promise(),f]),0)})};
|
|
764
|
+
As.prototype.Ec=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Bs(a.periods[c],e),b.push(f);return A(h,Ip(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
765
|
+
function Bs(a,b){Cs(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Ds(e,a.startTime,b)})}
|
|
766
|
+
function Ds(a,b,c){var d=a.initSegmentUri?Es(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Es(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
767
|
+
dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}As.prototype.qf=function(a){return{data:a.data}};function Es(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new O(2,9,9004,"Could not parse uri "+a);}
|
|
768
|
+
function Cs(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
769
|
+
f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Fs(){ls.apply(this,arguments)}u(Fs,ls);
|
|
770
|
+
Fs.prototype.Ec=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(Gs(p,k.startTime,k.startTime+e));f=l;b.push(f)}return A(h,Ip(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
772
771
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
773
|
-
function
|
|
774
|
-
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function
|
|
775
|
-
q.init=function(){var a=this,b=new Kc,c=!1,d=new P(function(){c=!0;b.reject(new O(2,9,9017))});d.S(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new
|
|
776
|
-
new
|
|
772
|
+
function Gs(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
|
|
773
|
+
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Hs(){ls.apply(this,arguments)}u(Hs,ls);q=Hs.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return ps(this,a,b)};q.Ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Is(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Is.prototype;
|
|
774
|
+
q.init=function(){var a=this,b=new Kc,c=!1,d=new P(function(){c=!0;b.reject(new O(2,9,9017))});d.S(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new As(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Fs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
775
|
+
new Fs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Hs(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new qs(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new O(2,
|
|
777
776
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return A(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),B(b)}})};
|
|
778
777
|
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
|
|
779
|
-
q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),A(b,
|
|
780
|
-
function
|
|
781
|
-
function
|
|
782
|
-
function
|
|
778
|
+
q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),A(b,Js(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,A(b,a.init(),0)}})};
|
|
779
|
+
function Js(){var a=new Kc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}zs("idb",function(){return Rc("CrKey")||Qc()||!window.indexedDB?null:new Is});function Ks(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ks.prototype.Ta=function(){return this.i};Ks.prototype.Ca=function(){return this.h};Ks.prototype.key=function(){return this.l};Ks.prototype.toString=function(){return this.j};
|
|
780
|
+
function Ls(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Ks(b,c,d,Number(a[4])):null};function Ms(a,b){this.h=a;this.g=b}
|
|
781
|
+
function Ns(a,b){var c=new R(null,0);c.Ua(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Os(a,d,e,c);e=b.streams.filter(function(l){return l.type==Gb}).map(function(l){return Ps(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ps(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
783
782
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1}}
|
|
784
|
-
function
|
|
785
|
-
b.next())for(e=e.value,g=
|
|
786
|
-
function
|
|
787
|
-
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function
|
|
788
|
-
function
|
|
789
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=
|
|
790
|
-
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new
|
|
791
|
-
dh["application/x-offline-manifest"]=function(){return new
|
|
792
|
-
function
|
|
793
|
-
function
|
|
783
|
+
function Os(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
|
|
784
|
+
b.next())for(e=e.value,g=Ps(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Ps(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
|
|
785
|
+
function Ps(a,b,c){var d=b.segments.map(function(e){return Qs(a,e)});c.mc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
|
|
786
|
+
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Qs(a,b){var c=new Ks("segment",a.h,a.g,b.dataKey);return new yi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Rs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
787
|
+
function Rs(a,b){var c=new Ks("segment",a.h,a.g,b);return new wi(function(){return[c.toString()]},0,null)};function Ss(){this.g=null}q=Ss.prototype;q.configure=function(){};
|
|
788
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=Ls(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new rs;ua(m);return A(m,e.init(),4);case 4:return A(m,vs(e,d.Ta(),d.Ca()),5);case 5:return f=m.h,A(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ms(d.Ta(),d.Ca()),l=Ns(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),A(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
789
|
+
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new rs,F(m,2,3),A(m,e.init(),5);case 5:return A(m,vs(e,d.Ta(),d.Ca()),6);case 6:return f=m.h,A(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return A(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),A(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
|
|
790
|
+
dh["application/x-offline-manifest"]=function(){return new Ss};function Ts(){}function Us(a){var b=Ls(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?Vs(b.key(),b):af(new O(2,1,9004,a));return a}
|
|
791
|
+
function Vs(a,b){var c=new rs;return cf(void 0).oa(function(){return c.init()}).oa(function(){return vs(c,b.Ta(),b.Ca())}).oa(function(d){return d.getSegments([b.key()])}).oa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}L("shaka.offline.OfflineScheme",Ts);Ts.plugin=Us;mf("offline",Us);function Ws(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,y=r(m),x=y.next();!x.done;x=y.next())if(x=x.value,Xs(x.info,n)){x.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=Ys(a,b,g);return A(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l.return(d)}})}
|
|
792
|
+
function Ys(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new og({Pb:b,onError:function(){},Bd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),F(f,2),d.configure(a),A(f,yg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return I(f),A(f,d.destroy(),5);case 5:return f.return([]);case 3:return F(f,6),A(f,Jg(d),8);case 8:va(f,7);break;case 6:return I(f),A(f,d.destroy(),
|
|
794
793
|
9);case 9:return f.return([]);case 7:return e=[],A(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return F(h,2),A(h,Kg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);I(h);B(h)})})),10);case 10:return A(f,d.destroy(),11);case 11:return f.return(e)}})}
|
|
795
|
-
function
|
|
796
|
-
function
|
|
797
|
-
case 4:b.h=null,b.g=null,B(k)}})})}function
|
|
798
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
799
|
-
function
|
|
800
|
-
n,b,c,e,f),x=y.Zg,v=y.Se,A(C,l.Ca.addManifests([x]),11);case 11:w=C.h;
|
|
801
|
-
function
|
|
802
|
-
return A(ea,
|
|
803
|
-
I(z),D=Object.values(l),A(z,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function
|
|
804
|
-
function
|
|
805
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return A(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return x=I(w),A(w,
|
|
806
|
-
function
|
|
794
|
+
function Xs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&cc(a.audioCapabilities,b.audioCapabilities,c)&&cc(a.videoCapabilities,b.videoCapabilities,c)};function Zs(a,b,c){var d=b.presentationTimeline.getDuration();b=$s(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function at(a,b){var c=Ns(new Ms(a.Ta(),a.Ca()),b),d=b.appMetadata||{};c=$s(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}}
|
|
795
|
+
function $s(a){var b=[],c=xe(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(oe(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(pe(c.value));return b};function bt(){this.g={}}function ct(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 dt(a,b){a.g[b.id]=b.bandwidth||2048}function et(a,b){a=a.g[b];null==a&&(a=0);return a};function ft(a){var b=this;if(a&&a.constructor!=T)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ic()):(this.h=yl(),this.g=new lf);this.i=[];this.j=[];var c=!a;this.l=new wf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return A(k,Promise.all(b.j.map(function(l){return bs(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return A(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return A(k,b.g.destroy(),4);
|
|
796
|
+
case 4:b.h=null,b.g=null,B(k)}})})}function gt(){if(Nc())a:{var a=r(ss.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}q=ft.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=sl(a,b));return Al(this.h,a)};q.getConfiguration=function(){var a=yl();Al(a,this.h,yl());return a};q.Ic=function(){return this.g};
|
|
797
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new as(this.g);this.j.push(f);b=ht(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return A(h,ch(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new $e(b,function(){return bs(f)});b.finally(function(){bc(d.j,f)});return it(this,b)};
|
|
798
|
+
function ht(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,y,x,v,w,D,z;return K(function(C){switch(C.g){case 1:return jt(),h=g=null,k=new rs,p=m=l=null,F(C,2,3),A(C,d(),5);case 5:return g=C.h,A(C,kt(a,b,g,e),6);case 6:n=C.h;lt(a);t=!n.presentationTimeline.U()&&!n.presentationTimeline.Mb();if(!t)throw new O(2,9,9005,b);return A(C,mt(a,n,function(G){p=p||G},e),7);case 7:h=C.h;lt(a);if(p)throw p;return A(C,nt(n,e),8);case 8:return A(C,k.init(),9);case 9:return lt(a),A(C,ts(k),10);case 10:return l=C.h,lt(a),y=ot(h,
|
|
799
|
+
n,b,c,e,f),x=y.Zg,v=y.Se,A(C,l.Ca.addManifests([x]),11);case 11:w=C.h;lt(a);m=w[0];lt(a);if(p)throw p;return A(C,pt(a,v,m,x,f,e,l.Ca,n,h),12);case 12:return lt(a),D=new Ks("manifest",l.path.Ta,l.path.Ca,m),C.return(at(D,x));case 3:return wa(C),A(C,k.destroy(),13);case 13:if(!g){C.D(14);break}return A(C,g.stop(),14);case 14:if(!h){C.D(16);break}return A(C,h.destroy(),16);case 16:xa(C,0);break;case 2:z=I(C);if(null==m){C.D(18);break}return A(C,qt(m),18);case 18:throw p||z;}})}
|
|
800
|
+
function pt(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,y,x,v,w,D;return K(function(z){switch(z.g){case 1:l={};m=0;p=function(C,G){var E,H,J,M,Q,V,aa;return K(function(ea){if(1==ea.g){E={};H=r(C);for(J=H.next();!J.done;E={Fb:E.Fb},J=H.next())E.Fb=J.value,M=Yr(E.Fb,f),Q=E.Fb.i,V=E.Fb.h,aa=function(ma){return function(Ca){var Ia,Ja,Na;return K(function(Oa){if(1==Oa.g)return A(Oa,g.addSegments([{data:Ca}]),2);Ia=Oa.h;lt(a);Ja=ma.Fb.g;Na=Xr(Ja);l[Na]=Ia[0];m+=Ca.byteLength;B(Oa)})}}(E),ds(e,E.Fb.groupId,M,Q,V,aa);
|
|
801
|
+
return A(ea,fs(e),2)}if(!G)return ea.D(0);lt(a);rt(h,d,k,f);return A(ea,g.updateManifest(c,d),0)})};n=!1;F(z,2);if(!st(h)||!n||tt(h)){z.D(4);break}return A(z,p(b.filter(function(C){return C.h}),!0),5);case 5:return lt(a),b=b.filter(function(C){return!C.h}),t=l,y=m,l={},m=0,A(z,ut(g,c,d,t,y,function(){return lt(a)}),6);case 6:lt(a);case 4:if(n){z.D(7);break}return A(z,p(b,!1),8);case 8:return lt(a),x=l,v=m,l={},m=0,A(z,ut(g,c,d,x,v,function(){return lt(a)}),9);case 9:lt(a);case 7:va(z,0);break;case 2:return w=
|
|
802
|
+
I(z),D=Object.values(l),A(z,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function qt(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new rs,A(f,b.init(),2);case 2:return A(f,ts(b),3);case 3:return c=f.h,d=new Ks("manifest",c.path.Ta,c.path.Ca,a),A(f,b.destroy(),4);case 4:return e=new ft,A(f,e.remove(d.toString()),0)}})}
|
|
803
|
+
function ut(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,y,x,v;return K(function(w){switch(w.g){case 1:g=!1;F(w,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.value,y=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=y&&(t.dataKey=y,t.pendingSegmentRefId=void 0),y=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=y&&(t.initSegmentKey=y,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
|
|
804
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return A(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return x=I(w),A(w,qt(b),5);case 5:if(g){w.D(6);break}v=Object.values(d);return A(w,a.removeSegments(v,function(){}),6);case 6:throw x;}})}
|
|
805
|
+
function nt(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,C,G,E,H,J,M,Q,V,aa,ea,ma;return K(function(Ca){switch(Ca.g){case 1:return c={width:Infinity,height:Infinity},Yd(a,b.restrictions,c),A(Ca,be(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Ld(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(oe(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=
|
|
807
806
|
n.value,d.push(pe(t));y=r(a.imageStreams);for(x=y.next();!x.done;x=y.next())v=x.value,d.push(qe(v));return A(Ca,b.offline.trackSelectionCallback(d),3);case 3:w=Ca.h;D=a.presentationTimeline.getDuration();z=0;C=r(w);for(G=C.next();!G.done;G=C.next())E=G.value,H=E.bandwidth*D/8,z+=H;F(Ca,4);return A(Ca,b.offline.downloadSizeCallback(z),6);case 6:J=Ca.h;if(!J)throw new O(2,9,9014);va(Ca,5);break;case 4:M=I(Ca);if(M instanceof O)throw M;throw new O(2,9,9015);case 5:Q=new Set;V=new Set;aa=new Set;ea=r(w);
|
|
808
|
-
for(G=ea.next();!G.done;G=ea.next())ma=G.value,"variant"==ma.type&&Q.add(ma.id),"text"==ma.type&&V.add(ma.id),"image"==ma.type&&aa.add(ma.id);a.variants=a.variants.filter(function(Ia){return Q.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return V.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return aa.has(Ia.id)});
|
|
809
|
-
function
|
|
810
|
-
n&&p&&(n.initData=[]);return{Zg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hc(),streams:f,sessionIds:p?Pg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Se:m}}function
|
|
811
|
-
function
|
|
812
|
-
function
|
|
813
|
-
function
|
|
814
|
-
function
|
|
815
|
-
function
|
|
816
|
-
q.list=function(){return
|
|
817
|
-
function
|
|
818
|
-
|
|
819
|
-
function
|
|
820
|
-
function
|
|
821
|
-
function
|
|
822
|
-
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;
|
|
823
|
-
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function
|
|
824
|
-
function
|
|
825
|
-
function
|
|
826
|
-
function
|
|
827
|
-
function
|
|
828
|
-
|
|
829
|
-
var
|
|
830
|
-
|
|
831
|
-
function
|
|
832
|
-
function
|
|
833
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange"
|
|
834
|
-
function
|
|
835
|
-
function
|
|
807
|
+
for(G=ea.next();!G.done;G=ea.next())ma=G.value,"variant"==ma.type&&Q.add(ma.id),"text"==ma.type&&V.add(ma.id),"image"==ma.type&&aa.add(ma.id);a.variants=a.variants.filter(function(Ia){return Q.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return V.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return aa.has(Ia.id)});vt(a);B(Ca)}})}
|
|
808
|
+
function ot(a,b,c,d,e,f){var g=Zs(c,b,d),h=e.offline.progressCallback;cs(f,function(t,y){g.size=y;h(g,t)},function(t,y){k&&e.offline.usePersistentLicense&&l==y&&Gg(a,"cenc",t)});var k=st(b)&&!tt(b),l=null;k&&(l=wt.get(a.g.keySystem));for(var m=new bt,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())dt(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())ct(m,p.value);m=xt(f,m,b,e);f=m.streams;m=m.Se;n=a.g;p=e.offline.usePersistentLicense;
|
|
809
|
+
n&&p&&(n.initData=[]);return{Zg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hc(),streams:f,sessionIds:p?Pg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Se:m}}function st(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
810
|
+
function tt(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 rt(a,b,c,d){b.expiration=c.Hc();c=Pg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(st(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}q.remove=function(a){return yt(this,zt(this,a))};
|
|
811
|
+
function zt(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:jt();c=Ls(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new rs;ua(k);return A(k,e.init(),4);case 4:return A(k,vs(e,d.Ta(),d.Ca()),5);case 5:return f=k.h,A(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],A(k,Promise.all([At(a,h,e),Bt(f,d,h)]),2);case 2:return wa(k),A(k,e.destroy(),8);case 8:xa(k,0)}})}
|
|
812
|
+
function Ct(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:ud(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ud(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function At(a,b,c){return K(function(d){return A(d,Dt(a.g,a.h.drm,c,b),0)})}
|
|
813
|
+
function Bt(a,b,c){function d(){}var e=Et(c);at(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.nh=function(){return yt(this,Ft(this))};
|
|
814
|
+
function Ft(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return jt(),b=a.g,c=a.h.drm,d=new rs,e=!1,ua(p),A(p,d.init(),4);case 4:f=[],ws(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.D(2);break}k=h.value;return A(p,k.getAll(),8);case 8:return l=p.h,A(p,Ws(c,b,l),9);case 9:return m=p.h,A(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.D(5);break;case 2:return wa(p),A(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p.return(!e)}})}
|
|
815
|
+
q.list=function(){return yt(this,Gt())};function Gt(){var a,b,c;return K(function(d){switch(d.g){case 1:return jt(),a=[],b=new rs,ua(d),A(d,b.init(),4);case 4:return c=Promise.resolve(),us(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return A(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=at(new Ks("manifest",e.Ta,e.Ca,l),k);a.push(k)});B(h)})})}),A(d,c,2);case 2:return wa(d),A(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d.return(a)}})}
|
|
816
|
+
function kt(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){}},c.configure(d.manifest),
|
|
817
|
+
lt(a),A(l,c.start(b,g),2);if(3!=l.g)return h=l.h,lt(a),k=Ht(h),A(l,Promise.all(eb(k,function(m){return m.createSegmentIndex()})),3);lt(a);if(e)throw e;return l.return(h)})}
|
|
818
|
+
function mt(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new og({Pb:a.g,onError:c,Bd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),A(f,vg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return A(f,Jg(e),3);case 3:return A(f,Ig(e),4);case 4:return f.return(e)}})}
|
|
819
|
+
function xt(a,b,c,d){var e=new Map,f=Ht(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=It(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Se:Array.from(e.values())}}
|
|
820
|
+
function It(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
|
|
821
|
+
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;Jt(d,c.presentationTimeline.ob(),function(l){var m=Xr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=et(b,d.id)*n;n=$r(a.g,n);f.set(m,new Wr(l,n,k,!1))}l.i&&(p=Xr(l.i),f.has(p)||(n=.5*et(b,d.id),n=$r(a.g,n),f.set(p,new Wr(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
|
|
822
|
+
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Jt(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function lt(a){if(a.l.g)throw new O(2,9,7001);}function jt(){if(!gt())throw new O(2,9,9E3);}function yt(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c),A(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);bc(a.i,b);return xa(c,0)})}
|
|
823
|
+
function it(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){bc(a.i,c)})}function Et(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
824
|
+
function Dt(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=xs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Ct(d,!1),videoCapabilities:Ct(d,!0)}});return A(h,Ws(b,a,f),2)}return 3!=h.g?(g=h.h,A(h,e.remove(g),3)):A(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
825
|
+
function Ht(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
826
|
+
function vt(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}L("shaka.offline.Storage",ft);ft.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new rs,ua(b),A(b,ys(a),2)):5!=b.g?(wa(b),A(b,a.destroy(),5)):xa(b,0)})};ft.prototype.list=ft.prototype.list;
|
|
827
|
+
ft.prototype.removeEmeSessions=ft.prototype.nh;ft.prototype.remove=ft.prototype.remove;ft.prototype.store=ft.prototype.store;ft.prototype.getNetworkingEngine=ft.prototype.Ic;ft.prototype.getConfiguration=ft.prototype.getConfiguration;ft.prototype.configure=ft.prototype.configure;ft.prototype.destroy=ft.prototype.destroy;ft.support=gt;
|
|
828
|
+
var wt=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
|
|
829
|
+
gn.offline=gt;function Kt(){}function Lt(){for(var a=r(Mt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.eg()}catch(c){Ua("Error installing polyfill!",c)}}}function Nt(a,b){a={priority:b||0,eg:a};for(b=0;b<Mt.length;b++)if(Mt[b].priority<a.priority){Mt.splice(b,0,a);return}Mt.push(a)}L("shaka.polyfill",Kt);Kt.register=Nt;Kt.installAll=Lt;var Mt=[];function Ot(){this.g=new Pt}function Qt(){window.AbortController||(window.AbortController=Ot,window.AbortSignal=Pt)}Ot.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new N("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(Ot.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Kt.AbortController=Ot;Ot.install=Qt;
|
|
830
|
+
function Pt(){db.call(this);this.h=!1;this.g=void 0;this.onabort=null}u(Pt,db);fa.Object.defineProperties(Pt.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Nt(Qt);function Rt(){}function St(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Tt(b.value)}function Tt(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Kt.Aria=Rt;Rt.install=St;Nt(St);function Ut(){}function Vt(){Wt()}Kt.EncryptionScheme=Ut;Ut.install=Vt;Nt(Vt,-2);function Xt(){}
|
|
831
|
+
function Yt(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
832
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Zt);document.addEventListener("webkitfullscreenerror",Zt);document.addEventListener("mozfullscreenchange",Zt);document.addEventListener("mozfullscreenerror",Zt);document.addEventListener("MSFullscreenChange",Zt);document.addEventListener("MSFullscreenError",Zt)}}
|
|
833
|
+
function Zt(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Kt.Fullscreen=Xt;Xt.install=Yt;Nt(Yt);function $t(){}function au(){var a=!0;if(Wc()||Rc("PlayStation 5")||Xc()||Rc("Web0S")||Sc()||Rc("CrKey")||Rc("PC=EOS")||Rc("Hisense")||Rc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),bu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=cu)}
|
|
834
|
+
function cu(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D;return K(function(z){switch(z.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return z.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Nc())return z.return(b);if(c){if(Rc("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var C=c.contentType;c.width&&c.height&&(C+="; width="+c.width+"; height="+c.height);c.framerate&&(C+="; framerate="+c.framerate);"pq"===
|
|
836
835
|
c.transferFunction&&(C+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(C)}else e=MediaSource.isTypeSupported(c.contentType);else Sc()?(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=MediaSource.isTypeSupported(f)):e=MediaSource.isTypeSupported(c.contentType);if(!e)return z.return(b)}if(d&&(g=d.contentType,h=MediaSource.isTypeSupported(g),!h))return z.return(b)}else if("file"==
|
|
837
836
|
a.type){if(c&&(k=c.contentType,l=Oc(k),!l)||d&&(m=d.contentType,p=Oc(m),!p))return z.return(b)}else return z.return(b);if(!a.keySystemConfiguration)return b.supported=!0,z.return(Promise.resolve(b));n=a.keySystemConfiguration;t=[];y=[];n.audio&&(x={robustness:n.audio.robustness||"",contentType:a.audio.contentType},t.push(x));n.video&&(v={robustness:n.video.robustness||"",contentType:a.video.contentType},y.push(v));w={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,
|
|
838
|
-
sessionTypes:n.sessionTypes};t.length&&(w.audioCapabilities=t);y.length&&(w.videoCapabilities=y);F(z,3);return A(z,navigator.requestMediaKeySystemAccess(n.keySystem,[w]),5);case 5:D=z.h;va(z,4);break;case 3:I(z);case 4:D&&(b.supported=!0,b.keySystemAccess=D);case 2:return z.return(b)}})}
|
|
839
|
-
function
|
|
840
|
-
function
|
|
841
|
-
function
|
|
842
|
-
|
|
837
|
+
sessionTypes:n.sessionTypes};t.length&&(w.audioCapabilities=t);y.length&&(w.videoCapabilities=y);F(z,3);return A(z,navigator.requestMediaKeySystemAccess(n.keySystem,[w]),5);case 5:D=z.h;va(z,4);break;case 3:I(z);case 4:D&&(b.supported=!0,b.keySystemAccess=D);case 2:return z.return(b)}})}Kt.MediaCapabilities=$t;$t.install=au;var bu=null;$t.originalMcap=bu;Nt(au,-1);function du(){}function eu(){var a=Yc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?fu():a?12>=a?(gu(),hu()):15>=a&&gu():navigator.userAgent.match(/Edge?\//)?iu():(Rc("Tizen 2")||Rc("Tizen 3")||Rc("Tizen 4"))&&ju());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ku()}
|
|
838
|
+
function gu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function hu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function iu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
|
|
839
|
+
function ju(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=xd(b)[0]&&a(b)}}function fu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
|
|
840
|
+
function ku(){var a=MediaSource.isTypeSupported;Rc("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)})}Kt.MediaSource=du;du.install=eu;Nt(eu);function lu(){}function mu(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?nu():void 0!=window.orientation&&ou())}function nu(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
841
|
+
function ou(){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 pu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new N("change");b.dispatchEvent(c)})}Kt.Orientation=lu;lu.install=mu;function pu(){db.call(this);this.type="";this.angle=0}u(pu,db);
|
|
843
842
|
pu.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)};
|
|
844
|
-
pu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};
|
|
845
|
-
|
|
843
|
+
pu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Nt(mu);function qu(){}function ru(a,b){try{var c=new su(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function tu(a){var b=this.mediaKeys;b&&b!=a&&uu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?uu(a,this):Promise.resolve()}function vu(a){a=Dc(a.initData);if(Gc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=cd(a.subarray(4),!0);a=fd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ec(a);this.dispatchEvent(b)}
|
|
844
|
+
Kt.PatchedMediaKeysApple=qu;qu.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=tu,window.MediaKeys=wu,window.MediaKeySystemAccess=su,navigator.requestMediaKeySystemAccess=ru,window.shakaMediaKeysPolyfill=!0)};
|
|
846
845
|
function su(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(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=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
847
846
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=r(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;}
|
|
848
847
|
su.prototype.createMediaKeys=function(){var a=new wu(this.keySystem);return Promise.resolve(a)};su.prototype.getConfiguration=function(){return this.g};function wu(a){this.h=new WebKitMediaKeys(a);this.g=new yf}wu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new xu(this.h,a)};wu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
@@ -851,9 +850,9 @@ q.generateRequest=function(a,b){var c=this;this.h=new Kc;try{var d=this.l.create
|
|
|
851
850
|
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:zu(c,"output-not-allowed");break;default:zu(c,"internal-error")}});zu(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
852
851
|
q.update=function(a){this.g=new Kc;try{this.i.update(Dc(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function zu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new N("keystatuseschange");a.dispatchEvent(b)}
|
|
853
852
|
function yu(){this.size=0;this.g=void 0}q=yu.prototype;q.fc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,ah.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ah.value();return this.g&&Bc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function Au(){}function Bu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Cu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Du,window.MediaKeys=Eu,window.MediaKeySystemAccess=Fu,window.shakaMediaKeysPolyfill=!0)}function Cu(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
854
|
-
function Du(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}
|
|
853
|
+
function Du(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Kt.PatchedMediaKeysNop=Au;Au.install=Bu;function Eu(){throw new TypeError("Illegal constructor.");}Eu.prototype.createSession=function(){};Eu.prototype.setServerCertificate=function(){};function Fu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Fu.prototype.getConfiguration=function(){};Fu.prototype.createMediaKeys=function(){};Nt(Bu,-10);function Gu(){}
|
|
855
854
|
function Hu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Iu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Ju;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ku;window.MediaKeys=Lu;window.MediaKeySystemAccess=Mu;window.shakaMediaKeysPolyfill=!0}}
|
|
856
|
-
function Nu(a){var b=Iu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Ju(a,b){try{var c=new Mu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ku(a){var b=this.mediaKeys;b&&b!=a&&Ou(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Ou(a,this);return Promise.resolve()}
|
|
855
|
+
function Nu(a){var b=Iu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Ju(a,b){try{var c=new Mu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ku(a){var b=this.mediaKeys;b&&b!=a&&Ou(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Ou(a,this);return Promise.resolve()}Kt.PatchedMediaKeysWebkit=Gu;Gu.install=Hu;
|
|
857
856
|
function Mu(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=r(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=r(f.audioCapabilities),
|
|
858
857
|
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=r(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"]):
|
|
859
858
|
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;}Mu.prototype.createMediaKeys=function(){var a=new Lu(this.g);return Promise.resolve(a)};Mu.prototype.getConfiguration=function(){return this.h};function Lu(a){this.l=a;this.h=null;this.g=new yf;this.i=[];this.j=new Map}
|
|
@@ -865,10 +864,10 @@ function Tu(a,b,c){if(a.m)return Promise.reject(Error("The session is already in
|
|
|
865
864
|
function Uu(a,b,c){if(a.g)a.g.then(function(){return Uu(a,b,c)}).catch(function(){return Uu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=bd(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=kd(e.keys[0].k);e=kd(e.keys[0].kid)}else d=Dc(c),e=null;var f=Nu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
866
865
|
function Qu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new N("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return Tu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Tu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Kc;Uu(this,b,a);return b};
|
|
867
866
|
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Nu("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Su(){this.size=0;this.g=void 0}q=Su.prototype;q.fc=function(){return this.g};
|
|
868
|
-
q.forEach=function(a){this.g&&a(this.g,ah.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ah.value();return this.g&&Bc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Iu="";
|
|
867
|
+
q.forEach=function(a){this.g&&a(this.g,ah.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ah.value();return this.g&&Bc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Iu="";Nt(Hu);function Vu(){}function Wu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Xu,Object.defineProperty(a,"disablePictureInPicture",{get:Yu,set:Zu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=$u,document.addEventListener("webkitpresentationmodechanged",av,!0))}}
|
|
869
868
|
function av(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)}
|
|
870
869
|
function Xu(){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 $u(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
871
|
-
function Yu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Zu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}
|
|
870
|
+
function Yu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Zu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Kt.PiPWebkit=Vu;Vu.install=Wu;Nt(Wu);function bv(){}function cv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=dv))}function dv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Kt.RandomUUID=bv;bv.install=cv;Nt(cv);function ev(){}function fv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=gv)}function gv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Kt.StorageEstimate=ev;ev.install=fv;Nt(fv);function hv(){}function iv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:jv})}function jv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Kt.Symbol=hv;hv.install=iv;Nt(iv);function kv(){}function lv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Kt.VideoPlayPromise=kv;kv.install=lv;Nt(lv);function mv(){}function nv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Vc())&&(a.getVideoPlaybackQuality=ov)}}function ov(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Kt.VideoPlaybackQuality=mv;mv.install=nv;Nt(nv);function pv(){}function qv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=rv;else if(6==b)a=sv;else{try{var c=!!rv(1,2,"")}catch(d){c=!1}c&&(a=rv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function rv(a,b,c){return new window.TextTrackCue(a,b,c)}function sv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Kt.VTTCue=pv;pv.install=qv;Nt(qv);function tv(){}tv.prototype.parseInit=function(){};tv.prototype.setSequenceMode=function(){};tv.prototype.parseMedia=function(a,b){var c=null,d=[];a=bd(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=uv.exec(e))){var f=vv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new ec(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};L("shaka.text.LrcTextParser",tv);tv.prototype.parseMedia=tv.prototype.parseMedia;
|
|
872
871
|
tv.prototype.setSequenceMode=tv.prototype.setSequenceMode;tv.prototype.parseInit=tv.prototype.parseInit;var uv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,vv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Bd["application/x-subtitle-lrc"]=function(){return new tv};function wv(){}wv.prototype.parseInit=function(){};wv.prototype.setSequenceMode=function(){};
|
|
873
872
|
wv.prototype.parseMedia=function(a,b){var c=bd(a);a=[];if(""==c)return a;var d=lg(c,"tt");if(!d)throw new O(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=$f(d,xv,"frameRate"),f=$f(d,xv,"subFrameRate"),g=$f(d,xv,"frameRateMultiplier"),h=$f(d,xv,"tickRate"),k=$f(d,xv,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=$f(d,yv,"extent");if("default"!=l&&"preserve"!=l)throw new O(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new zv(e,f,
|
|
874
873
|
g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Yf(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new gc;var y=t.getAttribute("xml:id");if(y){n.id=y;var x=null;m&&(x=Av.exec(m)||Bv.exec(m));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var v,w;if(v=Cv(t,g,"extent"))v=(w=Av.exec(v))||Bv.exec(v),
|
|
@@ -893,28 +892,28 @@ function zv(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Num
|
|
|
893
892
|
var Av=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Nv=/^(\d{1,2}(?:\.\d+)?|100)%$/,Mv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Bv=/^(\d+)px (\d+)px$/,Sv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Tv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Vv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Wv=/^(\d*(?:\.\d*)?)f$/,Xv=/^(\d*(?:\.\d*)?)t$/,Yv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Lv={left:mc,center:"center",right:"end",start:mc,
|
|
894
893
|
end:"end"},Kv={left:"line-left",center:"center",right:"line-right"},xv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],yv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Ev=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Bd["application/ttml+xml"]=function(){return new wv};function Zv(){this.g=new wv}Zv.prototype.parseInit=function(a){var b=!1;(new Jf).box("moov",Nf).box("trak",Nf).box("mdia",Nf).box("minf",Nf).box("stbl",Nf).X("stsd",Pf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};Zv.prototype.setSequenceMode=function(){};Zv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Jf).box("mdat",Qf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};
|
|
895
894
|
L("shaka.text.Mp4TtmlParser",Zv);Zv.prototype.parseMedia=Zv.prototype.parseMedia;Zv.prototype.setSequenceMode=Zv.prototype.setSequenceMode;Zv.prototype.parseInit=Zv.prototype.parseInit;Bd['application/mp4; codecs="stpp"']=function(){return new Zv};Bd['application/mp4; codecs="stpp.ttml"']=function(){return new Zv};Bd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Zv};Bd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Zv};function $v(){this.g=!1}$v.prototype.parseInit=function(){};$v.prototype.setSequenceMode=function(a){this.g=a};
|
|
896
|
-
$v.prototype.parseMedia=function(a,b){a=bd(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.g){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=aw(new
|
|
897
|
-
e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new
|
|
898
|
-
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");
|
|
895
|
+
$v.prototype.parseMedia=function(a,b){a=bd(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.g){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=aw(new Fq(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+
|
|
896
|
+
e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Fq(d);var f=new gc;Iq(d);Gq(d);for(var g=Iq(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=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
|
|
897
|
+
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Gq(d);g=Iq(d)}b.push(f)}e=new Map;bw(e);d=[];c=r(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=r(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
|
|
899
898
|
(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 ec(0,0,""));for(var m=!1,p=0;p<k.length;p++){var n=/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(n){var t=n[2].trim().replace(";","");switch(n[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=t;break;case "color":m=!0;l.color=t;break;case "font-family":m=!0;l.fontFamily=t;break;case "font-size":m=!0;l.fontSize=t;break;case "font-weight":if(700<=parseInt(t,10)||"bold"==
|
|
900
899
|
t)m=!0,l.fontWeight=700;break;case "font-style":switch(t){case "normal":m=!0;l.fontStyle=pc;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(t);break;case "text-shadow":m=!0;l.textShadow=t;break;case "white-space":m=!0,l.wrapLine="noWrap"!=t}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));
|
|
901
|
-
g=new
|
|
900
|
+
g=new Fq(f[0]);k=aw(g);p=Hq(g,/[ \t]+--\x3e[ \t]+/g);l=aw(g);if(null==k||null==p||null==l)throw new O(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.payload=""):f=new ec(k,l,"");cw(m,f,e);Gq(g);for(k=Iq(g);k;)dw(f,k,b),Gq(g),k=Iq(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
|
|
902
901
|
function bw(a){for(var b=r(Object.entries(uc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new ec(0,0,"");e.color=d;a.set("."+c,e)}b=r(Object.entries(wc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new ec(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
903
902
|
function cw(a,b,c){0===c.size&&bw(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+1:">"===a[e]&&0<f&&(f=
|
|
904
903
|
a.substr(f,e-f),f.match(ew)&&d.push(f),f=-1);d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!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){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):
|
|
905
904
|
">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=lg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=fw(a);return}a=r(e);for(e=a.next();!e.done;e=a.next())gw(e.value,b,d,c);b.nestedCues=d}else b.payload=fw(a)}
|
|
906
905
|
function hw(a,b){return a&&0<a.length?a:b}
|
|
907
906
|
function gw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=hw(h.backgroundColor,e.backgroundColor),e.color=hw(h.color,e.color),e.fontFamily=hw(h.fontFamily,e.fontFamily),e.fontSize=hw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
|
|
908
|
-
h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=aw(new
|
|
909
|
-
r(a.childNodes),a=b.next();!a.done;a=b.next())gw(a.value,e,c,d)}
|
|
907
|
+
h.fontStyle,e.opacity=h.opacity,e.textShadow=h.textShadow,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=aw(new Fq(g)))e.startTime=g}}if(bg(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=
|
|
908
|
+
fw(a),c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())gw(a.value,e,c,d)}
|
|
910
909
|
function dw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=jc:a.textAlign=rc[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))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||
|
|
911
910
|
"end"==b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=iw(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=tc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=lc,a.line=Number(c[1]),c[2]&&(a.lineAlign=tc[c[2].toUpperCase()])}function iw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
|
|
912
|
-
function aw(a){a=
|
|
911
|
+
function aw(a){a=Hq(a,ew);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)}function fw(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}L("shaka.text.VttTextParser",$v);$v.prototype.parseMedia=$v.prototype.parseMedia;
|
|
913
912
|
$v.prototype.setSequenceMode=$v.prototype.setSequenceMode;$v.prototype.parseInit=$v.prototype.parseInit;var ew=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Bd["text/vtt"]=function(){return new $v};Bd['text/vtt; codecs="vtt"']=function(){return new $v};Bd['text/vtt; codecs="wvtt"']=function(){return new $v};function jw(){this.g=null}jw.prototype.parseInit=function(a){var b=this,c=!1;(new Jf).box("moov",Nf).box("trak",Nf).box("mdia",Nf).X("mdhd",function(d){d=qi(d.reader,d.version);b.g=d.timescale}).box("minf",Nf).box("stbl",Nf).X("stsd",Pf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};jw.prototype.setSequenceMode=function(){};
|
|
914
913
|
jw.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 Jf).box("moof",Nf).box("traf",Nf).X("tfdt",function(z){g=!0;c=pi(z.reader,z.version).hf}).X("tfhd",function(z){l=oi(z.reader,z.flags).uf}).X("trun",function(z){h=!0;d=ri(z.reader,z.version,z.flags).Lf}).box("mdat",Qf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);a=c;for(var m=new Gf(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;
|
|
915
914
|
var t=n.De||l,y=n.Hd?c+n.Hd:a;a=y+(t||0);var x=0;do{var v=m.R();x+=v;var w=m.R(),D=null;"vttc"==Rf(w)?8<v&&(D=m.Cb(v-8)):m.skip(v-8);t&&D&&(v=kw(D,b.periodStart+y/this.g,b.periodStart+a/this.g),f.push(v))}while(n.sampleSize&&x<n.sampleSize)}return f.filter(zb)};function kw(a,b,c){var d,e,f;(new Jf).box("payl",Qf(function(g){d=bd(g)})).box("iden",Qf(function(g){e=bd(g)})).box("sttg",Qf(function(g){f=bd(g)})).parse(a);return d?lw(d,e,f,b,c):null}
|
|
916
|
-
function lw(a,b,c,d,e){d=new ec(d,e,"");cw(a,d,new Map);b&&(d.id=b);if(c)for(a=new
|
|
917
|
-
function nw(a){a=
|
|
915
|
+
function lw(a,b,c,d,e){d=new ec(d,e,"");cw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Fq(c),b=Iq(a);b;)dw(d,b,[]),Gq(a),b=Iq(a);return d}L("shaka.text.Mp4VttParser",jw);jw.prototype.parseMedia=jw.prototype.parseMedia;jw.prototype.setSequenceMode=jw.prototype.setSequenceMode;jw.prototype.parseInit=jw.prototype.parseInit;Bd['application/mp4; codecs="wvtt"']=function(){return new jw};function mw(){}mw.prototype.parseInit=function(){};mw.prototype.setSequenceMode=function(){};mw.prototype.parseMedia=function(a){var b=bd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Fq(c[0]),e=nw(d),f=Hq(d,/,/g);d=nw(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 ec(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
916
|
+
function nw(a){a=Hq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}L("shaka.text.SbvTextParser",mw);mw.prototype.parseMedia=mw.prototype.parseMedia;mw.prototype.setSequenceMode=mw.prototype.setSequenceMode;mw.prototype.parseInit=mw.prototype.parseInit;Bd["text/x-subviewer"]=function(){return new mw};function ow(){this.g=new $v}ow.prototype.parseInit=function(){};ow.prototype.setSequenceMode=function(){};ow.prototype.parseMedia=function(a,b){a=bd(a);a=pw(a);a=Dc(fd(a));return this.g.parseMedia(a,b)};function pw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}L("shaka.text.SrtTextParser",ow);
|
|
918
917
|
ow.srt2webvtt=pw;ow.prototype.parseMedia=ow.prototype.parseMedia;ow.prototype.setSequenceMode=ow.prototype.setSequenceMode;ow.prototype.parseInit=ow.prototype.parseInit;Bd["text/srt"]=function(){return new ow};function qw(){}qw.prototype.parseInit=function(){};qw.prototype.setSequenceMode=function(){};
|
|
919
918
|
qw.prototype.parseMedia=function(a){var b="",c="";a=bd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=rw.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=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=sw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(tw);else if("Style"==e){e=f.split(tw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
920
919
|
[];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={$d:e.$d},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=sw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(tw);else if("Dialogue"==f){g=g.split(tw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=uw(f.Start);var k=uw(f.End);g=new ec(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.$d=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.$d}}(e)))&&vw(g,f);d.push(g)}return d};
|
|
@@ -941,7 +940,7 @@ function Mw(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfigur
|
|
|
941
940
|
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}L("McEncryptionSchemePolyfill",Hw);Hw.install=Jw;function Gw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
942
941
|
Gw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Gw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
943
942
|
function Ew(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 Cw(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}
|
|
944
|
-
function Nw(){}function
|
|
943
|
+
function Nw(){}function Wt(){Aw();Jw()}L("EncryptionSchemePolyfills",Nw);Nw.install=Wt;"undefined"!==typeof module&&module.exports&&(module.exports=Nw);/*
|
|
945
944
|
@license
|
|
946
945
|
Copyright 2013 Ali Al Dallal
|
|
947
946
|
|
|
@@ -997,16 +996,17 @@ L("shaka.ui.PlayButton",$w);function cx(a,b){$w.call(this,a,b);this.button.class
|
|
|
997
996
|
!1)});this.eventManager.o(window,"click",function(){Y(c.g,!1)});ex(this)}u(dx,X);dx.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];X.prototype.release.call(this)};function fx(a,b){gx.set(a,b)}function ex(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=gx.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}L("shaka.ui.ContextMenu",dx);
|
|
998
997
|
dx.registerElement=fx;var gx=new Map;function hx(a,b,c,d){X.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ja(c));this.g=!1;this.bar=document.createElement("input");this.l=new P(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ja(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
|
|
999
998
|
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Nb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Nb()&&(e.g=!0,ix(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(ix(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,ix(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
|
|
1000
|
-
"mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(hx,X);q=hx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};
|
|
1001
|
-
q.
|
|
1002
|
-
|
|
999
|
+
"mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}u(hx,X);q=hx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};
|
|
1000
|
+
q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};q.setValue=function(a){this.g||(this.bar.value=a)};
|
|
1001
|
+
function ix(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}L("shaka.ui.RangeElement",hx);hx.prototype.setValue=hx.prototype.setValue;hx.prototype.getValue=hx.prototype.getValue;hx.prototype.changeTo=hx.prototype.changeTo;hx.prototype.onChangeEnd=hx.prototype.onChangeEnd;hx.prototype.onChange=hx.prototype.onChange;hx.prototype.onChangeStart=hx.prototype.onChangeStart;
|
|
1002
|
+
hx.prototype.setRange=hx.prototype.setRange;function jx(a,b){hx.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new P(function(){c.video.currentTime=c.getValue()});this.s=new P(function(){kx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return lx(c)});this.eventManager.o(this.localization,
|
|
1003
1003
|
"locale-changed",function(){return lx(c)});this.eventManager.o(this.adManager,"ad-started",function(){mx(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){mx(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;nx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];nx(c)});this.setValue(this.video.currentTime);this.update();lx(this);this.ad&&Y(this.container,!1)}u(jx,hx);q=jx.prototype;
|
|
1004
1004
|
q.release=function(){this.h&&(this.h.stop(),this.h=null,this.s.stop(),this.s=null);hx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Ne(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.Aa();this.controls.Ne(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
1005
1005
|
q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ka(),g=f.end-f.start;this.setRange(f.start,f.end);mx(this)?(Y(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
|
|
1006
1006
|
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):Y(this.container,!1)};
|
|
1007
1007
|
function kx(a){if(a.i.length){for(var b=a.player.Ka(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|
|
1008
1008
|
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function nx(a){kx(a);var b=a.player.Ka();b=b.end-b.start;a.player.U()&&5<b&&a.s.na(1)}function mx(a){var b=a.player.Ka();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function lx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}L("shaka.ui.SeekBar",jx);function ox(){}
|
|
1009
|
-
ox.prototype.create=function(a,b){return new jx(a,b)};jx.Factory=ox;function Z(a,b,c,d){db.call(this);var e=this;this.T=!0;this.i=d;this.C=new
|
|
1009
|
+
ox.prototype.create=function(a,b){return new jx(a,b)};jx.Factory=ox;function Z(a,b,c,d){db.call(this);var e=this;this.T=!0;this.i=d;this.C=new Yn(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.ab=!0;this.s=this.C.Bb();this.B=c;this.F=this.C.dc();this.ua=a;this.j=b;this.Za=this.F.nd();this.l=this.m=null;this.$=!1;this.G=[];this.wb=[];this.ib=!1;this.aa=new P(function(){e.j.style.cursor="none";e.ib=!1;px(e)});this.ea=new P(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new P(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())Y(g.value,
|
|
1010
1010
|
!1)});this.Oa=new P(function(){e.Nb()&&qx(e)});this.J=null;this.H=[];this.Ba=rx();this.h=new yf;this.configure(this.i);sx(this);this.ha=new Set;tx(this);this.Oa.na(.125);this.h.o(this.Ba,"locale-changed",function(f){e.Za.setLocale(f.locales[0])})}u(Z,db);q=Z.prototype;
|
|
1011
1011
|
q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return A(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ea&&(a.ea.stop(),a.ea=null);a.I&&(a.I.stop(),a.I=null);a.Oa&&(a.Oa.stop(),a.Oa=null);ux(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return A(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.ua){b.D(6);break}return A(b,a.ua.destroy(),7);case 7:a.ua=
|
|
1012
1012
|
null;case 6:a.F=null,a.B=null,a.s=null,a.Ba=null,a.ha.clear(),db.prototype.release.call(a),B(b)}})};function ux(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function vx(a,b){wx.set(a,b)}q.dg=function(a){this.ab=a;tx(this)};q.Yg=function(){px(this)};
|
|
@@ -1101,13 +1101,13 @@ d.stopPropagation()});this.eventManager.o(this.g,"click",function(){Tx(c)});Sx(t
|
|
|
1101
1101
|
function Rx(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,Vx.get(c)?(c=Vx.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function Tx(a){if(a.controls.hd())a.controls.hc();else{Y(a.h,!0);px(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};gb(a.h.childNodes,b)&&hb(a.h.childNodes,b)[0].focus()}}function Sx(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1102
1102
|
L("shaka.ui.OverflowMenu",Qx);Qx.registerElement=Ux;function Wx(){}Wx.prototype.create=function(a,b){return new Qx(a,b)};vx("overflow_menu",new Wx);var Vx=new Map;function Xx(a,b){X.call(this,a,b);var c=this;this.g=Mk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=S("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=S("span");a.appendChild(this.j);
|
|
1103
1103
|
this.i=S("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);Yx(this);Zx(this);this.eventManager.o(this.localization,"locale-updated",function(){Yx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Yx(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});a=this.controls.Bb();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1104
|
-
c.player.ie()==
|
|
1104
|
+
c.player.ie()==Im;Y(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){Zx(c)})}u(Xx,X);function Zx(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Yx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}L("shaka.ui.AirPlayButton",Xx);function $x(){}$x.prototype.create=function(a,b){return new Xx(a,b)};Ux("airplay",new $x);
|
|
1105
1105
|
vx("airplay",new $x);function ay(a,b,c){this.i=a;this.h=by(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.ke()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.Qe(b);b.ui=this;c.ui=this}q=ay.prototype;q.destroy=function(){var a=this;return K(function(b){if(1==b.g)return a.g?A(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?A(b,a.i.destroy(),4):b.D(4);a.i=null;B(b)})};q.ke=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Wc()&&1<navigator.maxTouchPoints};
|
|
1106
1106
|
q.getConfiguration=function(){var a=by(this);rl(a,this.h,by(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=sl(a,b));rl(this.h,a,by(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new N("uiupdated"))};q.vg=function(){return this.g};q.Ah=function(a){this.g.Je(a)};
|
|
1107
1107
|
function by(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
|
|
1108
1108
|
"picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},
|
|
1109
1109
|
trackLabelFormat:cy,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.ke()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
|
|
1110
|
-
function dy(){var a,b,c,d,e,f,g,h,k,l,m,p,n;return K(function(t){switch(t.g){case 1:
|
|
1110
|
+
function dy(){var a,b,c,d,e,f,g,h,k,l,m,p,n;return K(function(t){switch(t.g){case 1:Lt();if(!Zl())return ey("shaka-ui-load-failed",fy),t.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),gy(f,e));t.D(2);break}h=r(a);k=h.next();
|
|
1111
1111
|
case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;p=r(b);for(d=p.next();!d.done;d=p.next())if(n=d.value,n.parentElement==l){m=n;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));F(t,7);return A(t,gy(l,m),9);case 9:va(t,5);break;case 7:return I(t),ey("shaka-ui-load-failed",hy),t.return();case 5:k=h.next();t.D(4);break;case 2:ey("shaka-ui-loaded"),B(t)}})}
|
|
1112
1112
|
function ey(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
1113
1113
|
function gy(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:c=new T(b);d=new ay(c,a,b);e="";f=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(e=a.dataset.shakaPlayerCastReceiverId,f="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId,f="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);e.length&&d.configure({castReceiverAppId:e,castAndroidReceiverCompatible:f});b.controls&&
|
|
@@ -1141,7 +1141,7 @@ function Ty(a,b){var c=Tw(a.menu,"material-icons-round shaka-chosen-item");if(c)
|
|
|
1141
1141
|
"x")}function Uy(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={yc:b.yc},d=c.next()){b.yc=d.value;d=Mk();var e=S("span");e.textContent=b.yc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.yc);a.video.defaultPlaybackRate=a.g.get(f.yc)}}(b));a.menu.appendChild(d)}Uw(a.menu)}L("shaka.ui.PlaybackRateSelection",Ry);function Vy(){}Vy.prototype.create=function(a,b){return new Ry(a,b)};Ux("playback_rate",new Vy);vx("playback_rate",new Vy);function Wy(a,b){X.call(this,a,b);var c=this;this.g=Mk();this.g.classList.add("shaka-current-time");Xy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Ka().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.zf(),f=c.video.duration,g=c.player.Ka(),h=g.end-g.start;c.player.U()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Xy(c,"- "+Ww(e,f)),c.g.disabled=
|
|
1142
1142
|
!1):(Xy(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=Ww(e,d),f&&(e+=" / "+Ww(f,d)),Xy(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}u(Wy,X);function Xy(a,b){b!=a.g.textContent&&(a.g.textContent=b)}L("shaka.ui.PresentationTimeTracker",Wy);function Yy(){}Yy.prototype.create=function(a,b){return new Wy(a,b)};vx("time_and_duration",new Yy);function Zy(a,b){ky.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){$y(c)});this.eventManager.o(this.localization,"locale-changed",function(){$y(c)});this.eventManager.o(this.player,"variantchanged",function(){az(c)});this.eventManager.o(this.player,"trackschanged",function(){az(c)});this.eventManager.o(this.player,
|
|
1143
1143
|
"abrstatuschanged",function(){az(c)});az(this)}u(Zy,ky);
|
|
1144
|
-
function az(a){var b=[];a.player.ie()!=
|
|
1144
|
+
function az(a){var b=[];a.player.ie()!=Im&&(b=a.player.Sa());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return(a.player.ic()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ic()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=Sw(a.menu);Nk(a.menu);
|
|
1145
1145
|
a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e={Zb:e.Zb},g=f.next()){e.Zb=g.value;g=Mk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Zb;a.player.configure({abr:{enabled:!1}});a.player.He(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=a.player.ic()?Math.round(e.Zb.bandwidth/1E3)+" kbits/s":e.Zb.height+"p";g.appendChild(h);d||e.Zb!=c||(g.ariaSelected=
|
|
1146
1146
|
"true",g.appendChild(Vw()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Mk();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});az(a)});a.g=S("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(Vw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=
|
|
1147
1147
|
a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);Uw(a.menu);a.controls.dispatchEvent(new N("resolutionselectionupdated"));$y(a)}
|