shaka-player 3.3.5 → 3.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release-please.yaml +3 -2
- package/CHANGELOG.md +11 -0
- package/README.md +4 -4
- package/build/checkversion.py +1 -1
- package/demo/demo.less +0 -1
- package/dist/controls.css +3 -3
- package/dist/controls.css.map +1 -1
- package/dist/demo.css +1 -1
- package/dist/demo.css.map +1 -1
- package/dist/deps.js +1 -1
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.d.ts +237 -237
- package/dist/shaka-player.compiled.debug.d.ts +237 -237
- package/dist/shaka-player.compiled.debug.js +7 -7
- package/dist/shaka-player.compiled.debug.map +1 -1
- package/dist/shaka-player.compiled.js +85 -85
- package/dist/shaka-player.compiled.map +1 -1
- package/dist/shaka-player.ui.d.ts +281 -281
- package/dist/shaka-player.ui.debug.d.ts +281 -281
- package/dist/shaka-player.ui.debug.js +9 -9
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +97 -97
- package/dist/shaka-player.ui.map +2 -2
- package/lib/abr/simple_abr_manager.js +2 -1
- package/lib/hls/hls_parser.js +14 -3
- package/lib/media/drm_engine.js +3 -0
- package/lib/player.js +1 -1
- package/lib/util/mime_utils.js +14 -5
- package/package.json +2 -2
- package/test/hls/hls_live_unit.js +60 -7
- package/ui/less/containers.less +1 -1
- package/ui/less/general.less +1 -1
- package/ui/less/range_elements.less +1 -0
- package/.github/pull_request_template.md +0 -10
package/dist/shaka-player.ui.js
CHANGED
|
@@ -79,7 +79,7 @@ CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033
|
|
|
79
79
|
FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,
|
|
80
80
|
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,MODIFY_OPERATION_NOT_SUPPORTED:9016,
|
|
81
81
|
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 yb(a,b){this.g=a;this.h=b}yb.prototype.toString=function(){return"v"+this.g+"."+this.h};function zb(a,b){var c=new yb(4,0),d=Ab,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Bb(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Cb(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ab=null;function Db(a,b){return a.concat(b)}function Eb(){}function Fb(a){return null!=a}function Gb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(zb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){zb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Hb(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(Db,[]).map(function(d){return d.toString()})}function Ib(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
82
|
-
function Jb(a,b){if(1==b.length)return b[0];var c=Kb(a,b);if(null!=c)return c;throw new P(2,4,4025,b);}function Kb(a,b){for(var c=r(Lb[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==Mb?"":null}var Mb="text",Nb={gb:"video",Fb:"audio",
|
|
82
|
+
function Jb(a,b){if(1==b.length)return b[0];var c=Kb(a,b);if(null!=c)return c;throw new P(2,4,4025,b);}function Kb(a,b){for(var c=r(Lb[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==Mb?"":null}var Mb="text",Nb={gb:"video",Fb:"audio",oa:Mb,wc:"image",lh:"application"},Lb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ob(){}function Pb(a,b){a=Qb(a);b=Qb(b);return a.split("-")[0]==b.split("-")[0]}function Rb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Sb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Qb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Tb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ub(a,b){var c=Vb(a),d=Vb(b);return a!=c&&b!=d&&c==d}
|
|
83
83
|
function Wb(a,b){a=Qb(a);b=Qb(b);return b==a?4:Rb(b,a)?3:Sb(b,a)?2:Rb(a,b)?1:0}function Vb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Tb.get(a)||a}function Xb(a){return a.language?Qb(a.language):a.audio&&a.audio.language?Qb(a.audio.language):a.video&&a.video.language?Qb(a.video.language):"und"}
|
|
84
84
|
function Yb(a,b){for(var c=Qb(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Qb(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Rb(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Sb(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Rb(c,f))return f;return null}N("shaka.util.LanguageUtils",Ob);Ob.findClosestLocale=Yb;Ob.getLocaleForVariant=Xb;
|
|
85
85
|
Ob.getLocaleForText=function(a){return Qb(a.language||"und")};Ob.getBase=Vb;Ob.relatedness=Wb;Ob.areSiblings=Ub;Ob.normalize=Qb;Ob.isSiblingOf=Sb;Ob.isParentOf=Rb;Ob.areLanguageCompatible=Pb;Ob.areLocaleCompatible=function(a,b){a=Qb(a);b=Qb(b);return a==b};
|
|
@@ -93,8 +93,8 @@ q.Oe=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a
|
|
|
93
93
|
q.ea=function(a,b,c){a=Qb(a);void 0===c&&(c=bc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=bc||d.set(f,e)});this.h.set(a,d);$b(this);this.dispatchEvent(new O("locale-updated"));return this};q.Vg=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 O("unknown-localization",a));return""};
|
|
94
94
|
function $b(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={Xb:f.Xb},h=g.next()){f.Xb=h.value;e.add(f.Xb);e.add(Vb(f.Xb));h=hb(b.keys(),function(l){return function(m){return Ub(m,l.Xb)}}(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 Vb(m)==l.Xb}}(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);
|
|
95
95
|
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,cc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new O("missing-localizations",d)))}function cc(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)}N("shaka.ui.Localization",Zb);Zb.prototype.resolve=Zb.prototype.resolve;
|
|
96
|
-
Zb.prototype.resolveDictionary=Zb.prototype.Vg;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Oe;Zb.prototype.release=Zb.prototype.release;var bc=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:bc};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={
|
|
97
|
-
|
|
96
|
+
Zb.prototype.resolveDictionary=Zb.prototype.Vg;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Oe;Zb.prototype.release=Zb.prototype.release;var bc=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:bc};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={$h:"PICTURE_IN_PICTURE",Ai:"UNMUTE",AD_PROGRESS:"AD_PROGRESS",Bi:"UNRECOGNIZED_LANGUAGE",Ke:"LIVE",yh:"ENTER_PICTURE_IN_PICTURE",ji:"SKIP_AD",mh:"AUTO_QUALITY",Gh:"FAST_FORWARD",ci:"REPLAY",Jh:"LANGUAGE",qh:"CAPTIONS",Uh:"OFF",Hh:"FULL_SCREEN",ei:"REWIND",Ef:"SUBTITLE_FORCED",xh:"ENTER_LOOP_MODE",mi:"STATISTICS",ii:"SEEK",Di:"VOLUME",Qh:"MUTE",Zh:"PAUSE",ai:"PLAY",ki:"SKIP_TO_LIVE",BACK:"BACK",ih:"AD_DURATION",jh:"AD_TIME",rh:"CAST",Kh:"LOOP",Ph:"MULTIPLE_LANGUAGES",Ch:"EXIT_LOOP_MODE",di:"RESOLUTION",
|
|
97
|
+
Vh:"ON",Bh:"EXIT_FULL_SCREEN",bi:"PLAYBACK_RATE",kh:"AIRPLAY",Dh:"EXIT_PICTURE_IN_PICTURE",Th:"NOT_APPLICABLE",Oh:"MORE_SETTINGS",zi:"UNDETERMINED_LANGUAGE"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.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)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Ed:d.Ed},e=a.next()){d.Ed=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ed,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
98
98
|
function kc(a,b,c){c||(c=hc);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 lc(a,b,c){this.startTime=a;this.direction=mc;this.endTime=b;this.payload=c;this.region=new nc;this.position=null;this.positionAlign=oc;this.size=0;this.textAlign=pc;this.writingMode=qc;this.lineInterpretation=rc;this.line=null;this.lineHeight="";this.lineAlign=sc;this.displayAlign=tc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=uc;this.fontStyle=vc;this.linePadding=this.letterSpacing=this.fontFamily=
|
|
99
99
|
"";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}lc.prototype.clone=function(){var a=new lc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
100
100
|
function wc(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(!kc(a.nestedCues,b.nestedCues,wc))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(!kc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",lc);var oc="auto";
|
|
@@ -108,7 +108,7 @@ var Vc=new Qc(function(){function a(c){try{var d=new Uint8Array(c);return 0<Stri
|
|
|
108
108
|
function dd(a){var b=Ic(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function ed(){for(var a=Fa.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Ic(d),c),c+=d.byteLength;return b}N("shaka.util.Uint8ArrayUtils",Zc);Zc.concat=ed;Zc.toHex=dd;Zc.fromHex=cd;Zc.fromBase64=bd;Zc.toBase64=ad;Zc.toStandardBase64=$c;
|
|
109
109
|
Zc.equal=function(a,b){zb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Gc(a,b)};function fd(){var a=this;this.A=Nc.get("muxjs")();this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(ed(b.initSegment,b.data))});this.g.on("done",function(){var b={data:ed.apply(Zc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}fd.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
|
|
110
110
|
function gd(a,b){if(!Nc.get("muxjs")()||!hd(a))return!1;if(b)return MediaSource.isTypeSupported(id(b,a));var c=id("audio",a),d=id("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function hd(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
111
|
-
function id(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function jd(a,b){a.l=!0;a.h=new Pc;a.m=[];a.j=[];a.i=[];var c=Ic(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new P(2,3,3018));return a.h};function kd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function ld(a,b,c){a=kd(a,b);
|
|
111
|
+
function id(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function jd(a,b){a.l=!0;a.h=new Pc;a.m=[];a.j=[];a.i=[];var c=Ic(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new P(2,3,3018));return a.h};function kd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function ld(a,b,c){a=kd(a,b);if(hd(a)){if(Nc.get("muxjs")())return id(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
|
|
112
112
|
function md(a){var b=nd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
|
|
113
113
|
case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function od(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function nd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
|
|
114
114
|
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function pd(a){this.l=null;this.i=a;this.j=this.C=0;this.m=Infinity;this.h=this.g=null;this.B="";this.A=new Map}function qd(a){return rd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}pd.prototype.destroy=function(){this.i=this.l=null;this.A.clear();return Promise.resolve()};
|
|
@@ -150,25 +150,25 @@ function te(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&
|
|
|
150
150
|
ue(e,a[0]):e}function ue(a,b){return a.filter(function(c){return c.roles.includes(b)})}function ge(a){var b=[];a.audio&&b.push(ve(a.audio));a.video&&b.push(ve(a.video));return b.join(", ")}
|
|
151
151
|
function ve(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var ne=0,Sd="smooth",Td="powerEfficient",Vd="bandwidth";function we(){var a=this;this.l=null;this.i=!1;this.h=new gc;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.i){a.h=new gc;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.j=[];this.A=1;this.B=!1;this.g=this.m=null}q=we.prototype;q.stop=function(){this.l=null;this.i=!1;this.j=[];this.A=1;this.m=null};q.init=function(a){this.l=a};
|
|
152
152
|
q.chooseVariant=function(){var a=xe(this.g.restrictions,this.j),b=this.h.getBandwidthEstimate(ye(this));this.j.length&&!a.length&&(a=xe(null,this.j),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.A)?1:Math.abs(this.A),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
|
|
153
|
-
q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.i)a:{if(!this.B){var c=this.h;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(ye(this));c&&this.l(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this
|
|
154
|
-
q.
|
|
155
|
-
we.prototype.
|
|
153
|
+
q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.i)a:{if(!this.B){var c=this.h;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(ye(this));c&&this.l(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(ye(this))};q.setVariants=function(a){this.j=a};q.playbackRateChanged=function(a){this.A=a};
|
|
154
|
+
q.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function ye(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function xe(a,b){a&&(b=b.filter(function(c){return Yd(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}N("shaka.abr.SimpleAbrManager",we);we.prototype.configure=we.prototype.configure;
|
|
155
|
+
we.prototype.playbackRateChanged=we.prototype.playbackRateChanged;we.prototype.setVariants=we.prototype.setVariants;we.prototype.getBandwidthEstimate=we.prototype.getBandwidthEstimate;we.prototype.segmentDownloaded=we.prototype.segmentDownloaded;we.prototype.disable=we.prototype.disable;we.prototype.enable=we.prototype.enable;we.prototype.chooseVariant=we.prototype.chooseVariant;we.prototype.init=we.prototype.init;we.prototype.stop=we.prototype.stop;function ze(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}ze.prototype.add=function(a){return Ae(this.h,a)?(this.g.add(a),!0):!1};
|
|
156
156
|
function Ae(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&Be(c,d)&&Ce(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Be(c,d)&&Ce(c.roles,d.roles)));return c?!1:!0}ze.prototype.values=function(){return this.g.values()};
|
|
157
157
|
function Be(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return nd(f)[0]}),d=b.codecs.split(",").map(function(f){return nd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Ce(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function De(a){this.g=a;this.h=new Ee(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}De.prototype.create=function(a){var b=this,c=a.filter(function(d){return Ae(b.g,d)});return c.length?new ze(c[0],c):this.h.create(a)};function Ee(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
|
|
158
158
|
Ee.prototype.create=function(a){var b=[];b=Ge(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=He(b,this.j);a.length&&(b=a);this.g&&(a=Nd(b,this.g),a.length&&(b=a));this.h&&(a=Ie(b,this.h),a.length&&(b=a));a=new ze(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,Ae(a.h,c)&&a.add(c);return a};function Ge(a,b){var c=Qb(b),d=Yb(c,a.map(function(e){return Xb(e)}));return d?a.filter(function(e){return d==Xb(e)}):[]}
|
|
159
159
|
function He(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ie(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Je(){this.g=Ke;this.h=(new Map).set(Ke,2).set(Le,1)}function Me(a,b,c){a.h.set(Ke,c).set(Le,b)}var Le=0,Ke=1;function Ne(a,b){var c=Oe();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
160
160
|
function Pe(a){var b,c;return M(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return z(d,new Promise(function(e){(new Q(e)).S(c/1E3)}),2)}a.h*=a.m;C(d)})}function Oe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Qe(a,b){this.promise=a;this.i=b;this.g=!1}function Re(a){return new Qe(Promise.reject(a),function(){return Promise.resolve()})}function Se(){var a=Promise.reject(new P(2,7,7001));a["catch"](function(){});return new Qe(a,function(){return Promise.resolve()})}function Te(a){return new Qe(Promise.resolve(a),function(){return Promise.resolve()})}function Ue(a){return new Qe(a,function(){return a["catch"](function(){})})}Qe.prototype.abort=function(){this.g=!0;return this.i()};
|
|
161
161
|
function Ve(a){return new Qe(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Qe.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
162
|
-
Qe.prototype.
|
|
163
|
-
function We(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}N("shaka.util.AbortableOperation",Qe);Qe.prototype.chain=Qe.prototype.
|
|
162
|
+
Qe.prototype.qa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=We(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Pc,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new Qe(f,function(){return d()})};
|
|
163
|
+
function We(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}N("shaka.util.AbortableOperation",Qe);Qe.prototype.chain=Qe.prototype.qa;Qe.prototype["finally"]=Qe.prototype["finally"];Qe.all=Ve;Qe.prototype.abort=Qe.prototype.abort;Qe.notAbortable=Ue;Qe.completed=Te;Qe.aborted=Se;Qe.failed=Re;function Xe(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Ye(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ze(){this.g=[]}function $e(a,b){a.g.push(b["finally"](function(){ic(a.g,b)}))}Ze.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function af(a,b,c){cb.call(this);this.i=!1;this.m=new Ze;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}u(af,cb);q=af.prototype;q.qe=function(a){this.A=a};function bf(a,b,c,d){c=c||cf;var e=df[a];if(!e||c>=e.priority)df[a]={priority:c,Mg:b,Ng:void 0===d?!1:d}}q.Og=function(a){this.g.add(a)};q.dh=function(a){this.g["delete"](a)};q.Mf=function(){this.g.clear()};q.Pg=function(a){this.h.add(a)};q.eh=function(a){this.h["delete"](a)};q.Nf=function(){this.h.clear()};
|
|
164
164
|
function ef(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();cb.prototype.release.call(this);return this.m.destroy()};
|
|
165
|
-
q.request=function(a,b){var c=this,d=new ff;if(this.i){var e=Promise.reject(new P(2,7,7001));e["catch"](function(){});return new gf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Xe(b.retryParameters):Oe();b.uris=Xe(b.uris);e=hf(this,a,b);var f=e.
|
|
166
|
-
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.
|
|
167
|
-
function hf(a,b,c){var d=Te(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Kd:e.Kd},f=a.next())e.Kd=f.value,d=d.
|
|
168
|
-
function jf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Va,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=df[k])?k.Mg:null;if(!m)return Re(new P(2,1,1E3,h));var n=k.Ng,p=null,t=null,v=!1,y=!1,w;return Ue(Pe(d)).
|
|
169
|
-
if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new Q(function(){v=!0;x.abort()}),p.S(D/1E3));var B=c.retryParameters.stallTimeout;B&&(t=new Q(function(){v=!0;x.abort()}));return x}).
|
|
165
|
+
q.request=function(a,b){var c=this,d=new ff;if(this.i){var e=Promise.reject(new P(2,7,7001));e["catch"](function(){});return new gf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Xe(b.retryParameters):Oe();b.uris=Xe(b.uris);e=hf(this,a,b);var f=e.qa(function(){return jf(c,a,b,new Ne(b.retryParameters,!1),0,null,d)}),g=f.qa(function(n){return kf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
166
|
+
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.qa(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.zg||!c.l||t.fromCache||a!=lf||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new gf(m.promise,function(){return m.abort()},d);$e(this.m,e);return e};
|
|
167
|
+
function hf(a,b,c){var d=Te(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Kd:e.Kd},f=a.next())e.Kd=f.value,d=d.qa(function(g){return function(){c.body&&(c.body=Jc(c.body));return g.Kd(b,c)}}(e));return d.qa(void 0,function(g){if(g instanceof P&&7001==g.code)throw g;throw new P(2,1,1006,g);})}
|
|
168
|
+
function jf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Va,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=df[k])?k.Mg:null;if(!m)return Re(new P(2,1,1E3,h));var n=k.Ng,p=null,t=null,v=!1,y=!1,w;return Ue(Pe(d)).qa(function(){if(a.i)return Se();w=Date.now();var x=m(c.uris[e],c,b,function(A,F,G){p&&p.stop();t&&t.S(B/1E3);a.l&&b==lf&&(a.l(A,F),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);y=!0});
|
|
169
|
+
if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new Q(function(){v=!0;x.abort()}),p.S(D/1E3));var B=c.retryParameters.stallTimeout;B&&(t=new Q(function(){v=!0;x.abort()}));return x}).qa(function(x){p&&p.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var D={response:x,zg:l};!y&&a.j&&a.j(x.headers,c,b);return D},function(x){p&&p.stop();t&&t.stop();if(a.B){var D=null,B=0;x instanceof P&&(D=x,1001==x.code&&(B=x.data[1]));a.B(c,D,B,v)}if(a.i)return Se();v&&(x=new P(1,1,1003,
|
|
170
170
|
c.uris[e],b));if(x instanceof P){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new O("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,jf(a,b,c,d,e,x,g)}throw x;})}
|
|
171
|
-
function kf(a,b,c){var d=Te(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Ld:e.Ld},f=a.next())e.Ld=f.value,d=d.
|
|
171
|
+
function kf(a,b,c){var d=Te(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Ld:e.Ld},f=a.next())e.Ld=f.value,d=d.qa(function(g){return function(){var h=c.response;h.data&&(h.data=Jc(h.data));return g.Ld(b,h)}}(e));return d.qa(function(){return c},function(g){var h=2;if(g instanceof P){if(7001==g.code)throw g;h=g.severity}throw new P(h,1,1007,g);})}N("shaka.net.NetworkingEngine",af);af.prototype.request=af.prototype.request;af.prototype.destroy=af.prototype.destroy;af.makeRequest=ef;
|
|
172
172
|
af.defaultRetryParameters=function(){return Oe()};af.prototype.clearAllResponseFilters=af.prototype.Nf;af.prototype.unregisterResponseFilter=af.prototype.eh;af.prototype.registerResponseFilter=af.prototype.Pg;af.prototype.clearAllRequestFilters=af.prototype.Mf;af.prototype.unregisterRequestFilter=af.prototype.dh;af.prototype.registerRequestFilter=af.prototype.Og;af.unregisterScheme=function(a){delete df[a]};af.registerScheme=bf;af.prototype.setForceHTTPS=af.prototype.qe;function ff(){this.g=0}
|
|
173
173
|
af.NumBytesRemainingClass=ff;function gf(a,b,c){Qe.call(this,a,b);this.h=c}u(gf,Qe);af.PendingRequest=gf;var lf=1;af.RequestType={MANIFEST:0,SEGMENT:lf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var cf=3;af.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:cf};var df={};function mf(a){this.g=!1;this.h=new Pc;this.i=a}mf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function nf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function of(){this.g=new ab}q=of.prototype;q.release=function(){this.rb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new pf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.nc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.nc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.nc(),this.g.remove(b,e))}};
|
|
174
174
|
q.rb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.nc();this.g.g={}}};N("shaka.util.EventManager",of);of.prototype.removeAll=of.prototype.rb;of.prototype.unlisten=of.prototype.nc;of.prototype.listenOnce=of.prototype.Ga;of.prototype.listen=of.prototype.o;of.prototype.release=of.prototype.release;function pf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=qf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
@@ -199,8 +199,8 @@ if(!f)return a.i["delete"](c),a.m(new P(2,6,6013)),h["return"](Promise.resolve()
|
|
|
199
199
|
function Tf(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.m(new P(2,6,6005,f.message));return}a.A.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(f):Nf(a,f)});a.A.o(e,"keystatuseschange",function(f){return Zf(a,f)});a.i.set(e,{initData:c,loaded:!1,ae:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof P||(b=new P(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&ad(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
|
|
200
200
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new P(2,6,6006,f.message,f,h))}})}function ag(a,b,c){"skd"==b&&(b=c.serverCertificate,c=uf(a),a=vf(a,c,b));return a}
|
|
201
201
|
function Nf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;M(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&ad(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=ef([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Uf(a.g.keySystem)&&bg(g),h=Date.now(),E(w,2),l=a.G.Pb.request(2,g),z(w,
|
|
202
|
-
l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=I(w),n=new P(2,6,6007,m),a.m(n),d&&d.cb&&d.cb.reject(n),w["return"]();case 3:if(a.j.g)return w["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ad(k.data);E(w,5);return z(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return p=I(w),t=new P(2,6,6008,p.message),a.m(t),d&&d.cb&&d.cb.reject(t),w["return"]();case 6:v=new O("drmsessionupdate")
|
|
203
|
-
y.S(cg))
|
|
202
|
+
l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=I(w),n=new P(2,6,6007,m),a.m(n),d&&d.cb&&d.cb.reject(n),w["return"]();case 3:if(a.j.g)return w["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ad(k.data);E(w,5);return z(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return p=I(w),t=new P(2,6,6008,p.message),a.m(t),d&&d.cb&&d.cb.reject(t),w["return"]();case 6:if(a.j.g)return w["return"]();v=new O("drmsessionupdate");a.G.onEvent(v);d&&(d.cb&&d.cb.resolve(),y=new Q(function(){d.loaded=
|
|
203
|
+
!0;$f(a)&&a.C.resolve()}),y.S(cg));C(w)}})}function bg(a){var b=Uc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=bd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
204
204
|
function Zf(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Uf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Lc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=dd(h);a.ba.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.cb&&(a.i["delete"](c),c.close()["catch"](function(){}));
|
|
205
205
|
$f(a)&&(a.C.resolve(),a.R.S(dg))}function Af(a){var b=a.ba,c=a.$;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new P(2,6,6014));a.G.pd(xf(c))}
|
|
206
206
|
function eg(){var a,b,c,d,e,f,g,h;return M(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
|
|
@@ -258,13 +258,13 @@ function Oh(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()
|
|
|
258
258
|
function Th(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Sh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Sh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Uh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.J={};this.I={};this.g=null;this.K=d||function(){};this.i={};this.A=new of;this.B={};this.C=b;this.G=new Pc;this.m=Vh(this,this.G);this.F=new mf(function(){return Wh(e)});this.H=""}function Vh(a,b){var c=new MediaSource;a.A.Ga(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=Xh(c);a.j.src=a.H;return c}q=Uh.prototype;q.destroy=function(){return this.F.destroy()};
|
|
259
259
|
function Wh(a){var b,c,d,e,f,g,h,k;return M(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Eb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.B)b.push(a.B[k].destroy());return z(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.B={};a.C=null;a.i=
|
|
260
260
|
{};C(l)})}
|
|
261
|
-
q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g)return d=Nb,z(m,c.G,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ia:e.Ia},g=f.next())e.Ia=g.value,h=a.get(e.Ia),k=kd(h.mimeType,h.codecs),e.Ia==d.
|
|
261
|
+
q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g)return d=Nb,z(m,c.G,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ia:e.Ia},g=f.next())e.Ia=g.value,h=a.get(e.Ia),k=kd(h.mimeType,h.codecs),e.Ia==d.oa?Yh(c,k):(!b&&MediaSource.isTypeSupported(k)||!gd(k,e.Ia)||(c.B[e.Ia]=new fd,k=id(e.Ia,k)),l=c.m.addSourceBuffer(k),c.A.o(l,"error",function(n){return function(){c.i[n.Ia][0].p.reject(new P(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.A.o(l,"updateend",function(n){return function(){return Zh(c,n.Ia)}}(e)),
|
|
262
262
|
c.h[e.Ia]=l,c.J[e.Ia]=k,c.i[e.Ia]=[],c.I[e.Ia]=!!h.drmInfos.length);C(m)})};function Yh(a,b){a.g||(a.g=new pd(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Gb(rd[b]))}function $h(a){return a.m?"ended"==a.m.readyState:!0}function ai(a,b){if(b==Mb)var c=a.g.g;else c=bi(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function ci(a,b){return b==Mb?a.g.h:Ph(bi(a,b))}
|
|
263
263
|
function di(a,b,c){if(b==Mb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=bi(a,b);return Rh(a,c)}q.zb=function(){var a={total:Sh(this.j.buffered),audio:Sh(bi(this,"audio")),video:Sh(bi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function bi(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
264
|
-
function ei(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.
|
|
265
|
-
m,e));l.captions&&l.captions.length&&(n=a.h[g.gb].timestampOffset,p=vd(l.captions),xd(a.g,p,d,e,n));t=l.data;t=fi(a,t,d,b);return z(v,gi(a,b,function(){a.h[b].appendBuffer(t)}),0)})}function hi(a,b){var c=ci(a,"video")||0;ud(a.g,b,c)}function ii(a){a.g&&ud(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return M(function(f){e=Nb;return a==e.
|
|
266
|
-
function ji(a,b){var c;return M(function(d){c=Nb;return b==c.
|
|
267
|
-
function ki(a,b,c,d,e){var f;return M(function(g){f=Nb;return b==f.
|
|
264
|
+
function ei(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.oa)return z(v,sd(a.g,c,d,e),0);if(a.B[b])return z(v,jd(a.B[b],c),10);if(f)return a.g||Yh(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=Oh(a.C,c),h.length&&(k=a.h[g.gb].timestampOffset,xd(a.g,h,d,e,k))),c=fi(a,c,d,b),z(v,gi(a,b,function(){a.h[b].appendBuffer(c)}),0);c=fi(a,c,d,b);return z(v,gi(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||Yh(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.K(l.metadata,
|
|
265
|
+
m,e));l.captions&&l.captions.length&&(n=a.h[g.gb].timestampOffset,p=vd(l.captions),xd(a.g,p,d,e,n));t=l.data;t=fi(a,t,d,b);return z(v,gi(a,b,function(){a.h[b].appendBuffer(t)}),0)})}function hi(a,b){var c=ci(a,"video")||0;ud(a.g,b,c)}function ii(a){a.g&&ud(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return M(function(f){e=Nb;return a==e.oa?z(f,d.g.remove(b,c),0):z(f,gi(d,a,function(){c<=b?Zh(d,a):d.h[a].remove(b,c)}),0)})};
|
|
266
|
+
function ji(a,b){var c;return M(function(d){c=Nb;return b==c.oa?a.g?z(d,a.g.remove(0,Infinity),0):d["return"]():z(d,gi(a,b,function(){var e=a.m.duration;0>=e?Zh(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return M(function(d){c=Nb;return a==c.oa?d["return"]():z(d,gi(b,a,function(){b.j.currentTime-=.001;Zh(b,a)}),0)})};
|
|
267
|
+
function ki(a,b,c,d,e){var f;return M(function(g){f=Nb;return b==f.oa?(a.g.C=c,td(a.g,d,e),g["return"]()):z(g,Promise.all([gi(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;Zh(a,b)}),gi(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;Zh(a,b)}),gi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Zh(a,b)})]),0)})}
|
|
268
268
|
q.endOfStream=function(a){var b=this;return M(function(c){return z(c,li(b,function(){$h(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.bb=function(a){var b=this;return M(function(c){return z(c,li(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function Zh(a,b){var c=a.i[b][0];c&&(c.p.resolve(),mi(a,b))}function gi(a,b,c){nf(a.F);c={start:c,p:new Pc};a.i[b].push(c);1==a.i[b].length&&ni(a,b);return c.p}
|
|
269
269
|
function li(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:nf(a.F);c=[];d={};for(e in a.h)d.tc=new Pc,f={start:function(l){return function(){return l.tc.resolve()}}(d),p:d.tc},a.i[e].push(f),c.push(d.tc),1==a.i[e].length&&f.start(),d={tc:d.tc};E(k,2);return z(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=I(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)mi(a,h)}C(k)}})}function mi(a,b){a.i[b].shift();ni(a,b)}
|
|
270
270
|
function ni(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),mi(a,b)}}function fi(a,b,c,d){var e=a.I[d];null==c&&e&&(Fd()||Cd())&&"mp4"==a.J[d].split(";")[0].split("/")[1]&&(b=Cg(b));return b}var Xh=window.URL.createObjectURL;function oi(a,b,c,d){this.Ka=a;this.Ha=b;this.wa=c;this.Wd=void 0===d?null:d}oi.prototype.Fc=function(){return this.Ha};oi.prototype.Bc=function(){return this.wa};function pi(a,b){return a&&b?a.Fc()==b.Fc()&&a.Bc()==b.Bc()&&kc(a.Ka(),b.Ka()):a==b}N("shaka.media.InitSegmentReference",oi);oi.prototype.getEndByte=oi.prototype.Bc;oi.prototype.getStartByte=oi.prototype.Fc;
|
|
@@ -292,27 +292,27 @@ Ni.prototype.markImmutable=Ni.prototype.Fg;Ni.prototype.release=Ni.prototype.rel
|
|
|
292
292
|
Oi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.Ka().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Oi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.Ka().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",Oi);Oi.prototype.next=Oi.prototype.next;Oi.prototype.current=Oi.prototype.current;
|
|
293
293
|
Oi.prototype.seek=Oi.prototype.seek;function Qi(){Ni.call(this,[]);this.j=[]}u(Qi,Ni);q=Qi.prototype;q.clone=function(){var a=new Qi;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.O.length}return null};
|
|
294
294
|
q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.O.length}return null};q.offset=function(){};q.ec=function(){};q.Gb=function(){};q.fc=function(){};q.yb=function(){};q.wd=function(){};N("shaka.media.MetaSegmentIndex",Qi);Qi.prototype.updateEvery=Qi.prototype.wd;Qi.prototype.fit=Qi.prototype.yb;Qi.prototype.mergeAndEvict=Qi.prototype.fc;Qi.prototype.evict=Qi.prototype.Gb;Qi.prototype.merge=Qi.prototype.ec;
|
|
295
|
-
Qi.prototype.offset=Qi.prototype.offset;Qi.prototype.get=Qi.prototype.get;Qi.prototype.find=Qi.prototype.find;Qi.prototype.release=Qi.prototype.release;function Ri(a){var b=this;this.g=a;this.j=!1;this.i=this.g.ed();this.h=new Q(function(){b.g.lf(.25*b.i)})}Ri.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ri.prototype.set=function(a){this.i=a;Si(this)};Ri.prototype.bd=function(){return this.g.bd()};function Si(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.ed()!=b&&a.g.se(b);return}catch(c){}a.h.ha(.25);0!=a.g.ed()&&a.g.se(0)};function Ti(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Ui(b,!1)})).ha(.25)}Ti.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Ui(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Vi(a){cb.call(this);this.g=new Map;this.h=a}u(Vi,cb);Vi.prototype.release=function(){this.g.clear();cb.prototype.release.call(this)};function
|
|
295
|
+
Qi.prototype.offset=Qi.prototype.offset;Qi.prototype.get=Qi.prototype.get;Qi.prototype.find=Qi.prototype.find;Qi.prototype.release=Qi.prototype.release;function Ri(a){var b=this;this.g=a;this.j=!1;this.i=this.g.ed();this.h=new Q(function(){b.g.lf(.25*b.i)})}Ri.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ri.prototype.set=function(a){this.i=a;Si(this)};Ri.prototype.bd=function(){return this.g.bd()};function Si(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.ed()!=b&&a.g.se(b);return}catch(c){}a.h.ha(.25);0!=a.g.ed()&&a.g.se(0)};function Ti(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Ui(b,!1)})).ha(.25)}Ti.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Ui(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Vi(a){cb.call(this);this.g=new Map;this.h=a}u(Vi,cb);Vi.prototype.release=function(){this.g.clear();cb.prototype.release.call(this)};function Wi(a,b){var c=a.g.get(b);c||(c={Kc:[],Se:null,contentType:b},a.g.set(b,c));return c}function Zi(a,b,c){var d=Wi(a,b.contentType);$i(a,d);a={Wd:b,position:c};d=d.Kc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
296
296
|
Vi.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Kc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Wd;break a}}d=null}if(e=d)e=c.Se,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
297
297
|
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Se=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function $i(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Kc;b.Kc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Kc=[]};function aj(a){cb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ha(2)}u(aj,cb);aj.prototype.release=function(){this.g.clear();this.h.stop();cb.prototype.release.call(this)};function bj(a){cb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Vb:null,Ub:cj,Lb:function(c,d){return dj(b,"enter",c,d)}},{Vb:ej,Ub:cj,Lb:function(c,d){return dj(b,"enter",c,d)}},{Vb:fj,Ub:cj,Lb:function(c,d){return dj(b,"enter",c,d)}},{Vb:cj,Ub:ej,Lb:function(c,d){return dj(b,"exit",c,d)}},{Vb:cj,Ub:fj,Lb:function(c,d){return dj(b,"exit",c,d)}},{Vb:ej,Ub:fj,Lb:function(c,d){return dj(b,"skip",c,d)}},{Vb:fj,Ub:ej,Lb:function(c,d){return dj(b,"skip",c,d)}}];this.h=new of;this.h.o(this.i,"regionremove",
|
|
298
298
|
function(c){b.g["delete"](c.region)})}u(bj,cb);bj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cb.prototype.release.call(this)};bj.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?ej:a>d.endTime?fj:cj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Vb==e&&h.Ub==f&&h.Lb(d,b)}};
|
|
299
299
|
function dj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ej=1,cj=2,fj=3;function gj(a,b,c,d,e){a=ef(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function hj(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=1;this.A=this.l=null;this.i=new Map;this.F=!1;this.G=null;this.B=!1;this.j=new mf(function(){return ij(c)})}hj.prototype.destroy=function(){return this.j.destroy()};function ij(a){var b,c,d,e;return M(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,jj(e),b.push(kj(e));return z(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;C(f)})}
|
|
300
300
|
hj.prototype.configure=function(a){this.h=a;this.G=new Ne({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};hj.prototype.start=function(){var a=this;return M(function(b){if(1==b.g)return z(b,lj(a),2);nf(a.j);a.F=!0;C(b)})};
|
|
301
|
-
function mj(a,b){var c,d,e,f,g,h;M(function(k){switch(k.g){case 1:return c=Nb,E(k,2),z(k,ji(a.g.V,c.
|
|
301
|
+
function mj(a,b){var c,d,e,f,g,h;M(function(k){switch(k.g){case 1:return c=Nb,E(k,2),z(k,ji(a.g.V,c.oa),4);case 4:va(k,3);break;case 2:if(d=I(k),a.g)a.g.onError(d);case 3:e=kd(b.mimeType,b.codecs);Yh(a.g.V,e);f=a.g.V.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=nj(b),a.i.set(c.oa,h),oj(a,h,0);C(k)}})}function pj(a){var b=a.i.get(Mb);b&&(jj(b),kj(b)["catch"](function(){}),a.i["delete"](Mb));a.A=null}
|
|
302
302
|
function qj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Rb&&(rj(a,e,!1,0,!1),c.Rb=d)}else if(d=c.Rb)c.Rb=null,rj(a,d,!0,0,!1)}}function sj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&rj(a,b.video,c,d,e),b.audio&&rj(a,b.audio,c,d,e))}function tj(a,b){a.A=b;a.F&&rj(a,b,!0,0,!1)}
|
|
303
|
-
function rj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=Mb?f&&(f.Rb&&(b.trickModeVideo?(f.Rb=b,b=b.trickModeVideo):f.Rb=null),f.stream!=b||e)&&(b.type==Mb&&Yh(a.g.V,kd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.
|
|
303
|
+
function rj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=Mb?f&&(f.Rb&&(b.trickModeVideo?(f.Rb=b,b=b.trickModeVideo):f.Rb=null),f.stream!=b||e)&&(b.type==Mb&&Yh(a.g.V,kd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ua=null,c&&(f.yc?f.zd=!0:f.ab?(f.Tb=!0,f.Yc=d,f.zd=!0):(jj(f),uj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),vj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):mj(a,b)}
|
|
304
304
|
function vj(a,b){var c,d;return M(function(e){if(1==e.g){if(!b.Ma)return e["return"]();c=b.stream;d=b.Ma;return c.segmentIndex?e.D(2):z(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e["return"]();var f=a.g.dd();var g=ci(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.wa?k.wa-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
|
|
305
305
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();C(e)})}function wj(a,b){b.yc||b.Tb||(b.ab?(b.Tb=!0,b.Yc=0):null==ai(a.g.V,b.type)?null==b.eb&&oj(a,b,0):(jj(b),uj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
|
|
306
|
-
function lj(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Fb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.gb,a.l.video),d.add(a.l.video));a.A&&(c.set(b.
|
|
307
|
-
(m=nj(l),a.i.set(k,m),oj(a,m,0));C(n)})}function nj(a){return{stream:a,type:a.type,
|
|
306
|
+
function lj(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Fb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.gb,a.l.video),d.add(a.l.video));a.A&&(c.set(b.oa,a.A),d.add(a.A));e=a.g.V;f=a.h.forceTransmuxTS;return z(n,e.init(c,f),2)}nf(a.j);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.V.bb(p):a.g.V.bb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||
|
|
307
|
+
(m=nj(l),a.i.set(k,m),oj(a,m,0));C(n)})}function nj(a){return{stream:a,type:a.type,ua:null,Ra:null,jd:null,Vd:null,Ud:null,Td:null,Rb:null,endOfStream:!1,ab:!1,eb:null,Tb:!1,Yc:0,zd:!1,yc:!1,fe:!1,Gc:!1,Ma:null}}
|
|
308
308
|
function xj(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:nf(a.j);if(b.ab||null==b.eb||b.yc)return h["return"]();b.eb=null;if(!b.Tb){h.D(2);break}return z(h,uj(a,b,b.zd,b.Yc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return z(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.eb&&oj(a,b,0),h["return"]();case 4:E(h,6);d=yj(a,b);null!=d&&(oj(a,b,d),b.Gc=!1);va(h,7);break;case 6:return e=
|
|
309
309
|
I(h),z(h,zj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return z(h,a.g.V.endOfStream(),10);case 10:nf(a.j),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),C(h)}})}
|
|
310
310
|
function yj(a,b){if(Aj(b))return hi(a.g.V,b.stream.originalId||""),null;b.type==Mb&&ii(a.g.V);var c=a.g.dd(),d=b.Ra?b.Ra.endTime:c,e=di(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(Mb))&&Aj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=ci(a.g.V,b.type);e=Bj(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=Infinity;
|
|
311
|
-
var g=Array.from(a.i.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Aj(h)||h.
|
|
312
|
-
function Bj(a,b,c,d){if(b.
|
|
313
|
-
function Cj(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){switch(w.g){case 1:return e=Nb,f=b.stream,g=b.
|
|
311
|
+
var g=Array.from(a.i.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Aj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Cj(a,b,c,e)["catch"](function(){});return null}
|
|
312
|
+
function Bj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Ra||d)return b.ua=b.stream.segmentIndex.Ib(b.Ra?b.Ra.endTime:d),b.ua&&b.ua.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.Ib(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.Ib(c),e=b.ua&&b.ua.next().value);return e}
|
|
313
|
+
function Cj(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){switch(w.g){case 1:return e=Nb,f=b.stream,g=b.ua,b.ab=!0,E(w,2),z(w,Dj(a,b,d),4);case 4:nf(a.j);if(a.B)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(x){var D,B,A;return M(function(F){nf(a.j);if(a.B)return F["return"]();n=Ej(n,x);D=!1;B=0;(new tg).box("mdat",function(G){B=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D)return F.D(0);
|
|
314
314
|
A=n.subarray(0,B);n=n.subarray(B);return z(F,Fj(a,b,c,f,d,A),0)})},z(w,Gj(a,b,d,p),6);l=Gj(a,b,d);return z(w,l,7);case 7:return m=w.h,nf(a.j),a.B?w["return"]():b.Tb?(b.ab=!1,oj(a,b,0),w["return"]()):z(w,Fj(a,b,c,f,d,m),6);case 6:nf(a.j);if(a.B)return w["return"]();b.Ra=d;g.next();b.ab=!1;b.fe=!1;t=a.g.V.zb();v=t[b.type];Xa(JSON.stringify(v));b.Tb||a.g.be();oj(a,b,0);va(w,0);break;case 2:y=I(w);nf(a.j,y);if(a.B)return w["return"]();b.ab=!1;if(7001==y.code)b.ab=!1,b.eb=null,oj(a,b,0),w.D(0);else if(b.type==
|
|
315
|
-
e.
|
|
315
|
+
e.oa&&a.h.ignoreTextStreamFailures)a.i["delete"](e.oa),w.D(0);else if(3017==y.code)Hj(a,b,y),w.D(0);else if(1001==y.code&&y.data&&404==y.data[1])b.ab=!1,b.eb=null,oj(a,b,1),w.D(0);else return b.Gc=!0,y.severity=2,z(w,zj(a,y),0)}})}function Ej(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
316
316
|
function Hj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.fe})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Gc=!0;a.B=!0;a.g.onError(c);return}b.fe=!0}oj(a,b,4)}
|
|
317
317
|
function Dj(a,b,c){var d,e,f,g,h,k,l;return M(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Vd||e!=b.Ud||f!=b.Td)h=function(){var n;return M(function(p){if(1==p.g)return E(p,2),b.Ud=e,b.Td=f,b.Vd=g,z(p,ki(a.g.V,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=I(p);b.Ud=null;b.Td=null;b.Vd=null;throw n;})},d.push(h());!pi(c.g,b.jd)&&(b.jd=c.g)&&(k=Gj(a,b,c.g),l=function(){var n,p,t;return M(function(v){switch(v.g){case 1:return E(v,2),z(v,k,4);
|
|
318
318
|
case 4:return n=v.h,nf(a.j),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,z(v,ei(a.g.V,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw t=I(v),b.jd=null,t;}})},a.g.Jg(c.startTime,c.g),d.push(l()));return z(m,Promise.all(d),0)})}
|
|
@@ -320,7 +320,7 @@ function Fj(a,b,c,d,e,f){var g;return M(function(h){if(1==h.g)return g=d.closedC
|
|
|
320
320
|
m=k.reader.Lc(),n=k.reader.Lc();k=k.reader.Cb(k.reader.U.byteLength-k.reader.ia());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Kg():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:y,messageData:k}),l=new O(Ij,l),a.g.onEvent(l))}).parse(f),z(h,Jj(a,b,c),2);if(3!=h.g)return nf(a.j),z(h,ei(a.g.V,b.type,f,e.startTime,e.endTime,g),3);nf(a.j);C(h)})}
|
|
321
321
|
function Jj(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=ai(a.g.V,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():z(h,a.g.V.remove(b.type,e,e+g),2)}nf(a.j);C(h)})}function Aj(a){return a&&a.type==Mb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
322
322
|
function Gj(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=lf,f=gj(c.Ka(),c.Ha,c.wa,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof oi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Pb.request(e,f),b.Ma=h,z(l,h.promise,2);k=l.h;b.Ma=null;return l["return"](k.data)})}
|
|
323
|
-
function uj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Tb=!1,b.zd=!1,b.Yc=0,b.yc=!0,b.Ra=null,b.jd=null,b.
|
|
323
|
+
function uj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Tb=!1,b.zd=!1,b.Yc=0,b.yc=!0,b.Ra=null,b.jd=null,b.ua=null,d?(e=a.g.dd(),f=a.g.V.getDuration(),z(g,a.g.V.remove(b.type,e+d,f),3)):z(g,ji(a.g.V,b.type),4);if(3!=g.g)return nf(a.j),c?z(g,a.g.V.flush(b.type),3):g.D(3);nf(a.j);b.yc=!1;b.endOfStream=!1;oj(a,b,0);C(g)})}
|
|
324
324
|
function oj(a,b,c){var d=b.type;if(d!=Mb||a.i.has(d))b.eb=(new yd(function(){var e;return M(function(f){if(1==f.g)return E(f,2),z(f,xj(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);C(f)})})).S(c)}function jj(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function kj(a){return M(function(b){return a.Ma?z(b,a.Ma.abort(),0):b.D(0)})}function zj(a,b){return M(function(c){if(1==c.g)return z(c,Pe(a.G),2);nf(a.j);a.g.onError(b);b.handled||a.h.failureCallback(b);C(c)})};function Kj(a,b){var c=Lj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Mj(d)});this.B=new mf(function(){return Nj(d)})}Kj.prototype.destroy=function(){return this.B.destroy()};function Nj(a){var b,c,d;return M(function(e){if(1==e.g)return a.h&&a.h.abort(),Oj(a),z(e,a.C,2);a.g&&a.g.$a.Qb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Qb();a.g=null;a.m=[];a.j=null;C(e)})}
|
|
325
325
|
function Pj(a,b){var c={ic:function(){},od:function(){},Qb:function(){},onError:function(){},qd:function(){},Hi:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();Oj(a);return c}
|
|
326
326
|
function Mj(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Kb)var c=!1;else{a.g&&(a.g.$a.Qb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.ic(),a.g={node:d.node,payload:d.payload,Kb:d.Kb,$a:c.$a}):c.$a.qd();c=!0}c?c=Promise.resolve():a.g?c=Qj(a):(a.j.Ig(a.i),a.A=new Pc,c=a.A);b=z(b,c,1)}return b})}
|
|
@@ -366,14 +366,14 @@ function Gk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Yb(
|
|
|
366
366
|
function Lk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Mk(){this.i=this.h=null;this.g=[]}function Nk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Ok(){this.A=this.B=this.H=this.F=this.m=this.j=this.G=this.l=this.i=this.I=this.J=this.K=this.C=this.N=NaN;this.g=new Ik;this.h=new Mk};function T(a,b){cb.call(this);var c=this;this.l=Pk;this.fd=this.g=null;this.ba=!1;this.kd=new of;this.ib=new of;this.A=new of;this.ce=this.B=this.hb=this.i=this.ld=this.J=this.j=this.ma=this.W=this.nd=this.K=this.gd=this.I=this.Wa=this.G=this.N=this.m=this.H=null;this.He=1E9;this.h=Qk(this);this.Ge={width:Infinity,height:Infinity};this.C=null;this.Aa=new Ee(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ba=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
|
|
367
367
|
this.jb=this.h.preferForcedSubs;this.fb=[];this.Ac=null;b&&b(this);this.H=Rk(this);this.H.qe(this.h.streaming.forceHTTPS);this.F=null;Sk&&(this.F=Gb(Sk));this.kd.o(window,"online",function(){c.ge()});this.R={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Ie={name:"manifest-parser"};this.De={name:"manifest"};this.Oa={name:"media-source"};this.ee={name:"drm-engine"};this.$={name:"load"};this.Je={name:"src-equals-drm-engine"};this.Xa={name:"src-equals"};var d=new Map;d.set(this.Z,
|
|
368
368
|
function(e,f){return Ue(Tk(c,e,f))});d.set(this.R,function(e){e.M&&(c.ib.rb(),e.M=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Ue(e)});d.set(this.aa,function(e){return Ue(Uk(c,e))});d.set(this.Oa,function(e){e=Vk(c,e);return Ue(e)});d.set(this.Ie,function(e,f){var g=Wk(c,e,f);return Ue(g)});d.set(this.De,function(e){return Xk(c,e)});d.set(this.ee,function(e){e=Yk(c,e);return Ue(e)});d.set(this.$,function(e,f){return Ue(Zk(c,e,f))});d.set(this.Je,function(e,f){var g=$k(c,e,f);return Ue(g)});
|
|
369
|
-
d.set(this.Xa,function(e,f){return al(c,e,f)});this.
|
|
369
|
+
d.set(this.Xa,function(e,f){return al(c,e,f)});this.na=new Kj(this.R,{mg:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.Z);e==c.Z&&(k=g==c.R||f.M!=h.M?c.R:g==c.Z?c.Z:g==c.Oa||g==c.$?c.Oa:g==c.Xa?c.Je:null);e==c.Oa&&(k=g==c.$&&f.M==h.M?c.Ie:c.aa);e==c.Ie&&(k=bl(c.$,c.De,c.aa,g,f,h));e==c.De&&(k=bl(c.$,c.ee,c.aa,g,f,h));e==c.ee&&(k=bl(c.$,c.$,c.aa,g,f,h));e==c.Je&&(k=g==c.Xa&&f.M==h.M?c.Xa:c.aa);if(e==c.$||e==c.Xa)k=c.aa;e==c.aa&&(k=h.M&&f.M==h.M?c.Z:c.R);return k},Rf:function(e,f,g){c.dispatchEvent(cl(dl,
|
|
370
370
|
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return M(function(f){return 1==f.g?z(f,Uk(c,e),2):f["return"](e.M?c.Z:c.R)})},Ig:function(e){c.dispatchEvent(cl(el,(new Map).set("state",e.name)))}});a&&this.xc(a,!0)}u(T,cb);function cl(a,b){return new O(a,b)}q=T.prototype;
|
|
371
|
-
q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==fl)return c["return"]();a.l=fl;b=Pj(a.
|
|
371
|
+
q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==fl)return c["return"]();a.l=fl;b=Pj(a.na,function(){return{node:a.R,payload:Lj(),Kb:!1}});return z(c,new Promise(function(d){b.ic=function(){};b.od=function(){d()};b.Qb=function(){d()};b.onError=function(){d()};b.qd=function(){d()}}),2);case 2:return z(c,a.na.destroy(),3);case 3:a.kd&&(a.kd.release(),a.kd=null);a.ib&&(a.ib.release(),a.ib=null);a.A&&(a.A.release(),a.A=null);a.ce=null;a.B=null;a.h=null;a.C=null;a.fd=null;
|
|
372
372
|
a.W=null;if(!a.H){c.D(4);break}return z(c,a.H.destroy(),5);case 5:a.H=null;case 4:cb.prototype.release.call(a),C(c)}})};
|
|
373
373
|
function gl(){window.Promise||Sa("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Sa("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Ed("Trident/"))return!1;var a=Id();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
|
|
374
|
-
!1:zd()?!0:Ad("application/x-mpegurl")}q.xc=function(a,b){b=void 0===b?!0:b;if(this.l==fl)return Promise.reject(hl());var c=Lj();c.M=a;zd()||(b=!1);var d=b?this.Oa:this.Z,e=Pj(this.
|
|
375
|
-
q.Ee=function(a){var b=this;a=void 0===a?!0:a;if(this.l==fl)return Promise.reject(hl());zd()||(a=!1);var c=Lj(),d=Pj(this.
|
|
376
|
-
q.load=function(a,b,c){var d=this;this.Ac=null;if(this.l==fl)return Promise.reject(hl());this.dispatchEvent(cl(jl));var e=Lj();e.uri=a;e.ye=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=kl(this,e)?this.Xa:this.$,g=Pj(this.
|
|
374
|
+
!1:zd()?!0:Ad("application/x-mpegurl")}q.xc=function(a,b){b=void 0===b?!0:b;if(this.l==fl)return Promise.reject(hl());var c=Lj();c.M=a;zd()||(b=!1);var d=b?this.Oa:this.Z,e=Pj(this.na,function(){return{node:d,payload:c,Kb:!1}});e.ic=function(){};return il(e)};q.detach=function(){var a=this;if(this.l==fl)return Promise.reject(hl());var b=Pj(this.na,function(){return{node:a.R,payload:Lj(),Kb:!1}});b.ic=function(){};return il(b)};
|
|
375
|
+
q.Ee=function(a){var b=this;a=void 0===a?!0:a;if(this.l==fl)return Promise.reject(hl());zd()||(a=!1);var c=Lj(),d=Pj(this.na,function(e){var f=e.M&&a?b.Oa:e.M?b.Z:b.R;c.M=e.M;return{node:f,payload:c,Kb:!1}});d.ic=function(){};return il(d)};q.hh=function(a){this.Ac=a};
|
|
376
|
+
q.load=function(a,b,c){var d=this;this.Ac=null;if(this.l==fl)return Promise.reject(hl());this.dispatchEvent(cl(jl));var e=Lj();e.uri=a;e.ye=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=kl(this,e)?this.Xa:this.$,g=Pj(this.na,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Kb:!0}});this.C=new Ok;this.W=ll(this);g.ic=function(){};return new Promise(function(h,k){g.qd=function(){return k(new P(2,7,7002))};g.od=function(){h();d.dispatchEvent(cl(ml))};g.Qb=function(){return k(hl())};
|
|
377
377
|
g.onError=function(l){return k(l)}})};function kl(a,b){if(!zd())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ng(d),c=nl[c]);if(c){if(""==(b.M||Bd()).canPlayType(c))return!1;if(!zd()||!(c in mg||ng(d)in og)||a.h.streaming.preferNativeHls)return!0;if(Hd())return a.h.streaming.useNativeHlsOnSafari}return!1}function Tk(a,b,c){null==b.M&&(b.M=c.M,a.ib.o(b.M,"error",function(){var d=ol(a);d&&pl(a,d)}));a.g=b.M;return Promise.resolve()}
|
|
378
378
|
function Uk(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=fl&&(a.l=Pk),c=a.fb.map(function(p){return p()}),a.fb=[],z(n,Promise.all(c),2);case 2:a.dispatchEvent(cl(ql));b.mimeType=null;b.startTime=null;b.uri=null;b.M&&a.A.rb();a.Wa&&(a.Wa.release(),a.Wa=null);a.gd&&(a.gd.stop(),a.gd=null);if(!a.J){n.D(3);break}return z(n,a.J.stop(),4);case 4:a.J=null,a.ld=null;case 3:if(!a.B){n.D(5);break}return z(n,a.B.stop(),5);case 5:if(!a.j){n.D(7);break}return z(n,a.j.destroy(),
|
|
379
379
|
8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.G&&(a.G.release(),a.G=null);if(!a.N){n.D(9);break}return z(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.M||!b.M.src){n.D(11);break}return z(n,new Promise(function(p){return(new Q(p)).S(.1)}),12);case 12:for(b.M.removeAttribute("src"),b.M.load();b.M.lastChild;)b.M.removeChild(b.M.firstChild);case 11:if(!a.m){n.D(13);break}return z(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.hb=null;a.K=null;if(a.i){d=r(a.i.variants);
|
|
@@ -401,7 +401,7 @@ function $l(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.vd(b);var c=a.h.pref
|
|
|
401
401
|
function Yl(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.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,tl(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=cm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}
|
|
402
402
|
function tl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(cl(dm,b))}function Ol(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}function Al(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 Bl(a,b){return new zf(b,a.h.drm.updateExpirationTime)}
|
|
403
403
|
function Rk(a){return new af(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(cl(em,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(cl(fm,b))})}
|
|
404
|
-
function Jl(a,b){return new Hi(a.g,a.i,a.h.streaming,b,function(){a.Wa&&Ui(a.Wa,!0);if(a.j)for(var c=a.j,d=c.g.dd(),e=c.h.smallGapLimit,f=r(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.
|
|
404
|
+
function Jl(a,b){return new Hi(a.g,a.i,a.h.streaming,b,function(){a.Wa&&Ui(a.Wa,!0);if(a.j)for(var c=a.j,d=c.g.dd(),e=c.h.smallGapLimit,f=r(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.ua=null;var k=c.g.V;g==Mb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=bi(k,g),k=Qh(k,d,e));if(!k&&((null!=ci(c.g.V,g)||h.ab)&&wj(c,h),h.Ma&&(h.Ma.abort(),h.Ma=null),g===Mb))for(g=c.g.V.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Dh(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())yh(h.value)}a.K&&
|
|
405
405
|
gm(a)},function(c){return a.dispatchEvent(c)})}function Kl(a){var b=new bj(a.nd);b.addEventListener("enter",function(d){ul(a,hm,d.region)});b.addEventListener("exit",function(d){ul(a,im,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ul(a,hm,e),ul(a,im,e))});var c=new Ti(a.g);c.g.add(b);a.ma&&c.g.add(a.ma);return c}function Ll(a,b){a.K=new Je;a.K.g=Le;Me(a.K,b,Math.min(.5,b/2));rl(a);a.gd=(new Q(function(){gm(a)})).ha(.25)}
|
|
406
406
|
function gm(a){switch(a.l){case Zl:if(a.g.ended)var b=!0;else{var c=Ph(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Nl:a:if(a.g.ended||$h(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Jb();var d=Ph(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Rh(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ke:Le;c.g=d;b!=d&&rl(a)}function sl(a,b,c,d){return new Uh(a,b,c,d)}
|
|
407
407
|
function ll(a){return new fk({getBandwidthEstimate:function(){return a.B?a.B.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Za:function(){return a.Za()},Ab:function(){return a.Ab()},T:function(){return a.T()}},a.h.cmcd)}
|
|
@@ -428,7 +428,7 @@ q.Wg=function(a){if(this.i&&this.G){for(var b=null,c=r(this.i.variants),d=c.next
|
|
|
428
428
|
q.Wf=function(a){var b=Qb(a),c=qm(this).filter(function(f){return Qb(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function am(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
|
|
429
429
|
function cm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function qm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
430
430
|
q.we=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==Nl)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=te(this.i.textStreams,this.Ba,this.wb,this.jb),0<a.length&&(tj(this.j,a[0]),mm(this))):pj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=am(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")}Ul(this)}};
|
|
431
|
-
q.ng=function(){if(!this.T())return null;var a=this.
|
|
431
|
+
q.ng=function(){if(!this.T())return null;var a=this.na.l,b=0;if(this.G)b=this.G.m();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};
|
|
432
432
|
q.bf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zb=function(){if(this.l==Nl)return this.N.zb();var a={total:[],audio:[],video:[],text:[]};this.l==Zl&&(a.total=Sh(this.g.buffered));return a};
|
|
433
433
|
q.getStats=function(){if(this.l!=Nl&&this.l!=Zl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Fl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.C;b=Math.round(100*b);c.i=isNaN(c.i)?
|
|
434
434
|
b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.C,b=Number(a.totalVideoFrames),c.K=Number(a.droppedVideoFrames),c.J=b,this.C.I=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.I?a.I:NaN):a=NaN;this.C.m=a;if(this.l==Nl){if(a=this.j.l)this.C.B=(this.I?this.I.i:1)*a.bandwidth;a&&a.video&&(c=this.C,b=a.video.height||NaN,c.N=a.video.width||NaN,c.C=b);this.T()&&(a=this.bf().valueOf()+1E3*this.La().end,this.C.F=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
|
|
@@ -438,7 +438,7 @@ q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;zb("addTextTrack","Plea
|
|
|
438
438
|
b&&k.label==(f||"")&&k.kind==c}))return Xl(this),a;throw new P(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new P(1,4,4033);a={id:this.He++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Pi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Mb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
|
|
439
439
|
closedCaptions:null};if(!qd(kd(a.mimeType,a.codecs)))throw new P(2,2,2014,d);this.i.textStreams.push(a);Xl(this);return ke(a)};
|
|
440
440
|
q.If=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,y,w,x,D;return M(function(B){switch(B.g){case 1:if(h.l!=Nl&&h.l!=Zl)throw new P(1,7,7004);if(d){B.D(2);break}return z(B,sm(h,a),3);case 3:d=B.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(A){}if(h.l!=Zl){B.D(4);break}g&&(c="forced");return z(B,tm(h,a,b,c,d,f||"",k),5);case 5:l=h.pb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Xl(h),B["return"](m);throw new P(1,2,2012);case 4:n=
|
|
441
|
-
Nb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new P(1,4,4033);if(!k.length){B.D(6);break}return z(B,um(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=B.h,v=vm(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Xh(y),d="text/vtt";case 6:w={id:h.He++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Pi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.
|
|
441
|
+
Nb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new P(1,4,4033);if(!k.length){B.D(6);break}return z(B,um(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=B.h,v=vm(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Xh(y),d="text/vtt";case 6:w={id:h.He++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Pi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.oa,primary:!1,trickModeVideo:null,
|
|
442
442
|
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=kd(w.mimeType,w.codecs);D=qd(x);if(!D)throw new P(2,2,2014,d);h.i.textStreams.push(w);Xl(h);return B["return"](ke(w))}})};
|
|
443
443
|
q.Hf=function(a,b,c){var d=this,e,f,g,h;return M(function(k){switch(k.g){case 1:if(d.l!=Nl&&d.l!=Zl)throw new P(1,7,7004);if(c){k.D(2);break}return z(k,sm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return z(k,tm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ye();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return z(k,new Promise(function(l,m){d.A.Ga(f,"load",l);d.A.Ga(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return k["return"](h);
|
|
444
444
|
case 5:throw new P(1,2,2012);}})};function sm(a,b){var c,d;return M(function(e){switch(e.g){case 1:c=ng(b);if(d=rm[c])return e["return"](d);E(e,2);return z(e,pg(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 P(1,2,2011,c);}})}
|
|
@@ -473,13 +473,13 @@ T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h
|
|
|
473
473
|
zd()?!!og[p]:Ad(l[p]);c=k;k={};p=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
|
|
474
474
|
for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=zd()?qd(l)?!0:MediaSource.isTypeSupported(l)||gd(l):Ad(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Lm;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=gl;T.setAdManagerFactory=function(a){Sk=a};T.registerSupportPlugin=function(a,b){Lm[a]=b};T.prototype.destroy=T.prototype.destroy;
|
|
475
475
|
var Hm="abrstatuschanged",Bm="adaptation",ym="buffering",fm="downloadfailed",em="downloadheadersreceived",El="drmsessionupdate",Ij="emsg",Im="error",Km="expirationupdated",ml="loaded",jl="loading",zl="manifestparsed",wl="mediaqualitychanged",dm="metadata",dl="onstatechange",el="onstateidle",zm="ratechange",Pl="streaming",Fm="textchanged",Gm="texttrackvisibility",vl="timelineregionadded",hm="timelineregionenter",im="timelineregionexit",Dm="trackschanged",ql="unloading",Em="variantchanged",Mm={nh:Hm,
|
|
476
|
-
oh:Bm,ph:ym,uh:fm,vh:em,wh:El,Eh:Ij,Error:Im,Fh:Km,Lh:"largegap",Mh:ml,Nh:jl,Rh:zl,Sh:wl,Metadata:dm,Xh:dl,Yh:el,gi:zm,ni:"sessiondata",oi:Pl,pi:Fm,ri:Gm,si:vl,ti:hm,wi:im,xi:Dm,Ci:ql,Ei:Em},fl=0,Pk=1,Nl=2,Zl=3;T.LoadMode={DESTROYED:fl,NOT_LOADED:Pk,MEDIA_SOURCE:Nl,SRC_EQUALS:Zl};T.version="v3.3.
|
|
476
|
+
oh:Bm,ph:ym,uh:fm,vh:em,wh:El,Eh:Ij,Error:Im,Fh:Km,Lh:"largegap",Mh:ml,Nh:jl,Rh:zl,Sh:wl,Metadata:dm,Xh:dl,Yh:el,gi:zm,ni:"sessiondata",oi:Pl,pi:Fm,ri:Gm,si:vl,ti:hm,wi:im,xi:Dm,Ci:ql,Ei:Em},fl=0,Pk=1,Nl=2,Zl=3;T.LoadMode={DESTROYED:fl,NOT_LOADED:Pk,MEDIA_SOURCE:Nl,SRC_EQUALS:Zl};T.version="v3.3.6";var Nm=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(Nm[0]),Number(Nm[1])));
|
|
477
477
|
var Jm=["output-restricted","internal-error"],Lm={},Sk=null,nl={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"},rm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
478
478
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function Om(){this.h=[];this.j=this.i=this.g=0};function Pm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new of;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=Pm.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};
|
|
479
479
|
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()};
|
|
480
480
|
q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?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()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};
|
|
481
481
|
N("shaka.ads.ClientSideAd",Pm);Pm.prototype.release=Pm.prototype.release;Pm.prototype.getPositionInSequence=Pm.prototype.getPositionInSequence;Pm.prototype.getSequenceLength=Pm.prototype.getSequenceLength;Pm.prototype.setMuted=Pm.prototype.setMuted;Pm.prototype.resize=Pm.prototype.resize;Pm.prototype.isLinear=Pm.prototype.isLinear;Pm.prototype.isMuted=Pm.prototype.isMuted;Pm.prototype.setVolume=Pm.prototype.setVolume;Pm.prototype.getVolume=Pm.prototype.getVolume;Pm.prototype.play=Pm.prototype.play;
|
|
482
|
-
Pm.prototype.pause=Pm.prototype.pause;Pm.prototype.skip=Pm.prototype.skip;Pm.prototype.canSkipNow=Pm.prototype.canSkipNow;Pm.prototype.getTimeUntilSkippable=Pm.prototype.getTimeUntilSkippable;Pm.prototype.isSkippable=Pm.prototype.isSkippable;Pm.prototype.isPaused=Pm.prototype.isPaused;Pm.prototype.getRemainingTime=Pm.prototype.getRemainingTime;Pm.prototype.getMinSuggestedDuration=Pm.prototype.getMinSuggestedDuration;Pm.prototype.getDuration=Pm.prototype.getDuration;function Qm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.j=d;this.m=null;this.h=new of;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.3.
|
|
482
|
+
Pm.prototype.pause=Pm.prototype.pause;Pm.prototype.skip=Pm.prototype.skip;Pm.prototype.canSkipNow=Pm.prototype.canSkipNow;Pm.prototype.getTimeUntilSkippable=Pm.prototype.getTimeUntilSkippable;Pm.prototype.isSkippable=Pm.prototype.isSkippable;Pm.prototype.isPaused=Pm.prototype.isPaused;Pm.prototype.getRemainingTime=Pm.prototype.getRemainingTime;Pm.prototype.getMinSuggestedDuration=Pm.prototype.getMinSuggestedDuration;Pm.prototype.getDuration=Pm.prototype.getDuration;function Qm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.j=d;this.m=null;this.h=new of;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.3.6");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Rm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
483
483
|
function(f){Sm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Qm.prototype.stop=function(){this.g&&this.g.stop();this.A&&Wj(this.A)};Qm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Sm(a,b){b.getError();Tm(a,null);a.j(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
484
484
|
function Rm(a,b){a.j(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.j(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new O("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Um(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
485
485
|
a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.g.start()}catch(f){Tm(a,null)}}
|
|
@@ -500,20 +500,20 @@ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Xm.prototyp
|
|
|
500
500
|
function Ym(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function U(){cb.call(this);this.g=this.i=null;this.h=new Om;this.j=navigator.language}u(U,cb);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 P(2,10,1E4);this.i&&this.i.release();this.i=new Qm(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)})};
|
|
501
501
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new Om};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.l.requestAds(a)};
|
|
502
502
|
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new Xm(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)})};
|
|
503
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.3.
|
|
504
|
-
(c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.3.
|
|
505
|
-
q.
|
|
506
|
-
|
|
507
|
-
U.prototype.
|
|
508
|
-
U.
|
|
509
|
-
U.
|
|
503
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.3.6";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
504
|
+
(c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.3.6";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
|
|
505
|
+
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)};N("shaka.ads.AdManager",U);
|
|
506
|
+
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;
|
|
507
|
+
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";
|
|
508
|
+
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";
|
|
509
|
+
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";Sk=function(){return new U};function Zm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof O){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
|
|
510
510
|
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(Sh(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
|
|
511
511
|
function $m(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=an(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
|
|
512
512
|
function an(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
513
513
|
var bn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),cn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),dn=["loop","playbackRate"],en=["pause","play"],fn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
|
|
514
514
|
getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},gn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},hn=[["getConfiguration","configure"]],jn=[["isTextTrackVisible","setTextTrackVisibility"]],kn="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
515
515
|
ln=["attach","detach","load","unload"];function mn(a,b,c,d,e,f){var g=this;this.I=a;this.j=new Q(b);this.R=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return nn(g)};this.G=function(h,k){var l=$m(k);switch(l.type){case "event":var m=l.targetName;l=Oa(l.event);g.B(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.C&&(g.R(),g.C=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new P(l.severity,l.category,l.code);
|
|
516
|
-
for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;on.add(this)}q=mn.prototype;q.destroy=function(){on["delete"](this);pn(this);qn&&rn(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.A=null;return Promise.resolve()};q.
|
|
516
|
+
for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;on.add(this)}q=mn.prototype;q.destroy=function(){on["delete"](this);pn(this);qn&&rn(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.A=null;return Promise.resolve()};q.ra=function(){return this.h};q.td=function(){return this.N};
|
|
517
517
|
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.I);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(on),d=c.next();!d.done;d=c.next())sn(d.value,b)},function(b){for(var c=r(on),d=c.next();!d.done;d=c.next())d=d.value,tn="available"==b,d.j.za()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});tn&&this.j.S(un);(a=qn)&&a.status!=chrome.cast.SessionStatus.STOPPED?sn(this,
|
|
518
518
|
a):qn=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=vn),window.__onGCastApiAvailable!=vn&&Sa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.oe=function(a){this.A=a;this.h&&wn(this,{type:"appData",appData:this.A})};
|
|
519
519
|
q.cast=function(a){var b=this;return M(function(c){if(!b.m)throw new P(1,8,8E3);if(!tn)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Pc;chrome.cast.requestSession(function(d){return xn(b,a,d)},function(d){return yn(b,d)});return z(c,b.l,0)})};function zn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return xn(a,b,c)},function(c){return yn(a,c)})}}q.Zb=function(){if(this.h){pn(this);if(qn){rn(this);try{qn.stop(function(){},function(){})}catch(a){}qn=null}nn(this)}};
|
|
@@ -522,20 +522,20 @@ q.set=function(a,b,c){this.g[a][b]=c;wn(this,{type:"set",targetName:a,property:b
|
|
|
522
522
|
q.pf=function(a,b){wn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.Rg=function(a,b){var c=Fa.apply(2,arguments),d=new Pc,e=this.J.toString();this.J++;this.i[e]=d;try{wn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function sn(a,b){var c=a.K();a.l=new Pc;a.C=!0;xn(a,c,b)}function rn(a){var b=qn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
523
523
|
function nn(a){var b=qn?"connected"==qn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};pn(a)}a.h=b;a.N=b?qn.receiver.friendlyName:"";a.j.za()}function pn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function wn(a,b){var c=Zm(b),d=qn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new P(2,8,8005,e),d=new O("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var un=.02,tn=!1,qn=null,on=new Set;
|
|
524
524
|
function vn(a){if(a){a=r(on);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function An(a,b,c){cb.call(this);var d=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.F=c;this.C=new Map;this.g=new mn(c,function(){return Bn(d)},function(){return Cn(d)},function(e,f){return Dn(d,e,f)},function(){return En(d)},function(){return Fn(d)});Gn(this)}u(An,cb);q=An.prototype;
|
|
525
|
-
q.destroy=function(a){a&&this.g.Zb();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;cb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.ac=function(){return this.B};q.Le=function(){return this.g.m&&tn};q.
|
|
525
|
+
q.destroy=function(a){a&&this.g.Zb();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;cb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.ac=function(){return this.B};q.Le=function(){return this.g.m&&tn};q.ra=function(){return this.g.ra()};q.td=function(){return this.g.td()};
|
|
526
526
|
q.cast=function(){var a=this,b;return M(function(c){return 1==c.g?(b=Fn(a),z(c,a.g.cast(b),2)):a.h?z(c,a.h.Ee(),0):c["return"]()})};q.oe=function(a){this.g.oe(a)};q.Af=function(){zn(this.g)};q.Zb=function(){this.g.Zb()};
|
|
527
527
|
q.Pe=function(a){var b=this;return M(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.Zb();return z(c,b.g.destroy(),2)}b.g=null;b.g=new mn(a,function(){return Bn(b)},function(){return Cn(b)},function(d,e){return Dn(b,d,e)},function(){return En(b)},function(){return Fn(b)});b.g.init();C(c)})};
|
|
528
|
-
function Gn(a){a.g.init();a.m=new of;for(var b=r(bn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.
|
|
528
|
+
function Gn(a){a.g.init();a.m=new of;for(var b=r(bn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.ra()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in Mm)a.m.o(a.h,Mm[d],function(f){a.g.ra()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.pc=e,Object.defineProperty(a.l,b.pc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Hn(a,f.pc)}}(b),set:function(f){return function(g){var h=f.pc;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={pc:b.pc};a.B={};In(a,
|
|
529
529
|
function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Jn(a,f)}})});Kn(a);a.j=new cb;a.j.hd=a.l;a.A=new cb;a.A.hd=a.B}function Kn(a){var b=new Map;In(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
|
|
530
530
|
function In(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
|
|
531
531
|
function Fn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Rd(),startTime:null};a.i.pause();for(var c=r(dn),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(hn);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(jn);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 Bn(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
|
|
532
532
|
function Cn(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
533
533
|
function En(a){for(var b=r(hn),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(dn);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(dn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(jn);for(k=
|
|
534
534
|
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 O(Im,h);a.h.dispatchEvent(h)})}
|
|
535
|
-
function Hn(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.
|
|
535
|
+
function Hn(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):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
|
|
536
536
|
function Jn(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Dc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.$c()};
|
|
537
|
-
if("setVideoContainer"==b)return function(c){return a.h.xe(c)};if(a.g.
|
|
538
|
-
N("shaka.cast.CastProxy",An);An.prototype.changeReceiverId=An.prototype.Pe;An.prototype.forceDisconnect=An.prototype.Zb;An.prototype.suggestDisconnect=An.prototype.Af;An.prototype.setAppData=An.prototype.oe;An.prototype.cast=An.prototype.cast;An.prototype.receiverName=An.prototype.td;An.prototype.isCasting=An.prototype.
|
|
537
|
+
if("setVideoContainer"==b)return function(c){return a.h.xe(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&fn[b]||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}function Dn(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}
|
|
538
|
+
N("shaka.cast.CastProxy",An);An.prototype.changeReceiverId=An.prototype.Pe;An.prototype.forceDisconnect=An.prototype.Zb;An.prototype.suggestDisconnect=An.prototype.Af;An.prototype.setAppData=An.prototype.oe;An.prototype.cast=An.prototype.cast;An.prototype.receiverName=An.prototype.td;An.prototype.isCasting=An.prototype.ra;An.prototype.canCast=An.prototype.Le;An.prototype.getPlayer=An.prototype.ac;An.prototype.getVideo=An.prototype.Bb;An.prototype.destroy=An.prototype.destroy;function Ln(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new of;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new Q(function(){Mn(e)});Nn(this)}u(Ln,cb);q=Ln.prototype;q.isConnected=function(){return this.H};q.Bg=function(){return this.A};q.Zg=function(a){this.i=a};q.Of=function(){this.i=null};
|
|
539
539
|
q.$g=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Yg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Xg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
540
540
|
q.destroy=function(){var a=this,b,c;return M(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.A=!0,a.l=null,a.B=null,cb.prototype.release.call(a),z(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();C(d)})};
|
|
541
541
|
function Nn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return On(a)};b.onSenderDisconnected=function(){return On(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Pn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Pn(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 Qn(a,
|
|
@@ -567,11 +567,11 @@ function Lo(a){var b=a.getAttribute("schemeIdUri"),c=no(a,"urn:mpeg:cenc:2013","
|
|
|
567
567
|
var Jo=1,Ko=(new Map).set("com.widevine.alpha",function(a){return(a=ko(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Io).set("com.microsoft.playready.recommendation",Io).set("com.microsoft.playready.software",Io).set("com.microsoft.playready.hardware",Io);function Mo(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=
|
|
568
568
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
569
569
|
function No(a,b){var c=Oo(a,b,"timescale"),d=1;c&&(d=wo(c)||1);var e=Oo(a,b,"duration");c=wo(e||"");"image"==a.L.contentType&&(c=yo(e||""));c&&(c/=d);var f=Oo(a,b,"startNumber");e=Number(Oo(a,b,"presentationTimeOffset"))||0;var g=xo(f||"");if(null==f||null==g)g=1;var h=Po(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Y.duration||Infinity;h=jo(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],t=h[n+1],v=ro(p,"t",xo),y=ro(p,"d",xo);p=ro(p,"r",vo);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
|
|
570
|
-
p||0;if(0>p)if(t){t=ro(t,"t",xo);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+y,l.push({start:v/f,end:m/f,fh:v}),v=m}f=l}return{timescale:d,ya:c,mc:g,sb:e/d||0,Fe:e,timeline:f}}function Oo(a,b,c){return[b(a.L),b(a.Ca),b(a.
|
|
571
|
-
function Po(a,b,c){return[b(a.L),b(a.Ca),b(a.
|
|
572
|
-
function Qo(a,b,c,d,e,f){for(var g=no(a,"http://www.w3.org/1999/xlink","href"),h=no(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 Re(new P(2,4,4028));if("onLoad"!=h)return Re(new P(2,4,4027));var m=Hb([d],[g]);return e.request(0,ef(m,b)).
|
|
570
|
+
p||0;if(0>p)if(t){t=ro(t,"t",xo);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+y,l.push({start:v/f,end:m/f,fh:v}),v=m}f=l}return{timescale:d,ya:c,mc:g,sb:e/d||0,Fe:e,timeline:f}}function Oo(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
571
|
+
function Po(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return io(d,c)}).reduce(function(d,e){return d||e})}
|
|
572
|
+
function Qo(a,b,c,d,e,f){for(var g=no(a,"http://www.w3.org/1999/xlink","href"),h=no(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 Re(new P(2,4,4028));if("onLoad"!=h)return Re(new P(2,4,4027));var m=Hb([d],[g]);return e.request(0,ef(m,b)).qa(function(n){n=Bo(n.data,a.tagName);if(!n)return Re(new P(2,4,4001,g));
|
|
573
573
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Ro(a,b,c,m[0],e,f+1)})}
|
|
574
|
-
function Ro(a,b,c,d,e,f){f=void 0===f?0:f;if(no(a,"http://www.w3.org/1999/xlink","href")){var g=Qo(a,b,c,d,e,f);c&&(g=g.
|
|
574
|
+
function Ro(a,b,c,d,e,f){f=void 0===f?0:f;if(no(a,"http://www.w3.org/1999/xlink","href")){var g=Qo(a,b,c,d,e,f);c&&(g=g.qa(void 0,function(){return Ro(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"==no(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Ro(k,b,c,d,e,f)));return Ve(g).qa(function(){return a})};function So(a,b,c,d,e,f,g){var h,k=(new tg).X("sidx",function(l){h=To(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
|
|
575
575
|
function To(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.kc();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),t=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.P();g.reader.skip(4);if(1==t)throw new P(2,3,3006);h.push(new qi(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Uo(a){this.h=Lc(a);this.g=new qg(this.h,0)}Uo.prototype.Ea=function(){return this.g.Ea()};
|
|
576
576
|
function Vo(a){var b=Wo(a);if(7<b.length)throw new P(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=Wo(a);a:{d=r(Xo);for(var e=d.next();!e.done;e=d.next())if(Gc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ia();else{if(8==b.length&&b[1]&224)throw new P(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.ia()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ia();d=Lc(a.h,a.g.ia(),b);a.g.skip(b);return new Yo(c,
|
|
577
577
|
d)}function Wo(a){var b=a.g.ia(),c=a.g.ka();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ic(a.h,b,c)}var Xo=[[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 Yo(a,b){this.id=a;this.g=b}
|
|
@@ -581,28 +581,28 @@ function dp(a,b){var c=Number(Oo(a,ep,"presentationTimeOffset"))||0,d=Oo(a,ep,"t
|
|
|
581
581
|
function hp(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,w,x,D,B,A,F;return M(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.xb||!a.Y.jf,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ka(),c.Ha,c.wa):null],p=null,z(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;D=null;B=l-g;A=l;F=m?l+m:Infinity;if("mp4"==n)var H=So(w,e,d,c,B,A,F);else{H=new Uo(x);if(440786851!=Vo(H).id)throw new P(2,3,3008);var K=Vo(H);if(408125543!=K.id)throw new P(2,3,3009);H=K.g.byteOffset;
|
|
582
582
|
K=new Uo(K.g);for(var J=null;K.Ea();){var L=Vo(K);if(357149030==L.id){J=L;break}}if(!J)throw new P(2,3,3010);J=new Uo(J.g);L=1E6;for(K=null;J.Ea();){var W=Vo(J);if(2807729==W.id)L=Zo(W);else if(17545==W.id)if(4==W.g.byteLength)K=W.g.getFloat32(0);else if(8==W.g.byteLength)K=W.g.getFloat64(0);else throw new P(2,3,3003);}if(null==K)throw new P(2,3,3011);J=L/1E9;K*=J;L=Vo(new Uo(w));if(475249515!=L.id)throw new P(2,3,3007);H=$o(L,H,J,K,d,c,B,A,F)}D=H;h.hc(D);t=new Ni(D);k&&t.yb(A,F,!0);return G["return"](t)})}
|
|
583
583
|
function ep(a){return a.Mc}function gp(a){var b=Po(a,ep,"RepresentationIndex");a=Oo(a,ep,"indexRange");a=uo(a||"");b&&(a=ro(b,"range",uo,a));return a}function fp(a,b){ip(a,b);if(!gp(a))throw new P(2,4,4002);}function ip(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Mb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
|
|
584
|
-
function cp(a){var b=a.L;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.md,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function jp(a,b){var c=bp(a,kp),d=lp(a);if(!d.ya&&!d.timeline&&1<d.dc.length)throw new P(2,4,4002);if(!d.ya&&!a.Y.duration&&!d.timeline&&1==d.dc.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.
|
|
584
|
+
function cp(a){var b=a.L;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.md,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function jp(a,b){var c=bp(a,kp),d=lp(a);if(!d.ya&&!d.timeline&&1<d.dc.length)throw new P(2,4,4002);if(!d.ya&&!a.Y.duration&&!d.timeline&&1==d.dc.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=mp(a.Y.start,a.Y.duration,a.L.Pa,d,c);c=!e;e?e.fc(g,a.presentationTimeline.ob()):e=new Ni(g);a.presentationTimeline.hc(g);a.xb&&a.Y.jf||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
|
|
585
585
|
Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.O.length||e.ec(g);return Promise.resolve(e)}}}function kp(a){return a.Db}function lp(a){var b=np(a);a=No(a,kp);var c=a.mc;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,mc:c,sb:a.sb,timeline:a.timeline,dc:b}}
|
|
586
586
|
function mp(a,b,c,d,e){var f=d.dc.length;d.timeline&&d.timeline.length!=d.dc.length&&(f=Math.min(d.timeline.length,d.dc.length));for(var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Gd:m.Gd},n++){var p=d.dc[n];m.Gd=Hb(c,[p.Hg]);var t=void 0;t=null!=d.ya?l+d.ya:d.timeline?d.timeline[n].end:l+b;k.push(new qi(a+l,a+t,function(v){return function(){return v.Gd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
|
|
587
|
-
function np(a){return[a.L.Db,a.Ca.Db,a.
|
|
587
|
+
function np(a){return[a.L.Db,a.Ca.Db,a.sa.Db].filter(Fb).map(function(b){return jo(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=ro(b,"mediaRange",uo,{start:0,end:null});return{Hg:c,start:b.start,end:b.end}})};function wp(a,b,c,d,e,f){var g=xp(a),h=yp(a);zp(h);var k=Ye(a);if(h.Hc)return ip(a,g),{$b:function(){var t=Mo(h.Hc,k.L.id,null,k.bandwidth||null,null);t=Hb(k.L.Pa,[t]);return hp(k,b,g,t,0,null,h.sb)}};if(h.ya)return d||(a.presentationTimeline.Zd(h.ya),a.presentationTimeline.$d(a.Y.start)),{$b:function(){return Ap(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Bp(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:Infinity,p=Infinity!=
|
|
588
588
|
n;l?(p&&(new Ni(m)).yb(c,n,!0),l.fc(m,a.presentationTimeline.ob())):l=new Ni(m);a.presentationTimeline.hc(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{$b:function(){l&&0!=l.O.length||l.ec(m);return Promise.resolve(l)}}}function Cp(a){return a.Nc}function yp(a){var b=No(a,Cp),c=Oo(a,Cp,"media");a=Oo(a,Cp,"index");return{ya:b.ya,timescale:b.timescale,mc:b.mc,sb:b.sb,Fe:b.Fe,timeline:b.timeline,Yd:c,Hc:a}}
|
|
589
589
|
function zp(a){var b=a.Hc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Hc&&(a.timeline=null),a.ya=null);if(!a.Hc&&!a.Yd)throw new P(2,4,4002);}
|
|
590
|
-
function Ap(a,b,c,d,e){function f(J){var L=(J-t)*p,W=L+b.sb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new qi(Z,ka,function(){var ja=Mo(y,x,J,w,W*v);return Hb(D,[ja])},0,null,d,B,l,h());Z.l=L;return Z}function g(){var J=[Math.max(k.ob(),l),Math.min(k.Jb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(L){return L+t})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.
|
|
590
|
+
function Ap(a,b,c,d,e){function f(J){var L=(J-t)*p,W=L+b.sb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new qi(Z,ka,function(){var ja=Mo(y,x,J,w,W*v);return Hb(D,[ja])},0,null,d,B,l,h());Z.l=L;return Z}function g(){var J=[Math.max(k.ob(),l),Math.min(k.Jb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(L){return L+t})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,n=a.Y.duration,p=b.ya,t=b.mc,v=b.timescale,
|
|
591
591
|
y=b.Yd,w=a.bandwidth||null,x=a.L.id,D=a.L.Pa,B=l-b.sb,A=g();a=a.xb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var F=a;F<=A;++F){var G=f(F);c.push(G)}var H=new Ni(c);c=k.Jb()<h();F=k.T();if(c||F){var K=Math.max(a,A+1);H.wd(p,function(){var J=k.ob();H.Gb(J);var L=r(g());L.next();L=L.next().value;for(var W=[];K<=L;){var Z=f(K);W.push(Z);K++}return J>h()&&!W.length?null:W})}return Promise.resolve(H)}
|
|
592
592
|
function Bp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.sb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Fd:h.Fd,Jd:h.Jd,Md:h.Md,Cd:h.Cd,Od:h.Od,Dd:h.Dd},k++){var l=b.timeline[k],m=l.start,n=l.fh;l=l.end;h.Md=k+b.mc;h.Od=n+b.Fe;h.Jd=a.L.id;h.Cd=a.bandwidth||null;h.Fd=b.Yd;h.Dd=a.L.Pa;g.push(new qi(d+m,d+l,function(p){return function(){var t=Mo(p.Fd,p.Jd,p.Md,p.Cd||null,p.Od);return Hb(p.Dd,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
593
593
|
function xp(a){var b=Oo(a,Cp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Pa;return new oi(function(){var f=Mo(b,c,null,d,null);return Hb(e,[f])},0,null,cp(a))};function Dp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Dp.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=[]};
|
|
594
594
|
function Ep(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia;return M(function(Ma){switch(Ma.g){case 1:d=Nb;Fp(b);Gp(b);Hp(b);Ip(b);if(!c&&1==b.length){e=b[0];a.g=e.Wc;a.h=e.yd;a.j=e.textStreams;a.i=e.imageStreams;Ma.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 Ma["return"]();k=b.map(function(Da){return Da.Wc});l=b.map(function(Da){return Da.yd});m=b.map(function(Da){return Da.textStreams});n=b.map(function(Da){return Da.imageStreams});
|
|
595
|
-
p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Jp(d.
|
|
595
|
+
p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Jp(d.oa));y=r(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Jp(d.wc));return z(Ma,Kp(a.g,k,f,Lp,Mp),3);case 3:return z(Ma,Kp(a.h,l,f,Lp,Mp),4);case 4:return z(Ma,Kp(a.j,m,f,Lp,Mp),5);case 5:return z(Ma,Kp(a.i,n,f,Lp,Mp),2);case 2:D=0;B=[];if(a.h.length&&a.g.length)for(J=r(a.g),L=J.next();!L.done;L=J.next())for(W=L.value,Z=r(a.h),ka=Z.next();!ka.done;ka=Z.next())ja=ka.value,ea=ig(W.drmInfos,ja.drmInfos),W.drmInfos.length&&ja.drmInfos.length&&
|
|
596
596
|
!ea.length||(Ia=D++,B.push({id:Ia,language:W.language,primary:W.primary,audio:W,video:ja,bandwidth:(W.bandwidth||0)+(ja.bandwidth||0),drmInfos:ea,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),F=r(A),G=F.next();!G.done;G=F.next())H=G.value,K=D++,B.push({id:K,language:H.language,primary:H.primary,audio:H.type==d.Fb?H:null,video:H.type==d.gb?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
597
597
|
a.l=B;C(Ma)}})}function Fp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Wc),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&&jc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Wc=c}}
|
|
598
598
|
function Hp(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&&jc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
599
599
|
function Gp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.yd),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&&jc(e.roles,h.roles)&&yf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.yd=c}}
|
|
600
600
|
function Ip(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}}
|
|
601
|
-
function Np(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Fb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.gb})});e=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.
|
|
602
|
-
h.value,k.push(Op(b.
|
|
601
|
+
function Np(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Fb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.gb})});e=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.oa})});f=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.wc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
|
|
602
|
+
h.value,k.push(Op(b.oa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Op(b.wc));return z(Z,Kp([],c,0,Pp,Qp),2);case 2:return p=Z.h,z(Z,Kp([],d,0,Pp,Qp),3);case 3:return t=Z.h,z(Z,Kp([],e,0,Pp,Qp),4);case 4:return v=Z.h,z(Z,Kp([],f,0,Pp,Qp),5);case 5:y=Z.h;w=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(H=G.value,K=r(t),J=K.next();!J.done;J=K.next())L=J.value,W=w++,L.variantIds.push(W),H.variantIds.push(W);else for(x=t.concat(p),D=r(x),B=D.next();!B.done;B=D.next())A=
|
|
603
603
|
B.value,A.variantIds=[w++];return Z["return"](t.concat(p).concat(v).concat(y))}})}
|
|
604
604
|
function Kp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J;return M(function(L){switch(L.g){case 1:f=Nb;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){L.D(4);break}m=l.value;return z(L,Rp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new P(2,4,4037);l=k.next();L.D(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(D=Sp(x,b,d,e,g))&&a.push(D);B=r(g);for(t=B.next();!t.done;t=
|
|
605
|
-
B.next())for(A=t.value,F={},G=r(A),w=G.next();!w.done;F={vb:F.vb},w=G.next())if(F.vb=w.value,H=F.vb.type==f.
|
|
605
|
+
B.next())for(A=t.value,F={},G=r(A),w=G.next();!w.done;F={vb:F.vb},w=G.next())if(F.vb=w.value,H=F.vb.type==f.oa&&!F.vb.language,K=F.vb.type==f.wc&&!F.vb.tilesLayout,!H&&!K&&(J=a.some(function(W){return function(Z){return Z.mimeType==W.vb.mimeType&&md(Z.codecs)==md(W.vb.codecs)}}(F))))throw new P(2,4,4037);return L["return"](a)}})}
|
|
606
606
|
function Rp(a,b,c,d,e){return M(function(f){if(1==f.g)return Tp(b,a),a.matchedStreams?a.segmentIndex?z(f,Up(a,c),2):f.D(2):f["return"](!1);Vp(a,c,d,e);return f["return"](!0)})}
|
|
607
607
|
function Up(a,b){var c,d,e,f,g,h,k;return M(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 z(l,Promise.all(c),2)}if(a.segmentIndex instanceof Qi)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);C(l)})}
|
|
608
608
|
function Sp(a,b,c,d,e){var f=c(a);Tp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return M(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Qi;return z(g,Up(f,0),0)})});if(!f.matchedStreams)return null;Vp(f,0,d,e);return f}function Vp(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==Wb(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
|
|
@@ -625,15 +625,15 @@ function jq(a){var b,c,d,e,f,g,h;return M(function(k){if(1==k.g)return b=ef(a.m,
|
|
|
625
625
|
function lq(a,b,c){var d,e,f,g,h;return M(function(k){if(1==k.g){d=Bo(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](mq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Ro(d,a.g.retryParameters,f,c,a.h.networkingEngine);$e(a.A,g);return z(k,g.promise,2)}h=k.h;return k["return"](mq(a,h,c))})}
|
|
626
626
|
function mq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da;return M(function(Qa){switch(Qa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=jo(b,"Location").map(po).filter(Fb);0<f.length&&(g=Hb(e,f),e=a.m=g);h=jo(b,"BaseURL");k=h.map(po);l=Hb(e,k);m=0;h&&h.length&&(m=ro(h[0],"availabilityTimeOffset",yo)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=ro(b,"minBufferTime",to)||0);a.H=ro(b,"minimumUpdatePeriod",to,-1);t=ro(b,"availabilityStartTime",so);v=ro(b,
|
|
627
627
|
"timeShiftBufferDepth",to);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=ro(b,"suggestedPresentationDelay",to));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=ro(b,"maxSegmentDuration",to));B=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,F=r(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.Gb(A.ob());else K=a.g.defaultPresentationDelay||1.5*p,J=null!=w?w:K,A=new R(t,J,a.g.dash.autoCorrectDrift);A.Oc("static"==B);(L=A.T())&&
|
|
628
|
-
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.ve(v);W=b.getAttribute("profiles")||"";Z={xb:"static"!=B,presentationTimeline:A,
|
|
628
|
+
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.ve(v);W=b.getAttribute("profiles")||"";Z={xb:"static"!=B,presentationTimeline:A,sa:null,Y:null,Ca:null,L:null,bandwidth:0,ef:!1,Yb:m,profiles:W.split(",")};ka=nq(a,Z,l,b);ja=ka.duration;ea=ka.periods;"static"!=B&&ka.Ve||A.bb(ja||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?A.uf(a.C):a.C&&Sa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
629
629
|
A.Zd(D||1);return z(Qa,Ep(a.j,ea,Z.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);Qa.D(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!A.Cf()){Qa.D(3);break}Ma=jo(b,"UTCTiming");return z(Qa,oq(a,l,Ma),5);case 5:Da=Qa.h;if(!a.h)return Qa["return"]();A.vf(Da);case 3:a.h.makeTextStreamsForClosedCaptions(a.i),C(Qa)}})}
|
|
630
|
-
function nq(a,b,c,d){var e=ro(d,"mediaPresentationDuration",to),f=[],g=0;d=jo(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=ro(k,"start",to,g),n=k.id,p=ro(k,"duration",to),t=null;if(l){var v=ro(l,"start",to);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=pq(a,b,c,{start:m,duration:t,node:k,jf:null==t||!l});f.push(g);b.
|
|
630
|
+
function nq(a,b,c,d){var e=ro(d,"mediaPresentationDuration",to),f=[],g=0;d=jo(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=ro(k,"start",to,g),n=k.id,p=ro(k,"duration",to),t=null;if(l){var v=ro(l,"start",to);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=pq(a,b,c,{start:m,duration:t,node:k,jf:null==t||!l});f.push(g);b.sa.id&&t&&(a.N[b.sa.id]=t);if(null==t){g=
|
|
631
631
|
null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Ve:!1}:{periods:f,duration:g,Ve:!0}}
|
|
632
|
-
function pq(a,b,c,d){b.
|
|
632
|
+
function pq(a,b,c,d){b.sa=qq(d.node,null,c);b.Y=d;b.sa.Yb=b.Yb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=jo(d.node,"EventStream");c=b.presentationTimeline.ob();e=r(e);for(var f=e.next();!f.done;f=e.next())rq(a,d.start,d.duration,f.value,c);c=jo(d.node,"AdaptationSet").map(function(m){return sq(a,b,m)}).filter(Fb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Tg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
|
|
633
633
|
}d=c.filter(function(m){return!m.Be});c=c.filter(function(m){return m.Be});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Be.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={Uc:h.Uc},l=k.next())h.Uc=l.value,h.Uc.trickModeVideo=e.streams.find(function(m){return function(n){return md(m.Uc.codecs)==md(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:tq(d,"audio");g=a.g.disableVideo?[]:tq(d,"video");f=a.g.disableText?
|
|
634
|
-
[]:tq(d,Mb);c=a.g.disableThumbnails?[]:tq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.
|
|
634
|
+
[]:tq(d,Mb);c=a.g.disableThumbnails?[]:tq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.sa.id,Wc:d,yd:e,textStreams:g,imageStreams:f}}
|
|
635
635
|
function tq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
636
|
-
function sq(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ca=qq(c,b.
|
|
636
|
+
function sq(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ca=qq(c,b.sa,null);var e=!1,f=jo(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Fb),h=void 0,k=b.Ca.contentType==Mb;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=
|
|
637
637
|
l}}var n;m=jo(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=jo(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
|
|
638
638
|
10)));m=jo(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var y=r(t),w=y.next();!w.done;w=y.next()){var x=w.value,D=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],D=x[1]||"und"):(w="CC"+p,2==t.length?p+=2:p++,D=x);v.set(w,Qb(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
|
|
639
639
|
1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,x=w),v.set(y,Qb(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=jo(c,"ContentProtection");var B=Co(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=Qb(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=jo(c,"Label"))&&l.length&&
|
|
@@ -641,7 +641,7 @@ l}}var n;m=jo(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.do
|
|
|
641
641
|
m.value,p=r(B.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.Ca.id||"__fake__"+a.I++,contentType:b.Ca.contentType,language:A,Gi:e,streams:c,drmInfos:B.drmInfos,Be:f,Tg:k}}
|
|
642
642
|
function uq(a,b,c,d,e,f,g,h,k,l){b.L=qq(l,b.Ca,null);a.C=Math.min(a.C,b.L.Yb);if(!wq(b.L))return null;var m=b.Y.start;b.bandwidth=ro(l,"bandwidth",wo)||0;var n=b.L.contentType,p=n==Mb||"application"==n;n="image"==n;try{var t=function(H,K,J){return xq(a,H,K,J)};if(b.L.Mc)var v=dp(b,t);else if(b.L.Db)v=jp(b,a.l);else if(b.L.Nc)v=wp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Pa,w=b.Y.duration||0;v={$b:function(){return Promise.resolve(Pi(m,w,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
|
|
643
643
|
throw H;}t=jo(l,"ContentProtection");t=Fo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;jo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(n&&((l=jo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
644
|
-
(B=l.getAttribute("value")),!B))return null;var A;l=b.L.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"))&&(A="PQ");var F=b.L.id?b.
|
|
644
|
+
(B=l.getAttribute("value")),!B))return null;var A;l=b.L.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"))&&(A="PQ");var F=b.L.id?b.sa.id+","+b.L.id:"",G={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,K,J;return M(function(L){if(1==L.g){K=(H=F&&b.xb&&a.l[F])?a.l[F]:G;if(K.segmentIndex)return L.D(0);J=K;return z(L,v.$b(),3)}J.segmentIndex=L.h;C(L)})},closeSegmentIndex:function(){G.segmentIndex&&
|
|
645
645
|
(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.md,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:x,closedCaptions:k,
|
|
646
646
|
hdr:A,tilesLayout:B,matchedStreams:[]};F&&b.xb&&!a.l[F]&&(a.l[F]=G);return G}function iq(a){var b,c;M(function(d){switch(d.g){case 1:return b=0,E(d,2),z(d,jq(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"]();kq(a,b);C(d)}})}function kq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,fc(a.J)))}
|
|
647
647
|
function qq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,md:null,audioSamplingRate:null,Yb:0};c=c||b.Pa;var d=jo(a,"BaseURL"),e=d.map(po),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=ro(a,"frameRate",zo)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=jo(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
|
|
@@ -660,14 +660,14 @@ function Pq(a,b,c){b=Tc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
|
|
|
660
660
|
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=Qq(a,m),Rq.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"==Cq(m,"TYPE")?k.push(m):"MAP"==Cq(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Hb([d],[m.trim()])[0],h&&g.push(h),e.push(new Eq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Eq("",g,k)));return new Aq(c,b,f,
|
|
661
661
|
e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Fq("URI",k)),e=!0)}}return new Aq(c,b,f)}function Qq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new P(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Kq(f);var h;(h=Mq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Mq(f,k);)d.push(new Fq(h[1],h[2]||h[3])),Lq(f)}return new Bq(c,e,d,g)}
|
|
662
662
|
var Rq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Sq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Tq(){}function Uq(a){try{var b=Vq(a);return Te({uri:a,mf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Re(c)}}function Vq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(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=bd(a):e=Xc(a);return{data:e,contentType:c}}
|
|
663
|
-
N("shaka.net.DataUriPlugin",Tq);Tq.parse=Uq;bf("data",Uq);function Wq(){var a=this;this.g=this.i=null;this.
|
|
664
|
-
q.start=function(a,b){var c=this,d,e;return M(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),z(f,Zq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,z(f,$q(c,d.data),3);e=c.
|
|
663
|
+
N("shaka.net.DataUriPlugin",Tq);Tq.parse=Uq;bf("data",Uq);function Wq(){var a=this;this.g=this.i=null;this.Aa=1;this.A=new Map;this.C=new Map;this.na=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Oq;this.ma=0;this.F=new Q(function(){Xq(a)});this.m=Yq;this.G=null;this.aa=0;this.I=Infinity;this.Z=this.ba=0;this.H=new Ze;this.W=[];this.K=new Map;this.Ba=!1;this.B=new Map;this.R=null;this.va=new Map;this.J=new Map;this.l=!1}q=Wq.prototype;q.configure=function(a){this.g=a};
|
|
664
|
+
q.start=function(a,b){var c=this,d,e;return M(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),z(f,Zq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,z(f,$q(c,d.data),3);e=c.ma;0<e&&c.F.S(e);return f["return"](c.G)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.i=null;this.na.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
|
|
665
665
|
q.update=function(){var a=this,b,c,d;return M(function(e){if(1==e.g){if(a.m==Yq)return e["return"]();b=[];a.R=null;c=Array.from(a.h.values());return c.length?z(e,ar(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push(ar(a,c[d]));return z(e,Promise.all(b),0)})};
|
|
666
666
|
function ar(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return c=br,d=b.Gf,e=new jb(d),a.l&&b.Lf&&nb(e,new pb("_HLS_skip=YES")),z(y,Zq(a,e.toString()),2);if(3!=y.g){f=y.h;g=Pq(a.$,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=Gq(g.g,"EXT-X-DEFINE");k=cr(a,h);l=b.stream;return z(y,dr(a,b.xd,g,l.type,l.mimeType,b.Xd,k,b.Qf,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.fc(m,a.j.ob());m.length&&(n=Jq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Xd.get(n),l.segmentIndex.Gb(p));t=m[m.length-
|
|
667
667
|
1];if(v=Iq(g.g,"EXT-X-ENDLIST"))er(a,c.Ff),a.j.bb(t.endTime);C(y)})}q.onExpirationUpdated=function(){};
|
|
668
668
|
function $q(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd;return M(function(gb){switch(gb.g){case 1:c=Pq(a.$,b,a.N);if(0!=c.type)throw new P(2,4,4022);d=Gq(c.g,"EXT-X-DEFINE");fr(a,d);e=Gq(c.g,"EXT-X-MEDIA");f=Gq(c.g,"EXT-X-STREAM-INF");g=Gq(c.g,"EXT-X-IMAGE-STREAM-INF");gr(a,f);h=Gq(c.g,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Cq(m,"DATA-ID"),p=Cq(m,"URI"),t=Cq(m,"LANGUAGE"),v=Cq(m,"VALUE"),y=(new Map).set("id",n),p&&
|
|
669
|
-
y.set("uri",Hb([a.N],[p])[0]),t&&y.set("language",t),v&&y.set("value",v),w=new O("sessiondata",y),a.i)a.i.onEvent(w);return z(gb,hr(a,e),2);case 2:return ir(a,e),z(gb,jr(a,f),3);case 3:return x=gb.h,z(gb,kr(a,e),4);case 4:return D=gb.h,z(gb,lr(a,g),5);case 5:B=gb.h;if(!a.i)throw new P(2,7,7001);if(a.
|
|
670
|
-
a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.aa),a.j.Oc(!1)):(a.j=new R(null,0),a.j.Oc(!0));mr(a);if(a.m!=Yq)a.
|
|
669
|
+
y.set("uri",Hb([a.N],[p])[0]),t&&y.set("language",t),v&&y.set("value",v),w=new O("sessiondata",y),a.i)a.i.onEvent(w);return z(gb,hr(a,e),2);case 2:return ir(a,e),z(gb,jr(a,f),3);case 3:return x=gb.h,z(gb,kr(a,e),4);case 4:return D=gb.h,z(gb,lr(a,g),5);case 5:B=gb.h;if(!a.i)throw new P(2,7,7001);if(a.Ba&&0==x.length)throw new P(2,4,4034);F=A=Infinity;G=r(a.h.values());for(H=G.next();!H.done;H=G.next())K=H.value,A=Math.min(A,K.kf),"text"!=K.stream.type&&(F=Math.min(F,K.Gg-K.kf));a.m!=Yq?(a.j=new R(0,
|
|
670
|
+
a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.aa),a.j.Oc(!1)):(a.j=new R(null,0),a.j.Oc(!0));mr(a);if(a.m!=Yq)a.ma=a.I,J=br,a.m==J.Ke&&(L=a.j.sd,isNaN(a.g.availabilityWindowOverride)||(L=a.g.availabilityWindowOverride),a.j.ve(L));else for(a.j.bb(F),a.j.offset(-A),W=r(a.h.values()),H=W.next();!H.done;H=W.next())Z=H.value,Z.stream.segmentIndex.offset(-A),Z.stream.segmentIndex.yb(0,F);a.W=[];ka=[];ja=r(x);for(ea=ja.next();!ea.done;ea=ja.next())for(Ia=ea.value,Ma=r([Ia.video,Ia.audio]),
|
|
671
671
|
Da=Ma.next();!Da.done;Da=Ma.next())(Qa=Da.value)&&ka.push(Qa);return z(gb,Promise.all(ka.map(function(Sc){return M(function(Fe){return z(Fe,Sc.createSegmentIndex(),0)})})),6);case 6:ac=r(ka);for(Da=ac.next();!Da.done;Da=ac.next())Dd=Da.value,a.W.push(Dd.segmentIndex.O);mr(a);a.G={presentationTimeline:a.j,variants:x,textStreams:D,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.G);C(gb)}})}
|
|
672
672
|
function fr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Cq(e,"NAME");e=Cq(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}function cr(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Cq(f,"NAME");var g=Cq(f,"VALUE");f=Cq(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}
|
|
673
673
|
function gr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Cq(e,"AUDIO");d=Cq(e,"VIDEO");var g=Cq(e,"SUBTITLES");e=nr(a,e);if(g){var h=Kb(Mb,e);a.B.set(g,h);ic(e,h)}f&&(g=Jb("audio",e),a.B.set(f,g));d&&(f=Jb("video",e),a.B.set(d,f))}}
|
|
@@ -676,8 +676,8 @@ r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"
|
|
|
676
676
|
function lr(a,b){var c,d;return M(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return M(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);E(l,2);return z(l,pr(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;})}),z(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
|
|
677
677
|
function hr(a,b){var c;return M(function(d){if(1==d.g)return b=b.filter(function(e){var f=Cq(e,"URI")||"";return"SUBTITLES"!=Cq(e,"TYPE")&&""!=f}),b.length?z(d,or(a,b[0]),2):d.D(2);c=b.slice(1).map(function(e){return or(a,e)});return z(d,Promise.all(c),0)})}
|
|
678
678
|
function jr(a,b){var c,d,e;return M(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return h=Cq(g,"FRAME-RATE"),k=Number(Cq(g,"AVERAGE-BANDWIDTH"))||Number(Dq(g,"BANDWIDTH")),l=Cq(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Cq(g,"VIDEO-RANGE"),z(y,qr(a,g,k),2);if(v=y.h){for(var w=y["return"],x=v.audio,D=v.video,B=r(D),A=B.next();!A.done;A=B.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||
|
|
679
|
-
void 0,A.frameRate=Number(h)||void 0,A.hdr=t||void 0;B=a.g.disableAudio;if(!x.length||B)x=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];x=r(x);for(A=x.next();!A.done;A=x.next()){A=A.value;for(var F=r(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=A?A.stream:null;var K=H?H.stream:null,J=A?A.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.xd:"")+" - "+(A?A.xd:"");G&&K&&J.length&&L.length&&!(0<ig(J,L).length)||a.
|
|
680
|
-
!!K&&K.primary,audio:G,video:K,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(G),a.
|
|
679
|
+
void 0,A.frameRate=Number(h)||void 0,A.hdr=t||void 0;B=a.g.disableAudio;if(!x.length||B)x=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];x=r(x);for(A=x.next();!A.done;A=x.next()){A=A.value;for(var F=r(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=A?A.stream:null;var K=H?H.stream:null,J=A?A.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.xd:"")+" - "+(A?A.xd:"");G&&K&&J.length&&L.length&&!(0<ig(J,L).length)||a.na.has(H)||(G={id:a.Aa++,language:G?G.language:"und",primary:!!G&&G.primary||
|
|
680
|
+
!!K&&K.primary,audio:G,video:K,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(G),a.na.add(H))}}y=w.call(y,B)}else y=y["return"]([]);return y})}),z(f,Promise.all(c),2);d=f.h;e=d.reduce(Db,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
|
|
681
681
|
function qr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w;return M(function(x){if(1==x.g)return d=Nb,e=nr(a,b),f=Cq(b,"AUDIO"),g=Cq(b,"VIDEO"),k=(h=f||g)&&a.C.has(h)?a.C.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=Dq(b,"URI"),t=l.audio.find(function(D){return D&&D.xd==p}),v=Kb(d.gb,e),(y=Kb(d.Fb,e))&&!v?m=d.Fb:!k.length&&y&&v?(m=d.gb,e=[[v,y].join()]):l.audio.length&&t?(m=d.Fb,n=!0):m=l.video.length?d.Fb:d.gb,n?x.D(2):z(x,rr(a,b,e,m,c),3);2!=x.g&&(w=x.h);if(w)l[w.stream.type]=[w];else if(null===w)return x["return"](null);
|
|
682
682
|
sr(l);return x["return"](l)})}function nr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Cq(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=nd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function tr(a){a=Cq(a,"LANGUAGE")||"und";return Qb(a)}
|
|
683
683
|
function sr(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){var c=Hq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=tr(e);var f=Dq(e,"GROUP-ID");e=Dq(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
|
|
@@ -686,14 +686,14 @@ v="YES"==t;return z(w,vr(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=w.h;a.C.has(c)?a.C.get
|
|
|
686
686
|
function pr(a,b){var c,d,e,f,g,h,k,l,m,n;return M(function(p){if(1==p.g){c=ur(Dq(b,"URI"),a.A);d=Cq(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=tr(b);f=Cq(b,"NAME");g=Cq(b,"CHARACTERISTICS");return z(p,vr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Cq(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=
|
|
687
687
|
Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Cq(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
|
|
688
688
|
function rr(a,b,c,d,e){var f,g,h,k;return M(function(l){if(1==l.g){f=ur(Dq(b,"URI"),a.A);if(a.h.has(f))return l["return"](a.h.get(f));var m=Cq(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.K.get(m):null;h=Jb(d,c);return z(l,vr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
|
|
689
|
-
function vr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd,gb,Sc,Fe,op,pp,qp,rp,
|
|
690
|
-
W=Dq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.
|
|
691
|
-
if(4035==Fe.code)return Sa("Skipping unsupported HLS stream",ac,b),lb["return"](null);throw Fe;case 5:op=Sc[0].startTime;pp=Sc[Sc.length-1].endTime;qp=new Ni(Sc);rp=d==Mb?"subtitle":void 0;
|
|
692
|
-
drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:
|
|
693
|
-
function xr(a,b){var c=Iq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Iq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)er(a,Yq);else{c?er(a,Ar):er(a,Br);d=Iq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Iq(b.g,"EXT-X-PART-INF");a.l&&c?(a.
|
|
689
|
+
function vr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd,gb,Sc,Fe,op,pp,qp,rp,Xi,Yi,hg,sp,tp,up,vp;return M(function(lb){switch(lb.g){case 1:return t=Hb([a.N],[b])[0],z(lb,Zq(a,t),2);case 2:v=lb.h;t=v.uri;y=Pq(a.$,v.data,t);if(1!=y.type)throw new P(2,4,4017);w=[];if(y.segments)for(x=r(y.segments),D=x.next();!D.done;D=x.next())B=D.value,A=Gq(B.g,"EXT-X-KEY"),w.push.apply(w,ia(A));F=!1;G=[];H=new Set;K=r(w);for(J=K.next();!J.done;J=K.next())if(L=J.value,
|
|
690
|
+
W=Dq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ba=!0,lb["return"](null);Z=Dq(L,"KEYFORMAT");if(ja=(ka=wr[Z])?ka(L):null){if(ja.keyIds)for(ea=r(ja.keyIds),Ia=ea.next();!Ia.done;Ia=ea.next())Ma=Ia.value,H.add(Ma);G.push(ja)}}if(F&&!G.length)throw new P(2,4,4026);Da=Gq(y.g,"EXT-X-DEFINE");Qa=cr(a,Da);xr(a,y);return z(lb,yr(a,d,c,y,Qa),3);case 3:return ac=lb.h,zr.includes(ac)&&(c=""),Dd=new Map,gb=new Map,E(lb,4),z(lb,dr(a,b,y,d,ac,Dd,Qa,gb,c,p),6);case 6:Sc=lb.h;va(lb,5);break;case 4:Fe=I(lb);
|
|
691
|
+
if(4035==Fe.code)return Sa("Skipping unsupported HLS stream",ac,b),lb["return"](null);throw Fe;case 5:op=Sc[0].startTime;pp=Sc[Sc.length-1].endTime;qp=new Ni(Sc);rp=d==Mb?"subtitle":void 0;Xi=[];if(l)for(Yi=r(l.split(",")),hg=Yi.next();!hg.done;hg=Yi.next())sp=hg.value,Xi.push(sp);up=(tp=Iq(y.g,"EXT-X-SERVER-CONTROL"))?null!=tp.getAttribute("CAN-SKIP-UNTIL"):!1;vp={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:qp,mimeType:ac,codecs:c,kind:rp,encrypted:F,
|
|
692
|
+
drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Xi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return lb["return"]({stream:vp,xd:b,Gf:t,kf:op,Gg:pp,Xd:Dd,Qf:gb,Lf:up})}})}
|
|
693
|
+
function xr(a,b){var c=Iq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Iq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)er(a,Yq);else{c?er(a,Ar):er(a,Br);d=Iq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Iq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Dq(c,"PART-TARGET")),a.I=Math.min(a.ba,a.I),c=Iq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Dq(c,"PART-HOLD-BACK")):0):a.I=Math.min(d,a.I);a.aa=Math.max(d,a.aa)}}
|
|
694
694
|
function Cr(a,b,c,d){c=Iq(c,"EXT-X-MAP");if(!c)return null;var e=Dq(c,"URI");d=ur(Hb([b],[e])[0],d);b=[d,Cq(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,e=Cq(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new oi(function(){return[a]},c,d)}
|
|
695
|
-
function Er(a,b,c,d,e,f,g,h,k){var l=d.g,m=ur(d.h,g),n=Iq(l,"EXTINF"),p=g=0,t=null;if(!n){if(0==d.i.length)throw new P(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)
|
|
696
|
-
v.push(new qi(
|
|
695
|
+
function Er(a,b,c,d,e,f,g,h,k){var l=d.g,m=ur(d.h,g),n=Iq(l,"EXTINF"),p=g=0,t=null;if(!n){if(0==d.i.length)throw new P(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},w=0;w<d.i.length;y={Hd:y.Hd},w++){var x=d.i[w],D=0==w?c:v[v.length-1],B=0==w?e:D.endTime,A=Number(Cq(x,"DURATION"))||a.ba;if(A){A=B+A;var F=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?F=(D=Cq(x,"BYTERANGE-START"))?Number(D):0:(F=Cq(x,"BYTERANGE"),D=r(Fr(D,F)),F=D.next().value,G=D.next().value);if(x=Cq(x,"URI"))y.Hd=Hb([h],
|
|
696
|
+
[x])[0],v.push(new qi(B,A,function(H){return function(){return[H.Hd]}}(y),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Iq(l,"EXT-X-BYTERANGE"))?(t=r(Fr(c,a.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Ha,t=v[v.length-1].wa);c="";a=null;"image"==k&&(c="1x1",k=Iq(l,"EXT-X-TILES"))&&(c=Dq(k,"LAYOUT"),(k=Cq(k,"DURATION"))&&(a=Number(k)));return new qi(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,a)}
|
|
697
697
|
function Fr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}function mr(a){if(a.j){for(var b=r(a.W),c=b.next();!c.done;c=b.next())a.j.hc(c.value);a.W=[]}}
|
|
698
698
|
function dr(a,b,c,d,e,f,g,h,k,l){var m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:m=c.segments;p=Jq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(t=Iq(c.g,"EXT-X-SKIP"))?Number(Cq(t,"SKIPPED-SEGMENTS")):0;y=p+v;if(a.m!=Yq&&f.has(y)){w=f.get(y);ea.D(2);break}if(null!=a.R){ea.D(3);break}n=Cr(a,c.h,m[0].g,g);x=a;return z(ea,Gr(a,b,n,e,y,!1,m[0],g,d,k,l),4);case 4:x.R=ea.h;case 3:w=a.R;case 2:D=m[0].h;D.split("/").pop();B=Jq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(B)||
|
|
699
699
|
h.set(B,y),v))for(A=h;A.has(B+1)&&A.get(B+1)<y;)B++;F=a.J.get(B)||0;G=[];H=0;case 5:if(!(H<m.length)){ea.D(7);break}K=m[H];J=G[G.length-1];L=0==H?w:J.endTime;y=p+v+H;f.set(y,L);n=Cr(a,c.h,K.g,g);W=Iq(K.g,"EXT-X-DISCONTINUITY");if(!W){ea.D(8);break}B++;h.set(B,y);return z(ea,Hr(a,B,b,n,e,y,K,g,L,d,k,l),9);case 9:F=ea.h;case 8:!a.l&&(Z=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ka=Iq(K.g,"EXTINF");a.l||ka?(ja=Er(a,n,J,K,L,F,g,c.h,d))&&G.push(ja):a.l||Sa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
@@ -705,8 +705,8 @@ Promise.all(v),3);case 3:return y=B.h,w=y[0],x=y[1]||y[0],B["return"](Kr(b,w.uri
|
|
|
705
705
|
function Kr(a,b,c,d){var e=0;(new tg).box("moov",xg).box("trak",xg).box("mdia",xg).X("mdhd",function(h){e=Kh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new P(2,4,4030,a,b);var f=0,g=!1;(new tg).box("moof",xg).box("traf",xg).X("tfdt",function(h){f=Jh(h.reader,h.version).Qd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new P(2,4,4030,a,b);return f}
|
|
706
706
|
function Lr(a,b,c){function d(){f.seek(g+188);h=f.ka();71!=h&&(f.seek(g+192),h=f.ka());71!=h&&(f.seek(g+204),h=f.ka());71!=h&&e();f.qf(1)}function e(){throw new P(2,4,4030,a,b);}var f=new qg(c,0),g=0,h=0;for(c=Math.min(f.U.byteLength-188,940);;){g=f.ia();h=f.ka();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.kc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ka()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ka(),f.skip(k)),1!=f.P()>>8)d();else{f.skip(3);c=f.ka()>>6;0!=c&&1!=c||e();0==f.ka()&&e();c=f.ka();k=
|
|
707
707
|
f.kc();var l=f.kc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function ur(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new P(2,4,4039,f);}}return c}
|
|
708
|
-
function yr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y;return M(function(w){if(1==w.g){f=Nb;g=lf;h=ur(d.segments[0].h,e);k=new jb(h);l=k.Na.split(".").pop();m=Mr[b];if(n=m[l])return w["return"](n);if(b==f.
|
|
709
|
-
function Zq(a,b){var c=ef([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Jr(a,c,0)}function Xq(a){var b,c;M(function(d){if(1==d.g){if(!a.i)return d["return"]();E(d,2);return z(d,a.update(),4)}if(2!=d.g)return b=a.
|
|
708
|
+
function yr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y;return M(function(w){if(1==w.g){f=Nb;g=lf;h=ur(d.segments[0].h,e);k=new jb(h);l=k.Na.split(".").pop();m=Mr[b];if(n=m[l])return w["return"](n);if(b==f.oa)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.wc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");p=ef([h],a.g.retryParameters);p.method="HEAD";return z(w,Jr(a,p,g),2)}t=w.h;v=t.headers["content-type"];return v?w["return"](v.split(";")[0]):(y=m.mp4,w["return"](y))})}
|
|
709
|
+
function Zq(a,b){var c=ef([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Jr(a,c,0)}function Xq(a){var b,c;M(function(d){if(1==d.g){if(!a.i)return d["return"]();E(d,2);return z(d,a.update(),4)}if(2!=d.g)return b=a.ma,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);C(d)})}function er(a,b){a.m=b;a.j&&a.j.Oc(a.m==Yq);a.m!=Yq||a.F.stop()}
|
|
710
710
|
function Jr(a,b,c){if(!a.H)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);$e(a.H,b);return b.promise}N("shaka.hls.HlsParser",Wq);
|
|
711
711
|
var zr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Mr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
712
712
|
vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},wr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Dq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Dq(a,"URI");b=Vq(b);b=Ic(b.data);b=Ib("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Cq(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
|
|
@@ -756,7 +756,7 @@ function Ws(a,b){var c=new Ps("segment",a.h,a.g,b);return new oi(function(){retu
|
|
|
756
756
|
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:d=Qs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new ws;ua(m);return z(m,e.init(),4);case 4:return z(m,As(e,d.Sa(),d.Da()),5);case 5:return f=m.h,z(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Rs(d.Sa(),d.Da()),l=Ss(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),z(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
757
757
|
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return d=c.g,e=new ws,E(m,2,3),z(m,e.init(),5);case 5:return z(m,As(e,d.Sa(),d.Da()),6);case 6:return f=m.h,z(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 z(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),z(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
|
|
758
758
|
mg["application/x-offline-manifest"]=function(){return new Xs};function Ys(){}function Zs(a){var b=Qs(a);b&&"manifest"==b.g?(a={uri:a,mf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Te(a)):a=b&&"segment"==b.g?$s(b.key(),b):Re(new P(2,1,9004,a));return a}
|
|
759
|
-
function $s(a,b){var c=new ws;return Te(void 0).
|
|
759
|
+
function $s(a,b){var c=new ws;return Te(void 0).qa(function(){return c.init()}).qa(function(){return As(c,b.Sa(),b.Da())}).qa(function(d){return d.getSegments([b.key()])}).qa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}N("shaka.offline.OfflineScheme",Ys);Ys.plugin=Zs;bf("offline",Zs);function at(a,b,c){var d,e,f,g,h,k;return M(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,bt(y.info,p)){y.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=ct(a,b,g);return z(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)}})}
|
|
760
760
|
function ct(a,b,c){var d,e;return M(function(f){switch(f.g){case 1:return d=new zf({Pb:b,onError:function(){},pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(f,2),d.configure(a),z(f,Hf(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),z(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return E(f,6),z(f,Qf(d),8);case 8:va(f,7);break;case 6:return I(f),z(f,d.destroy(),
|
|
761
761
|
9);case 9:return f["return"]([]);case 7:return e=[],z(f,Promise.all(c.sessionIds.map(function(g){return M(function(h){if(1==h.g)return E(h,2),z(h,Rf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);I(h);C(h)})})),10);case 10:return z(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
762
762
|
function bt(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&jc(a.audioCapabilities,b.audioCapabilities,c)&&jc(a.videoCapabilities,b.videoCapabilities,c)};function dt(a,b,c){var d=b.presentationTimeline.getDuration();b=et(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function ft(a,b){var c=Ss(new Rs(a.Sa(),a.Da()),b),d=b.appMetadata||{};c=et(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}}
|
|
@@ -975,9 +975,9 @@ a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.b
|
|
|
975
975
|
function xx(a){if(a.i.length){for(var b=a.player.La(),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 "+
|
|
976
976
|
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 Ax(a){xx(a);var b=a.player.La();b=b.end-b.start;a.player.T()&&5<b&&a.A.ha(1)}function zx(a){var b=a.player.La();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function yx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}N("shaka.ui.SeekBar",wx);function Bx(){}
|
|
977
977
|
Bx.prototype.create=function(a,b){return new wx(a,b)};wx.Factory=Bx;function Y(a,b,c,d){cb.call(this);var e=this;this.W=!0;this.i=d;this.B=new An(c,a,this.i.castReceiverAppId);this.hb=!0;this.A=this.B.Bb();this.C=c;this.F=this.B.ac();this.Aa=a;this.j=b;this.Wa=this.F.$c();this.m=this.l=null;this.$=!1;this.G=[];this.wb=[];this.jb=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.jb=!1;Cx(e)});this.ma=new Q(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Oa=new Q(function(){e.Nb()&&
|
|
978
|
-
Dx(e)});this.J=null;this.H=[];this.Ba=Ex();this.h=new of;this.configure(this.i);Fx(this);this.
|
|
978
|
+
Dx(e)});this.J=null;this.H=[];this.Ba=Ex();this.h=new of;this.configure(this.i);Fx(this);this.na=new Set;Gx(this);this.Oa.ha(.125);this.h.o(this.Ba,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}u(Y,cb);q=Y.prototype;
|
|
979
979
|
q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.C){b.D(2);break}return z(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ma&&(a.ma.stop(),a.ma=null);a.I&&(a.I.stop(),a.I=null);a.Oa&&(a.Oa.stop(),a.Oa=null);Hx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.B){b.D(4);break}return z(b,a.B.destroy(),5);case 5:a.B=null;case 4:if(!a.Aa){b.D(6);break}return z(b,a.Aa.destroy(),7);case 7:a.Aa=
|
|
980
|
-
null;case 6:a.F=null,a.C=null,a.A=null,a.Ba=null,a.
|
|
980
|
+
null;case 6:a.F=null,a.C=null,a.A=null,a.Ba=null,a.na.clear(),cb.prototype.release.call(a),C(b)}})};function Hx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Ix(a,b){Jx.set(a,b)}q.Jf=function(a){this.hb=a;Gx(this)};q.Dg=function(){Cx(this)};
|
|
981
981
|
q.configure=function(a){this.i=a;this.B.Pe(a.castReceiverAppId);this.m&&(this.m=null);this.fb&&(this.fb=null);this.Xa&&(this.Xa=null);this.g?(Wj(this.g),Hx(this)):(Kx(this),Lx(this));this.j.classList.add("shaka-video-container");this.C.classList.add("shaka-video");Mx(this);this.i.addBigPlayButton&&Nx(this);this.i.customContextMenu&&(this.Xa=new qx(this.Z,this),this.H.push(this.Xa));this.ba||Ox(this);this.ib=S("div");this.ib.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.ib);
|
|
982
982
|
Px(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Qx(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Cx(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",c)}};
|
|
983
983
|
q.pe=function(a){(this.W=a)?(this.j.setAttribute("shaka-controls","true"),this.C.tabIndex=-1,this.C.controls=!1):this.j.removeAttribute("shaka-controls");Cx(this)};q.wf=function(a){this.C.controls=a;this.C.tabIndex=a?0:-1;a&&this.pe(!1)};q.getAd=function(){return this.l};q.Vf=function(){return this.B};q.hg=function(){return this.Ba};q.xg=function(){return this.j};q.Bb=function(){return this.A};q.gg=function(){return this.C};q.ac=function(){return this.F};q.fg=function(){return this.Aa};q.$f=function(){return this.g};
|
|
@@ -993,14 +993,14 @@ d.value,Jx.get(d)?(d=Jx.get(d).create(a.Z,a),"function"!=typeof d.release&&(zb("
|
|
|
993
993
|
function Lx(a){a.R=S("div");a.R.classList.add("shaka-client-side-ad-container");X(a.R,!1);a.h.o(a.R,"click",function(){Sx(a)});a.j.appendChild(a.R)}
|
|
994
994
|
function Fx(a){a.h.o(a.F,"buffering",function(){a.W&&X(a.ba,a.F.Ic())});a.W&&X(a.ba,a.F.Ic());a.h.o(window,"keydown",function(b){Vx(a,b)});a.h.o(window,"click",function(){return a.cc()});a.h.o(a,"submenuopen",function(){a.cc()});a.h.o(a.A,"play",function(){Cx(a)});a.h.o(a.A,"pause",function(){Cx(a)});a.h.o(a.j,"mousemove",function(b){Rx(a,b)});a.h.o(a.j,"touchmove",function(b){Rx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Rx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.za()});
|
|
995
995
|
a.h.o(a.B,"caststatuschanged",function(){Gx(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&Rx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),Wx(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),Wx(a,a.m.getValue()+5));break;case "Home":a.m&&Wx(a,a.F.La().start);break;
|
|
996
|
-
case "End":a.m&&Wx(a,a.F.La().end);break;case " ":e&&Xx(a)}});a.h.o(a.j,"keyup",function(b){a.
|
|
997
|
-
function Yx(a){return M(function(b){return a.A&&0!=a.A.readyState&&!a.B.
|
|
996
|
+
case "End":a.m&&Wx(a,a.F.La().end);break;case " ":e&&Xx(a)}});a.h.o(a.j,"keyup",function(b){a.na["delete"](b.key)});a.h.o(a.Wa,"ad-started",function(b){a.l=b.ad;a.zf()});a.h.o(a.Wa,"ad-stopped",function(){a.l=null;a.cf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return M(function(b){return z(b,Yx(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.C.offsetWidth,a.C.offsetHeight)})}
|
|
997
|
+
function Yx(a){return M(function(b){return a.A&&0!=a.A.readyState&&!a.B.ra()&&a.i.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?z(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?z(b,document.exitFullscreen(),0):b.D(0):b["return"]()})}
|
|
998
998
|
function Rx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Cx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.jb=!0,a.I.stop(),a.Nb()||(Dx(a),Cx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.S(3))}function Zx(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
|
|
999
999
|
function Cx(a){var b=a.l?a.l.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.jb||d||Zx(a)?(Dx(a),a.g.setAttribute("shown","true"),a.ma.stop()):a.ma.S(a.i.fadeDelay)}function Sx(a){a.W&&(a.Vc()?a.I.za():a.i.singleClickForPlayAndPause&&Xx(a))}function Xx(a){a.l&&a.l.isLinear()?nx(a):ox(a)}
|
|
1000
|
-
function Gx(a){var b=a.B.
|
|
1000
|
+
function Gx(a){var b=a.B.ra();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Nb=function(){return this.W?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function Wx(a,b){a.m.changeTo(b);a.Nb()&&Dx(a)}
|
|
1001
1001
|
function Dx(a){if(a.m)if(a.m.setValue(a.A.currentTime),a.m.update(),a.m.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
|
|
1002
|
-
function Vx(a,b){a.
|
|
1003
|
-
function $x(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.
|
|
1002
|
+
function Vx(a,b){a.na.add(b.key);var c=a.Vc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Cx(a),a.h.o(window,"mousedown",function(){a.h.nc(window,"mousedown")}));"Escape"==b.key&&a.I.za();c&&a.na.has("Tab")&&$x(a,b)}
|
|
1003
|
+
function $x(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.na.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
1004
1004
|
function Ex(){var a=new Zb("en");a.ea("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
|
|
1005
1005
|
["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
|
|
1006
1006
|
["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
|
|
@@ -1089,8 +1089,8 @@ S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}
|
|
|
1089
1089
|
function(){By(c)});Ay(this);By(this)}u(zy,vy);function By(a){var b=a.player.Za();ty(b,a.menu,function(c){a.player.vd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);gx(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
|
|
1090
1090
|
function Ay(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}N("shaka.ui.AudioLanguageSelection",zy);function Cy(){}Cy.prototype.create=function(a,b){return new zy(a,b)};ey("language",new Cy);Ix("language",new Cy);function Dy(a,b){V.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Vj();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
|
|
1091
1091
|
d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);Ey(this);Fy(this);this.eventManager.o(this.localization,"locale-updated",function(){Ey(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ey(c)});this.eventManager.o(this.g,"click",function(){Gy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Fy(c)})}u(Dy,V);
|
|
1092
|
-
function Gy(a){var b;M(function(c){if(1==c.g){if(a.h.
|
|
1093
|
-
function Hy(a){a.j.textContent=a.h.
|
|
1092
|
+
function Gy(a){var b;M(function(c){if(1==c.g){if(a.h.ra())return a.h.Af(),c.D(0);E(c,3);a.g.disabled=!0;return z(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}function Fy(a){var b=a.h.Le()&&a.controls.hb,c=a.h.ra();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Hy(a)}
|
|
1093
|
+
function Hy(a){a.j.textContent=a.h.ra()?a.h.td():a.localization.resolve("OFF")}function Ey(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Hy(a)}N("shaka.ui.CastButton",Dy);function Iy(){}Iy.prototype.create=function(a,b){return new Dy(a,b)};ey("cast",new Iy);Ix("cast",new Iy);function Jy(a,b){V.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Ky(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){Ky(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ky(c)});
|
|
1094
1094
|
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Ce(d);c.g.setAttribute("shaka-status",d+"x")}})}u(Jy,V);function Ky(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}N("shaka.ui.FastForwardButton",Jy);function Ly(){}Ly.prototype.create=function(a,b){return new Jy(a,b)};Ix("fast_forward",new Ly);function My(a,b){V.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Ny(this);this.eventManager.o(this.localization,"locale-updated",function(){Ny(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ny(c)});this.eventManager.o(this.g,
|
|
1095
1095
|
"click",function(){return M(function(d){return z(d,c.controls.Ae(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Ny(c)})}u(My,V);function Ny(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}N("shaka.ui.FullscreenButton",My);function Oy(){}Oy.prototype.create=function(a,b){return new My(a,b)};Ix("fullscreen",new Oy);function Py(a,b){V.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
|
|
1096
1096
|
d.appendChild(this.l);this.g.appendChild(d);Qy(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Qy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Qy(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ha(1)});this.m=this.video.loop;this.h=new Q(function(){c.m!=c.video.loop&&(Qy(c),c.m=c.video.loop)});this.h.ha(1)}u(Py,V);Py.prototype.release=function(){this.h.stop();this.h=null;V.prototype.release.call(this)};
|