@castlabs/prestoplay 6.11.1-beta.1 → 6.11.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +6 -6
- package/cjs/cl.cast.js +98 -98
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +279 -277
- package/cjs/cl.crypto.js +8 -8
- package/cjs/cl.dash.js +72 -72
- package/cjs/cl.externs.js +1 -1
- package/cjs/cl.freewheel.js +23 -23
- package/cjs/cl.hls.js +66 -66
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +21 -21
- package/cjs/cl.mse.js +267 -267
- package/cjs/cl.muxdata.js +13 -13
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +13 -13
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.simid.js +16 -16
- package/cjs/cl.smooth.js +71 -71
- package/cjs/cl.thumbnails.js +23 -23
- package/cjs/cl.tizen.js +65 -65
- package/cjs/cl.ttml.js +28 -28
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +12 -12
- package/cjs/cl.vr.js +18 -18
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.youbora.js +11 -11
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +82 -82
- package/cl.conviva.js +26 -26
- package/cl.core.js +204 -204
- package/cl.crypto.js +6 -6
- package/cl.dash.js +67 -67
- package/cl.externs.js +1 -1
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +69 -69
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +17 -17
- package/cl.mse.js +232 -232
- package/cl.muxdata.js +11 -11
- package/cl.onboard.js +3 -3
- package/cl.persistent.js +10 -10
- package/cl.playlist.js +5 -5
- package/cl.simid.js +13 -13
- package/cl.smooth.js +59 -59
- package/cl.thumbnails.js +16 -16
- package/cl.tizen.js +54 -54
- package/cl.ttml.js +22 -22
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +6 -6
- package/cl.vr.js +14 -14
- package/cl.vtt.js +12 -12
- package/cl.youbora.js +10 -10
- package/package.json +1 -1
- package/typings.d.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
`safari.enableHlsVideoTrackInfo` and `safari.enableMetadata`.
|
|
14
14
|
* Fixed position attribute of the `clpp-fill` css class and made it `absolute`
|
|
15
15
|
* Fixed issue with typescript types where namespace functions were not exposed
|
|
16
|
+
* Fixed issue with ESM module dependencies where required files were not automatically imported
|
|
16
17
|
|
|
17
18
|
# 6.11.0
|
|
18
19
|
|
package/cjs/cl.adobe.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
(b.currentState+".")),
|
|
4
|
-
|
|
2
|
+
var f=function(window){var KR=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},NR=function(a){a.f=new _.Dh;a.f.on(a.m,_.mg,function(){return LR(a)});a.f.on(a.m,_.lg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Ee,function(){return MR(a)});a.f.on(a.m,_.Sf,function(b){b=b.detail;switch(b.currentState){case _.Ro:a.a.length||MR(a);s.Media.play(a.a,a.m.getPosition());break;case _.Qo:case _.Io:LR(a);break;case _.Ko:case _.Do:case _.Oo:a.g.info("Close session for "+a.a+" in player state "+
|
|
3
|
+
(b.currentState+".")),LR(a),s.Media.close(a.a),a.a=""}})},MR=function(a){var b=a.m.getLoadedSource();a.a=b?b.name||b.url:"";a.g.info("Open session for "+a.a+" with duration "+a.m.getDuration());s.Media.open(a.a,a.m.getDuration(),_.xa)},LR=function(a){s.Media.stop(a.a,a.m.getPosition())},OR=function(){};_.w(KR,_.gt);KR.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.m=a,NR(this)):this.g.warn("Adobe API not available.")};
|
|
4
|
+
KR.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};KR.prototype.id=function(){return"adobe"};_.H("clpp.adobe.AdobeAnalyticsPlugin",KR);KR.Id="adobe";OR.prototype.create=function(){return new KR};_.jq(new OR);};
|
|
5
5
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
6
6
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
7
7
|
else{_=this.clpp._;(f.call(g,this));}
|
package/cjs/cl.airplay.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
_.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.
|
|
4
|
-
_.r.
|
|
2
|
+
var f=function(window){var IR=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.rk(function(){a.m.play()["catch"](function(){})});this.h=new _.Dh},JR=function(){};_.w(IR,_.gt);_.r=IR.prototype;_.r.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.r.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.dl.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.El.bind(this)))};
|
|
3
|
+
_.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.dl=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.L(_.Qc,{canCast:this.f}))};_.r.El=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Pc:_.Oc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Ro)this.l?this.m.play()["catch"](function(){}):this.o.aa(.01);this.m.trigger(new _.L(a))};_.r.ob=function(){return this.j};
|
|
4
|
+
_.r.Te=function(){return this.f};_.r.mm=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.H("clpp.airplay.AirPlayPlugin",IR);IR.prototype.showCastMenu=IR.prototype.mm;IR.prototype.canCast=IR.prototype.Te;IR.prototype.isCasting=IR.prototype.ob;IR.Id="airplay";JR.prototype.create=function(){return new IR};_.jq(new JR);};
|
|
5
5
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
6
6
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
7
7
|
else{_=this.clpp._;(f.call(g,this));}
|
package/cjs/cl.broadpeak.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
0:1E3*this.m.getDuration()};b.prototype.getCurrentPosition=function(){return 1E3*this.m.getPosition()};b.prototype.getCurrentBitrate=function(){var c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3};return new b(a)},
|
|
4
|
-
b){var c=b.customParameters||{};a.a=a.h.createStreamingSession();for(var d in c)a.a.setCustomParameter(d,c[d]);a.l.on(a.m,_.me,a.U.bind(a));a.j=
|
|
5
|
-
_.r.
|
|
6
|
-
_.r.U=function(a){a=a.detail;if(7003===a.code)
|
|
7
|
-
|
|
2
|
+
var f=function(window){var AR=function(a,b){this.m=a;this.f=b;this.a=new _.Dh;this.h=!1},BR=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Ej();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.xa};b.prototype.getVersion=function(){return _.ia};b.prototype.getOSName=function(){return this.a.os};b.prototype.getDeviceVersion=function(){return this.a.osVersion.name};b.prototype.getDeviceType=function(){return"browser"};b.prototype.getTotalDuration=function(){return this.m.isLive()?
|
|
3
|
+
0:1E3*this.m.getDuration()};b.prototype.getCurrentPosition=function(){return 1E3*this.m.getPosition()};b.prototype.getCurrentBitrate=function(){var c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3};return new b(a)},CR=function(){this.j=this.f=this.a=this.h=this.m=null;this.l=new _.Dh},DR=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.h||(a.h=SmartLib.getInstance(),a.h.init(c,d,e),typeof f===_.Vf&&a.h.setUUID(f))},ER=function(a,
|
|
4
|
+
b){var c=b.customParameters||{};a.a=a.h.createStreamingSession();for(var d in c)a.a.setCustomParameter(d,c[d]);a.l.on(a.m,_.me,a.U.bind(a));a.j=BR(a.m);a.a.attachPlayer(a.j)},FR=function(a,b){_.Gh(a.l);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},GR=function(){return!window.SmartLib||!window.GenericPlayerApi},HR=function(){};_.r=AR.prototype;_.r.init=function(){var a=this.m,b=this.a;b.on(a,_.Sf,this.wi.bind(this));b.on(a,_.gd,this.si.bind(this));b.on(a,"seek",this.vi.bind(this))};
|
|
5
|
+
_.r.si=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.wi=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Io&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Io:c.notifyStallStart();break;case _.Ro:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.Qo:c.notifyPause()}};_.r.vi=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.Gh(this.a),this.a=null)};_.w(CR,_.gt);_.r=CR.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(GR())return a.onError(new _.P(1,9,11E3));DR(this,d);ER(this,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.m.onError(new _.P(1,9,11001,{bpkErrorCode:f,message:e}));FR(c,void 0)}else b.url=e.getURL(),c.f=new AR(c.m,c.j),c.f.init()})}};
|
|
6
|
+
_.r.U=function(a){a=a.detail;if(7003===a.code)FR(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:FR(this,SmartLib.BPDecodingError);break;case 1:FR(this,SmartLib.BPNetworkingError);break;case 6:FR(this,SmartLib.BPAccessRightError);break;default:FR(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){GR()||FR(this,SmartLib.BPSessionEndsNormally)};_.r.id=function(){return"broadpeak"};_.H("clpp.broadpeak.BroadpeakPlugin",CR);
|
|
7
|
+
CR.isSdkMissing=GR;CR.Id="broadpeak";HR.prototype.create=function(){return new CR};_.jq(new HR);};
|
|
8
8
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
9
9
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
10
10
|
else{_=this.clpp._;(f.call(g,this));}
|
package/cjs/cl.cast.js
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
a;this.j=null;this.f=_.Do;this.l=_.Eo;this.h=2;this.B=Date.now();this.A=-1}
|
|
4
|
-
"Infinity"===c?Infinity:c})}catch(b){return a}},
|
|
5
|
-
chrome.cast&&chrome.cast.media){var c=chrome.cast.media.HlsSegmentFormat;var d=chrome.cast.media.HlsVideoSegmentFormat}else if(window.cast&&cast.framework&&cast.framework.messages)c=cast.framework.messages.HlsSegmentFormat,d=cast.framework.messages.HlsVideoSegmentFormat;else return;switch(a){case _.tg:return d.FMP4;case _.sg:return b===_.Pj?d.MPEG2_TS:c.TS;case _.ad:return c.AAC;case _.bd:return c.AC3;case _.cd:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.dd:return c.FMP4}},
|
|
6
|
-
void 0===a?
|
|
7
|
-
this.o=this.a=null;this.w=this.
|
|
8
|
-
e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;
|
|
9
|
-
_.yl();this.D=[];this.B=0;this.M=new _.Hj;this.H=this.l=this.a=null;this.A=this.w=!1;this.pa="";this.Ua=1E6;this.f=new
|
|
10
|
-
|
|
11
|
-
a:{var b=a.metadataType;var c=Object.entries(
|
|
12
|
-
a.fa.length){a.w=!0;a.o.
|
|
13
|
-
null;a=null===a?null:a+b;return null===a?b:a},
|
|
14
|
-
b.F(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},
|
|
15
|
-
g.hlsSegmentFormat=
|
|
16
|
-
case 3:q=a.jb()||{};t=
|
|
17
|
-
d.language);(e=a.f.sa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.x(f,
|
|
18
|
-
function(a){return new
|
|
19
|
-
b=a.f.a,b!==a.a&&a.f&&a.a?_.x(c,a.f.release(),2):c["return"]();_.aq(a.f,a.a);_.y(c)})},
|
|
20
|
-
typeof e===_.k?e:0},
|
|
21
|
-
|
|
22
|
-
p.vastAdsRequest=
|
|
23
|
-
(c
|
|
24
|
-
h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new
|
|
25
|
-
_.Nh:_.Lh,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b&&b.eventElement}},
|
|
26
|
-
var e=!1,f=[];b===_.T?f=a.getAudioTracks():b===_.S&&(f=a.ja());if(c=c.find(function(h){var l=_.Mi(h);return f.some(function(m){m=_.Mi(m.language||"");return _.Ni(l,m)})})){var g=_.Mi(c);c=f.filter(function(h){h=_.Mi(h.language||"");return _.Ni(g,h)});f=c.length?c:f;e=e||!!c.length}_.R.
|
|
27
|
-
e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.Nj(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.originalLanguage=e.language||null;f.label=e.name||null;f.src=e.trackContentId||null;f.mimeType=e.trackContentType||null;e.customData&&(f.mimeType=e.customData.mimeType||f.mimeType,f.src=e.customData.url||f.src);f.renditions.push(new _.Vj(f.id,f));c.push(f)}return c},
|
|
28
|
-
this.l=-1;this.G=new _.Hj;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},
|
|
29
|
-
h=e.Ya[g];h?(d=g===_.Rd?cast.framework.ContentProtection.WIDEVINE:g===_.Pd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},
|
|
30
|
-
d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},
|
|
31
|
-
this.w=this.
|
|
32
|
-
|
|
33
|
-
[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},
|
|
34
|
-
null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:b.breaks.filter(function(h){return 0<=h.position}).sort(function(h,l){return h.position-l.position}).findIndex(function(h){return h===c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new
|
|
2
|
+
var f=function(window){var OP="Cannot seek during ads playout.",PP="Cannot switch track",QP="Media session does not exist.",RP="No receivers available",SP="Reset ABR functionality not available on cast.",TP="SDK not yet ready",UP="Sender is destroyed.",VP="clpp.cast.CastProxy",WP="clpp.cast.Player",XP="clpp.cast.Receiver",YP="urn:x-cast:castlabs",ZP="urn:x-cast:com.google.cast.media",$P=function(a){return _.E(function(b){return 1==b.a?_.x(b,a.uc(_.We),2):_.x(b,a.uc(_.Ve),0)})},aQ=function(a,b){this.log=new _.K(b);this.player=
|
|
3
|
+
a;this.j=null;this.f=_.Do;this.l=_.Eo;this.h=2;this.B=Date.now();this.A=-1},bQ=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.oe){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Se?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.k?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},cQ=function(a){if(typeof a!==_.Vf)return a;try{return JSON.parse(a,function(b,c){return"NaN"===c?NaN:"-Infinity"===c?-Infinity:
|
|
4
|
+
"Infinity"===c?Infinity:c})}catch(b){return a}},dQ=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.E(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(h=0;h<b.length&&!f;)g=b[h++],f=_.ok(d,a.mimeType,g);if(!f||!g)return q.F(2);l=_.qj(a.url);return _.x(q,c.fetch(l).O,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.Ti(m.data)),p=URL.createObjectURL(new Blob([n])),e={url:p,kind:a.kind,language:a.language,label:a.label,mimeType:g});return q["return"](e)})},eQ=function(a,b){if(window.chrome&&
|
|
5
|
+
chrome.cast&&chrome.cast.media){var c=chrome.cast.media.HlsSegmentFormat;var d=chrome.cast.media.HlsVideoSegmentFormat}else if(window.cast&&cast.framework&&cast.framework.messages)c=cast.framework.messages.HlsSegmentFormat,d=cast.framework.messages.HlsVideoSegmentFormat;else return;switch(a){case _.tg:return d.FMP4;case _.sg:return b===_.Pj?d.MPEG2_TS:c.TS;case _.ad:return c.AAC;case _.bd:return c.AC3;case _.cd:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.dd:return c.FMP4}},gQ=function(a){a=
|
|
6
|
+
void 0===a?fQ:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.P(1,8,8001);var c=b.MetadataType,d=b.GenericMediaMetadata,e=b.MovieMediaMetadata,f=b.TvShowMediaMetadata,g=b.MusicTrackMediaMetadata,h=b.PhotoMediaMetadata;b=b.AudiobookChapterMediaMetadata;switch(a){case c.MOVIE:return new e;case c.TV_SHOW:return new f;case c.MUSIC_TRACK:return new g;case c.PHOTO:return new h;case c.AUDIOBOOK_CHAPTER:return new b;default:return new d}},hQ=function(a){aQ.call(this,a,"clpp.cast.SenderStateManager");
|
|
7
|
+
this.o=this.a=null;this.w=this.Hb.bind(this)},iQ=function(){this.g=new _.K("clpp.cast.SenderTrackManager");this.a=null;this.h=[];this.f={}},jQ=function(a){a=a.a?a.a.a:null;return(a?a.activeTrackIds||[]:[]).map(function(b){return b.toString()})},lQ=function(a,b){var c=jQ(a);return kQ(a,b).find(function(d){return c.includes(d.id)})||null},kQ=function(a,b){return a.h.filter(function(c){return c.type===b})},nQ=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.S){var e=a.ta();
|
|
8
|
+
e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;mQ(a,b)},function(f){a.f[b]=null;a.g.debug(PP,f)})}else b===_.S&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){mQ(a,b)},function(f){a.g.debug(PP,f)}))},mQ=function(a,b){b===_.T?a.a.trigger(new _.L(_.ll)):b===_.S&&a.a.trigger(new _.L(_.ml))},rQ=function(a,b,c,d){_.sl.call(this);this.g=new _.K(_.Cd);this.fa=a;this.o=new _.tk(b);this.da=c;this.oa=d;this.h=this.J=
|
|
9
|
+
_.yl();this.D=[];this.B=0;this.M=new _.Hj;this.H=this.l=this.a=null;this.A=this.w=!1;this.pa="";this.Ua=1E6;this.f=new iQ;this.f.initialize(this);this.j=new hQ(this);this.I=new _.Dh;this.K=null;this.G=new Set;this.T=this.fl.bind(this);this.Da=this.yl.bind(this);this.ia=this.pl.bind(this);this.V=this.jl.bind(this);this.P=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){oQ(!0)},0)}});pQ(this);qQ.add(this)},
|
|
10
|
+
sQ=function(a){var b,c;return _.E(function(d){if(1==d.a)return qQ["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.T),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Da)),c=[],a.f&&(c.push(a.f.destroy()),a.f=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.x(d,Promise.all(c),2);a.A=!1;a.o&&(a.o.stop(),a.o=null);a.da=null;a.oa=null;_.y(d)})},xQ=function(a){if(!a)return null;
|
|
11
|
+
a:{var b=a.metadataType;var c=Object.entries(tQ);c=_.u(c);for(var d=c.next();!d.done;d=c.next()){d=_.u(d.value);var e=d.next().value;if(d.next().value===b){b=e;break a}}b=null}if(!b)return null;b=gQ(tQ[b]);return Object.assign(b,a)},CQ=function(a){var b=void 0===b?fQ:b;return Object.values(tQ).includes(a)?a:b},HQ=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},pQ=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
|
|
12
|
+
a.fa.length){a.w=!0;a.o.Sf();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.fa;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.T);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Da);IQ&&a.o.aa(.02)}},JQ=function(a){var b=a.getPosition();a.a&&a.a.media?(a=a.a.media.startAbsoluteTime,a=typeof a!==_.k?null:a):a=
|
|
13
|
+
null;a=null===a?null:a+b;return null===a?b:a},LQ=function(a,b){KQ(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ia);b.addMessageListener(YP,a.V)},KQ=function(a,b){a.a=b;a.a&&(a.I.release(),a.H=null,a.l=null,a.l=new cast.framework.RemotePlayer,a.H=new cast.framework.RemotePlayerController(a.l),a.I.on(a.H,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.xi.bind(a)),a.f&&a.f.load(),a.j&&a.j.init(),a.trigger(new _.L(_.Ee)))},MQ=function(a){return _.E(function(b){return a.ob()?
|
|
14
|
+
b.F(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},NQ=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,v,z,D,G,F;return _.E(function(C){switch(C.a){case 1:return c=chrome.cast.media.StreamType,d=_.Pt,_.x(C,MQ(a),2);case 2:if(!b)return C["return"]();e=cast.framework.CastContext.getInstance();f=e.getCurrentSession();g=new chrome.cast.media.MediaInfo(b.source.url,b.source.type);g.streamType=b.isLive?c.LIVE:c.BUFFERED;h=b;l=h.Lb;m=h.audioMimeType;g.hlsVideoSegmentFormat=eQ(l,d.VIDEO);
|
|
15
|
+
g.hlsSegmentFormat=eQ(m,d.AUDIO);if(!b.Xa){C.F(3);break}if(!a.P){C.F(4);break}return _.x(C,Promise.resolve(a.P(b.Xa)),5);case 5:if(n=C.f)b.Xa=n;case 4:a.h=b.Xa;a.D=_.Vo(a.h);a.B=a.D.findIndex(function(I){return I.url===b.source.url});if(!b.Xa.remoteTextTracks){C.F(6);break}return _.x(C,Promise.all(b.Xa.remoteTextTracks.map(a.Ej.bind(a))),7);case 7:p=C.f,g.tracks=p.filter(function(I){return I}),b.Xa.remoteTextTracks=void 0;case 6:delete b.Xa.autoplay,b.Xa.startTime=null,g.customData={playerConfiguration:bQ(b.Xa)};
|
|
16
|
+
case 3:q=a.jb()||{};t=CQ(q.metadataType);typeof b.If===_.k&&(v={metadataType:t,sectionStartAbsoluteTime:b.If});b.source.name&&(z={metadataType:t,title:b.source.name});D=HQ(q);if(G=xQ(Object.assign({},v,z,D)))g.metadata=G;F=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.hd&&(F.autoplay=b.autoplay);typeof b.currentTime===_.k&&(F.currentTime=b.currentTime);return _.x(C,f.loadMedia(F),0)}})},OQ=function(a,b,c){c=void 0===c?0:c;var d,e;return _.E(function(f){(d=a.f.ta())&&d.language&&(a.h.preferredTextLanguage=
|
|
17
|
+
d.language);(e=a.f.sa())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.x(f,NQ(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),If:a.getPresentationStartTime(),autoplay:b,Xa:a.h}),0)})},oQ=function(a){if(a){a=_.u(qQ);for(var b=a.next();!b.done;b=a.next())pQ(b.value)}},QQ=function(a,b,c){_.sl.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.oe?c:function(e,f){d.f&&e!==_.Ko&&e!==_.Do&&d.f.load(f)};this.a=PQ(this);this.g=new _.K(VP);this.addDelegate(this.f)},PQ=
|
|
18
|
+
function(a){return new rQ(a.h,function(){a.trigger(new _.L(_.od))},function(b,c){var d=a.f.getConfiguration();d.source=c.source;d.autoplay=!1;d.startTime=c.currentTime?Math.max(c.currentTime-1,0):null;d.ima&&d.startTime&&(d.ima.playAdsAfterTime=d.startTime);c.dg&&(d.preferredAudioLanguage=c.dg);c.Rh&&(d.preferredTextLanguage=c.Rh);_.aq(a.f,null);a.trigger(new _.L("castingended"));a.j(b,d)},function(){return RQ(a)})},RQ=function(a){var b;return _.E(function(c){if(1==c.a)return a.trigger(new _.L(_.nd)),
|
|
19
|
+
b=a.f.a,b!==a.a&&a.f&&a.a?_.x(c,a.f.release(),2):c["return"]();_.aq(a.f,a.a);_.y(c)})},SQ=function(a){aQ.call(this,a,"clpp.cast.StateManager");this.I=this.Bi.bind(this);this.H=this.Ai.bind(this);this.w=this.ll.bind(this);this.o=this.el.bind(this);this.K=this.Di.bind(this);this.J=this.Ci.bind(this);this.M=this.Bl.bind(this);this.G=this.ol.bind(this);this.D=this.U.bind(this);this.a=this.zi.bind(this)},TQ=function(a,b,c,d,e){this.a=a;this.f=b;this.j=typeof c===_.k?c:1;this.l=typeof d===_.k?d:1;this.h=
|
|
20
|
+
typeof e===_.k?e:0},UQ=function(a){this.a=a},WQ=function(a){this.m=a;this.a=null;this.h=this.Ei.bind(this);this.f=[cast.framework.events.EventType.PLAYER_LOADING,cast.framework.events.EventType.BREAK_CLIP_LOADING,cast.framework.events.EventType.BREAK_STARTED,cast.framework.events.EventType.BREAK_ENDED,cast.framework.events.EventType.BREAK_CLIP_STARTED,cast.framework.events.EventType.BREAK_CLIP_ENDED,cast.framework.events.EventType.PLAYING,cast.framework.events.EventType.PAUSE,cast.framework.events.EventType.BUFFERING];
|
|
21
|
+
VQ().addEventListener(this.f,this.h)},ZQ=function(a,b,c){var d,e,f,g,h,l,m;return _.E(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.A(n,2);XQ=!1;e=_.qj(d);return _.x(n,c.fetch(e).O,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.R.Z(f.data),h=new DOMParser,l=h.parseFromString(g,_.cg),l.getElementsByTagName("vmap:VMAP").length)_.J("VMAP detected."),a.vmapAdsRequest=YQ(g);else if(l.getElementsByTagName("VAST").length){_.J("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
|
|
22
|
+
p.vastAdsRequest=YQ(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.J("Unsupported schema."),XQ=!0;return _.$g(n,0)}m=_.B(n);_.J("Failed to fetch an ad",m);XQ=!0;_.y(n)})},YQ=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},VQ=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},aR=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
|
|
23
|
+
(c=$Q(a,c))&&(d={ad:c});a.m.trigger(new _.L(b,d))}},bR=function(a,b){var c=new _.P(1,10,10003,{errorType:b});a.m.onError(c)},$Q=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.Vf&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.Vf&&(e=a.a.getBreakById(b.breakId),!e&&d&&(e=a.a.getBreaks().find(function(g){return g.breakClipIds.includes(d.id)})||null),e&&(f=a.a.getBreaks().filter(function(g){return 0<=g.position}).sort(function(g,
|
|
24
|
+
h){return g.position-h.position}).findIndex(function(g){return g===e})));c=new TQ(d,e,b.index,b.total,f)}return c},cR=function(a){this.cc=a;this.a=this.f.bind(this)},dR=function(){return[cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,cast.framework.events.EventType.TIMED_METADATA_CHANGED,cast.framework.events.EventType.TIMED_METADATA_ENTER,cast.framework.events.EventType.TIMED_METADATA_EXIT]},eR=function(a){var b=a.dashTimedMetadata,c=_.kg;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.jg)?
|
|
25
|
+
_.Nh:_.Lh,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b&&b.eventElement}},fR=function(){this.g=new _.K("clpp.cast.TrackManager");this.m=null;this.o=1E9;this.h=[];this.j=[];this.l=this.Wl.bind(this);this.a=this.f=null},gR=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},iR=function(a){a.a=gR().getTextTracksManager();var b=a.a.getTracks();a.j=hR(_.S,b)},jR=function(a,b,c,d){c=_.Sh(c).filter(function(h){return h});
|
|
26
|
+
var e=!1,f=[];b===_.T?f=a.getAudioTracks():b===_.S&&(f=a.ja());if(c=c.find(function(h){var l=_.Mi(h);return f.some(function(m){m=_.Mi(m.language||"");return _.Ni(l,m)})})){var g=_.Mi(c);c=f.filter(function(h){h=_.Mi(h.language||"");return _.Ni(g,h)});f=c.length?c:f;e=e||!!c.length}_.R.ue(d)&&(c=f.filter(function(h){return h.roles.includes(d)}),f=c.length?c:f,e=e||!!c.length);e&&f[0]&&(e=f[0],a.g.info("Will select track",e),b===_.T?a.ya(e):b===_.S&&a.Ia(e))},hR=function(a,b){for(var c=[],d=_.u(b),
|
|
27
|
+
e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.Nj(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=e.language||null;f.originalLanguage=e.language||null;f.label=e.name||null;f.src=e.trackContentId||null;f.mimeType=e.trackContentType||null;e.customData&&(f.mimeType=e.customData.mimeType||f.mimeType,f.src=e.customData.url||f.src);f.renditions.push(new _.Vj(f.id,f));c.push(f)}return c},kR=function(){_.sl.call(this);this.g=new _.K(WP);this.h=this.w=_.yl();this.A=null;
|
|
28
|
+
this.l=-1;this.G=new _.Hj;this.f=this.o=this.j=this.a=this.B=null;this.D=!1},lR=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},oR=function(a,b){function c(){b.protectionSystem=cast.framework.ContentProtection.NONE;b.licenseUrl=void 0;b.licenseRequestHandler=void 0;b.licenseHandler=void 0}if(a&&a.drm){var d=a.drm,e=_.Wl(d);if(e){var f=[_.Pd];_.Vo(a)[0].type!==_.Yc&&f.unshift(_.Rd);d.preferredDrmSystem===_.Pd&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),
|
|
29
|
+
h=e.Ya[g];h?(d=g===_.Rd?cast.framework.ContentProtection.WIDEVINE:g===_.Pd?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},mR(b,h,a,d),nR(b,h,a,d)):c()}else c()}else c()},mR=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.qj({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,
|
|
30
|
+
d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},nR=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.E(function(h){return 1==h.a?(g=_.rj(Object.assign({},f.headers),e.buffer,200,""),_.x(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.Ti(g.data))})}:a.licenseHandler=void 0},pR=function(){this.a=!1;this.g=new _.K(XP);this.f=this.m=null;this.h=new Set;this.A=this.nl.bind(this);
|
|
31
|
+
this.w=this.yi.bind(this);this.j=null;this.o=new _.Dh;this.l=null},rR=function(){return qR||(qR=new pR)},sR=function(){return cast.framework.CastReceiverContext.getInstance()},uR=function(a,b){a.g.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=sR();c=(sR().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.tg:_.sg;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var h=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=
|
|
32
|
+
tR(h,_.ta),m=tR(h,_.Pb),n=_.u([]),p=n.next().value;n=n.next().value;m&&(m=_.u(m.split("x").map(function(q){return+q})),p=m.next().value,n=m.next().value);if(!d.canDisplayType(c,l,p,n)){g+=2;continue}}f.push(h);++g}return f.join("\n")},tR=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+b.length);d.startsWith('"')?(d=d.substring(1),d=d.substring(0,d.indexOf('"'))):(c=d.indexOf(","),0<=c&&(d=d.substring(0,c)))}return d},vR=function(a){this.f=a;this.a=null;this.h=new _.Dh;this.j=
|
|
33
|
+
[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},xR=function(a,b){var c=null,d=wR(a);d&&(c={ad:d});a.f.trigger(new _.L(b,c))},wR=function(a){var b=null;if(a.a&&a.a.mediaInfo){b=a.a.mediaInfo;var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(h){return h.id===a.a.breakId})||
|
|
34
|
+
null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:b.breaks.filter(function(h){return 0<=h.position}).sort(function(h,l){return h.position-l.position}).findIndex(function(h){return h===c})}b.breakClips&&(d=b.breakClips.find(function(h){return h.id===a.a.breakClipId})||null);b=new TQ(d,c,e,f,g)}return b},yR=function(){},zR=function(){};_.r=aQ.prototype;_.r.release=function(){this.qa(_.Do)};_.r.destroy=function(){this.j=this.player=null;return Promise.resolve()};_.r.getState=function(){return this.f};
|
|
35
35
|
_.r.onError=function(a){a.severity===_.Q&&this.qa(_.Oo)};
|
|
36
36
|
_.r.qa=function(a){if(a!==this.f)if(this.f===_.Oo&&a!==_.Do)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.l=this.f;this.f=a;this.f===_.Io?(this.A=b,this.player.trigger(new _.L(_.jd,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.l===_.Io&&this.player.trigger(new _.L(_.id,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.f,previousState:this.l,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.to(this.j,this.f);this.player.trigger(new _.L(_.Sf,
|
|
37
|
-
{detail:a}))}};_.H("clpp.cast.CastUtils",function(){});var
|
|
38
|
-
|
|
37
|
+
{detail:a}))}};_.H("clpp.cast.CastUtils",function(){});var fQ=0,tQ={GENERIC:fQ,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.w(hQ,aQ);hQ.prototype.init=function(){var a=this.player,b=a.a;b&&(this.a&&this.a.removeUpdateListener(this.w),this.a=b,this.a.addUpdateListener(this.w),this.o=a.l)};hQ.prototype.destroy=function(){var a=this;return _.E(function(b){a.a&&(a.a.removeUpdateListener(a.w),a.a=null);return _.x(b,aQ.prototype.destroy.call(a),0)})};hQ.prototype.qa=function(a){var b=this.player.l;b&&b.isPlayingBreak||aQ.prototype.qa.call(this,a)};
|
|
38
|
+
hQ.prototype.Hb=function(){if(this.a&&this.o&&!this.o.isPlayingBreak)switch(this.a.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.a.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.qa(_.Ko);break;case chrome.cast.media.IdleReason.ERROR:this.qa(_.Oo);break;default:this.qa(_.Do)}break;case chrome.cast.media.PlayerState.PLAYING:this.qa(_.Ro);break;case chrome.cast.media.PlayerState.PAUSED:this.qa(_.Qo);break;case chrome.cast.media.PlayerState.BUFFERING:this.qa(_.Io)}};_.w(iQ,_.U);_.r=iQ.prototype;_.r.initialize=function(a){this.a=a};_.r.release=function(){this.h=[];this.f={}};
|
|
39
39
|
_.r.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.h=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.Pj;break;case chrome.cast.media.TrackType.AUDIO:c=_.T;break;case chrome.cast.media.TrackType.TEXT:c=_.S}c=new _.Nj(b.trackId.toString(),c);c.kind=b.subtype;c.language=b.language;c.label=b.name;c.src=b.trackContentId;c.mimeType=b.trackContentType;b.customData&&(c.src=b.customData.url||c.src,c.mimeType=b.customData.mimeType||c.mimeType);
|
|
40
|
-
c.renditions.push(new _.Vj(c.id,c));return c}):[],this.a.trigger(new _.L(_.
|
|
41
|
-
_.r.kb=function(){return this.f[_.T]||null};_.r.lb=function(){return this.f[_.S]||null};_.r.Qa=function(){return
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
_.r.sendMessage=function(a,b){var c=this,d,e,f;return _.E(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.P(1,8,8004,void 0);g.F(2);break}_.A(g,3);return _.x(g,e.sendMessage(a
|
|
45
|
-
_.r.cast=function(){var a=this,b,c;return _.E(function(d){if(1==d.a){if(!a.
|
|
46
|
-
_.r.addMessageListener=function(a){typeof a===_.oe&&this.G.add(a)};_.r.removeMessageListener=function(a){typeof a===_.oe&&this.G["delete"](a)};_.r.play=function(){var a=this;return this.isEnded()?
|
|
47
|
-
_.r.isEnded=function(){return this.getState()===_.Ko};_.r.seek=function(a){var b=this;return this.isEnded()?
|
|
48
|
-
_.r.getDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.r.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(
|
|
40
|
+
c.renditions.push(new _.Vj(c.id,c));return c}):[],this.a.trigger(new _.L(_.St)))};_.r.destroy=function(){this.a=null};_.r.getVideoTracks=function(){return kQ(this,_.Pj)};_.r.getAudioTracks=function(){return kQ(this,_.T)};_.r.ja=function(){return kQ(this,_.S)};_.r.ha=function(){var a=this.Qa();return a?a.renditions[0]:null};_.r.Ma=function(){var a=this.sa();return a?a.renditions[0]:null};_.r.Oa=function(){var a=this.ta();return a?a.renditions[0]:null};_.r.ab=function(){return this.f[_.Pj]||null};
|
|
41
|
+
_.r.kb=function(){return this.f[_.T]||null};_.r.lb=function(){return this.f[_.S]||null};_.r.Qa=function(){return lQ(this,_.Pj)};_.r.sa=function(){return lQ(this,_.T)};_.r.ta=function(){return lQ(this,_.S)};_.r.gb=function(a){nQ(this,_.Pj,a)};_.r.ya=function(a){nQ(this,_.T,a)};_.r.Ia=function(a){nQ(this,_.S,a)};_.r.fb=function(a){this.gb(a&&a.track)};_.r.rb=function(a){this.ya(a&&a.track)};_.r.sb=function(a){this.Ia(a&&a.track)};_.r.addTextTrack=function(){return _.E(function(a){_.y(a)})};_.r.la=function(){return!0};
|
|
42
|
+
iQ.prototype.isAbrEnabled=iQ.prototype.la;iQ.prototype.addTextTrack=iQ.prototype.addTextTrack;iQ.prototype.setTextRendition=iQ.prototype.sb;iQ.prototype.setAudioRendition=iQ.prototype.rb;iQ.prototype.setVideoRendition=iQ.prototype.fb;iQ.prototype.setTextTrack=iQ.prototype.Ia;iQ.prototype.setAudioTrack=iQ.prototype.ya;iQ.prototype.setVideoTrack=iQ.prototype.gb;iQ.prototype.getTextTrack=iQ.prototype.ta;iQ.prototype.getAudioTrack=iQ.prototype.sa;iQ.prototype.getVideoTrack=iQ.prototype.Qa;
|
|
43
|
+
iQ.prototype.getLoadingTextRendition=iQ.prototype.lb;iQ.prototype.getLoadingAudioRendition=iQ.prototype.kb;iQ.prototype.getLoadingVideoRendition=iQ.prototype.ab;iQ.prototype.getTextRendition=iQ.prototype.Oa;iQ.prototype.getAudioRendition=iQ.prototype.Ma;iQ.prototype.getVideoRendition=iQ.prototype.ha;iQ.prototype.getTextTracks=iQ.prototype.ja;iQ.prototype.getAudioTracks=iQ.prototype.getAudioTracks;iQ.prototype.getVideoTracks=iQ.prototype.getVideoTracks;_.w(rQ,_.sl);_.r=rQ.prototype;_.r.init=function(a,b){this.h=this.J=b};_.r.unload=function(){var a=this;return new Promise(function(b,c){a.f&&a.f.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)})};_.r.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.r.destroy=function(){return _.E(function(a){_.y(a)})};_.r.Od=function(a){this.P=a};_.r.oc=function(){return this.w};_.r.ob=function(){return this.A};_.r.jf=function(){return this.pa};
|
|
44
|
+
_.r.sendMessage=function(a,b){var c=this,d,e,f;return _.E(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.P(1,8,8004,void 0);g.F(2);break}_.A(g,3);return _.x(g,e.sendMessage(a,bQ(b)),5);case 5:_.$g(g,2);break;case 3:f=_.B(g),d=new _.P(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.y(g)}})};
|
|
45
|
+
_.r.cast=function(){var a=this,b,c;return _.E(function(d){if(1==d.a){if(!a.oc())throw a.g.warn(TP),new _.P(1,8,8001,void 0);if(!IQ)throw a.g.warn(RP),new _.P(1,8,8002,void 0);if(a.ob())throw a.g.warn("Already casting"),new _.P(1,8,8003,void 0);_.A(d,2);return _.x(d,MQ(a),4)}if(2!=d.a)return _.$g(d,0);b=_.B(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.P(1,8,8E3,c);})};_.r.df=function(){this.ob()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};
|
|
46
|
+
_.r.addMessageListener=function(a){typeof a===_.oe&&this.G.add(a)};_.r.removeMessageListener=function(a){typeof a===_.oe&&this.G["delete"](a)};_.r.play=function(){var a=this;return this.isEnded()?OQ(this,!0):new Promise(function(b,c){if(!a.a)return c(QP);a.a.play(null,b,c)})};_.r.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(QP);a.a.pause(null,b,c)})};_.r.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};
|
|
47
|
+
_.r.isEnded=function(){return this.getState()===_.Ko};_.r.seek=function(a){var b=this;return this.isEnded()?OQ(this,!1,a):new Promise(function(c,d){b.a||d(QP);b.l.isPlayingBreak&&d(OP);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.L(_.mg));b.a.seek(e,function(){b.trigger(new _.L(_.lg));c()},d)})};_.r.getPosition=function(){return this.a&&this.a.getEstimatedTime()||0};
|
|
48
|
+
_.r.getDuration=function(){if(!this.a||!this.a.media)return-1;var a=this.a.media.duration;return typeof a!==_.k?-1:-1===a?Infinity:a};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.r.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(ZP,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
|
|
49
49
|
_.r.getVolume=function(){return this.a&&this.a.volume.level};_.r.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.r.isMuted=function(){return this.a&&this.a.volume.muted};_.r.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
|
|
50
50
|
_.r.getPresentationStartTime=function(){if(!this.a||!this.a.media||!this.a.media.metadata)return null;var a=this.a.media.metadata.sectionStartAbsoluteTime;return typeof a!==_.k?null:1E-8===a?0:a};_.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.j?this.j.getState():_.Eo};
|
|
51
|
-
_.r.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?
|
|
51
|
+
_.r.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?cQ(this.a.customData.stats):_.zo()};_.r.isLive=function(){return Infinity===this.getDuration()};_.r.load=function(a){var b=this,c,d;return _.E(function(e){if(!b.oc())return b.g.warn(TP),e["return"]();if(!IQ)return b.g.warn(RP),e["return"]();b.D=_.Vo(a);_.Bl(a)&&(b.h=_.Al(b.J,a));c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,Xa:b.h,Lb:c.Lb,audioMimeType:c.audioMimeType};return _.x(e,NQ(b,d),0)})};
|
|
52
52
|
_.r.getBufferInfo=function(){return new _.rl};_.r.getTrackManager=function(){return this.f};_.r.getConfiguration=function(){return this.h};_.r.getSurface=function(){return null};_.r.setNetworkEngine=function(a){this.M=a};_.r.getNetworkEngine=function(){return this.M};_.r.getSourceIndex=function(){return this.B};_.r.setSourceIndex=function(a){this.B=a};_.r.getLoadedSource=function(){return this.D[this.B]};_.r.getPeriods=function(){return[]};_.r.getDrmInfo=function(){return null};
|
|
53
|
-
_.r.getTimelineCues=function(){return[]};_.r.resetAbr=function(){this.g.warn(
|
|
54
|
-
_.r.
|
|
55
|
-
_.r.
|
|
56
|
-
_.r.
|
|
57
|
-
isLive:this.isLive()},currentTime:
|
|
58
|
-
_.r.
|
|
59
|
-
|
|
53
|
+
_.r.getTimelineCues=function(){return[]};_.r.resetAbr=function(){this.g.warn(SP)};_.r.onError=function(a){if(a&&(this.trigger(new _.L(_.me,{detail:a})),this.j))this.j.onError(a)};_.r.namespace=function(){return _.Cd};_.r.canPlay=function(){return this.oc()?2:0};_.r.jb=function(){return this.K};_.r.wc=function(a){this.K=xQ(a)};_.r.We=function(){this.K=null};_.r.Nf=function(a){var b=this.jb()||{};a={metadataType:CQ(b.metadataType),title:a};this.wc(Object.assign({},b,a))};
|
|
54
|
+
_.r.Lf=function(a){var b=this.jb()||{},c=CQ(b.metadataType);a=new chrome.cast.Image(a);this.wc(Object.assign({},b,{metadataType:c,images:[a]}))};_.r.Kf=function(a){var b=this.jb()||{};this.wc(Object.assign({},b,{metadataType:3,artist:a}))};_.r.Mf=function(a){var b=this.jb()||{};a={metadataType:CQ(b.metadataType),releaseDate:a};this.wc(Object.assign({},b,a))};
|
|
55
|
+
_.r.fl=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;IQ=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.pa=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.Sf()};
|
|
56
|
+
_.r.yl=function(a){this.g.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;LQ(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.ob()||(this.A=!0,LQ(this,a.session),this.oa());break;case cast.framework.SessionState.SESSION_ENDED:if(this.ob()&&this.a){var b=this.a.media,c=this.f.sa(),d=this.f.ta();c=c&&c.language||void 0;d=d&&d.language||void 0;this.da(this.getState(),{source:{url:b.contentId,type:b.contentType,
|
|
57
|
+
isLive:this.isLive()},currentTime:JQ(this),Rh:d,dg:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ia);a.session.removeMessageListener(YP,this.V);this.A=!1;this.a=null;this.I.release();this.l=this.H=null}};_.r.pl=function(a){this.g.debug("New media session",a.mediaSession);KQ(this,a.mediaSession)};_.r.jl=function(a,b){if(a===YP&&0<this.G.size){var c=cQ(b);this.G.forEach(function(d){return d(c)})}};_.r.xi=function(){this.trigger(new _.L(_.dg))};
|
|
58
|
+
_.r.Ej=function(a){var b=this,c,d;return _.E(function(e){if(1==e.a)return c=null,_.x(e,dQ(a,[_.bg,_.Xc],b.M,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Ua++,chrome.cast.media.TrackType.TEXT),c.language=d.language,c.name=d.label||null,c.trackContentId=d.url,c.trackContentType=d.mimeType,c.customData={mimeType:a.mimeType,url:a.url};return e["return"](c)})};_.r.getTextDisplayer=function(){return null};rQ.prototype.getTextDisplayer=rQ.prototype.getTextDisplayer;rQ.prototype.getNetworkEngine=rQ.prototype.getNetworkEngine;
|
|
59
|
+
rQ.prototype.setNetworkEngine=rQ.prototype.setNetworkEngine;var IQ=!1,qQ=new Set;window.__onGCastApiAvailable=oQ;_.w(QQ,_.sl);_.r=QQ.prototype;_.r.destroy=function(){var a=this;return _.E(function(b){if(1==b.a)return a.a?_.x(b,sQ(a.a),3):b.F(2);2!=b.a&&(a.a=null);a.removeDelegate(a.f);_.y(b)})};_.r.Te=function(){return!!this.a&&this.a.oc()&&IQ};_.r.ob=function(){return!!this.a&&this.a.ob()};_.r.jf=function(){return this.a?this.a.jf():""};_.r.Od=function(a){this.a&&this.a.Od(a)};
|
|
60
60
|
_.r.cast=function(a){var b=this,c,d,e;return _.E(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.A(f,2);return _.x(f,b.a.cast(),4);case 4:if(!b.f||!b.a)return f["return"]();var g=null,h=b.f.getLoadedSource();if(h){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.sa();if(n){if(n.mimeType)var p=n.mimeType;n.language&&(g.preferredAudioLanguage=n.language);n.roles.length&&(g.preferredAudioRole=n.roles[0])}if(l=l.ta())l.language&&
|
|
61
|
-
(g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.hd?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),
|
|
62
|
-
b.g.error("Error while trying to cast",d),e=new _.L(_.me,{detail:d}),b.trigger(e),_.y(f)}})};_.r.
|
|
63
|
-
_.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
(g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.hd?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),If:b.f.getPresentationStartTime(),Lb:m,audioMimeType:p,Xa:g}}c=g;return _.x(f,RQ(b),5);case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.x(f,b.f.load(a),7);if(b.a.a){f.F(7);break}return _.x(f,NQ(b.a,c),7);case 7:_.$g(f,0);break;case 2:d=_.B(f),
|
|
62
|
+
b.g.error("Error while trying to cast",d),e=new _.L(_.me,{detail:d}),b.trigger(e),_.y(f)}})};_.r.df=function(){this.a&&this.a.df()};_.r.ri=function(a){var b=this;return _.E(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.x(c,sQ(b.a),2):c.F(2)}b.a=PQ(b);_.y(c)})};_.r.sendMessage=function(a){var b=this;return _.E(function(c){return b.a?_.x(c,b.a.sendMessage(YP,a),0):(b.g.warn(UP),c["return"]())})};_.r.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(UP)};
|
|
63
|
+
_.r.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(UP)};_.r.jb=function(){return this.a&&this.a.jb()};_.r.wc=function(a){this.a&&this.a.wc(a)};_.r.We=function(){this.a&&this.a.We()};_.r.Nf=function(a){this.a&&this.a.Nf(a)};_.r.Lf=function(a){this.a&&this.a.Lf(a)};_.r.Kf=function(a){this.a&&this.a.Kf(a)};_.r.Mf=function(a){this.a&&this.a.Mf(a)};_.H(VP,QQ);QQ.prototype.setContentReleaseDate=QQ.prototype.Mf;QQ.prototype.setContentArtist=QQ.prototype.Kf;
|
|
64
|
+
QQ.prototype.setContentImage=QQ.prototype.Lf;QQ.prototype.setContentTitle=QQ.prototype.Nf;QQ.prototype.clearContentMetadata=QQ.prototype.We;QQ.prototype.setContentMetadata=QQ.prototype.wc;QQ.prototype.getContentMetadata=QQ.prototype.jb;QQ.prototype.removeMessageListener=QQ.prototype.removeMessageListener;QQ.prototype.addMessageListener=QQ.prototype.addMessageListener;QQ.prototype.sendMessage=QQ.prototype.sendMessage;QQ.prototype.changeReceiverId=QQ.prototype.ri;QQ.prototype.forceDisconnect=QQ.prototype.df;
|
|
65
|
+
QQ.prototype.cast=QQ.prototype.cast;QQ.prototype.setPlayerConfigInterceptor=QQ.prototype.Od;QQ.prototype.getReceiverName=QQ.prototype.jf;QQ.prototype.isCasting=QQ.prototype.ob;QQ.prototype.canCast=QQ.prototype.Te;QQ.prototype.destroy=QQ.prototype.destroy;_.w(SQ,aQ);_.r=SQ.prototype;
|
|
66
66
|
_.r.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.I);b.addEventListener(a.PAUSE,this.H);b.addEventListener(a.MEDIA_FINISHED,this.w);b.addEventListener(a.BUFFERING,this.o);b.addEventListener(a.SEEKING,this.K);b.addEventListener(a.SEEKED,this.J);b.addEventListener(a.STALLED,this.M);b.addEventListener(a.PLAYER_LOADING,this.G);b.addEventListener(a.ERROR,this.D);b.addEventListener(a.BITRATE_CHANGED,this.a)};
|
|
67
67
|
_.r.destroy=function(){var a=this,b,c;return _.E(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.H);c.removeEventListener(b.MEDIA_FINISHED,a.w);c.removeEventListener(b.BUFFERING,a.o);c.removeEventListener(b.SEEKING,a.K);c.removeEventListener(b.SEEKED,a.J);c.removeEventListener(b.STALLED,a.M);c.removeEventListener(b.PLAYER_LOADING,a.G);c.removeEventListener(b.ERROR,
|
|
68
|
-
a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,
|
|
69
|
-
_.r.
|
|
70
|
-
_.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.
|
|
71
|
-
_.r.Db=function(){return this.l};_.r.getWrapperAdIds=function(){return[]};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
_.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.r.dispose=function(){var a=this;return _.E(function(b){
|
|
75
|
-
_.r.
|
|
76
|
-
_.Ic,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
a.D);c.removeEventListener(b.BITRATE_CHANGED,a.a);return _.x(d,aQ.prototype.destroy.call(a),0)})};_.r.Bi=function(){this.player.trigger(new _.L(_.ff));this.qa(_.Ro)};_.r.Ai=function(){this.qa(_.Qo)};_.r.ll=function(){this.qa(_.Ko)};_.r.el=function(a){a.isBuffering?this.qa(_.Io):(a=this.player.isPaused()?_.Qo:_.Ro,this.qa(a))};_.r.Di=function(){this.h=1;this.player.trigger(new _.L(_.mg))};_.r.Ci=function(){this.player.trigger(new _.L(_.lg))};_.r.Bl=function(){this.h=2};_.r.ol=function(){this.qa(_.Po)};
|
|
69
|
+
_.r.zi=function(a){var b=this.player.getStats();this.player.trigger(new _.L(_.gd,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.r.U=function(a){a=new _.P(_.Q,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.player.trigger(new _.L(_.me,{detail:a}));this.qa(_.Oo)};_.r=TQ.prototype;_.r.xb=function(){return"Google Cast Framework"};_.r.yb=function(){return cast.framework.VERSION};_.r.Eb=function(){return 0};_.r.getId=function(){return""};_.r.getCreativeId=function(){return""};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return this.a.title||""};_.r.getDuration=function(){return this.a.duration||0};
|
|
70
|
+
_.r.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.r.qc=function(){return!1};_.r.Rb=function(){return this.a.clickThroughUrl||null};_.r.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.r.Bb=function(){return 0};_.r.Ab=function(){return 0};_.r.mb=function(){return 0};_.r.bb=function(){switch(this.Sb()){case 0:return 0;case -1:return 2;default:return 1}};_.r.getPodIndex=function(){return this.h};_.r.Sb=function(){return this.f.position};_.r.Tb=function(){return this.j};
|
|
71
|
+
_.r.Db=function(){return this.l};_.r.getWrapperAdIds=function(){return[]};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};TQ.prototype.getWrapperCreativeIds=TQ.prototype.getWrapperCreativeIds;TQ.prototype.getWrapperAdSystems=TQ.prototype.getWrapperAdSystems;TQ.prototype.getWrapperAdIds=TQ.prototype.getWrapperAdIds;TQ.prototype.getSequenceLength=TQ.prototype.Db;TQ.prototype.getPositionInSequence=TQ.prototype.Tb;TQ.prototype.getPodTimeOffset=TQ.prototype.Sb;
|
|
72
|
+
TQ.prototype.getPodIndex=TQ.prototype.getPodIndex;TQ.prototype.getPodType=TQ.prototype.bb;TQ.prototype.getMediaBitrate=TQ.prototype.mb;TQ.prototype.getMediaHeight=TQ.prototype.Ab;TQ.prototype.getMediaWidth=TQ.prototype.Bb;TQ.prototype.getMediaUrl=TQ.prototype.getMediaUrl;TQ.prototype.getClickThroughUrl=TQ.prototype.Rb;TQ.prototype.isBumper=TQ.prototype.qc;TQ.prototype.getSkipTimeOffset=TQ.prototype.getSkipTimeOffset;TQ.prototype.getDuration=TQ.prototype.getDuration;TQ.prototype.getTitle=TQ.prototype.getTitle;
|
|
73
|
+
TQ.prototype.getAdvertiserName=TQ.prototype.getAdvertiserName;TQ.prototype.getAdSystem=TQ.prototype.getAdSystem;TQ.prototype.getApiFramework=TQ.prototype.getApiFramework;TQ.prototype.getCreativeId=TQ.prototype.getCreativeId;TQ.prototype.getId=TQ.prototype.getId;TQ.prototype.getTechnology=TQ.prototype.Eb;TQ.prototype.getAdManagerVersion=TQ.prototype.yb;TQ.prototype.getAdManagerName=TQ.prototype.xb;UQ.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};UQ.prototype.Vb=function(){return!!this.a.find(function(a){return 0===a.position})};UQ.prototype.nb=function(){return!!this.a.find(function(a){return-1===a.position})};UQ.prototype.hasPostroll=UQ.prototype.nb;UQ.prototype.hasPreroll=UQ.prototype.Vb;UQ.prototype.getCuePoints=UQ.prototype.getCuePoints;_.r=WQ.prototype;_.r.load=function(){var a=this;return _.E(function(b){XQ&&(XQ=!1,bR(a,0));_.y(b)})};_.r.start=function(){return _.E(function(a){VQ().play();_.y(a)})};_.r.resume=function(){-1!==this.getPosition()&&VQ().play()};_.r.pause=function(){-1!==this.getPosition()&&VQ().pause()};_.r.skip=function(){};_.r.getVolume=function(){return this.m.getVolume()||0};_.r.setVolume=function(a){this.m.setVolume(a)};
|
|
74
|
+
_.r.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.r.dispose=function(){var a=this;return _.E(function(b){VQ().removeEventListener(a.f,a.h);_.y(b)})};
|
|
75
|
+
_.r.Ei=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=VQ().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.m.trigger(new _.L(_.Nc,{adsTimeline:new UQ(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:aR(this,_.Cc,a);break;case cast.framework.events.EventType.BREAK_STARTED:aR(this,_.vc,a);break;case cast.framework.events.EventType.BREAK_ENDED:aR(this,_.wc,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:aR(this,
|
|
76
|
+
_.Ic,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(aR(this,_.Hc,a),aR(this,_.Jc,a)):a.endedReason===b.STOPPED?aR(this,_.Jc,a):a.endedReason===b.END_OF_STREAM?(aR(this,_.zc,a),aR(this,_.Jc,a)):a.endedReason===b.ERROR&&bR(this,1);break;case cast.framework.events.EventType.PLAYING:aR(this,_.Gc,a);break;case cast.framework.events.EventType.PAUSE:aR(this,_.Ec,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?aR(this,_.xc,a):aR(this,_.Gc,a)}};
|
|
77
|
+
WQ.prototype.getPosition=WQ.prototype.getPosition;WQ.prototype.setVolume=WQ.prototype.setVolume;WQ.prototype.getVolume=WQ.prototype.getVolume;WQ.prototype.skip=WQ.prototype.skip;WQ.prototype.pause=WQ.prototype.pause;WQ.prototype.resume=WQ.prototype.resume;var XQ=!1;cR.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(dR(),this.a)};cR.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(dR(),this.a)};cR.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return eR(a)})};
|
|
78
|
+
cR.prototype.f=function(a){if(a instanceof cast.framework.events.TimedMetadataEvent){var b=null;switch(a.type){case cast.framework.events.EventType.TIMED_METADATA_CHANGED:b=_.Oh;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.Qh;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.Rh}b&&this.cc(new _.L(b,{detail:eR(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.cc(new _.L(_.Oh,{detail:b.value}))};_.w(fR,_.U);_.r=fR.prototype;_.r.initialize=function(a){this.m=a;gR().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.r.load=function(){};_.r.destroy=function(){this.m=null;gR().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.l)};_.r.getVideoTracks=function(){return[]};_.r.getAudioTracks=function(){return this.h};_.r.ja=function(){return this.j};_.r.ha=function(){return null};
|
|
79
79
|
_.r.Ma=function(){var a=this.sa();return a&&a.renditions[0]};_.r.Oa=function(){var a=this.ta();return a&&a.renditions[0]};_.r.ab=function(){return null};_.r.kb=function(){return null};_.r.lb=function(){return null};_.r.Qa=function(){return null};_.r.sa=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.k&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
|
|
80
80
|
_.r.ta=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ja().find(function(c){return c.id===b})||null)}return a};_.r.gb=function(){this.g.warn("Video tracks unavailable on Cast")};_.r.ya=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.r.Ia=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.r.fb=function(){this.g.warn("Video renditions unavailable on Cast")};_.r.rb=function(a){this.ya(a&&a.track)};
|
|
81
81
|
_.r.sb=function(a){this.Ia(a&&a.track)};
|
|
82
|
-
_.r.addTextTrack=function(a){var b=this,c,d,e;return _.E(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.x(f,
|
|
83
|
-
a),g;}}_.y(f)})};_.r.la=function(){return!0};_.r.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
_.r.unload=function(){var a=cast.framework.messages.PlayerState,b=
|
|
87
|
-
_.r.play=function(){var a=
|
|
88
|
-
_.r.isEnded=function(){return
|
|
89
|
-
_.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;
|
|
90
|
-
_.r.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.r.getLoadedSource=function(){var a=
|
|
91
|
-
_.r.getPresentationStartTime=function(){return
|
|
92
|
-
_.r.getStats=function(){var a=_.zo();if(this.f){a=
|
|
93
|
-
_.r.load=function(a){var b=this,c,d;return _.E(function(e){b.f=new _.yo;b.a.j=b.f.a;b.A=_.Vo(a);_.Bl(a)&&(b.h=_.Al(b.w,a));if(b.D)return b.D=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration
|
|
94
|
-
_.r.getTrackManager=function(){return this.j};_.r.getConfiguration=function(){return this.h};_.r.getSurface=function(){return this.B};_.r.setNetworkEngine=function(a){this.G=a};_.r.getNetworkEngine=function(){return this.G};_.r.getSourceIndex=function(){return this.l};_.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return
|
|
82
|
+
_.r.addTextTrack=function(a){var b=this,c,d,e;return _.E(function(f){if(1==f.a)return c=b.m.getConfiguration(),_.x(f,dQ(a,Object.values(cast.framework.messages.CaptionMimeType),b.m.getNetworkEngine(),c),2);if((d=f.f)&&b.a){e=new cast.framework.messages.Track(b.o++,cast.framework.messages.TrackType.TEXT);e.isInband=!1;e.language=d.language;e.name=d.label;e.subtype=d.kind;e.trackContentId=d.url;e.trackContentType=d.mimeType;e.customData={mimeType:a.mimeType,url:a.url};try{b.a.addTracks([e]),iR(b)}catch(g){throw b.g.warn("failed on track",
|
|
83
|
+
a),g;}}_.y(f)})};_.r.la=function(){return!0};_.r.Wl=function(){this.f=gR().getAudioTracksManager();var a=this.f.getTracks();this.h=hR(_.T,a);iR(this);a=this.m.getConfiguration();jR(this,_.T,a.preferredAudioLanguage,a.preferredAudioRole);jR(this,_.S,a.preferredTextLanguage,a.preferredTextRole)};fR.prototype.isAbrEnabled=fR.prototype.la;fR.prototype.addTextTrack=fR.prototype.addTextTrack;fR.prototype.setTextRendition=fR.prototype.sb;fR.prototype.setAudioRendition=fR.prototype.rb;
|
|
84
|
+
fR.prototype.setVideoRendition=fR.prototype.fb;fR.prototype.setTextTrack=fR.prototype.Ia;fR.prototype.setAudioTrack=fR.prototype.ya;fR.prototype.setVideoTrack=fR.prototype.gb;fR.prototype.getTextTrack=fR.prototype.ta;fR.prototype.getAudioTrack=fR.prototype.sa;fR.prototype.getVideoTrack=fR.prototype.Qa;fR.prototype.getLoadingTextRendition=fR.prototype.lb;fR.prototype.getLoadingAudioRendition=fR.prototype.kb;fR.prototype.getLoadingVideoRendition=fR.prototype.ab;fR.prototype.getTextRendition=fR.prototype.Oa;
|
|
85
|
+
fR.prototype.getAudioRendition=fR.prototype.Ma;fR.prototype.getVideoRendition=fR.prototype.ha;fR.prototype.getTextTracks=fR.prototype.ja;fR.prototype.getAudioTracks=fR.prototype.getAudioTracks;fR.prototype.getVideoTracks=fR.prototype.getVideoTracks;_.w(kR,_.sl);_.r=kR.prototype;_.r.init=function(a,b){var c=this;this.B=a;b&&(this.h=this.w=b);var d=lR();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.ql.bind(this));d.setMediaPlaybackInfoHandler(this.fi.bind(this));this.a=new SQ(this);this.a.init();this.j=new fR;this.j.initialize(this);this.o=new cR(function(e){return c.trigger(e)});this.o.init()};
|
|
86
|
+
_.r.unload=function(){var a=cast.framework.messages.PlayerState,b=lR();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.r.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.r.destroy=function(){var a=this;return _.E(function(b){if(1==b.a)return a.B=null,a.w=_.yl(),a.h=a.w,a.l=-1,a.A=null,a.a?_.x(b,a.a.destroy(),3):b.F(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.y(b)})};
|
|
87
|
+
_.r.play=function(){var a=lR();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.r.pause=function(){var a=lR();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.r.isPaused=function(){return lR().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
|
|
88
|
+
_.r.isEnded=function(){return lR().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.r.seek=function(a){var b=lR();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(OP);b.seek(a);return Promise.resolve()};_.r.getPosition=function(){return lR().getCurrentTimeSec()};_.r.getDuration=function(){var a=lR().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.r.getPlaybackRate=function(){return lR().getPlaybackRate()};
|
|
89
|
+
_.r.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;lR().sendLocalMediaRequest(b)}};_.r.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.r.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};_.r.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};
|
|
90
|
+
_.r.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.r.getLoadedSource=function(){var a=lR().getMediaInformation();if(a){var b=lR().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.l?this.A[this.l]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,$m:b,name:c}}return null};_.r.getDrmInfo=function(){return null};
|
|
91
|
+
_.r.getPresentationStartTime=function(){return lR().getStartAbsoluteTime()};_.r.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=lR().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.r.getState=function(){return this.a?this.a.getState():_.Eo};
|
|
92
|
+
_.r.getStats=function(){var a=_.zo();if(this.f){a=lR().getStats();this.f.f=a.estimatedBandwidth||NaN;this.f.o=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.w=a.width||NaN;b.h=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.l=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.r.isLive=function(){return Infinity===this.getDuration()};
|
|
93
|
+
_.r.load=function(a){var b=this,c,d;return _.E(function(e){b.f=new _.yo;b.a.j=b.f.a;b.A=_.Vo(a);_.Bl(a)&&(b.h=_.Al(b.w,a));if(b.D)return b.D=!1,e["return"]();c=b.A[b.l];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.h.autoplay;typeof b.h.startTime===_.k&&(d.currentTime=b.h.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:bQ(b.h),local:!0};return _.x(e,lR().load(d),0)})};_.r.getBufferInfo=function(){this.g.warn(_.va);return new _.rl};
|
|
94
|
+
_.r.getTrackManager=function(){return this.j};_.r.getConfiguration=function(){return this.h};_.r.getSurface=function(){return this.B};_.r.setNetworkEngine=function(a){this.G=a};_.r.getNetworkEngine=function(){return this.G};_.r.getSourceIndex=function(){return this.l};_.r.setSourceIndex=function(a){this.l=a};_.r.getPeriods=function(){return[]};_.r.namespace=function(){return WP};_.r.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.r.resetAbr=function(){this.g.warn(SP)};
|
|
95
95
|
_.r.onError=function(a){this.trigger(new _.L(_.me,{detail:a}))};_.r.canPlay=function(){return _.zk()?2:0};
|
|
96
|
-
_.r.
|
|
97
|
-
(!e||e&&f)){d=
|
|
98
|
-
_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};
|
|
99
|
-
_.r.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=
|
|
100
|
-
d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.
|
|
101
|
-
_.r.stop=function(){if(this.a){this.a=!1;this.o.release();var a=
|
|
102
|
-
_.r.removeMessageListener=function(a){typeof a===_.oe&&this.h["delete"](a)};_.r.sendMessage=function(a,b){
|
|
103
|
-
_.r.
|
|
104
|
-
h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Le)||g,n=h[l].getAttribute(_.Jd),p=h[l].getAttribute(_.Gg)||void 0,q=h[l].getAttribute(_.pe)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(h[l])}e[f].getElementsByTagName(_.Rb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ja).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.ac)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=
|
|
96
|
+
_.r.ql=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=bQ(this.getStats());var b=lR(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.g.info("Syncing startAbsoluteTime.Old value: "+(c.startAbsoluteTime+", new value: ")+b),c.startAbsoluteTime=b,a=Object.assign({},a,{media:c}));c=cast.framework.messages.StreamType;b=a.media;var d=!!b,e=this.isLive(),f=d&&!b.metadata,g=!!a.liveSeekableRange;if(d&&g&&
|
|
97
|
+
(!e||e&&f)){d=lR().getStartAbsoluteTime();if(typeof d===_.k){b.startAbsoluteTime=d;var h;f?h=new cast.framework.messages.GenericMediaMetadata:h=b.metadata;h.sectionStartAbsoluteTime=d;b.metadata=h}b.streamType=c.LIVE;a=Object.assign({},a,{media:b})}return a};_.r.fi=function(a,b){var c=null;a.media.customData&&(c=cQ(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;oR(c,b);return b};
|
|
98
|
+
_.r.getTextDisplayer=function(){return null};_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};kR.prototype.getTextDisplayer=kR.prototype.getTextDisplayer;kR.prototype.getNetworkEngine=kR.prototype.getNetworkEngine;kR.prototype.setNetworkEngine=kR.prototype.setNetworkEngine;_.r=pR.prototype;_.r.init=function(a){var b=this;a&&(this.f=new kR,_.aq(a,this.f),this.m=a,this.o.on(window,"unload",function(){return _.E(function(c){return b.m&&b.m.getState()!==_.Do?_.x(c,$P(b.m),0):c.F(0)})}))};
|
|
99
|
+
_.r.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=sR(),b=sR().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[YP]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Jk.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.m&&this.m.getSurface().getMedia())c.mediaElement=
|
|
100
|
+
d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.Hk.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(YP,this.w)}};
|
|
101
|
+
_.r.stop=function(){if(this.a){this.a=!1;this.o.release();var a=sR();sR().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(YP,this.w);a.stop();this.m=this.f=null}};_.r.Od=function(a){this.j=a};_.r.km=function(a){this.l=a};_.r.on=function(a,b){sR().addEventListener(a,b)};_.r.off=function(a,b){sR().removeEventListener(a,b)};_.r.addMessageListener=function(a){typeof a===_.oe&&this.h.add(a)};
|
|
102
|
+
_.r.removeMessageListener=function(a){typeof a===_.oe&&this.h["delete"](a)};_.r.sendMessage=function(a,b){sR().sendCustomMessage(YP,b,bQ(a))};_.r.oc=function(){return this.a};_.r.jb=function(){var a=sR().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
|
|
103
|
+
_.r.Jk=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return uR(this,a);try{var b=(new DOMParser).parseFromString(a,_.cg)}catch(t){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.g.debug("Detected DASH, parsing");b=sR();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.ja),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.rg||g===_.$c){g=e[f].getAttribute(_.Le);for(var h=e[f].getElementsByTagName(_.Rb),l=
|
|
104
|
+
h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Le)||g,n=h[l].getAttribute(_.Jd),p=h[l].getAttribute(_.Gg)||void 0,q=h[l].getAttribute(_.pe)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(h[l])}e[f].getElementsByTagName(_.Rb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.ja).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.ac)[0]){a=c;this.g.debug("Detected Smooth, parsing");b=sR();c=a.getElementsByTagName("StreamIndex");
|
|
105
105
|
for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.rg){e=c[d].getElementsByTagName(_.Ob);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.xb)||void 0,h=e[f].getAttribute(_.wb)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.tg,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.Ob).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
|
|
106
|
-
_.r.
|
|
107
|
-
break}b.f.D=!0;return _.x(l,_.gq(b.m,d),8);case 8:return _.x(l,_.hq(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.
|
|
108
|
-
break}return _.x(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.r.
|
|
109
|
-
_.r.
|
|
110
|
-
|
|
111
|
-
_.r.skip=function(){var a=this.f.a;a&&this.f.sendMessage(
|
|
112
|
-
_.r.
|
|
113
|
-
|
|
106
|
+
_.r.Hk=function(a){var b=this,c,d,e,f,g,h;return _.E(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=cQ(c.media.customData.playerConfiguration));if(!b.m||!d){l.F(2);break}if(!b.j){l.F(3);break}return _.x(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.F(5);break}return _.x(l,ZQ(c.media,d.ima,b.m.getNetworkEngine()),5);case 5:typeof d.startTime===_.k&&d.startTime!==c.currentTime?c.currentTime=d.startTime:d.startTime=c.currentTime||null;if(c.media.customData.local){l.F(7);
|
|
107
|
+
break}b.f.D=!0;return _.x(l,_.gq(b.m,d),8);case 8:return _.x(l,_.hq(b.m),9);case 9:f=b.m.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Lb&&(c.media.hlsVideoSegmentFormat=eQ(f.Lb,_.Pj)),f.audioMimeType&&(c.media.hlsSegmentFormat=eQ(f.audioMimeType,_.T));case 7:if((g=c.media.metadata)&&typeof g.sectionStartAbsoluteTime===_.k){var m=g.sectionStartAbsoluteTime;g.sectionStartAbsoluteTime=0===m?1E-8:m}void 0===c.autoplay&&(c.autoplay=b.m.getConfiguration().autoplay);case 2:if(!b.l){l.F(10);
|
|
108
|
+
break}return _.x(l,Promise.resolve(b.l(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.r.nl=function(a){if(this.m&&(!a.media.customData||!a.media.customData.local)){a=_.N.zk;var b=sR().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.m.getConfiguration().startTime;typeof d!==_.k||typeof c!==_.k||typeof e!==_.k||a(e,d,c)||(b=b.getMediaTimeForAbsoluteTime(e),typeof b===_.k&&a(b,d,c)&&this.m.seek(b))}_.dq(this.m)}};
|
|
109
|
+
_.r.yi=function(a){if(0<this.h.size){var b=cQ(a.data);this.h.forEach(function(c){return c(b)})}};_.H(XP,pR);pR.prototype.getContentMetadata=pR.prototype.jb;pR.prototype.isApiReady=pR.prototype.oc;pR.prototype.sendMessage=pR.prototype.sendMessage;pR.prototype.removeMessageListener=pR.prototype.removeMessageListener;pR.prototype.addMessageListener=pR.prototype.addMessageListener;pR.prototype.off=pR.prototype.off;pR.prototype.on=pR.prototype.on;pR.prototype.setLoadRequestDataInterceptor=pR.prototype.km;
|
|
110
|
+
pR.prototype.setPlayerConfigInterceptor=pR.prototype.Od;pR.prototype.stop=pR.prototype.stop;pR.prototype.start=pR.prototype.start;pR.prototype.init=pR.prototype.init;pR.getInstance=rR;var qR=null;_.r=vR.prototype;_.r.load=function(){var a=this,b,c,d,e,f;return _.E(function(g){a.a=a.f.l;if(a.a)for(b=a.a.controller,c=a.Dl.bind(a),d=_.u(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.h.on(b,f,c);_.y(g)})};_.r.start=function(){return _.E(function(a){_.y(a)})};_.r.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.r.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
|
|
111
|
+
_.r.skip=function(){var a=this.f.a;a&&this.f.sendMessage(ZP,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.r.getVolume=function(){return this.f.getVolume()||0};_.r.setVolume=function(a){this.f.setVolume(a)};_.r.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.r.dispose=function(){var a=this;return _.E(function(b){a.h.release();_.y(b)})};
|
|
112
|
+
_.r.Dl=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.L(_.Nc,{adsTimeline:new UQ(a.breaks)})));break;case "isPlayingBreak":a.value?xR(this,_.vc):(xR(this,_.zc),xR(this,_.Jc),xR(this,_.wc));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(xR(this,_.zc),xR(this,_.Jc)),xR(this,_.Ic));break;case "isPaused":this.a.isPlayingBreak&&(a.value?xR(this,_.Ec):xR(this,_.Gc))}};vR.prototype.getPosition=vR.prototype.getPosition;
|
|
113
|
+
vR.prototype.setVolume=vR.prototype.setVolume;vR.prototype.getVolume=vR.prototype.getVolume;vR.prototype.skip=vR.prototype.skip;vR.prototype.pause=vR.prototype.pause;vR.prototype.resume=vR.prototype.resume;yR.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};yR.prototype.ba=function(a,b){return a.namespace()!==_.Cd?!1:!(!b||!b.ima)};yR.prototype.create=function(a){return new vR(a.a)};yR.prototype.create=yR.prototype.create;yR.prototype.isSupported=yR.prototype.ba;yR.prototype.name=yR.prototype.name;_.jp(new yR);zR.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};zR.prototype.ba=function(a,b){return rR().oc()?!(!b||!b.ima):!1};zR.prototype.create=function(a){return new WQ(a)};zR.prototype.create=zR.prototype.create;zR.prototype.isSupported=zR.prototype.ba;zR.prototype.name=zR.prototype.name;_.jp(new zR);};
|
|
114
114
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
115
115
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
116
116
|
else{_=this.clpp._;(f.call(g,this));}
|