@castlabs/prestoplay 6.7.0 → 6.8.0
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 +23 -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 +110 -110
- package/cjs/cl.conviva.js +33 -33
- package/cjs/cl.core.js +416 -417
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +72 -72
- package/cjs/cl.externs.js +26 -26
- package/cjs/cl.freewheel.js +23 -23
- package/cjs/cl.hls.js +67 -67
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +31 -31
- package/cjs/cl.ima.js +23 -23
- package/cjs/cl.mse.js +270 -259
- package/cjs/cl.muxdata.js +15 -11
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +13 -13
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.smooth.js +70 -70
- package/cjs/cl.thumbnails.js +24 -24
- package/cjs/cl.tizen.js +69 -69
- package/cjs/cl.ttml.js +27 -27
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +13 -13
- package/cjs/cl.vr.js +19 -19
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.youbora.js +18 -18
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +86 -86
- package/cl.conviva.js +27 -27
- package/cl.core.js +355 -360
- package/cl.crypto.js +8 -8
- package/cl.dash.js +66 -66
- package/cl.externs.js +26 -26
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +58 -57
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +25 -25
- package/cl.ima.js +17 -17
- package/cl.mse.js +237 -227
- package/cl.muxdata.js +12 -9
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +9 -9
- package/cl.playlist.js +5 -5
- package/cl.smooth.js +58 -58
- package/cl.thumbnails.js +17 -17
- package/cl.tizen.js +57 -57
- package/cl.ttml.js +22 -22
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +8 -8
- package/cl.vr.js +15 -15
- package/cl.vtt.js +12 -12
- package/cl.youbora.js +14 -14
- package/package.json +1 -1
- package/typings.d.ts +47 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
# 6.8.0
|
|
2
|
+
|
|
3
|
+
## New Features
|
|
4
|
+
|
|
5
|
+
* Add support for Managed Media Source (MMS).
|
|
6
|
+
* Add support for changing initialization sections and encryption in
|
|
7
|
+
discontinuous VOD HLS.
|
|
8
|
+
* Add config options `streaming.disableAudioTracks` and `streaming.disableVideoTracks`
|
|
9
|
+
to disable audio and video of the MSE Player (not applicable to Safari or Tizen
|
|
10
|
+
native playback).
|
|
11
|
+
* Add config option `drm.ignoreUnrecognizedInitData`. If the player encounters init data
|
|
12
|
+
that cannot be processed (e.g., due to a malformed data payload), it will not pass it
|
|
13
|
+
to the CDM to avoid license requests errors. This option allows to disable this behavior
|
|
14
|
+
and pass the init data even if we couldn't parse it.
|
|
15
|
+
* Add IMA SDK support to MSE player on Tizen devices.
|
|
16
|
+
* **Warning!** There are limitations related to analytics reporting for IMA SDK Plugin and SmartTV devices. Refer to the [IMA Plugin](https://demo.castlabs.com/#/docs/advertising#ima-sdk-smarttv-support) documentation for more information.
|
|
17
|
+
* Add Mux Data Plugin support for [Bandwidth Throughput Events](https://docs.mux.com/guides/mux-data-playback-events#bandwidth-throughput-events).
|
|
18
|
+
|
|
19
|
+
## Changes
|
|
20
|
+
|
|
21
|
+
* Improve handling of segment duration drift in multi-period content.
|
|
22
|
+
* Fix track switching in audio-only content.
|
|
23
|
+
|
|
1
24
|
# 6.7.0
|
|
2
25
|
|
|
3
26
|
## Changes
|
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 aO=function(){this.l=this.f=null;this.a="";this.h=new _.H("clpp.adobe.AdobePlugin")},dO=function(a){a.f=new _.dg;a.f.on(a.l,_.Me,function(){return bO(a)});a.f.on(a.l,_.Le,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.wd,function(){return cO(a)});a.f.on(a.l,_.qe,function(b){b=b.detail;switch(b.currentState){case _.an:a.a.length||cO(a);s.Media.play(a.a,a.l.getPosition());break;case _.$m:case _.Sm:bO(a);break;case _.Um:case _.Nm:case _.Ym:a.h.info("Close session for "+a.a+" in player state "+
|
|
3
|
+
(b.currentState+".")),bO(a),s.Media.close(a.a),a.a=""}})},cO=function(a){var b=a.l.getLoadedSource();a.a=b?b.name||b.url:"";a.h.info("Open session for "+a.a+" with duration "+a.l.getDuration());s.Media.open(a.a,a.l.getDuration(),_.ra)},bO=function(a){s.Media.stop(a.a,a.l.getPosition())},eO=function(){};_.w(aO,_.cq);aO.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,dO(this)):this.h.warn("Adobe API not available.")};
|
|
4
|
+
aO.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};aO.prototype.id=function(){return"adobe"};_.C("clpp.adobe.AdobeAnalyticsPlugin",aO);aO.Id="adobe";eO.prototype.create=function(){return new aO};_.uo(new eO);};
|
|
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
|
-
_.t.onPlayerWillRelease=function(){this.o.stop();this.g.release()};_.t.id=function(){return"airplay"};_.t
|
|
4
|
-
_.t.qe=function(){return this.f};_.t.
|
|
2
|
+
var f=function(window){var ZN=function(){var a=this;this.a=this.l=null;this.m=this.f=this.j=!1;this.o=new _.Yi(function(){a.l.play()["catch"](function(){})});this.g=new _.dg},$N=function(){};_.w(ZN,_.cq);_.t=ZN.prototype;_.t.onPlayerCreated=function(a){this.l=a;this.a=a.getSurface().getMedia()};_.t.onContentWillLoad=function(){this.a&&(this.g.on(this.a,"webkitplaybacktargetavailabilitychanged",this.$j.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Bk.bind(this)))};
|
|
3
|
+
_.t.onPlayerWillRelease=function(){this.o.stop();this.g.release()};_.t.id=function(){return"airplay"};_.t.$j=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.J(_.ac,{canCast:this.f}))};_.t.Bk=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.$b:_.Zb;if(this.m||!this.l.isPaused()||this.l.getState()===_.an)this.m?this.l.play()["catch"](function(){}):this.o.$(.01);this.l.trigger(new _.J(a))};_.t.kb=function(){return this.j};
|
|
4
|
+
_.t.qe=function(){return this.f};_.t.bl=function(){this.f&&(this.m=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.C("clpp.airplay.AirPlayPlugin",ZN);ZN.prototype.showCastMenu=ZN.prototype.bl;ZN.prototype.canCast=ZN.prototype.qe;ZN.prototype.isCasting=ZN.prototype.kb;ZN.Id="airplay";$N.prototype.create=function(){return new ZN};_.uo(new $N);};
|
|
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.l.getDuration()};b.prototype.getCurrentPosition=function(){return 1E3*this.l.getPosition()};b.prototype.getCurrentBitrate=function(){var c=this.l.getStats();return(c?c.streamBandwidth:0)/1E3};return new b(a)},
|
|
4
|
-
b){var c=b.customParameters||{};a.a=a.g.createStreamingSession();for(var d in c)a.a.setCustomParameter(d,c[d]);a.m.on(a.l,_.
|
|
5
|
-
_.t.
|
|
6
|
-
_.t.
|
|
7
|
-
|
|
2
|
+
var f=function(window){var RN=function(a,b){this.l=a;this.f=b;this.a=new _.dg;this.g=!1},SN=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.l=c;d.a=_.li();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.ra};b.prototype.getVersion=function(){return _.ea};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.l.isLive()?
|
|
3
|
+
0:1E3*this.l.getDuration()};b.prototype.getCurrentPosition=function(){return 1E3*this.l.getPosition()};b.prototype.getCurrentBitrate=function(){var c=this.l.getStats();return(c?c.streamBandwidth:0)/1E3};return new b(a)},TN=function(){this.j=this.f=this.a=this.g=this.l=null;this.m=new _.dg},UN=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.g||(a.g=SmartLib.getInstance(),a.g.init(c,d,e),typeof f===_.ue&&a.g.setUUID(f))},VN=function(a,
|
|
4
|
+
b){var c=b.customParameters||{};a.a=a.g.createStreamingSession();for(var d in c)a.a.setCustomParameter(d,c[d]);a.m.on(a.l,_.id,a.T.bind(a));a.j=SN(a.l);a.a.attachPlayer(a.j)},WN=function(a,b){_.gg(a.m);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},XN=function(){return!window.SmartLib||!window.GenericPlayerApi},YN=function(){};_.t=RN.prototype;_.t.init=function(){var a=this.l,b=this.a;b.on(a,_.qe,this.zh.bind(this));b.on(a,_.tc,this.xh.bind(this));b.on(a,"seek",this.yh.bind(this))};
|
|
5
|
+
_.t.xh=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.t.zh=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Sm&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Sm:c.notifyStallStart();break;case _.an:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.$m:c.notifyPause()}};_.t.yh=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.t.release=function(){this.a&&(_.gg(this.a),this.a=null)};_.w(TN,_.cq);_.t=TN.prototype;_.t.onPlayerCreated=function(a){this.l=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(XN())return a.onError(new _.L(1,9,11E3));UN(this,d);VN(this,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.l.onError(new _.L(1,9,11001,{bpkErrorCode:f,message:e}));WN(c,void 0)}else b.url=e.getURL(),c.f=new RN(c.l,c.j),c.f.init()})}};
|
|
6
|
+
_.t.T=function(a){a=a.detail;if(7003===a.code)WN(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.M)switch(a.category){case 3:WN(this,SmartLib.BPDecodingError);break;case 1:WN(this,SmartLib.BPNetworkingError);break;case 6:WN(this,SmartLib.BPAccessRightError);break;default:WN(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){XN()||WN(this,SmartLib.BPSessionEndsNormally)};_.t.id=function(){return"broadpeak"};_.C("clpp.broadpeak.BroadpeakPlugin",TN);
|
|
7
|
+
TN.isSdkMissing=XN;TN.Id="broadpeak";YN.prototype.create=function(){return new TN};_.uo(new YN);};
|
|
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,115 +1,115 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
a;this.m=null;this.g=_.
|
|
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 _.
|
|
6
|
-
void 0===a?
|
|
7
|
-
this.w=this.f=null;this.A=this.Db.bind(this)},
|
|
8
|
-
e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;
|
|
9
|
-
_.
|
|
10
|
-
|
|
11
|
-
a:{var b=a.metadataType;var c=Object.entries(
|
|
12
|
-
a.ga.length){a.w=!0;a.o.
|
|
13
|
-
null;a=null===a?null:a+b;return null===a?b:a},
|
|
14
|
-
b.G(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},
|
|
15
|
-
g.hlsSegmentFormat=
|
|
16
|
-
case 3:q=a.
|
|
17
|
-
d.language);(e=a.f.pa())&&e.language&&(a.g.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"]();_.
|
|
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 Z(d,e,b.index,b.total,f)}return c},
|
|
25
|
-
_.
|
|
26
|
-
var e=!1,f=[];b===_.
|
|
27
|
-
d.next();!e.done;e=d.next()){e=e.value;var f=new _.
|
|
28
|
-
this.j=this.a=this.B=null;this.D=!1},
|
|
29
|
-
g===_.
|
|
30
|
-
f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},
|
|
31
|
-
|
|
32
|
-
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")},
|
|
33
|
-
cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},
|
|
34
|
-
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 Z(d,c,e,f,g)}return b},
|
|
35
|
-
_.t.oa=function(a){if(a!==this.g)if(this.g===_.
|
|
36
|
-
{detail:a}))}};_.C("clpp.cast.CastUtils",function(){});var
|
|
37
|
-
|
|
38
|
-
_.t.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.g=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.
|
|
39
|
-
c.renditions.push(new _.
|
|
40
|
-
_.t.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
_.t.sendMessage=function(a,b){var c=this,d,e,f;return _.B(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.L(1,8,8004,void 0);g.G(2);break}_.
|
|
44
|
-
_.t.cast=function(){var a=this,b,c;return _.B(function(d){if(1==d.a){if(!a.ec())throw a.h.warn(
|
|
45
|
-
_.t.Be=function(){this.
|
|
46
|
-
_.t.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};_.t.isEnded=function(){return this.getState()===_.
|
|
47
|
-
_.t.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};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};_.t.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.t.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(
|
|
2
|
+
var f=function(window){var fM="Cannot seek during ads playout.",gM="Cannot switch track",hM="Media session does not exist.",iM="No receivers available",jM="Reset ABR functionality not available on cast.",kM="SDK not yet ready",lM="Sender is destroyed.",mM="clpp.cast.CastProxy",nM="clpp.cast.Player",oM="clpp.cast.Receiver",pM="urn:x-cast:castlabs",qM="urn:x-cast:com.google.cast.media",rM=function(a){return _.B(function(b){return 1==b.a?_.x(b,a.ic(_.Od),2):_.x(b,a.ic(_.Nd),0)})},sM=function(a,b){this.log=new _.H(b);this.a=
|
|
3
|
+
a;this.m=null;this.g=_.Nm;this.o=_.Om;this.j=2;this.D=Date.now();this.B=-1},tM=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.kd){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Kd?"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}})},uM=function(a){if(typeof a!==_.ue)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}},vM=function(a,b,c,d){var e,f,g,h,l,m,n,p;return _.B(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=_.Vi(d,a.mimeType,g);if(!f||!g)return q.G(2);l=_.Yh(a.url);return _.x(q,c.fetch(l).P,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.N(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)})},wM=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 _.Se:return d.FMP4;case _.Re:return b===_.ti?d.MPEG2_TS:c.TS;case _.lc:return c.AAC;case _.mc:return c.AC3;case _.oc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.qc:return c.FMP4}},yM=function(a){a=
|
|
6
|
+
void 0===a?xM:a;var b=cast.framework.messages||chrome.cast.media;if(!b)throw new _.L(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}},zM=function(a){sM.call(this,a,"clpp.cast.SenderStateManager");
|
|
7
|
+
this.w=this.f=null;this.A=this.Db.bind(this)},AM=function(){this.h=new _.H("clpp.cast.SenderTrackManager");this.a=null;this.g=[];this.f={}},BM=function(a){return(a=a.a?a.a.a:null)?a.activeTrackIds.map(function(b){return b.toString()}):[]},DM=function(a,b){var c=BM(a);return CM(a,b).find(function(d){return c.includes(d.id)})||null},CM=function(a,b){return a.g.filter(function(c){return c.type===b})},FM=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=[+c.id];if(b!==_.O){var e=a.qa();
|
|
8
|
+
e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;EM(a,b)},function(f){a.f[b]=null;a.h.debug(gM,f)})}else b===_.O&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){EM(a,b)},function(f){a.h.debug(gM,f)}))},EM=function(a,b){b===_.P?a.a.trigger(new _.J(_.Tj)):b===_.O&&a.a.trigger(new _.J(_.Uj))},JM=function(a,b,c,d){_.ak.call(this);this.h=new _.H(_.Jc);this.ga=a;this.o=new _.$i(b);this.da=c;this.ma=d;this.g=this.J=
|
|
9
|
+
_.gk();this.D=[];this.B=0;this.L=new _.oi;this.H=this.m=this.a=null;this.A=this.w=!1;this.na="";this.Va=1E6;this.f=new AM;this.f.initialize(this);this.j=new zM(this);this.I=new _.dg;this.K=null;this.F=new Set;this.S=this.bk.bind(this);this.Ga=this.vk.bind(this);this.ha=this.lk.bind(this);this.V=this.fk.bind(this);this.O=null;window.cast||Object.defineProperty(window,"cast",{get:function(){return window.cast_},set:function(e){window.cast_=e;window.setTimeout(function(){GM(!0)},0)}});HM(this);IM.add(this)},
|
|
10
|
+
KM=function(a){var b,c;return _.B(function(d){if(1==d.a)return IM["delete"](a),a.w&&(a.w=!1,b=cast.framework.CastContext.getInstance(),b.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.S),b.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ga)),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.ma=null;_.z(d)})},MM=function(a){if(!a)return null;
|
|
11
|
+
a:{var b=a.metadataType;var c=Object.entries(LM);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=yM(LM[b]);return Object.assign(b,a)},NM=function(a){var b=void 0===b?xM:b;return Object.values(LM).includes(a)?a:b},RM=function(a){var b={},c;for(c in a)void 0!==a[c]&&(b[c]=a[c]);return b},HM=function(a){if(!a.w&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&
|
|
12
|
+
a.ga.length){a.w=!0;a.o.rf();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.ga;c.autoJoinPolicy=chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;b.setOptions(c);b.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,a.S);b.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,a.Ga);WM&&a.o.$(.02)}},aN=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},cN=function(a,b){bN(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ha);b.addMessageListener(pM,a.V)},bN=function(a,b){a.a=b;a.a&&(a.I.release(),a.H=null,a.m=null,a.m=new cast.framework.RemotePlayer,a.H=new cast.framework.RemotePlayerController(a.m),a.I.on(a.H,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Ah.bind(a)),a.f&&a.f.load(),a.j&&a.j.init(),a.trigger(new _.J(_.wd)))},dN=function(a){return _.B(function(b){return a.kb()?
|
|
14
|
+
b.G(0):_.x(b,cast.framework.CastContext.getInstance().requestSession(),0)})},eN=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,r,v,y,A,E,G;return _.B(function(D){switch(D.a){case 1:return c=chrome.cast.media.StreamType,d=_.qq,_.x(D,dN(a),2);case 2:if(!b)return D["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.Gb;m=h.audioMimeType;g.hlsVideoSegmentFormat=wM(l,d.VIDEO);
|
|
15
|
+
g.hlsSegmentFormat=wM(m,d.AUDIO);if(!b.Ta){D.G(3);break}if(!a.O){D.G(4);break}return _.x(D,Promise.resolve(a.O(b.Ta)),5);case 5:if(n=D.f)b.Ta=n;case 4:a.g=b.Ta;a.D=_.en(a.g);a.B=a.D.findIndex(function(I){return I.url===b.source.url});if(!b.Ta.remoteTextTracks){D.G(6);break}return _.x(D,Promise.all(b.Ta.remoteTextTracks.map(a.Ki.bind(a))),7);case 7:p=D.f,g.tracks=p.filter(function(I){return I}),b.Ta.remoteTextTracks=void 0;case 6:delete b.Ta.autoplay,b.Ta.startTime=null,g.customData={playerConfiguration:tM(b.Ta)};
|
|
16
|
+
case 3:q=a.fb()||{};r=NM(q.metadataType);typeof b.ff===_.k&&(v={metadataType:r,sectionStartAbsoluteTime:b.ff});b.source.name&&(y={metadataType:r,title:b.source.name});A=RM(q);if(E=MM(Object.assign({},v,y,A)))g.metadata=E;G=new chrome.cast.media.LoadRequest(g);typeof b.autoplay===_.uc&&(G.autoplay=b.autoplay);typeof b.currentTime===_.k&&(G.currentTime=b.currentTime);return _.x(D,f.loadMedia(G),0)}})},fN=function(a,b,c){c=void 0===c?0:c;var d,e;return _.B(function(f){(d=a.f.qa())&&d.language&&(a.g.preferredTextLanguage=
|
|
17
|
+
d.language);(e=a.f.pa())&&e.language&&(a.g.preferredAudioLanguage=e.language);return _.x(f,eN(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),ff:a.getPresentationStartTime(),autoplay:b,Ta:a.g}),0)})},GM=function(a){if(a){a=_.u(IM);for(var b=a.next();!b.done;b=a.next())HM(b.value)}},hN=function(a,b,c){_.ak.call(this);var d=this;this.f=a;this.g=b;this.j=typeof c===_.kd?c:function(e,f){d.f&&e!==_.Um&&e!==_.Nm&&d.f.load(f)};this.a=gN(this);this.h=new _.H(mM);this.addDelegate(this.f)},gN=
|
|
18
|
+
function(a){return new JM(a.g,function(){a.trigger(new _.J(_.Ac))},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.Df&&(d.preferredAudioLanguage=c.Df);c.ah&&(d.preferredTextLanguage=c.ah);_.mo(a.f,null);a.trigger(new _.J("castingended"));a.j(b,d)},function(){return iN(a)})},iN=function(a){var b;return _.B(function(c){if(1==c.a)return a.trigger(new _.J(_.zc)),
|
|
19
|
+
b=a.f.a,b!==a.a&&a.f&&a.a?_.x(c,a.f.release(),2):c["return"]();_.mo(a.f,a.a);_.z(c)})},jN=function(a){sM.call(this,a,"clpp.cast.StateManager");this.J=this.Eh.bind(this);this.I=this.Dh.bind(this);this.A=this.hk.bind(this);this.w=this.ak.bind(this);this.L=this.Gh.bind(this);this.K=this.Fh.bind(this);this.O=this.yk.bind(this);this.H=this.kk.bind(this);this.F=this.T.bind(this);this.f=this.Ch.bind(this)},Z=function(a,b,c,d,e){this.a=a;this.f=b;this.j=typeof c===_.k?c:1;this.m=typeof d===_.k?d:1;this.g=
|
|
20
|
+
typeof e===_.k?e:0},kN=function(a){this.a=a},mN=function(a){this.l=a;this.a=null;this.g=this.Hh.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
|
+
lN().addEventListener(this.f,this.g)},pN=function(a,b,c){var d,e,f,g,h,l,m;return _.B(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.zf(n,2);nN=!1;e=_.Yh(d);return _.x(n,c.fetch(e).P,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.vh(f.data),h=new DOMParser,l=h.parseFromString(g,_.De),l.getElementsByTagName("vmap:VMAP").length)_.F("VMAP detected."),a.vmapAdsRequest=oN(g);else if(l.getElementsByTagName("VAST").length){_.F("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
|
|
22
|
+
p.vastAdsRequest=oN(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.F("Unsupported schema."),nN=!0;return _.Af(n,0)}m=_.Bf(n);_.F("Failed to fetch an ad",m);nN=!0;_.z(n)})},oN=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},lN=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},rN=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
|
|
23
|
+
(c=qN(a,c))&&(d={ad:c});a.l.trigger(new _.J(b,d))}},sN=function(a,b){var c=new _.L(1,10,10003,{errorType:b});a.l.onError(c)},qN=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.ue&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.ue&&(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 Z(d,e,b.index,b.total,f)}return c},tN=function(a){this.Wb=a;this.a=this.f.bind(this)},uN=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]},vN=function(a){var b=a.dashTimedMetadata,c=_.Ke;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Je)?
|
|
25
|
+
_.ng:_.lg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b&&b.eventElement}},wN=function(){this.h=new _.H("clpp.cast.TrackManager");this.l=null;this.o=1E9;this.g=[];this.j=[];this.m=this.Ok.bind(this);this.a=this.f=null},xN=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},zN=function(a){a.a=xN().getTextTracksManager();var b=a.a.getTracks();a.j=yN(_.O,b)},AN=function(a,b,c,d){c=_.Eg(c).filter(function(h){return h});
|
|
26
|
+
var e=!1,f=[];b===_.P?f=a.getAudioTracks():b===_.O&&(f=a.ia());if(c=c.find(function(h){var l=_.fh(h);return f.some(function(m){m=_.fh(m.language||"");return _.gh(l,m)})})){var g=_.fh(c);c=f.filter(function(h){h=_.fh(h.language||"");return _.gh(g,h)});f=c.length?c:f;e=e||!!c.length}_.Eh(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.h.info("Will select track",e),b===_.P?a.wa(e):b===_.O&&a.Ea(e))},yN=function(a,b){for(var c=[],d=_.u(b),e=
|
|
27
|
+
d.next();!e.done;e=d.next()){e=e.value;var f=new _.ri(e.trackId.toString(),a);f.roles=e.roles||[];f.kind=e.subtype||null;f.language=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 _.zi(f.id,f));c.push(f)}return c},BN=function(){_.ak.call(this);this.h=new _.H(nM);this.g=this.w=_.gk();this.A=null;this.m=-1;this.F=new _.oi;this.f=this.o=
|
|
28
|
+
this.j=this.a=this.B=null;this.D=!1},CN=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},FN=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=_.xk(d);if(e){var f=[_.Sc];_.en(a)[0].type!==_.ic&&f.unshift(_.Tc);d.preferredDrmSystem===_.Sc&&f.reverse();for(var g,h;f.length&&!h;)g=f.shift(),h=e.Ua[g];h?(d=g===_.Tc?cast.framework.ContentProtection.WIDEVINE:
|
|
29
|
+
g===_.Sc?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=h.licenseUrl,d={ldlDelay:0,customData:{}},DN(b,h,a,d),EN(b,h,a,d)):c()}else c()}else c()},DN=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.Yh({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,f,d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=
|
|
30
|
+
f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},EN=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.B(function(h){return 1==h.a?(g=_.Zh(Object.assign({},f.headers),e.buffer,200,""),_.x(h,b.modifiers.licenseResponse(c,g,d),2)):h["return"](_.N(g.data))})}:a.licenseHandler=void 0},GN=function(){this.a=!1;this.h=new _.H(oM);this.f=this.l=null;this.g=new Set;this.A=this.jk.bind(this);this.w=this.Bh.bind(this);this.j=null;this.o=new _.dg;this.m=null},
|
|
31
|
+
IN=function(){return HN||(HN=new GN)},JN=function(){return cast.framework.CastReceiverContext.getInstance()},LN=function(a,b){a.h.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=JN();c=(JN().getPlayerManager().getMediaInformation()||{}).hlsVideoSegmentFormat===c.FMP4?_.Se:_.Re;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=KN(h,_.na),m=KN(h,_.ib),n=_.u([]),
|
|
32
|
+
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")},KN=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},MN=function(a){this.f=a;this.a=null;this.g=new _.dg;this.j=[cast.framework.RemotePlayerEventType.IS_PLAYING_BREAK_CHANGED,
|
|
33
|
+
cast.framework.RemotePlayerEventType.CURRENT_BREAK_CLIP_NUMBER_CHANGED,cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]},ON=function(a,b){var c=null,d=NN(a);d&&(c={ad:d});a.f.trigger(new _.J(b,c))},NN=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})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:
|
|
34
|
+
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 Z(d,c,e,f,g)}return b},PN=function(){},QN=function(){};_.t=sM.prototype;_.t.release=function(){this.oa(_.Nm)};_.t.destroy=function(){this.m=this.a=null;return Promise.resolve()};_.t.getState=function(){return this.g};_.t.onError=function(a){a.severity===_.M&&this.oa(_.Ym)};
|
|
35
|
+
_.t.oa=function(a){if(a!==this.g)if(this.g===_.Ym&&a!==_.Nm)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.o=this.g;this.g=a;this.g===_.Sm?(this.B=b,this.a.trigger(new _.J(_.wc,{detail:{bufferedTimeMS:-1,reason:this.j}}))):this.o===_.Sm&&this.a.trigger(new _.J(_.vc,{detail:{bufferedTimeMS:b-this.B,reason:this.j}}));a={currentState:this.g,previousState:this.o,timeSinceLastStateChangeMS:b-this.D};this.D=b;this.m&&_.ym(this.m,this.g);this.a.trigger(new _.J(_.qe,
|
|
36
|
+
{detail:a}))}};_.C("clpp.cast.CastUtils",function(){});var xM=0,LM={GENERIC:xM,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};_.w(zM,sM);zM.prototype.init=function(){var a=this.a,b=a.a;b&&(this.f&&this.f.removeUpdateListener(this.A),this.f=b,this.f.addUpdateListener(this.A),this.w=a.m)};zM.prototype.destroy=function(){var a=this;return _.B(function(b){a.f&&(a.f.removeUpdateListener(a.A),a.f=null);return _.x(b,sM.prototype.destroy.call(a),0)})};zM.prototype.oa=function(a){var b=this.a.m;b&&b.isPlayingBreak||sM.prototype.oa.call(this,a)};
|
|
37
|
+
zM.prototype.Db=function(){if(this.f&&this.w&&!this.w.isPlayingBreak)switch(this.f.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.f.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.oa(_.Um);break;case chrome.cast.media.IdleReason.ERROR:this.oa(_.Ym);break;default:this.oa(_.Nm)}break;case chrome.cast.media.PlayerState.PLAYING:this.oa(_.an);break;case chrome.cast.media.PlayerState.PAUSED:this.oa(_.$m);break;case chrome.cast.media.PlayerState.BUFFERING:this.oa(_.Sm)}};_.w(AM,_.Q);_.t=AM.prototype;_.t.initialize=function(a){this.a=a};_.t.release=function(){this.g=[];this.f={}};
|
|
38
|
+
_.t.load=function(){this.release();var a=this.a.a;a&&(a=a.media)&&(this.g=(a=a.tracks)?a.map(function(b){switch(b.type){case chrome.cast.media.TrackType.VIDEO:var c=_.ti;break;case chrome.cast.media.TrackType.AUDIO:c=_.P;break;case chrome.cast.media.TrackType.TEXT:c=_.O}c=new _.ri(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);
|
|
39
|
+
c.renditions.push(new _.zi(c.id,c));return c}):[],this.a.trigger(new _.J(_.tq)))};_.t.destroy=function(){this.a=null};_.t.getVideoTracks=function(){return CM(this,_.ti)};_.t.getAudioTracks=function(){return CM(this,_.P)};_.t.ia=function(){return CM(this,_.O)};_.t.fa=function(){var a=this.La();return a?a.renditions[0]:null};_.t.Ia=function(){var a=this.pa();return a?a.renditions[0]:null};_.t.Ja=function(){var a=this.qa();return a?a.renditions[0]:null};_.t.Xa=function(){return this.f[_.ti]||null};
|
|
40
|
+
_.t.gb=function(){return this.f[_.P]||null};_.t.hb=function(){return this.f[_.O]||null};_.t.La=function(){return DM(this,_.ti)};_.t.pa=function(){return DM(this,_.P)};_.t.qa=function(){return DM(this,_.O)};_.t.bb=function(a){FM(this,_.ti,a)};_.t.wa=function(a){FM(this,_.P,a)};_.t.Ea=function(a){FM(this,_.O,a)};_.t.ab=function(a){this.bb(a&&a.track)};_.t.nb=function(a){this.wa(a&&a.track)};_.t.ob=function(a){this.Ea(a&&a.track)};_.t.addTextTrack=function(){return _.B(function(a){_.z(a)})};_.t.ka=function(){return!0};
|
|
41
|
+
AM.prototype.isAbrEnabled=AM.prototype.ka;AM.prototype.addTextTrack=AM.prototype.addTextTrack;AM.prototype.setTextRendition=AM.prototype.ob;AM.prototype.setAudioRendition=AM.prototype.nb;AM.prototype.setVideoRendition=AM.prototype.ab;AM.prototype.setTextTrack=AM.prototype.Ea;AM.prototype.setAudioTrack=AM.prototype.wa;AM.prototype.setVideoTrack=AM.prototype.bb;AM.prototype.getTextTrack=AM.prototype.qa;AM.prototype.getAudioTrack=AM.prototype.pa;AM.prototype.getVideoTrack=AM.prototype.La;
|
|
42
|
+
AM.prototype.getLoadingTextRendition=AM.prototype.hb;AM.prototype.getLoadingAudioRendition=AM.prototype.gb;AM.prototype.getLoadingVideoRendition=AM.prototype.Xa;AM.prototype.getTextRendition=AM.prototype.Ja;AM.prototype.getAudioRendition=AM.prototype.Ia;AM.prototype.getVideoRendition=AM.prototype.fa;AM.prototype.getTextTracks=AM.prototype.ia;AM.prototype.getAudioTracks=AM.prototype.getAudioTracks;AM.prototype.getVideoTracks=AM.prototype.getVideoTracks;_.w(JM,_.ak);_.t=JM.prototype;_.t.init=function(a,b){this.g=this.J=b};_.t.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)})};_.t.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.t.destroy=function(){return _.B(function(a){_.z(a)})};_.t.vd=function(a){this.O=a};_.t.ec=function(){return this.w};_.t.kb=function(){return this.A};_.t.He=function(){return this.na};
|
|
43
|
+
_.t.sendMessage=function(a,b){var c=this,d,e,f;return _.B(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.L(1,8,8004,void 0);g.G(2);break}_.zf(g,3);return _.x(g,e.sendMessage(a,tM(b)),5);case 5:_.Af(g,2);break;case 3:f=_.Bf(g),d=new _.L(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.z(g)}})};
|
|
44
|
+
_.t.cast=function(){var a=this,b,c;return _.B(function(d){if(1==d.a){if(!a.ec())throw a.h.warn(kM),new _.L(1,8,8001,void 0);if(!WM)throw a.h.warn(iM),new _.L(1,8,8002,void 0);if(a.kb())throw a.h.warn("Already casting"),new _.L(1,8,8003,void 0);_.zf(d,2);return _.x(d,dN(a),4)}if(2!=d.a)return _.Af(d,0);b=_.Bf(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.L(1,8,8E3,c);})};
|
|
45
|
+
_.t.Be=function(){this.kb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.t.addMessageListener=function(a){typeof a===_.kd&&this.F.add(a)};_.t.removeMessageListener=function(a){typeof a===_.kd&&this.F["delete"](a)};_.t.play=function(){var a=this;return this.isEnded()?fN(this,!0):new Promise(function(b,c){if(!a.a)return c(hM);a.a.play(null,b,c)})};_.t.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(hM);a.a.pause(null,b,c)})};
|
|
46
|
+
_.t.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};_.t.isEnded=function(){return this.getState()===_.Um};_.t.seek=function(a){var b=this;return this.isEnded()?fN(this,!1,a):new Promise(function(c,d){b.a||d(hM);b.m.isPlayingBreak&&d(fM);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.J(_.Me));b.a.seek(e,function(){b.trigger(new _.J(_.Le));c()},d)})};_.t.getPosition=function(){return this.a&&this.a.getEstimatedTime()||0};
|
|
47
|
+
_.t.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};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};_.t.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.t.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(qM,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};
|
|
48
48
|
_.t.getVolume=function(){return this.a&&this.a.volume.level};_.t.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.t.isMuted=function(){return this.a&&this.a.volume.muted};_.t.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};
|
|
49
|
-
_.t.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};_.t.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};_.t.getState=function(){return this.j?this.j.getState():_.
|
|
50
|
-
_.t.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?
|
|
51
|
-
_.t.getBufferInfo=function(){return new _.
|
|
52
|
-
_.t.getTimelineCues=function(){return[]};_.t.resetAbr=function(){this.h.warn(
|
|
53
|
-
_.t.
|
|
54
|
-
_.t.
|
|
55
|
-
_.t.
|
|
56
|
-
isLive:this.isLive()},currentTime:
|
|
57
|
-
_.t.
|
|
58
|
-
|
|
59
|
-
_.t.cast=function(a){var b=this,c,d,e;return _.B(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.
|
|
60
|
-
(g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.
|
|
61
|
-
b.h.error("Error while trying to cast",d),e=new _.
|
|
62
|
-
_.t.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.h.warn(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
_.t.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.J);b.addEventListener(a.PAUSE,this.I);b.addEventListener(a.MEDIA_FINISHED,this.A);b.addEventListener(a.BUFFERING,this.w);b.addEventListener(a.SEEKING,this.
|
|
66
|
-
_.t.destroy=function(){var a=this,b,c;return _.B(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.J);c.removeEventListener(b.PAUSE,a.I);c.removeEventListener(b.MEDIA_FINISHED,a.A);c.removeEventListener(b.BUFFERING,a.w);c.removeEventListener(b.SEEKING,a.
|
|
67
|
-
a.F);c.removeEventListener(b.BITRATE_CHANGED,a.f);return _.x(d,
|
|
68
|
-
_.t.
|
|
69
|
-
_.t.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.t.gc=function(){return!1};_.t.Nb=function(){return this.a.clickThroughUrl||null};_.t.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.t.
|
|
70
|
-
_.t.
|
|
71
|
-
Z.prototype.getPodIndex=Z.prototype.getPodIndex;Z.prototype.getPodType=Z.prototype.Ya;Z.prototype.getMediaBitrate=Z.prototype.
|
|
72
|
-
Z.prototype.getAdvertiserName=Z.prototype.getAdvertiserName;Z.prototype.getAdSystem=Z.prototype.getAdSystem;Z.prototype.getApiFramework=Z.prototype.getApiFramework;Z.prototype.getCreativeId=Z.prototype.getCreativeId;Z.prototype.getId=Z.prototype.getId;Z.prototype.getTechnology=Z.prototype.
|
|
73
|
-
_.t.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.t.dispose=function(){var a=this;return _.B(function(b){
|
|
74
|
-
_.t.
|
|
75
|
-
_.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
_.t.Ia=function(){var a=this.pa();return a&&a.renditions[0]};_.t.Ja=function(){var a=this.qa();return a&&a.renditions[0]};_.t.Xa=function(){return null};_.t.
|
|
79
|
-
_.t.qa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ia().find(function(c){return c.id===b})||null)}return a};_.t.
|
|
80
|
-
_.t.
|
|
81
|
-
_.t.addTextTrack=function(a){var b=this,c,d,e;return _.B(function(f){if(1==f.a)return c=b.l.getConfiguration(),_.x(f,
|
|
82
|
-
a),g;}}_.z(f)})};_.t.ka=function(){return!0};_.t.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
_.t.unload=function(){var a=cast.framework.messages.PlayerState,b=
|
|
86
|
-
_.t.play=function(){var a=
|
|
87
|
-
_.t.isEnded=function(){return
|
|
88
|
-
_.t.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;
|
|
89
|
-
_.t.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.t.getLoadedSource=function(){var a=
|
|
90
|
-
_.t.getPresentationStartTime=function(){return
|
|
91
|
-
_.t.getStats=function(){var a=_.
|
|
92
|
-
_.t.load=function(a){var b=this,c,d;return _.B(function(e){b.f=new _.
|
|
93
|
-
_.t.getTrackManager=function(){return this.j};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return this.B};_.t.setNetworkEngine=function(a){this.F=a};_.t.getNetworkEngine=function(){return this.F};_.t.getSourceIndex=function(){return this.m};_.t.setSourceIndex=function(a){this.m=a};_.t.getPeriods=function(){return[]};_.t.namespace=function(){return
|
|
94
|
-
_.t.onError=function(a){this.trigger(new _.
|
|
95
|
-
_.t.
|
|
96
|
-
(!e||e&&f)){d=
|
|
97
|
-
_.t.getTextDisplayer=function(){return null};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};
|
|
98
|
-
_.t.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=
|
|
99
|
-
d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.
|
|
100
|
-
_.t.stop=function(){if(this.a){this.a=!1;this.o.release();var a=
|
|
101
|
-
_.t.removeMessageListener=function(a){typeof a===_.
|
|
102
|
-
_.t.
|
|
103
|
-
h.length-1;0<=l;--l){var m=h[l].getAttribute(_.
|
|
104
|
-
for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.
|
|
105
|
-
_.t.
|
|
106
|
-
break}b.f.D=!0;return _.x(l,_.
|
|
107
|
-
break}return _.x(l,Promise.resolve(b.m(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.t.
|
|
108
|
-
_.t.
|
|
109
|
-
|
|
110
|
-
_.t.skip=function(){var a=this.f.a;a&&this.f.sendMessage(
|
|
111
|
-
_.t.
|
|
112
|
-
|
|
49
|
+
_.t.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};_.t.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};_.t.getState=function(){return this.j?this.j.getState():_.Om};
|
|
50
|
+
_.t.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?uM(this.a.customData.stats):_.Em()};_.t.isLive=function(){return Infinity===this.getDuration()};_.t.load=function(a){var b=this,c,d;return _.B(function(e){if(!b.ec())return b.h.warn(kM),e["return"]();if(!WM)return b.h.warn(iM),e["return"]();b.D=_.en(a);_.jk(a)&&(b.g=_.ik(b.J,a));c=b.D[b.B];d={source:c,isLive:c.isLive,autoplay:b.g.autoplay,Ta:b.g,Gb:c.Gb,audioMimeType:c.audioMimeType};return _.x(e,eN(b,d),0)})};
|
|
51
|
+
_.t.getBufferInfo=function(){return new _.Zj};_.t.getTrackManager=function(){return this.f};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return null};_.t.setNetworkEngine=function(a){this.L=a};_.t.getNetworkEngine=function(){return this.L};_.t.getSourceIndex=function(){return this.B};_.t.setSourceIndex=function(a){this.B=a};_.t.getLoadedSource=function(){return this.D[this.B]};_.t.getPeriods=function(){return[]};_.t.getDrmInfo=function(){return null};
|
|
52
|
+
_.t.getTimelineCues=function(){return[]};_.t.resetAbr=function(){this.h.warn(jM)};_.t.onError=function(a){if(a&&(this.trigger(new _.J(_.id,{detail:a})),this.j))this.j.onError(a)};_.t.namespace=function(){return _.Jc};_.t.canPlay=function(){return this.ec()?2:0};_.t.fb=function(){return this.K};_.t.kc=function(a){this.K=MM(a)};_.t.te=function(){this.K=null};_.t.lf=function(a){var b=this.fb()||{};a={metadataType:NM(b.metadataType),title:a};this.kc(Object.assign({},b,a))};
|
|
53
|
+
_.t.jf=function(a){var b=this.fb()||{},c=NM(b.metadataType);a=new chrome.cast.Image(a);this.kc(Object.assign({},b,{metadataType:c,images:[a]}))};_.t.hf=function(a){var b=this.fb()||{};this.kc(Object.assign({},b,{metadataType:3,artist:a}))};_.t.kf=function(a){var b=this.fb()||{};a={metadataType:NM(b.metadataType),releaseDate:a};this.kc(Object.assign({},b,a))};
|
|
54
|
+
_.t.bk=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;WM=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.na=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.o.rf()};
|
|
55
|
+
_.t.vk=function(a){this.h.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.A=!0;cN(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.kb()||(this.A=!0,cN(this,a.session),this.ma());break;case cast.framework.SessionState.SESSION_ENDED:if(this.kb()&&this.a){var b=this.a.media,c=this.f.pa(),d=this.f.qa();c=c&&c.language||void 0;d=d&&d.language||void 0;this.da(this.getState(),{source:{url:b.contentId,type:b.contentType,
|
|
56
|
+
isLive:this.isLive()},currentTime:aN(this),ah:d,Df:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ha);a.session.removeMessageListener(pM,this.V);this.A=!1;this.a=null;this.I.release();this.m=this.H=null}};_.t.lk=function(a){this.h.debug("New media session",a.mediaSession);bN(this,a.mediaSession)};_.t.fk=function(a,b){if(a===pM&&0<this.F.size){var c=uM(b);this.F.forEach(function(d){return d(c)})}};_.t.Ah=function(){this.trigger(new _.J(_.Ee))};
|
|
57
|
+
_.t.Ki=function(a){var b=this,c,d;return _.B(function(e){if(1==e.a)return c=null,_.x(e,vM(a,[_.Ce,_.hc],b.L,b.g),2);if(d=e.f)c=new chrome.cast.media.Track(b.Va++,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)})};_.t.getTextDisplayer=function(){return null};JM.prototype.getTextDisplayer=JM.prototype.getTextDisplayer;JM.prototype.getNetworkEngine=JM.prototype.getNetworkEngine;
|
|
58
|
+
JM.prototype.setNetworkEngine=JM.prototype.setNetworkEngine;var WM=!1,IM=new Set;window.__onGCastApiAvailable=GM;_.w(hN,_.ak);_.t=hN.prototype;_.t.destroy=function(){var a=this;return _.B(function(b){if(1==b.a)return a.a?_.x(b,KM(a.a),3):b.G(2);2!=b.a&&(a.a=null);a.removeDelegate(a.f);_.z(b)})};_.t.qe=function(){return!!this.a&&this.a.ec()&&WM};_.t.kb=function(){return!!this.a&&this.a.kb()};_.t.He=function(){return this.a?this.a.He():""};_.t.vd=function(a){this.a&&this.a.vd(a)};
|
|
59
|
+
_.t.cast=function(a){var b=this,c,d,e;return _.B(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();_.zf(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.pa();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.qa())l.language&&
|
|
60
|
+
(g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=l.roles[0]);l=h&&typeof h.isLive===_.uc?h.isLive:b.f.isLive();g={source:h,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),ff:b.f.getPresentationStartTime(),Gb:m,audioMimeType:p,Ta:g}}c=g;return _.x(f,iN(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.G(7);break}return _.x(f,eN(b.a,c),7);case 7:_.Af(f,0);break;case 2:d=_.Bf(f),
|
|
61
|
+
b.h.error("Error while trying to cast",d),e=new _.J(_.id,{detail:d}),b.trigger(e),_.z(f)}})};_.t.Be=function(){this.a&&this.a.Be()};_.t.wh=function(a){var b=this;return _.B(function(c){if(1==c.a){if(a===b.g)return c["return"]();b.g=a;return b.a?_.x(c,KM(b.a),2):c.G(2)}b.a=gN(b);_.z(c)})};_.t.sendMessage=function(a){var b=this;return _.B(function(c){return b.a?_.x(c,b.a.sendMessage(pM,a),0):(b.h.warn(lM),c["return"]())})};_.t.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.h.warn(lM)};
|
|
62
|
+
_.t.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.h.warn(lM)};_.t.fb=function(){return this.a&&this.a.fb()};_.t.kc=function(a){this.a&&this.a.kc(a)};_.t.te=function(){this.a&&this.a.te()};_.t.lf=function(a){this.a&&this.a.lf(a)};_.t.jf=function(a){this.a&&this.a.jf(a)};_.t.hf=function(a){this.a&&this.a.hf(a)};_.t.kf=function(a){this.a&&this.a.kf(a)};_.C(mM,hN);hN.prototype.setContentReleaseDate=hN.prototype.kf;hN.prototype.setContentArtist=hN.prototype.hf;
|
|
63
|
+
hN.prototype.setContentImage=hN.prototype.jf;hN.prototype.setContentTitle=hN.prototype.lf;hN.prototype.clearContentMetadata=hN.prototype.te;hN.prototype.setContentMetadata=hN.prototype.kc;hN.prototype.getContentMetadata=hN.prototype.fb;hN.prototype.removeMessageListener=hN.prototype.removeMessageListener;hN.prototype.addMessageListener=hN.prototype.addMessageListener;hN.prototype.sendMessage=hN.prototype.sendMessage;hN.prototype.changeReceiverId=hN.prototype.wh;hN.prototype.forceDisconnect=hN.prototype.Be;
|
|
64
|
+
hN.prototype.cast=hN.prototype.cast;hN.prototype.setPlayerConfigInterceptor=hN.prototype.vd;hN.prototype.getReceiverName=hN.prototype.He;hN.prototype.isCasting=hN.prototype.kb;hN.prototype.canCast=hN.prototype.qe;hN.prototype.destroy=hN.prototype.destroy;_.w(jN,sM);_.t=jN.prototype;
|
|
65
|
+
_.t.init=function(){var a=cast.framework.events.EventType,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager();b.addEventListener(a.PLAYING,this.J);b.addEventListener(a.PAUSE,this.I);b.addEventListener(a.MEDIA_FINISHED,this.A);b.addEventListener(a.BUFFERING,this.w);b.addEventListener(a.SEEKING,this.L);b.addEventListener(a.SEEKED,this.K);b.addEventListener(a.STALLED,this.O);b.addEventListener(a.PLAYER_LOADING,this.H);b.addEventListener(a.ERROR,this.F);b.addEventListener(a.BITRATE_CHANGED,this.f)};
|
|
66
|
+
_.t.destroy=function(){var a=this,b,c;return _.B(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.J);c.removeEventListener(b.PAUSE,a.I);c.removeEventListener(b.MEDIA_FINISHED,a.A);c.removeEventListener(b.BUFFERING,a.w);c.removeEventListener(b.SEEKING,a.L);c.removeEventListener(b.SEEKED,a.K);c.removeEventListener(b.STALLED,a.O);c.removeEventListener(b.PLAYER_LOADING,a.H);c.removeEventListener(b.ERROR,
|
|
67
|
+
a.F);c.removeEventListener(b.BITRATE_CHANGED,a.f);return _.x(d,sM.prototype.destroy.call(a),0)})};_.t.Eh=function(){this.a.trigger(new _.J(_.Yd));this.oa(_.an)};_.t.Dh=function(){this.oa(_.$m)};_.t.hk=function(){this.oa(_.Um)};_.t.ak=function(a){a.isBuffering?this.oa(_.Sm):(a=this.a.isPaused()?_.$m:_.an,this.oa(a))};_.t.Gh=function(){this.j=1;this.a.trigger(new _.J(_.Me))};_.t.Fh=function(){this.a.trigger(new _.J(_.Le))};_.t.yk=function(){this.j=2};_.t.kk=function(){this.oa(_.Zm)};
|
|
68
|
+
_.t.Ch=function(a){var b=this.a.getStats();this.a.trigger(new _.J(_.tc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.t.T=function(a){a=new _.L(_.M,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.a.trigger(new _.J(_.id,{detail:a}));this.oa(_.Ym)};_.t=Z.prototype;_.t.tb=function(){return"Google Cast Framework"};_.t.ub=function(){return cast.framework.VERSION};_.t.zb=function(){return 0};_.t.getId=function(){return""};_.t.getCreativeId=function(){return""};_.t.getApiFramework=function(){return null};_.t.getAdSystem=function(){return""};_.t.getAdvertiserName=function(){return""};_.t.getTitle=function(){return this.a.title||""};_.t.getDuration=function(){return this.a.duration||0};
|
|
69
|
+
_.t.getSkipTimeOffset=function(){return this.a.whenSkippable||0};_.t.gc=function(){return!1};_.t.Nb=function(){return this.a.clickThroughUrl||null};_.t.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.t.wb=function(){return 0};_.t.vb=function(){return 0};_.t.ib=function(){return 0};_.t.Ya=function(){switch(this.Ob()){case 0:return 0;case -1:return 2;default:return 1}};_.t.getPodIndex=function(){return this.g};_.t.Ob=function(){return this.f.position};_.t.Pb=function(){return this.j};
|
|
70
|
+
_.t.yb=function(){return this.m};_.t.getWrapperAdIds=function(){return[]};_.t.getWrapperAdSystems=function(){return[]};_.t.getWrapperCreativeIds=function(){return[]};Z.prototype.getWrapperCreativeIds=Z.prototype.getWrapperCreativeIds;Z.prototype.getWrapperAdSystems=Z.prototype.getWrapperAdSystems;Z.prototype.getWrapperAdIds=Z.prototype.getWrapperAdIds;Z.prototype.getSequenceLength=Z.prototype.yb;Z.prototype.getPositionInSequence=Z.prototype.Pb;Z.prototype.getPodTimeOffset=Z.prototype.Ob;
|
|
71
|
+
Z.prototype.getPodIndex=Z.prototype.getPodIndex;Z.prototype.getPodType=Z.prototype.Ya;Z.prototype.getMediaBitrate=Z.prototype.ib;Z.prototype.getMediaHeight=Z.prototype.vb;Z.prototype.getMediaWidth=Z.prototype.wb;Z.prototype.getMediaUrl=Z.prototype.getMediaUrl;Z.prototype.getClickThroughUrl=Z.prototype.Nb;Z.prototype.isBumper=Z.prototype.gc;Z.prototype.getSkipTimeOffset=Z.prototype.getSkipTimeOffset;Z.prototype.getDuration=Z.prototype.getDuration;Z.prototype.getTitle=Z.prototype.getTitle;
|
|
72
|
+
Z.prototype.getAdvertiserName=Z.prototype.getAdvertiserName;Z.prototype.getAdSystem=Z.prototype.getAdSystem;Z.prototype.getApiFramework=Z.prototype.getApiFramework;Z.prototype.getCreativeId=Z.prototype.getCreativeId;Z.prototype.getId=Z.prototype.getId;Z.prototype.getTechnology=Z.prototype.zb;Z.prototype.getAdManagerVersion=Z.prototype.ub;Z.prototype.getAdManagerName=Z.prototype.tb;kN.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};kN.prototype.Qb=function(){return!!this.a.find(function(a){return 0===a.position})};kN.prototype.jb=function(){return!!this.a.find(function(a){return-1===a.position})};kN.prototype.hasPostroll=kN.prototype.jb;kN.prototype.hasPreroll=kN.prototype.Qb;kN.prototype.getCuePoints=kN.prototype.getCuePoints;_.t=mN.prototype;_.t.load=function(){var a=this;return _.B(function(b){nN&&(nN=!1,sN(a,0));_.z(b)})};_.t.start=function(){return _.B(function(a){lN().play();_.z(a)})};_.t.resume=function(){-1!==this.getPosition()&&lN().play()};_.t.pause=function(){-1!==this.getPosition()&&lN().pause()};_.t.skip=function(){};_.t.getVolume=function(){return this.l.getVolume()||0};_.t.setVolume=function(a){this.l.setVolume(a)};
|
|
73
|
+
_.t.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.k?a:-1};_.t.dispose=function(){var a=this;return _.B(function(b){lN().removeEventListener(a.f,a.g);_.z(b)})};
|
|
74
|
+
_.t.Hh=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=lN().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.l.trigger(new _.J(_.Yb,{adsTimeline:new kN(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:rN(this,_.Ob,a);break;case cast.framework.events.EventType.BREAK_STARTED:rN(this,_.Hb,a);break;case cast.framework.events.EventType.BREAK_ENDED:rN(this,_.Ib,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:rN(this,
|
|
75
|
+
_.Ub,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?(rN(this,_.Tb,a),rN(this,_.Vb,a)):a.endedReason===b.STOPPED?rN(this,_.Vb,a):a.endedReason===b.END_OF_STREAM?(rN(this,_.Lb,a),rN(this,_.Vb,a)):a.endedReason===b.ERROR&&sN(this,1);break;case cast.framework.events.EventType.PLAYING:rN(this,_.Sb,a);break;case cast.framework.events.EventType.PAUSE:rN(this,_.Qb,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?rN(this,_.Jb,a):rN(this,_.Sb,a)}};
|
|
76
|
+
mN.prototype.getPosition=mN.prototype.getPosition;mN.prototype.setVolume=mN.prototype.setVolume;mN.prototype.getVolume=mN.prototype.getVolume;mN.prototype.skip=mN.prototype.skip;mN.prototype.pause=mN.prototype.pause;mN.prototype.resume=mN.prototype.resume;var nN=!1;tN.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(uN(),this.a)};tN.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(uN(),this.a)};tN.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return vN(a)})};
|
|
77
|
+
tN.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=_.og;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.qg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.rg}b&&this.Wb(new _.J(b,{detail:vN(a.timedMetadataInfo)}))}else for(a=_.u(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Wb(new _.J(_.og,{detail:b.value}))};_.w(wN,_.Q);_.t=wN.prototype;_.t.initialize=function(a){this.l=a;xN().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.release=function(){this.g=[];this.j=[];this.a=this.f=null};_.t.load=function(){};_.t.destroy=function(){this.l=null;xN().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.t.getVideoTracks=function(){return[]};_.t.getAudioTracks=function(){return this.g};_.t.ia=function(){return this.j};_.t.fa=function(){return null};
|
|
78
|
+
_.t.Ia=function(){var a=this.pa();return a&&a.renditions[0]};_.t.Ja=function(){var a=this.qa();return a&&a.renditions[0]};_.t.Xa=function(){return null};_.t.gb=function(){return null};_.t.hb=function(){return null};_.t.La=function(){return null};_.t.pa=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};
|
|
79
|
+
_.t.qa=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.k&&(b=b.toString(),a=this.ia().find(function(c){return c.id===b})||null)}return a};_.t.bb=function(){this.h.warn("Video tracks unavailable on Cast")};_.t.wa=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.t.Ea=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.t.ab=function(){this.h.warn("Video renditions unavailable on Cast")};_.t.nb=function(a){this.wa(a&&a.track)};
|
|
80
|
+
_.t.ob=function(a){this.Ea(a&&a.track)};
|
|
81
|
+
_.t.addTextTrack=function(a){var b=this,c,d,e;return _.B(function(f){if(1==f.a)return c=b.l.getConfiguration(),_.x(f,vM(a,Object.values(cast.framework.messages.CaptionMimeType),b.l.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]),zN(b)}catch(g){throw b.h.warn("failed on track",
|
|
82
|
+
a),g;}}_.z(f)})};_.t.ka=function(){return!0};_.t.Ok=function(){this.f=xN().getAudioTracksManager();var a=this.f.getTracks();this.g=yN(_.P,a);zN(this);a=this.l.getConfiguration();AN(this,_.P,a.preferredAudioLanguage,a.preferredAudioRole);AN(this,_.O,a.preferredTextLanguage,a.preferredTextRole)};wN.prototype.isAbrEnabled=wN.prototype.ka;wN.prototype.addTextTrack=wN.prototype.addTextTrack;wN.prototype.setTextRendition=wN.prototype.ob;wN.prototype.setAudioRendition=wN.prototype.nb;
|
|
83
|
+
wN.prototype.setVideoRendition=wN.prototype.ab;wN.prototype.setTextTrack=wN.prototype.Ea;wN.prototype.setAudioTrack=wN.prototype.wa;wN.prototype.setVideoTrack=wN.prototype.bb;wN.prototype.getTextTrack=wN.prototype.qa;wN.prototype.getAudioTrack=wN.prototype.pa;wN.prototype.getVideoTrack=wN.prototype.La;wN.prototype.getLoadingTextRendition=wN.prototype.hb;wN.prototype.getLoadingAudioRendition=wN.prototype.gb;wN.prototype.getLoadingVideoRendition=wN.prototype.Xa;wN.prototype.getTextRendition=wN.prototype.Ja;
|
|
84
|
+
wN.prototype.getAudioRendition=wN.prototype.Ia;wN.prototype.getVideoRendition=wN.prototype.fa;wN.prototype.getTextTracks=wN.prototype.ia;wN.prototype.getAudioTracks=wN.prototype.getAudioTracks;wN.prototype.getVideoTracks=wN.prototype.getVideoTracks;_.w(BN,_.ak);_.t=BN.prototype;_.t.init=function(a,b){var c=this;this.B=a;b&&(this.g=this.w=b);var d=CN();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.mk.bind(this));d.setMediaPlaybackInfoHandler(this.nh.bind(this));this.a=new jN(this);this.a.init();this.j=new wN;this.j.initialize(this);this.o=new tN(function(e){return c.trigger(e)});this.o.init()};
|
|
85
|
+
_.t.unload=function(){var a=cast.framework.messages.PlayerState,b=CN();b.getPlayerState()!==a.IDLE&&b.stop();this.j&&this.j.release();this.o&&this.o.release();this.f=null;return Promise.resolve()};_.t.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.t.destroy=function(){var a=this;return _.B(function(b){if(1==b.a)return a.B=null,a.w=_.gk(),a.g=a.w,a.m=-1,a.A=null,a.a?_.x(b,a.a.destroy(),3):b.G(2);2!=b.a&&(a.a=null);a.j&&(a.j.destroy(),a.j=null);_.z(b)})};
|
|
86
|
+
_.t.play=function(){var a=CN();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.t.pause=function(){var a=CN();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.t.isPaused=function(){return CN().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
|
|
87
|
+
_.t.isEnded=function(){return CN().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.t.seek=function(a){var b=CN();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(fM);b.seek(a);return Promise.resolve()};_.t.getPosition=function(){return CN().getCurrentTimeSec()};_.t.getDuration=function(){var a=CN().getDurationSec();return typeof a===_.k?-1===a?Infinity:a:-1};_.t.getPlaybackRate=function(){return CN().getPlaybackRate()};
|
|
88
|
+
_.t.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;CN().sendLocalMediaRequest(b)}};_.t.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.t.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};_.t.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};
|
|
89
|
+
_.t.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.t.getLoadedSource=function(){var a=CN().getMediaInformation();if(a){var b=CN().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.A&&-1!==this.m?this.A[this.m]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,Ll:b,name:c}}return null};_.t.getDrmInfo=function(){return null};
|
|
90
|
+
_.t.getPresentationStartTime=function(){return CN().getStartAbsoluteTime()};_.t.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=CN().getLiveSeekableRange();b&&typeof b.start===_.k&&typeof b.end===_.k&&(a={start:b.start,end:b.end})}return a};_.t.getState=function(){return this.a?this.a.getState():_.Om};
|
|
91
|
+
_.t.getStats=function(){var a=_.Em();if(this.f){a=CN().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.g=c;b=this.f;c=typeof a.decodedFrames===_.k?a.decodedFrames:NaN;b.m=typeof a.droppedFrames===_.k?a.droppedFrames:NaN;b.j=c;a=this.f.getStats()}return a};_.t.isLive=function(){return Infinity===this.getDuration()};
|
|
92
|
+
_.t.load=function(a){var b=this,c,d;return _.B(function(e){b.f=new _.Dm;b.a.m=b.f.a;b.A=_.en(a);_.jk(a)&&(b.g=_.ik(b.w,a));if(b.D)return b.D=!1,e["return"]();c=b.A[b.m];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.g.autoplay;typeof b.g.startTime===_.k&&(d.currentTime=b.g.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:tM(b.g),local:!0};return _.x(e,CN().load(d),0)})};_.t.getBufferInfo=function(){this.h.warn(_.pa);return new _.Zj};
|
|
93
|
+
_.t.getTrackManager=function(){return this.j};_.t.getConfiguration=function(){return this.g};_.t.getSurface=function(){return this.B};_.t.setNetworkEngine=function(a){this.F=a};_.t.getNetworkEngine=function(){return this.F};_.t.getSourceIndex=function(){return this.m};_.t.setSourceIndex=function(a){this.m=a};_.t.getPeriods=function(){return[]};_.t.namespace=function(){return nM};_.t.getTimelineCues=function(){return this.o&&this.o.getTimelineCues()||[]};_.t.resetAbr=function(){this.h.warn(jM)};
|
|
94
|
+
_.t.onError=function(a){this.trigger(new _.J(_.id,{detail:a}))};_.t.canPlay=function(){return _.fj()?2:0};
|
|
95
|
+
_.t.mk=function(a){a=Object.assign({},a);a.customData||(a.customData={});a.customData.stats=tM(this.getStats());var b=CN(),c=a.media||b.getMediaInformation();b=b.getStartAbsoluteTime();c&&typeof b===_.k&&c.startAbsoluteTime!==b&&(this.h.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&&
|
|
96
|
+
(!e||e&&f)){d=CN().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};_.t.nh=function(a,b){var c=null;a.media.customData&&(c=uM(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.k?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;FN(c,b);return b};
|
|
97
|
+
_.t.getTextDisplayer=function(){return null};_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};BN.prototype.getTextDisplayer=BN.prototype.getTextDisplayer;BN.prototype.getNetworkEngine=BN.prototype.getNetworkEngine;BN.prototype.setNetworkEngine=BN.prototype.setNetworkEngine;_.t=GN.prototype;_.t.init=function(a){var b=this;a&&(this.f=new BN,_.mo(a,this.f),this.l=a,this.o.on(window,"unload",function(){return _.B(function(c){return b.l&&b.l.getState()!==_.Nm?_.x(c,rM(b.l),0):c.G(0)})}))};
|
|
98
|
+
_.t.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=JN(),b=JN().getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[pM]=cast.framework.system.MessageType.JSON;c.shakaVersion="4.3.4";var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.Gj.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};d.enableSmoothLiveRefresh=!0;c.playbackConfig=d;if(d=this.l&&this.l.getSurface().getMedia())c.mediaElement=
|
|
99
|
+
d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.Fj.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(pM,this.w)}};
|
|
100
|
+
_.t.stop=function(){if(this.a){this.a=!1;this.o.release();var a=JN();JN().getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(pM,this.w);a.stop();this.l=this.f=null}};_.t.vd=function(a){this.j=a};_.t.$k=function(a){this.m=a};_.t.on=function(a,b){JN().addEventListener(a,b)};_.t.off=function(a,b){JN().removeEventListener(a,b)};_.t.addMessageListener=function(a){typeof a===_.kd&&this.g.add(a)};
|
|
101
|
+
_.t.removeMessageListener=function(a){typeof a===_.kd&&this.g["delete"](a)};_.t.sendMessage=function(a,b){JN().sendCustomMessage(pM,b,tM(a))};_.t.ec=function(){return this.a};_.t.fb=function(){var a=JN().getPlayerManager().getMediaInformation();return a&&a.metadata?a.metadata:null};
|
|
102
|
+
_.t.Gj=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return LN(this,a);try{var b=(new DOMParser).parseFromString(a,_.De)}catch(r){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.h.debug("Detected DASH, parsing");b=JN();c=a.getElementsByTagName("Period");for(var d=c.length-1;0<=d;--d){for(var e=c[d].getElementsByTagName(_.fa),f=e.length-1;0<=f;--f){var g=e[f].getAttribute("contentType");if(g===_.Qe||g===_.kc){g=e[f].getAttribute(_.Cd);for(var h=e[f].getElementsByTagName(_.kb),l=
|
|
103
|
+
h.length-1;0<=l;--l){var m=h[l].getAttribute(_.Cd)||g,n=h[l].getAttribute(_.Oc),p=h[l].getAttribute(_.ef)||void 0,q=h[l].getAttribute(_.ld)||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(_.kb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.fa).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.tb)[0]){a=c;this.h.debug("Detected Smooth, parsing");b=JN();c=a.getElementsByTagName("StreamIndex");
|
|
104
|
+
for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Qe){e=c[d].getElementsByTagName(_.hb);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Wa)||void 0,h=e[f].getAttribute(_.Va)||void 0,void 0!==g&&(g=+g),void 0!==h&&(h=+h),b.canDisplayType(_.Se,void 0,g,h)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.hb).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
|
|
105
|
+
_.t.Fj=function(a){var b=this,c,d,e,f,g,h;return _.B(function(l){switch(l.a){case 1:c=a;c.media.customData&&(d=uM(c.media.customData.playerConfiguration));if(!b.l||!d){l.G(2);break}if(!b.j){l.G(3);break}return _.x(l,Promise.resolve(b.j(d)),4);case 4:d=(e=l.f)||d;case 3:if(!d.ima){l.G(5);break}return _.x(l,pN(c.media,d.ima,b.l.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.G(7);
|
|
106
|
+
break}b.f.D=!0;return _.x(l,_.qo(b.l,d),8);case 8:return _.x(l,_.ro(b.l),9);case 9:f=b.l.getLoadedSource(),c.media.contentId=f.url,c.media.contentType=f.type,f.Gb&&(c.media.hlsVideoSegmentFormat=wM(f.Gb,_.ti)),f.audioMimeType&&(c.media.hlsSegmentFormat=wM(f.audioMimeType,_.P));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.l.getConfiguration().autoplay);case 2:if(!b.m){l.G(10);
|
|
107
|
+
break}return _.x(l,Promise.resolve(b.m(c)),11);case 11:(h=l.f)&&(c=h);case 10:return l["return"](c)}})};_.t.jk=function(a){if(this.l&&(!a.media.customData||!a.media.customData.local)){a=_.K.yj;var b=JN().getPlayerManager(),c=b.getLiveSeekableRange();if(c){var d=c.start;c=c.end;var e=this.l.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.l.seek(b))}_.to(this.l)}};
|
|
108
|
+
_.t.Bh=function(a){if(0<this.g.size){var b=uM(a.data);this.g.forEach(function(c){return c(b)})}};_.C(oM,GN);GN.prototype.getContentMetadata=GN.prototype.fb;GN.prototype.isApiReady=GN.prototype.ec;GN.prototype.sendMessage=GN.prototype.sendMessage;GN.prototype.removeMessageListener=GN.prototype.removeMessageListener;GN.prototype.addMessageListener=GN.prototype.addMessageListener;GN.prototype.off=GN.prototype.off;GN.prototype.on=GN.prototype.on;GN.prototype.setLoadRequestDataInterceptor=GN.prototype.$k;
|
|
109
|
+
GN.prototype.setPlayerConfigInterceptor=GN.prototype.vd;GN.prototype.stop=GN.prototype.stop;GN.prototype.start=GN.prototype.start;GN.prototype.init=GN.prototype.init;GN.getInstance=IN;var HN=null;_.t=MN.prototype;_.t.load=function(){var a=this,b,c,d,e,f;return _.B(function(g){a.a=a.f.m;if(a.a)for(b=a.a.controller,c=a.Ak.bind(a),d=_.u(a.j),e=d.next();!e.done;e=d.next())f=e.value,a.g.on(b,f,c);_.z(g)})};_.t.start=function(){return _.B(function(a){_.z(a)})};_.t.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.t.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
|
|
110
|
+
_.t.skip=function(){var a=this.f.a;a&&this.f.sendMessage(qM,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.t.getVolume=function(){return this.f.getVolume()||0};_.t.setVolume=function(a){this.f.setVolume(a)};_.t.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.k&&(a=b));return a};_.t.dispose=function(){var a=this;return _.B(function(b){a.g.release();_.z(b)})};
|
|
111
|
+
_.t.Ak=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.J(_.Yb,{adsTimeline:new kN(a.breaks)})));break;case "isPlayingBreak":a.value?ON(this,_.Hb):(ON(this,_.Lb),ON(this,_.Vb),ON(this,_.Ib));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(ON(this,_.Lb),ON(this,_.Vb)),ON(this,_.Ub));break;case "isPaused":this.a.isPlayingBreak&&(a.value?ON(this,_.Qb):ON(this,_.Sb))}};MN.prototype.getPosition=MN.prototype.getPosition;
|
|
112
|
+
MN.prototype.setVolume=MN.prototype.setVolume;MN.prototype.getVolume=MN.prototype.getVolume;MN.prototype.skip=MN.prototype.skip;MN.prototype.pause=MN.prototype.pause;MN.prototype.resume=MN.prototype.resume;PN.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};PN.prototype.aa=function(a,b){return a.namespace()!==_.Jc?!1:!(!b||!b.ima)};PN.prototype.create=function(a){return new MN(a.a)};PN.prototype.create=PN.prototype.create;PN.prototype.isSupported=PN.prototype.aa;PN.prototype.name=PN.prototype.name;_.un(new PN);QN.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};QN.prototype.aa=function(a,b){return IN().ec()?!(!b||!b.ima):!1};QN.prototype.create=function(a){return new mN(a)};QN.prototype.create=QN.prototype.create;QN.prototype.isSupported=QN.prototype.aa;QN.prototype.name=QN.prototype.name;_.un(new QN);};
|
|
113
113
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
114
114
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
115
115
|
else{_=this.clpp._;(f.call(g,this));}
|