@castlabs/prestoplay 6.2.7 → 6.2.8
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 +31 -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 +101 -101
- package/cjs/cl.conviva.js +31 -31
- package/cjs/cl.core.js +367 -366
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +68 -67
- package/cjs/cl.externs.js +30 -30
- package/cjs/cl.freewheel.js +23 -23
- package/cjs/cl.hls.js +44 -43
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +29 -29
- package/cjs/cl.ima.js +21 -21
- package/cjs/cl.mse.js +249 -249
- package/cjs/cl.muxdata.js +11 -11
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +13 -13
- package/cjs/cl.playlist.js +5 -5
- package/cjs/cl.smooth.js +68 -68
- package/cjs/cl.thumbnails.js +22 -22
- package/cjs/cl.tizen.js +68 -68
- package/cjs/cl.ttml.js +26 -26
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +11 -11
- package/cjs/cl.vr.js +18 -18
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.youbora.js +15 -15
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +81 -81
- package/cl.conviva.js +27 -27
- package/cl.core.js +326 -323
- package/cl.crypto.js +8 -8
- package/cl.dash.js +64 -62
- package/cl.externs.js +30 -30
- package/cl.freewheel.js +17 -17
- package/cl.hls.js +37 -36
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +24 -24
- package/cl.ima.js +14 -14
- package/cl.mse.js +218 -218
- package/cl.muxdata.js +9 -9
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +9 -9
- package/cl.playlist.js +4 -4
- package/cl.smooth.js +57 -57
- package/cl.thumbnails.js +17 -17
- package/cl.tizen.js +57 -57
- package/cl.ttml.js +21 -21
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +8 -8
- package/cl.vr.js +14 -14
- package/cl.vtt.js +12 -12
- package/cl.youbora.js +13 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
# 6.2.8
|
|
2
|
+
|
|
3
|
+
## Changes
|
|
4
|
+
|
|
5
|
+
* Fix clock sync fallback in DASH.
|
|
6
|
+
* This fixes an issue where one failing `UTCTiming` tag
|
|
7
|
+
cancelled the whole time sync. Now all `UTCTiming` tags are tried one-by-one until one
|
|
8
|
+
succeeds, or if all fail, only then the time sync is cancelled.
|
|
9
|
+
* Warn whenever a clock sync fails. Warn when no UTCTiming elements are found.
|
|
10
|
+
Warn when a direct time scheme (`urn:mpeg:dash:utc:direct:2014`) provides an invalid value.
|
|
11
|
+
* Fix `clpp.thumbnails.ThumbnailsPlugin.get()` method, which now returns the correct
|
|
12
|
+
thumbnail at a specific position for BIF thumbnails.
|
|
13
|
+
* Change parsing process for dynamic DASH and always perform clock
|
|
14
|
+
synchronization before playback. This fixes issues related to wrong system time.
|
|
15
|
+
E.g. `player.getPresentationStartTime()` is now calculated correctly, even
|
|
16
|
+
when system time is wrong.
|
|
17
|
+
* Fix the issue where `player.play()` does not trigger a `clpp.events.AUTOPLAY_NOT_ALLOWED`
|
|
18
|
+
event when Safari blocks the play request due to the 'Stop Media with Sound' auto-play policy.
|
|
19
|
+
* Fix `clpp.thumbnails.Thumbnail.element()` method, which now works as expected
|
|
20
|
+
even if the URL of the thumbnail image contains round bracket characters.
|
|
21
|
+
* Fix `clpp.thumbnails.ThumbnailsPlugin.get()` method, which now returns the correct
|
|
22
|
+
thumbnail at a specific position for WebVTT thumbnails.
|
|
23
|
+
* Fix issue with multiple (unnecessary) license requests triggered.
|
|
24
|
+
* Fix the license request/response modifiers for Chromecast Receiver:
|
|
25
|
+
* The `licenseRequest` modifier now correctly indicates the `POST` method instead of falsely reporting `GET` for the `request` object.
|
|
26
|
+
* The `licenseResponse` modifier is now properly awaited when defined as async.
|
|
27
|
+
* Please refer to DRM section in manual for limitations of using request/response modifiers in Chromecast Receiver.
|
|
28
|
+
* Improve error logging for `MP4_SIDX_WRONG_BOX_TYPE` code. Now there is an URL, byte-range, size, and a 1kB sample of the erroneous SIDX box provided within the `clpp.Error` optional data.
|
|
29
|
+
* Handle FairPlay license loading with EME implementation more consistently and avoid
|
|
30
|
+
redundant license requests.
|
|
31
|
+
|
|
1
32
|
# 6.2.7
|
|
2
33
|
|
|
3
34
|
## 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 vL=function(){this.l=this.f=null;this.a="";this.g=new _.D("clpp.adobe.AdobePlugin")},yL=function(a){a.f=new _.Yf;a.f.on(a.l,_.Ee,function(){return wL(a)});a.f.on(a.l,_.De,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.kd,function(){return xL(a)});a.f.on(a.l,_.ie,function(b){b=b.detail;switch(b.currentState){case _.Vl:a.a.length||xL(a);s.Media.play(a.a,a.l.getPosition());break;case _.Ul:case _.Ml:wL(a);break;case _.Ol:case _.Hl:case _.Sl:a.g.info("Close session for "+a.a+" in player state "+
|
|
3
|
+
(b.currentState+".")),wL(a),s.Media.close(a.a),a.a=""}})},xL=function(a){var b=a.l.getLoadedSource();a.a=b?b.name||b.url:"";a.g.info("Open session for "+a.a+" with duration "+a.l.getDuration());s.Media.open(a.a,a.l.getDuration(),_.na)},wL=function(a){s.Media.stop(a.a,a.l.getPosition())},zL=function(){};_.u(vL,_.ap);vL.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,yL(this)):this.g.warn("Adobe API not available.")};
|
|
4
|
+
vL.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};vL.prototype.id=function(){return"adobe"};_.A("clpp.adobe.AdobeAnalyticsPlugin",vL);vL.Id="adobe";zL.prototype.create=function(){return new vL};_.pn(new zL);};
|
|
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
|
-
_.h.onPlayerWillRelease=function(){this.m.stop();this.g.release()};_.h.id=function(){return"airplay"};_.h.Mi=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.E(_.
|
|
4
|
-
_.h.Yd=function(){return this.f};_.h.Gj=function(){this.f&&(this.j=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.A("clpp.airplay.AirPlayPlugin",
|
|
2
|
+
var f=function(window){var tL=function(){var a=this;this.a=this.l=null;this.j=this.f=this.h=!1;this.m=new _.oh(function(){a.l.play()["catch"](function(){})});this.g=new _.Yf},uL=function(){};_.u(tL,_.ap);_.h=tL.prototype;_.h.onPlayerCreated=function(a){this.l=a;this.a=a.getSurface().getMedia()};_.h.onContentWillLoad=function(){this.a&&(this.g.on(this.a,"webkitplaybacktargetavailabilitychanged",this.Mi.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.oj.bind(this)))};
|
|
3
|
+
_.h.onPlayerWillRelease=function(){this.m.stop();this.g.release()};_.h.id=function(){return"airplay"};_.h.Mi=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.E(_.Pb,{canCast:this.f}))};_.h.oj=function(){var a=(this.h=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Ob:_.Nb;if(this.j||!this.l.isPaused()||this.l.getState()===_.Vl)this.j?this.l.play()["catch"](function(){}):this.m.$(.01);this.l.trigger(new _.E(a))};_.h.cb=function(){return this.h};
|
|
4
|
+
_.h.Yd=function(){return this.f};_.h.Gj=function(){this.f&&(this.j=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.A("clpp.airplay.AirPlayPlugin",tL);tL.prototype.showCastMenu=tL.prototype.Gj;tL.prototype.canCast=tL.prototype.Yd;tL.prototype.isCasting=tL.prototype.cb;tL.Id="airplay";uL.prototype.create=function(){return new tL};_.pn(new uL);};
|
|
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
|
-
c[d]);a.j.on(a.l,_.
|
|
4
|
-
_.h.Kg=function(a){a=a.detail;typeof a.bandwidth===_.zd&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.h.Mg=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.
|
|
5
|
-
_.h.getCurrentBitrate=function(){var a=this.l.getStats();return(a?a.streamBandwidth:0)/1E3};_.u(
|
|
6
|
-
_.h.S=function(a){a=a.detail;if(7003===a.code)
|
|
7
|
-
|
|
2
|
+
var f=function(window){var lL=function(a,b){this.l=a;this.f=b;this.a=new _.Yf;this.g=!1},mL=function(a){var b=GenericPlayerApi.call(this)||this;b.l=a;b.a=_.ji();return b},nL=function(){this.h=this.f=this.a=this.g=this.l=null;this.j=new _.Yf},oL=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===_.me&&a.g.setUUID(f))},pL=function(a,b){var c=b.customParameters||{};a.a=a.g.createStreamingSession();for(var d in c)a.a.setCustomParameter(d,
|
|
3
|
+
c[d]);a.j.on(a.l,_.Xc,a.S.bind(a));a.h=new mL(a.l);a.a.attachPlayer(a.h)},qL=function(a,b){_.ag(a.j);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},rL=function(){return!window.SmartLib||!window.GenericPlayerApi},sL=function(){};_.h=lL.prototype;_.h.init=function(){var a=this.l,b=this.a;b.on(a,_.ie,this.Mg.bind(this));b.on(a,_.hc,this.Kg.bind(this));b.on(a,"seek",this.Lg.bind(this))};
|
|
4
|
+
_.h.Kg=function(a){a=a.detail;typeof a.bandwidth===_.zd&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.h.Mg=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Ml&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Ml:c.notifyStallStart();break;case _.Vl:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.Ul:c.notifyPause()}};_.h.Lg=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.h.release=function(){this.a&&(_.ag(this.a),this.a=null)};_.u(mL,GenericPlayerApi);_.h=mL.prototype;_.h.getPlayerName=function(){return _.na};_.h.getVersion=function(){return _.ea};_.h.getOSName=function(){return this.a.os};_.h.getDeviceVersion=function(){return this.a.osVersion.name};_.h.getDeviceType=function(){return"browser"};_.h.getTotalDuration=function(){return this.l.isLive()?0:1E3*this.l.getDuration()};_.h.getCurrentPosition=function(){return 1E3*this.l.getPosition()};
|
|
5
|
+
_.h.getCurrentBitrate=function(){var a=this.l.getStats();return(a?a.streamBandwidth:0)/1E3};_.u(nL,_.ap);_.h=nL.prototype;_.h.onPlayerCreated=function(a){this.l=a};_.h.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(rL())return a.onError(new _.J(1,9,11E3));oL(this,d);pL(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 _.J(1,9,11001,{bpkErrorCode:f,message:e}));qL(c,void 0)}else b.url=e.getURL(),c.f=new lL(c.l,c.h),c.f.init()})}};
|
|
6
|
+
_.h.S=function(a){a=a.detail;if(7003===a.code)qL(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.K)switch(a.category){case 3:qL(this,SmartLib.BPDecodingError);break;case 1:qL(this,SmartLib.BPNetworkingError);break;case 6:qL(this,SmartLib.BPAccessRightError);break;default:qL(this,SmartLib.BPUnspecifiedError)}};_.h.onPlayerWillRelease=function(){rL()||qL(this,SmartLib.BPSessionEndsNormally)};_.h.id=function(){return"broadpeak"};_.A("clpp.broadpeak.BroadpeakPlugin",nL);
|
|
7
|
+
nL.isSdkMissing=rL;nL.Id="broadpeak";sL.prototype.create=function(){return new nL};_.pn(new sL);};
|
|
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,110 +1,110 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
a;this.j=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
|
-
a,"clpp.cast.SenderStateManager");this.o=this.f=null;this.w=this.C.bind(this)},
|
|
7
|
-
[+c.id];if(b!==_.L){var e=a.ja();e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;
|
|
8
|
-
this.Y=c;this.ga=d;this.h=this.K=_.
|
|
9
|
-
0)}});
|
|
10
|
-
|
|
11
|
-
a.Ha);
|
|
12
|
-
b.H(0):_.v(b,cast.framework.CastContext.getInstance().requestSession(),0)})},
|
|
13
|
-
|
|
14
|
-
a.Gd(b.source.name),a.f&&(g.metadata=a.f),q=new chrome.cast.media.LoadRequest(g),typeof b.autoplay===_.
|
|
15
|
-
|
|
16
|
-
d.ima&&d.startTime&&(d.ima.playAdsAfterTime=d.startTime);c.af&&(d.preferredAudioLanguage=c.af);c.jg&&(d.preferredTextLanguage=c.jg);_.
|
|
17
|
-
this.Vi.bind(this);this.o=this.Ni.bind(this);this.K=this.Tg.bind(this);this.J=this.Sg.bind(this);this.
|
|
18
|
-
a.dashTimedMetadata,c=_.
|
|
19
|
-
a.j=
|
|
20
|
-
b===_.N?a.na(e):b===_.L&&a.ua(e))},
|
|
21
|
-
this.g=this.o=_.
|
|
22
|
-
k;f.length&&!k;)g=f.shift(),k=e.
|
|
23
|
-
f,d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},
|
|
24
|
-
this.g=this.Ug.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];
|
|
25
|
-
e,f,g,k,l,m;return _.z(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.
|
|
26
|
-
[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.B("Unsupported schema."),
|
|
27
|
-
b){var c=new _.J(1,10,10003,{errorType:b});a.l.onError(c)},
|
|
28
|
-
e})));c=new Z(d,e,b.index,b.total,f)}return c},
|
|
29
|
-
"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var k=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=
|
|
30
|
-
(c=d.indexOf(","),0<=c&&(d=d.substring(0,c)))}return d},
|
|
31
|
-
var c=null,d=null,e=a.a.currentBreakClipNumber;if(b.breaks&&(c=b.breaks.find(function(k){return k.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:b.breaks.filter(function(k){return 0<=k.position}).sort(function(k,l){return k.position-l.position}).findIndex(function(k){return k===c})}b.breakClips&&(d=b.breakClips.find(function(k){return k.id===a.a.breakClipId})||null);b=new Z(d,c,e,f,g)}return b},
|
|
32
|
-
_.h.destroy=function(){this.j=this.a=null;return Promise.resolve()};_.h.getState=function(){return this.g};_.h.onError=function(a){a.severity===_.K&&this.ha(_.
|
|
33
|
-
_.h.ha=function(a){if(a!==this.g)if(this.g===_.
|
|
34
|
-
{detail:a}))}};_.A("clpp.cast.CastUtils",function(){});_.u(
|
|
35
|
-
|
|
36
|
-
_.h.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=_.
|
|
37
|
-
c.renditions.push(new _.
|
|
38
|
-
_.h.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
_.h.sendMessage=function(a,b){var c=this,d,e,f;return _.z(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.J(1,8,8004,void 0);g.H(2);break}_.
|
|
42
|
-
_.h.cast=function(){var a=this,b,c;return _.z(function(d){if(1==d.a){if(!a
|
|
43
|
-
_.h.ee=function(){this.
|
|
44
|
-
_.h.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};_.h.isEnded=function(){return this.getState()===_.
|
|
45
|
-
_.h.getDuration=function(){return this.a&&this.a.media&&typeof this.a.media.duration===_.zd?this.a.media.duration:0};_.h.setDrmCustomDataModifier=function(){};_.h.setCdnErrorCallback=function(){};_.h.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.h.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(
|
|
2
|
+
var f=function(window){var IJ="Cannot seek during ads playout.",JJ="Cannot switch track",KJ="Media session does not exist.",LJ="No receivers available",MJ="Reset ABR functionality not available on cast.",NJ="SDK not yet ready",OJ="Sender is destroyed.",PJ="clpp.cast.CastProxy",QJ="clpp.cast.Player",RJ="clpp.cast.Receiver",SJ="urn:x-cast:castlabs",TJ="urn:x-cast:com.google.cast.media",UJ=function(a){return _.z(function(b){return 1==b.a?_.v(b,a.fc(_.Fd),2):_.v(b,a.fc(_.Ed),0)})},VJ=function(a,b){this.log=new _.D(b);this.a=
|
|
3
|
+
a;this.j=null;this.g=_.Hl;this.m=_.Il;this.h=2;this.B=Date.now();this.A=-1},WJ=function(a){return JSON.stringify(a,function(b,c){if("license"!==b&&typeof c!==_.Zc){if(c instanceof Event){var d={},e;for(e in c){var f=c[e];typeof f===_.Ad?"detail"===e&&(d[e]=f):e in Event||(d[e]=f)}return d}return typeof c===_.zd?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c}})},XJ=function(a){if(typeof a!==_.me)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}},YJ=function(a,b,c,d){var e,f,g,k,l,m,n,p;return _.z(function(q){if(1==q.a){if(b.includes(a.mimeType))return q["return"](a);g=f=e=null;for(k=0;k<b.length&&!f;)g=b[k++],f=_.sh(d,a.mimeType,g);if(!f||!g)return q.H(2);l=_.ih(a.url);return _.v(q,c.fetch(l).N,3)}2!=q.a&&(m=q.f)&&m.data&&(n=f.a(_.Q(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)})},ZJ=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 _.Ke:return d.FMP4;case _.Je:return b===_.Bg?d.MPEG2_TS:c.TS;case _.ac:return c.AAC;case _.bc:return c.AC3;case _.cc:return c.E_AC3;case "audio/mpeg":return c.MP3;case _.dc:return c.FMP4}},$J=function(a){VJ.call(this,
|
|
6
|
+
a,"clpp.cast.SenderStateManager");this.o=this.f=null;this.w=this.C.bind(this)},aK=function(){this.h=new _.D("clpp.cast.SenderTrackManager");this.a=null;this.g=[];this.f={}},bK=function(a){return(a=a.a?a.a.a:null)?a.activeTrackIds.map(function(b){return b.toString()}):[]},dK=function(a,b){var c=bK(a);return cK(a,b).find(function(d){return c.includes(d.id)})||null},cK=function(a,b){return a.g.filter(function(c){return c.type===b})},fK=function(a,b,c){var d=a.a.a;if(d)if(c){a.f[b]=c.renditions[0];c=
|
|
7
|
+
[+c.id];if(b!==_.L){var e=a.ja();e&&c.push(+e.id)}c=new chrome.cast.media.EditTracksInfoRequest(c);d.editTracksInfo(c,function(){a.f[b]=null;eK(a,b)},function(f){a.f[b]=null;a.h.debug(JJ,f)})}else b===_.L&&(c=new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(c,function(){eK(a,b)},function(f){a.h.debug(JJ,f)}))},eK=function(a,b){b===_.N?a.a.trigger(new _.E(_.Jh)):b===_.L&&a.a.trigger(new _.E(_.Kh))},jK=function(a,b,c,d){_.Ph.call(this);this.m=new _.D(_.xc);this.aa=a;this.w=new _.qh(b);
|
|
8
|
+
this.Y=c;this.ga=d;this.h=this.K=_.Xi();this.D=[];this.C=0;this.M=new _.mi;this.I=this.o=this.a=null;this.B=this.A=!1;this.wa="";this.Na=1E6;this.g=new aK;this.g.Fb(this);this.j=new $J(this);this.J=new _.Yf;this.f=null;this.G=new Set;this.T=this.Pi.bind(this);this.Ha=this.ij.bind(this);this.ca=this.Zi.bind(this);this.U=this.Ti.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(){gK(!0)},
|
|
9
|
+
0)}});hK(this);iK.add(this)},kK=function(a){var b,c;return _.z(function(d){if(1==d.a)return iK["delete"](a),a.A&&(a.A=!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.Ha)),c=[],a.g&&(c.push(a.g.destroy()),a.g=null),a.j&&(c.push(a.j.destroy()),a.j=null),_.v(d,Promise.all(c),2);a.B=!1;a.w&&(a.w.stop(),a.w=null);a.Y=null;a.ga=null;_.w(d)})},
|
|
10
|
+
hK=function(a){if(!a.A&&window.chrome&&chrome.cast&&chrome.cast.isAvailable&&window.cast&&cast.framework&&cast.framework.CastContext&&a.aa.length){a.A=!0;a.w.Re();var b=cast.framework.CastContext.getInstance(),c=new cast.framework.CastOptions;c.receiverApplicationId=a.aa;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,
|
|
11
|
+
a.Ha);oK&&a.w.$(.02)}},yK=function(a,b){tK(a,b.getMediaSession());b.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,a.ca);b.addMessageListener(SJ,a.U)},tK=function(a,b){b!==a.a&&(a.a=b,a.a&&(a.J.release(),a.I=null,a.o=null,a.o=new cast.framework.RemotePlayer,a.I=new cast.framework.RemotePlayerController(a.o),a.J.on(a.I,cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,a.Ng.bind(a)),a.g&&a.g.load(),a.j&&a.j.init(),a.trigger(new _.E(_.kd))))},zK=function(a){return _.z(function(b){return a.cb()?
|
|
12
|
+
b.H(0):_.v(b,cast.framework.CastContext.getInstance().requestSession(),0)})},AK=function(a,b){var c,d,e,f,g,k,l,m,n,p,q;return _.z(function(r){switch(r.a){case 1:return c=chrome.cast.media.StreamType,d=_.ip,_.v(r,zK(a),2);case 2:if(!b)return r["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;k=b;l=k.Ab;m=k.audioMimeType;g.hlsVideoSegmentFormat=ZJ(l,d.VIDEO);g.hlsSegmentFormat=
|
|
13
|
+
ZJ(m,d.AUDIO);if(!b.Ka){r.H(3);break}if(!a.O){r.H(4);break}return _.v(r,Promise.resolve(a.O(b.Ka)),5);case 5:if(n=r.f)b.Ka=n;case 4:a.h=b.Ka;a.D=_.Zl(a.h);a.C=a.D.findIndex(function(x){return x.url===b.source.url});if(!b.Ka.remoteTextTracks){r.H(6);break}return _.v(r,Promise.all(b.Ka.remoteTextTracks.map(a.Sh.bind(a))),7);case 7:p=r.f,g.tracks=p.filter(function(x){return x}),b.Ka.remoteTextTracks=void 0;case 6:delete b.Ka.autoplay,b.Ka.startTime=null,g.customData={playerConfiguration:WJ(b.Ka)};case 3:return b.source.name&&
|
|
14
|
+
a.Gd(b.source.name),a.f&&(g.metadata=a.f),q=new chrome.cast.media.LoadRequest(g),typeof b.autoplay===_.ic&&(q.autoplay=b.autoplay),typeof b.currentTime===_.zd&&(q.currentTime=b.currentTime),_.v(r,f.loadMedia(q),0)}})},BK=function(a,b,c){c=void 0===c?0:c;var d,e;return _.z(function(f){(d=a.g.ja())&&d.language&&(a.h.preferredTextLanguage=d.language);(e=a.g.ia())&&e.language&&(a.h.preferredAudioLanguage=e.language);return _.v(f,AK(a,{source:a.getLoadedSource(),currentTime:c,isLive:a.isLive(),autoplay:b,
|
|
15
|
+
Ka:a.h}),0)})},gK=function(a){if(a){a=_.t(iK);for(var b=a.next();!b.done;b=a.next())hK(b.value)}},DK=function(a,b,c){_.Ph.call(this);var d=this;this.f=a;this.h=b;this.j=typeof c===_.Zc?c:function(e,f){d.f&&e!==_.Ol&&e!==_.Hl&&d.f.load(f)};this.a=CK(this);this.g=new _.D(PJ);this.addDelegate(this.f)},CK=function(a){return new jK(a.h,function(){a.trigger(new _.E(_.oc))},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;
|
|
16
|
+
d.ima&&d.startTime&&(d.ima.playAdsAfterTime=d.startTime);c.af&&(d.preferredAudioLanguage=c.af);c.jg&&(d.preferredTextLanguage=c.jg);_.gn(a.f,null);a.trigger(new _.E("castingended"));a.j(b,d)},function(){return EK(a)})},EK=function(a){var b;return _.z(function(c){if(1==c.a)return a.trigger(new _.E(_.nc)),b=a.f.a,b!==a.a&&a.f&&a.a?_.v(c,a.f.release(),2):c["return"]();_.gn(a.f,a.a);_.w(c)})},FK=function(a){VJ.call(this,a,"clpp.cast.StateManager");this.I=this.Rg.bind(this);this.G=this.Qg.bind(this);this.w=
|
|
17
|
+
this.Vi.bind(this);this.o=this.Ni.bind(this);this.K=this.Tg.bind(this);this.J=this.Sg.bind(this);this.M=this.lj.bind(this);this.D=this.Yi.bind(this);this.C=this.S.bind(this);this.f=this.Pg.bind(this)},GK=function(a){this.Qb=a;this.a=this.f.bind(this)},HK=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]},IK=function(a){var b=
|
|
18
|
+
a.dashTimedMetadata,c=_.Ce;b&&(c=b.schemeIdUri);return{type:c.startsWith(_.Be)?_.hg:_.fg,schemeIdUri:c,id:a.id||"",startTime:a.startTime,endTime:a.endTime,value:b&&b.value||"",eventElement:b&&b.eventElement}},JK=function(){this.g=new _.D("clpp.cast.TrackManager");this.l=null;this.o=1E9;this.h=[];this.j=[];this.m=this.qj.bind(this);this.a=this.f=null},KK=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},MK=function(a){a.a=KK().getTextTracksManager();var b=a.a.getTracks();
|
|
19
|
+
a.j=LK(_.L,b)},NK=function(a,b,c,d){c=_.yh(c).filter(function(k){return k});var e=!1,f=[];b===_.N?f=a.getAudioTracks():b===_.L&&(f=a.ea());if(c=c.find(function(k){var l=_.uh(k);return f.some(function(m){m=_.uh(m.language||"");return _.vh(l,m)})})){var g=_.uh(c);c=f.filter(function(k){k=_.uh(k.language||"");return _.vh(g,k)});f=c.length?c:f;e=e||!!c.length}_.bh(d)&&(c=f.filter(function(k){return k.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),
|
|
20
|
+
b===_.N?a.na(e):b===_.L&&a.ua(e))},LK=function(a,b){for(var c=[],d=_.t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=new _.zg(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 _.Gg(f.id,f));c.push(f)}return c},OK=function(){_.Ph.call(this);this.C=new _.D(QJ);
|
|
21
|
+
this.g=this.o=_.Xi();this.w=null;this.j=-1;this.D=new _.mi;this.f=this.m=this.h=this.a=this.A=null;this.B=!1},PK=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},SK=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=_.xj(d);if(e){var f=[_.Fc];_.Zl(a)[0].type!==_.Xb&&f.unshift(_.Gc);d.preferredDrmSystem===_.Fc&&f.reverse();for(var g,
|
|
22
|
+
k;f.length&&!k;)g=f.shift(),k=e.Xa[g];k?(d=g===_.Gc?cast.framework.ContentProtection.WIDEVINE:g===_.Fc?cast.framework.ContentProtection.PLAYREADY:void 0,b.protectionSystem=d,b.licenseUrl=k.licenseUrl,d={ldlDelay:0,customData:{}},QK(b,k,a,d),RK(b,k,a,d)):c()}else c()}else c()},QK=function(a,b,c,d){b.modifiers.licenseRequest?a.licenseRequestHandler=function(e){var f=_.ih({method:"POST",uris:[e.url]});e.headers&&(f.headers=e.headers);f.body=e.content;f.allowCrossSiteCredentials=e.withCredentials;b.modifiers.licenseRequest(c,
|
|
23
|
+
f,d);e.url=f.uris[0];e.headers=f.headers;e.content=f.body;e.withCredentials=f.allowCrossSiteCredentials}:a.licenseRequestHandler=void 0},RK=function(a,b,c,d){b.modifiers.licenseResponse?a.licenseHandler=function(e,f){var g;return _.z(function(k){return 1==k.a?(g=_.jh(Object.assign({},f.headers),e.buffer,200,""),_.v(k,b.modifiers.licenseResponse(c,g,d),2)):k["return"](_.Q(g.data))})}:a.licenseHandler=void 0},Z=function(a,b,c,d,e){this.a=a;this.f=b;this.h=typeof c===_.zd?c:1;this.j=typeof d===_.zd?
|
|
24
|
+
d:1;this.g=typeof e===_.zd?e:0},TK=function(a){this.a=a},VK=function(a){this.l=a;this.a=null;this.g=this.Ug.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];
|
|
25
|
+
UK().addEventListener(this.f,this.g)},YK=function(a,b,c){var d,e,f,g,k,l,m;return _.z(function(n){if(1==n.a){d=b.adTagUrl;if(!d)return n["return"]();_.rf(n,2);WK=!1;e=_.ih(d);return _.v(n,c.fetch(e).N,4)}if(2!=n.a){if((f=n.f)&&f.data)if(g=_.Tg(f.data),k=new DOMParser,l=k.parseFromString(g,_.ve),l.getElementsByTagName("vmap:VMAP").length)_.B("VMAP detected."),a.vmapAdsRequest=XK(g);else if(l.getElementsByTagName("VAST").length){_.B("VAST detected.");var p=new cast.framework.messages.BreakClip("bc1");
|
|
26
|
+
p.vastAdsRequest=XK(g);var q=new cast.framework.messages.Break("b1",[p.id],0);a.breakClips=[p];a.breaks=[q]}else _.B("Unsupported schema."),WK=!0;return _.sf(n,0)}m=_.tf(n);_.B("Failed to fetch an ad",m);WK=!0;_.w(n)})},XK=function(a){var b=new cast.framework.messages.VastAdsRequest;b.adsResponse=a;return b},UK=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager()},$K=function(a,b,c){if(c instanceof cast.framework.events.BreaksEvent||-1!==a.getPosition()){var d=null;
|
|
27
|
+
(c=ZK(a,c))&&(d={ad:c});a.l.trigger(new _.E(b,d))}},aL=function(a,b){var c=new _.J(1,10,10003,{errorType:b});a.l.onError(c)},ZK=function(a,b){var c=null;if(a.a&&b instanceof cast.framework.events.BreaksEvent){var d=null,e=null,f;typeof b.breakClipId===_.me&&(d=a.a.getBreakClipById(b.breakClipId));typeof b.breakId===_.me&&(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,
|
|
28
|
+
k){return g.position-k.position}).findIndex(function(g){return g===e})));c=new Z(d,e,b.index,b.total,f)}return c},bL=function(){this.a=!1;this.h=new _.D(RJ);this.f=this.l=null;this.g=new Set;this.A=this.Xi.bind(this);this.w=this.Og.bind(this);this.j=null;this.o=new _.Yf;this.m=null},dL=function(){return cL||(cL=new bL)},fL=function(a,b){a.h.debug("Detected HLS, parsing");var c=cast.framework.messages.HlsVideoSegmentFormat,d=cast.framework.CastReceiverContext.getInstance();c=d.getPlayerManager().getMediaInformation().hlsVideoSegmentFormat===
|
|
29
|
+
c.FMP4?_.Ke:_.Je;b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");for(var e=b.split(/\n+/m),f=[],g=0;g<e.length;){var k=e[g].trim();if(e[g].startsWith("#EXT-X-STREAM-INF")){var l=eL(k,_.ka),m=eL(k,"RESOLUTION"),n=_.t([]),p=n.next().value;n=n.next().value;m&&(m=_.t(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(k);++g}return f.join("\n")},eL=function(a,b){b+="\x3d";var c=a.indexOf(b);if(0<=c){var d=a.substring(c+b.length);d.startsWith('"')?
|
|
30
|
+
(d=d.substring(1),d=d.substring(0,d.indexOf('"'))):(c=d.indexOf(","),0<=c&&(d=d.substring(0,c)))}return d},gL=function(a){this.f=a;this.a=null;this.g=new _.Yf;this.h=[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]},iL=function(a,b){var c=null,d=hL(a);d&&(c={ad:d});a.f.trigger(new _.E(b,c))},hL=function(a){var b=
|
|
31
|
+
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(k){return k.id===a.a.breakId})||null)){var f=c.breakClipIds.length;var g=0>=c.position?c.position:b.breaks.filter(function(k){return 0<=k.position}).sort(function(k,l){return k.position-l.position}).findIndex(function(k){return k===c})}b.breakClips&&(d=b.breakClips.find(function(k){return k.id===a.a.breakClipId})||null);b=new Z(d,c,e,f,g)}return b},jL=function(){},kL=function(){};
|
|
32
|
+
_.h=VJ.prototype;_.h.release=function(){this.ha(_.Hl)};_.h.destroy=function(){this.j=this.a=null;return Promise.resolve()};_.h.getState=function(){return this.g};_.h.onError=function(a){a.severity===_.K&&this.ha(_.Sl)};
|
|
33
|
+
_.h.ha=function(a){if(a!==this.g)if(this.g===_.Sl&&a!==_.Hl)this.log.debug("Player is in ERROR state and can not switch to",a);else{var b=Date.now();this.m=this.g;this.g=a;this.g===_.Ml?(this.A=b,this.a.trigger(new _.E(_.kc,{detail:{bufferedTimeMS:-1,reason:this.h}}))):this.m===_.Ml&&this.a.trigger(new _.E(_.jc,{detail:{bufferedTimeMS:b-this.A,reason:this.h}}));a={currentState:this.g,previousState:this.m,timeSinceLastStateChangeMS:b-this.B};this.B=b;this.j&&_.xl(this.j,this.g);this.a.trigger(new _.E(_.ie,
|
|
34
|
+
{detail:a}))}};_.A("clpp.cast.CastUtils",function(){});_.u($J,VJ);$J.prototype.init=function(){var a=this.a,b=a.a;b&&(this.f&&this.f.removeUpdateListener(this.w),this.f=b,this.f.addUpdateListener(this.w),this.o=a.o)};$J.prototype.destroy=function(){var a=this;return _.z(function(b){a.f&&(a.f.removeUpdateListener(a.w),a.f=null);return _.v(b,VJ.prototype.destroy.call(a),0)})};$J.prototype.ha=function(a){var b=this.a.o;b&&b.isPlayingBreak||VJ.prototype.ha.call(this,a)};
|
|
35
|
+
$J.prototype.C=function(){if(this.f&&this.o&&!this.o.isPlayingBreak)switch(this.f.playerState){case chrome.cast.media.PlayerState.IDLE:switch(this.f.idleReason){case chrome.cast.media.IdleReason.FINISHED:this.ha(_.Ol);break;case chrome.cast.media.IdleReason.ERROR:this.ha(_.Sl);break;default:this.ha(_.Hl)}break;case chrome.cast.media.PlayerState.PLAYING:this.ha(_.Vl);break;case chrome.cast.media.PlayerState.PAUSED:this.ha(_.Ul);break;case chrome.cast.media.PlayerState.BUFFERING:this.ha(_.Ml)}};_.u(aK,_.P);_.h=aK.prototype;_.h.Fb=function(a){this.a=a};_.h.release=function(){this.g=[];this.f={}};
|
|
36
|
+
_.h.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=_.Bg;break;case chrome.cast.media.TrackType.AUDIO:c=_.N;break;case chrome.cast.media.TrackType.TEXT:c=_.L}c=new _.zg(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);
|
|
37
|
+
c.renditions.push(new _.Gg(c.id,c));return c}):[],this.a.trigger(new _.E(_.lp)))};_.h.destroy=function(){this.a=null};_.h.getVideoTracks=function(){return cK(this,_.Bg)};_.h.getAudioTracks=function(){return cK(this,_.N)};_.h.ea=function(){return cK(this,_.L)};_.h.fa=function(){var a=this.Da();return a?a.renditions[0]:null};_.h.Aa=function(){var a=this.ia();return a?a.renditions[0]:null};_.h.Ca=function(){var a=this.ja();return a?a.renditions[0]:null};_.h.Pa=function(){return this.f[_.Bg]||null};
|
|
38
|
+
_.h.Za=function(){return this.f[_.N]||null};_.h.$a=function(){return this.f[_.L]||null};_.h.Da=function(){return dK(this,_.Bg)};_.h.ia=function(){return dK(this,_.N)};_.h.ja=function(){return dK(this,_.L)};_.h.Wa=function(a){fK(this,_.Bg,a)};_.h.na=function(a){fK(this,_.N,a)};_.h.ua=function(a){fK(this,_.L,a)};_.h.Va=function(a){this.Wa(a&&a.track)};_.h.gb=function(a){this.na(a&&a.track)};_.h.hb=function(a){this.ua(a&&a.track)};_.h.addTextTrack=function(){return _.z(function(a){_.w(a)})};_.h.ka=function(){return!0};
|
|
39
|
+
aK.prototype.isAbrEnabled=aK.prototype.ka;aK.prototype.addTextTrack=aK.prototype.addTextTrack;aK.prototype.setTextRendition=aK.prototype.hb;aK.prototype.setAudioRendition=aK.prototype.gb;aK.prototype.setVideoRendition=aK.prototype.Va;aK.prototype.setTextTrack=aK.prototype.ua;aK.prototype.setAudioTrack=aK.prototype.na;aK.prototype.setVideoTrack=aK.prototype.Wa;aK.prototype.getTextTrack=aK.prototype.ja;aK.prototype.getAudioTrack=aK.prototype.ia;aK.prototype.getVideoTrack=aK.prototype.Da;
|
|
40
|
+
aK.prototype.getLoadingTextRendition=aK.prototype.$a;aK.prototype.getLoadingAudioRendition=aK.prototype.Za;aK.prototype.getLoadingVideoRendition=aK.prototype.Pa;aK.prototype.getTextRendition=aK.prototype.Ca;aK.prototype.getAudioRendition=aK.prototype.Aa;aK.prototype.getVideoRendition=aK.prototype.fa;aK.prototype.getTextTracks=aK.prototype.ea;aK.prototype.getAudioTracks=aK.prototype.getAudioTracks;aK.prototype.getVideoTracks=aK.prototype.getVideoTracks;_.u(jK,_.Ph);_.h=jK.prototype;_.h.init=function(a,b){this.h=this.K=b};_.h.unload=function(){var a=this;return new Promise(function(b,c){a.g&&a.g.release();a.a&&!a.a.idleReason||b();a.a.stop(null,b,c)})};_.h.release=function(){var a=this;return this.unload().then(function(){a.j&&a.j.release()})};_.h.destroy=function(){return _.z(function(a){_.w(a)})};_.h.cd=function(a){this.O=a};_.h.$b=function(){return this.A};_.h.cb=function(){return this.B};_.h.ke=function(){return this.wa};
|
|
41
|
+
_.h.sendMessage=function(a,b){var c=this,d,e,f;return _.z(function(g){switch(g.a){case 1:e=cast.framework.CastContext.getInstance().getCurrentSession();if(!e){d=new _.J(1,8,8004,void 0);g.H(2);break}_.rf(g,3);return _.v(g,e.sendMessage(a,WJ(b)),5);case 5:_.sf(g,2);break;case 3:f=_.tf(g),d=new _.J(1,8,8E3,{detailedErrorCode:f});case 2:if(d)c.onError(d);_.w(g)}})};
|
|
42
|
+
_.h.cast=function(){var a=this,b,c;return _.z(function(d){if(1==d.a){if(!a.$b())throw a.m.warn(NJ),new _.J(1,8,8001,void 0);if(!oK)throw a.m.warn(LJ),new _.J(1,8,8002,void 0);if(a.cb())throw a.m.warn("Already casting"),new _.J(1,8,8003,void 0);_.rf(d,2);return _.v(d,zK(a),4)}if(2!=d.a)return _.sf(d,0);b=_.tf(d);c={};b instanceof chrome.cast.Error?(c.detailedErrorCode=b.code,c.details=b.details,c.reason=b.description):c.detailedErrorCode=b;throw new _.J(1,8,8E3,c);})};
|
|
43
|
+
_.h.ee=function(){this.cb()&&cast.framework.CastContext.getInstance().endCurrentSession(!0)};_.h.addMessageListener=function(a){typeof a===_.Zc&&this.G.add(a)};_.h.removeMessageListener=function(a){typeof a===_.Zc&&this.G["delete"](a)};_.h.play=function(){var a=this;return this.isEnded()?BK(this,!0):new Promise(function(b,c){if(!a.a)return c(KJ);a.a.play(null,b,c)})};_.h.pause=function(){var a=this;return new Promise(function(b,c){a.isEnded()&&b();if(!a.a)return c(KJ);a.a.pause(null,b,c)})};
|
|
44
|
+
_.h.isPaused=function(){return!!this.a&&this.a.playerState===chrome.cast.media.PlayerState.PAUSED};_.h.isEnded=function(){return this.getState()===_.Ol};_.h.seek=function(a){var b=this;return this.isEnded()?BK(this,!1,a):new Promise(function(c,d){b.a||d(KJ);b.o.isPlayingBreak&&d(IJ);var e=new chrome.cast.media.SeekRequest;e.currentTime=a;b.trigger(new _.E(_.Ee));b.a.seek(e,function(){b.trigger(new _.E(_.De));c()},d)})};_.h.getPosition=function(){return this.a&&this.a.getEstimatedTime()||0};
|
|
45
|
+
_.h.getDuration=function(){return this.a&&this.a.media&&typeof this.a.media.duration===_.zd?this.a.media.duration:0};_.h.setDrmCustomDataModifier=function(){};_.h.setCdnErrorCallback=function(){};_.h.getPlaybackRate=function(){return this.a&&this.a.playbackRate||0};_.h.setPlaybackRate=function(a){this.a&&0<a&&this.sendMessage(TJ,{type:"SET_PLAYBACK_RATE",requestId:Math.round(1E3*Math.random()),mediaSessionId:this.a.mediaSessionId,playbackRate:a})};_.h.getVolume=function(){return this.a&&this.a.volume.level};
|
|
46
46
|
_.h.setVolume=function(a){this.a&&0<=a&&1>=a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(a)),this.a.setVolume(a))};_.h.isMuted=function(){return this.a&&this.a.volume.muted};_.h.setMuted=function(a){this.a&&(a=new chrome.cast.media.VolumeRequest(new chrome.cast.Volume(void 0,a)),this.a.setVolume(a))};_.h.getPresentationStartTime=function(){return this.a&&this.a.media.startAbsoluteTime||0};
|
|
47
|
-
_.h.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.zd&&typeof b.end===_.zd&&(a={start:b.start,end:b.end})}return a};_.h.getState=function(){return this.j?this.j.getState():_.
|
|
48
|
-
_.h.load=function(a){var b=this,c,d;return _.z(function(e){if(!b
|
|
49
|
-
_.h.setNetworkEngine=function(a){this.
|
|
50
|
-
_.h.canPlay=function(){return this
|
|
51
|
-
_.h.Oe=function(a){this.f||(this.f={metadataType:chrome.cast.media.MetadataType.GENERIC});this.f.releaseDate=a};_.h.Pi=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;
|
|
52
|
-
_.h.ij=function(a){this.m.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.B=!0;
|
|
53
|
-
isLive:b.streamType===chrome.cast.media.StreamType.LIVE},currentTime:this.getPosition(),jg:d,af:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ca);a.session.removeMessageListener(
|
|
54
|
-
_.h.Ng=function(a){this.trigger(new _.E(_.
|
|
55
|
-
|
|
47
|
+
_.h.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=this.a.getEstimatedLiveSeekableRange();b&&typeof b.start===_.zd&&typeof b.end===_.zd&&(a={start:b.start,end:b.end})}return a};_.h.getState=function(){return this.j?this.j.getState():_.Il};_.h.getStats=function(){return this.a&&this.a.customData&&this.a.customData.stats?XJ(this.a.customData.stats):_.Dl()};_.h.isLive=function(){return-1===this.getDuration()};
|
|
48
|
+
_.h.load=function(a){var b=this,c,d;return _.z(function(e){if(!b.$b())return b.m.warn(NJ),e["return"]();if(!oK)return b.m.warn(LJ),e["return"]();b.D=_.Zl(a);_.bj(a)&&(b.h=_.aj(b.K,a));c=b.D[b.C];d={source:c,isLive:c.isLive,autoplay:b.h.autoplay,Ka:b.h,Ab:c.Ab,audioMimeType:c.audioMimeType};return _.v(e,AK(b,d),0)})};_.h.getBufferInfo=function(){return new _.Oh};_.h.getTrackManager=function(){return this.g};_.h.getConfiguration=function(){return this.h};_.h.getSurface=function(){return null};
|
|
49
|
+
_.h.setNetworkEngine=function(a){this.M=a};_.h.getNetworkEngine=function(){return this.M};_.h.getSourceIndex=function(){return this.C};_.h.setSourceIndex=function(a){this.C=a};_.h.getLoadedSource=function(){return this.D[this.C]};_.h.getPeriods=function(){return[]};_.h.getDrmInfo=function(){return null};_.h.getTimelineCues=function(){return[]};_.h.resetAbr=function(){this.m.warn(MJ)};_.h.onError=function(a){if(a&&(this.trigger(new _.E(_.Xc,{detail:a})),this.j))this.j.onError(a)};_.h.namespace=function(){return _.xc};
|
|
50
|
+
_.h.canPlay=function(){return this.$b()?2:0};_.h.Ne=function(a){this.f=a};_.h.Zd=function(){this.f=null};_.h.Gd=function(a){this.f||(this.f={metadataType:chrome.cast.media.MetadataType.GENERIC});this.f.title=a};_.h.Me=function(a){this.f||(this.f={metadataType:chrome.cast.media.MetadataType.GENERIC});this.f.images=[{url:a}]};_.h.Le=function(a){this.f||(this.f={});this.f.metadataType=chrome.cast.media.MetadataType.MUSIC_TRACK;this.f.artist=a};
|
|
51
|
+
_.h.Oe=function(a){this.f||(this.f={metadataType:chrome.cast.media.MetadataType.GENERIC});this.f.releaseDate=a};_.h.Pi=function(a){var b=cast.framework.CastContext.getInstance(),c=a.castState===cast.framework.CastState.CONNECTED;oK=a.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE;this.wa=c?b.getCurrentSession().getCastDevice().friendlyName:"";this.w.Re()};
|
|
52
|
+
_.h.ij=function(a){this.m.debug("state: "+a.sessionState+", details:",a);switch(a.sessionState){case cast.framework.SessionState.SESSION_STARTED:this.B=!0;yK(this,a.session);break;case cast.framework.SessionState.SESSION_RESUMED:this.cb()||(this.B=!0,yK(this,a.session),this.ga());break;case cast.framework.SessionState.SESSION_ENDED:if(this.cb()&&this.a){var b=this.a.media,c=this.g.ia(),d=this.g.ja();c=c&&c.language||void 0;d=d&&d.language||void 0;this.Y(this.getState(),{source:{url:b.contentId,type:b.contentType,
|
|
53
|
+
isLive:b.streamType===chrome.cast.media.StreamType.LIVE},currentTime:this.getPosition(),jg:d,af:c})}a.session.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.ca);a.session.removeMessageListener(SJ,this.U);this.B=!1;this.a=null;this.J.release();this.o=this.I=null}};_.h.Zi=function(a){this.m.debug("New media session",a.mediaSession);tK(this,a.mediaSession)};_.h.Ti=function(a,b){if(a===SJ&&0<this.G.size){var c=XJ(b);this.G.forEach(function(d){return d(c)})}};
|
|
54
|
+
_.h.Ng=function(a){this.trigger(new _.E(_.we,{currentTime:a.value}))};_.h.Sh=function(a){var b=this,c,d;return _.z(function(e){if(1==e.a)return c=null,_.v(e,YJ(a,[_.ue,_.Wb],b.M,b.h),2);if(d=e.f)c=new chrome.cast.media.Track(b.Na++,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)})};_.h.getTextDisplayer=function(){return null};
|
|
55
|
+
jK.prototype.getTextDisplayer=jK.prototype.getTextDisplayer;jK.prototype.getNetworkEngine=jK.prototype.getNetworkEngine;jK.prototype.setNetworkEngine=jK.prototype.setNetworkEngine;var oK=!1,iK=new Set;window.__onGCastApiAvailable=gK;_.u(DK,_.Ph);_.h=DK.prototype;_.h.destroy=function(){var a=this;return _.z(function(b){if(1==b.a)return a.a?_.v(b,kK(a.a),3):b.H(2);2!=b.a&&(a.a=null);a.removeDelegate(a.f);_.w(b)})};_.h.Yd=function(){return!!this.a&&this.a.$b()&&oK};_.h.cb=function(){return!!this.a&&this.a.cb()};_.h.ke=function(){return this.a?this.a.ke():""};_.h.cd=function(a){this.a&&this.a.cd(a)};
|
|
56
56
|
_.h.cast=function(a){var b=this,c,d,e;return _.z(function(f){switch(f.a){case 1:if(!b.a)return f["return"]();var g=null,k=b.f.getLoadedSource();if(k){var l=b.f.getTrackManager();g=l.getVideoTracks()[0];if(g&&g.mimeType)var m=g.mimeType;g=b.f.getConfiguration();var n=l.ia();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.ja())l.language&&(g.preferredTextLanguage=l.language),l.roles.length&&(g.preferredTextRole=
|
|
57
|
-
l.roles[0]);l=k&&typeof k.isLive===_.
|
|
58
|
-
d),e=new _.E(_.
|
|
59
|
-
_.h.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
_.h.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.G);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.
|
|
63
|
-
_.h.destroy=function(){var a=this,b,c;return _.z(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.G);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.
|
|
64
|
-
a.C);c.removeEventListener(b.BITRATE_CHANGED,a.f);return _.v(d,
|
|
65
|
-
_.h.Pg=function(a){var b=this.a.getStats();this.a.trigger(new _.E(_.
|
|
66
|
-
|
|
67
|
-
_.h.Aa=function(){var a=this.ia();return a&&a.renditions[0]};_.h.Ca=function(){var a=this.ja();return a&&a.renditions[0]};_.h.Pa=function(){return null};_.h.
|
|
68
|
-
_.h.ja=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.zd&&(b=b.toString(),a=this.ea().find(function(c){return c.id===b})||null)}return a};_.h.
|
|
57
|
+
l.roles[0]);l=k&&typeof k.isLive===_.ic?k.isLive:b.f.isLive();g={source:k,isLive:l,autoplay:!b.f.isPaused(),currentTime:Math.max(b.f.getPosition()-1,0),Ab:m,audioMimeType:p,Ka:g}}c=g;_.rf(f,2);return _.v(f,b.a.cast(),4);case 4:return b.f&&b.a?_.v(f,EK(b),5):f["return"]();case 5:if(!b.a)return f["return"]();c&&(c.autoplay=!b.f.isPaused());if(a)return _.v(f,b.f.load(a),7);if(b.a.a){f.H(7);break}return _.v(f,AK(b.a,c),7);case 7:_.sf(f,0);break;case 2:d=_.tf(f),b.g.error("Error while trying to cast",
|
|
58
|
+
d),e=new _.E(_.Xc,{detail:d}),b.trigger(e),_.w(f)}})};_.h.ee=function(){this.a&&this.a.ee()};_.h.Jg=function(a){var b=this;return _.z(function(c){if(1==c.a){if(a===b.h)return c["return"]();b.h=a;return b.a?_.v(c,kK(b.a),2):c.H(2)}b.a=CK(b);_.w(c)})};_.h.sendMessage=function(a){var b=this;return _.z(function(c){return b.a?_.v(c,b.a.sendMessage(SJ,a),0):(b.g.warn(OJ),c["return"]())})};_.h.addMessageListener=function(a){this.a?this.a.addMessageListener(a):this.g.warn(OJ)};
|
|
59
|
+
_.h.removeMessageListener=function(a){this.a?this.a.removeMessageListener(a):this.g.warn(OJ)};_.h.Ne=function(a){this.a&&this.a.Ne(a)};_.h.Zd=function(){this.a&&this.a.Zd()};_.h.Gd=function(a){this.a&&this.a.Gd(a)};_.h.Me=function(a){this.a&&this.a.Me(a)};_.h.Le=function(a){this.a&&this.a.Le(a)};_.h.Oe=function(a){this.a&&this.a.Oe(a)};_.A(PJ,DK);DK.prototype.setContentReleaseDate=DK.prototype.Oe;DK.prototype.setContentArtist=DK.prototype.Le;DK.prototype.setContentImage=DK.prototype.Me;
|
|
60
|
+
DK.prototype.setContentTitle=DK.prototype.Gd;DK.prototype.clearContentMetadata=DK.prototype.Zd;DK.prototype.setContentMetadata=DK.prototype.Ne;DK.prototype.removeMessageListener=DK.prototype.removeMessageListener;DK.prototype.addMessageListener=DK.prototype.addMessageListener;DK.prototype.sendMessage=DK.prototype.sendMessage;DK.prototype.changeReceiverId=DK.prototype.Jg;DK.prototype.forceDisconnect=DK.prototype.ee;DK.prototype.cast=DK.prototype.cast;DK.prototype.setPlayerConfigInterceptor=DK.prototype.cd;
|
|
61
|
+
DK.prototype.getReceiverName=DK.prototype.ke;DK.prototype.isCasting=DK.prototype.cb;DK.prototype.canCast=DK.prototype.Yd;DK.prototype.destroy=DK.prototype.destroy;_.u(FK,VJ);_.h=FK.prototype;
|
|
62
|
+
_.h.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.G);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.D);b.addEventListener(a.ERROR,this.C);b.addEventListener(a.BITRATE_CHANGED,this.f)};
|
|
63
|
+
_.h.destroy=function(){var a=this,b,c;return _.z(function(d){b=cast.framework.events.EventType;c=cast.framework.CastReceiverContext.getInstance().getPlayerManager();c.removeEventListener(b.PLAYING,a.I);c.removeEventListener(b.PAUSE,a.G);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.D);c.removeEventListener(b.ERROR,
|
|
64
|
+
a.C);c.removeEventListener(b.BITRATE_CHANGED,a.f);return _.v(d,VJ.prototype.destroy.call(a),0)})};_.h.Rg=function(){this.a.trigger(new _.E(_.Pd));this.ha(_.Vl)};_.h.Qg=function(){this.ha(_.Ul)};_.h.Vi=function(){this.ha(_.Ol)};_.h.Ni=function(a){a.isBuffering?this.ha(_.Ml):(a=this.a.isPaused()?_.Ul:_.Vl,this.ha(a))};_.h.Tg=function(){this.h=1;this.a.trigger(new _.E(_.Ee))};_.h.Sg=function(){this.a.trigger(new _.E(_.De))};_.h.lj=function(){this.h=2};_.h.Yi=function(){this.ha(_.Tl)};
|
|
65
|
+
_.h.Pg=function(a){var b=this.a.getStats();this.a.trigger(new _.E(_.hc,{detail:{bandwidth:a.totalBitrate,width:b.width,height:b.height}}))};_.h.S=function(a){a=new _.J(_.K,7,7300,{detailedErrorCode:a.detailedErrorCode,error:a.error,reason:a.reason});this.a.trigger(new _.E(_.Xc,{detail:a}));this.ha(_.Sl)};GK.prototype.init=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().addEventListener(HK(),this.a)};GK.prototype.release=function(){cast.framework.CastReceiverContext.getInstance().getPlayerManager().removeEventListener(HK(),this.a)};GK.prototype.getTimelineCues=function(){return cast.framework.CastReceiverContext.getInstance().getPlayerManager().getTimedMetadata().map(function(a){return IK(a)})};
|
|
66
|
+
GK.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=_.ig;break;case cast.framework.events.EventType.TIMED_METADATA_ENTER:b=_.kg;break;case cast.framework.events.EventType.TIMED_METADATA_EXIT:b=_.lg}b&&this.Qb(new _.E(b,{detail:IK(a.timedMetadataInfo)}))}else for(a=_.t(this.getTimelineCues()),b=a.next();!b.done;b=a.next())this.Qb(new _.E(_.ig,{detail:b.value}))};_.u(JK,_.P);_.h=JK.prototype;_.h.Fb=function(a){this.l=a;KK().addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.h.release=function(){this.h=[];this.j=[];this.a=this.f=null};_.h.load=function(){};_.h.destroy=function(){this.l=null;KK().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.m)};_.h.getVideoTracks=function(){return[]};_.h.getAudioTracks=function(){return this.h};_.h.ea=function(){return this.j};_.h.fa=function(){return null};
|
|
67
|
+
_.h.Aa=function(){var a=this.ia();return a&&a.renditions[0]};_.h.Ca=function(){var a=this.ja();return a&&a.renditions[0]};_.h.Pa=function(){return null};_.h.Za=function(){return null};_.h.$a=function(){return null};_.h.Da=function(){return null};_.h.ia=function(){var a=null;if(this.f){var b=this.f.getActiveId();typeof b===_.zd&&(b=b.toString(),a=this.getAudioTracks().find(function(c){return c.id===b})||null)}return a};
|
|
68
|
+
_.h.ja=function(){var a=null;if(this.a){var b=this.a.getActiveIds()[0];typeof b===_.zd&&(b=b.toString(),a=this.ea().find(function(c){return c.id===b})||null)}return a};_.h.Wa=function(){this.g.warn("Video tracks unavailable on Cast")};_.h.na=function(a){a&&this.f&&this.f.setActiveById(+a.id)};_.h.ua=function(a){this.a&&(a?this.a.setActiveByIds([+a.id]):this.a.setActiveByIds([]))};_.h.Va=function(){this.g.warn("Video renditions unavailable on Cast")};_.h.gb=function(a){this.na(a&&a.track)};
|
|
69
69
|
_.h.hb=function(a){this.ua(a&&a.track)};
|
|
70
|
-
_.h.addTextTrack=function(a){var b=this,c,d,e;return _.z(function(f){if(1==f.a)return c=b.l.getConfiguration(),_.v(f,
|
|
71
|
-
a),g;}}_.w(f)})};_.h.ka=function(){return!0};_.h.qj=function(){this.f=
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
_.h.unload=function(){var a=
|
|
75
|
-
_.h.play=function(){var a=
|
|
76
|
-
_.h.isEnded=function(){return
|
|
77
|
-
_.h.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;
|
|
78
|
-
_.h.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.h.getLoadedSource=function(){var a=
|
|
79
|
-
_.h.getPresentationStartTime=function(){var a=
|
|
80
|
-
_.h.getStats=function(){var a=_.
|
|
81
|
-
_.h.load=function(a){var b=this,c,d;return _.z(function(e){b.f=new _.
|
|
82
|
-
_.h.getTrackManager=function(){return this.h};_.h.getConfiguration=function(){return this.g};_.h.getSurface=function(){return this.A};_.h.setNetworkEngine=function(a){this.D=a};_.h.getNetworkEngine=function(){return this.D};_.h.getSourceIndex=function(){return this.j};_.h.setSourceIndex=function(a){this.j=a};_.h.getPeriods=function(){return[]};_.h.namespace=function(){return
|
|
83
|
-
_.h.onError=function(a){this.trigger(new _.E(_.
|
|
84
|
-
_.h.setDrmCustomDataModifier=function(){};_.h.setCdnErrorCallback=function(){};
|
|
85
|
-
_.h.
|
|
70
|
+
_.h.addTextTrack=function(a){var b=this,c,d,e;return _.z(function(f){if(1==f.a)return c=b.l.getConfiguration(),_.v(f,YJ(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]),MK(b)}catch(g){throw b.g.warn("failed on track",
|
|
71
|
+
a),g;}}_.w(f)})};_.h.ka=function(){return!0};_.h.qj=function(){this.f=KK().getAudioTracksManager();var a=this.f.getTracks();this.h=LK(_.N,a);MK(this);a=this.l.getConfiguration();NK(this,_.N,a.preferredAudioLanguage,a.preferredAudioRole);NK(this,_.L,a.preferredTextLanguage,a.preferredTextRole)};JK.prototype.isAbrEnabled=JK.prototype.ka;JK.prototype.addTextTrack=JK.prototype.addTextTrack;JK.prototype.setTextRendition=JK.prototype.hb;JK.prototype.setAudioRendition=JK.prototype.gb;
|
|
72
|
+
JK.prototype.setVideoRendition=JK.prototype.Va;JK.prototype.setTextTrack=JK.prototype.ua;JK.prototype.setAudioTrack=JK.prototype.na;JK.prototype.setVideoTrack=JK.prototype.Wa;JK.prototype.getTextTrack=JK.prototype.ja;JK.prototype.getAudioTrack=JK.prototype.ia;JK.prototype.getVideoTrack=JK.prototype.Da;JK.prototype.getLoadingTextRendition=JK.prototype.$a;JK.prototype.getLoadingAudioRendition=JK.prototype.Za;JK.prototype.getLoadingVideoRendition=JK.prototype.Pa;JK.prototype.getTextRendition=JK.prototype.Ca;
|
|
73
|
+
JK.prototype.getAudioRendition=JK.prototype.Aa;JK.prototype.getVideoRendition=JK.prototype.fa;JK.prototype.getTextTracks=JK.prototype.ea;JK.prototype.getAudioTracks=JK.prototype.getAudioTracks;JK.prototype.getVideoTracks=JK.prototype.getVideoTracks;_.u(OK,_.Ph);_.h=OK.prototype;_.h.init=function(a,b){var c=this;this.A=a;b&&(this.g=this.o=b);var d=PK();d.setMessageInterceptor(cast.framework.messages.MessageType.MEDIA_STATUS,this.$i.bind(this));d.setMediaPlaybackInfoHandler(this.Bg.bind(this));this.a=new FK(this);this.a.init();this.h=new JK;this.h.Fb(this);this.m=new GK(function(e){return c.trigger(e)});this.m.init()};
|
|
74
|
+
_.h.unload=function(){var a=PK();a.getPlayerState()!==cast.framework.messages.PlayerState.IDLE&&a.stop();this.h&&this.h.release();this.m&&this.m.release();this.f=null;return Promise.resolve()};_.h.release=function(){var a=this;return this.unload().then(function(){a.a&&a.a.release()})};_.h.destroy=function(){var a=this;return _.z(function(b){if(1==b.a)return a.A=null,a.o=_.Xi(),a.g=a.o,a.j=-1,a.w=null,a.a?_.v(b,a.a.destroy(),3):b.H(2);2!=b.a&&(a.a=null);a.h&&(a.h.destroy(),a.h=null);_.w(b)})};
|
|
75
|
+
_.h.play=function(){var a=PK();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot play during ads playout.");a.play();return Promise.resolve()};_.h.pause=function(){var a=PK();if(null!==a.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject("Cannot pause during ads playout.");a.pause();return Promise.resolve()};_.h.isPaused=function(){return PK().getPlayerState()===cast.framework.messages.PlayerState.PAUSED};
|
|
76
|
+
_.h.isEnded=function(){return PK().getPlayerState()===cast.framework.messages.PlayerState.IDLE};_.h.seek=function(a){var b=PK();if(null!==b.getBreakManager().getBreakClipCurrentTimeSec())return Promise.reject(IJ);b.seek(a);return Promise.resolve()};_.h.getPosition=function(){return PK().getCurrentTimeSec()};_.h.getDuration=function(){return PK().getDurationSec()};_.h.getPlaybackRate=function(){return PK().getPlaybackRate()};
|
|
77
|
+
_.h.setPlaybackRate=function(a){if(0<a){var b=new cast.framework.messages.SetPlaybackRateRequestData;b.playbackRate=a;PK().sendLocalMediaRequest(b)}};_.h.getVolume=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().level||null};_.h.setVolume=function(a){0<=a&&1>=a&&cast.framework.CastReceiverContext.getInstance().setSystemVolumeLevel(a)};_.h.setMuted=function(a){cast.framework.CastReceiverContext.getInstance().setSystemVolumeMuted(a)};
|
|
78
|
+
_.h.isMuted=function(){return cast.framework.CastReceiverContext.getInstance().getSystemVolume().muted||null};_.h.getLoadedSource=function(){var a=PK().getMediaInformation();if(a){var b=PK().getPlaybackConfig();b=!!b&&b.protectionSystem!==cast.framework.ContentProtection.NONE;var c=this.w&&-1!==this.j?this.w[this.j]:null;c=c?c.name:void 0;!c&&a.metadata&&(c=a.metadata.title);return{url:a.contentId,type:a.contentType,lk:b,name:c}}return null};_.h.getDrmInfo=function(){return null};
|
|
79
|
+
_.h.getPresentationStartTime=function(){var a=PK().getMediaInformation();return a?a.startAbsoluteTime||0:0};_.h.getSeekRange=function(){var a={start:0,end:this.getDuration()};if(this.isLive()){var b=PK().getLiveSeekableRange();b&&typeof b.start===_.zd&&typeof b.end===_.zd&&(a={start:b.start,end:b.end})}return a};_.h.getState=function(){return this.a?this.a.getState():_.Il};
|
|
80
|
+
_.h.getStats=function(){var a=_.Dl();if(this.f){a=PK().getStats();this.f.m=a.estimatedBandwidth||NaN;this.f.A=a.streamBandwidth||NaN;var b=this.f,c=a.height||NaN;b.j=a.width||NaN;b.f=c;b=this.f;c=typeof a.decodedFrames===_.zd?a.decodedFrames:NaN;b.h=typeof a.droppedFrames===_.zd?a.droppedFrames:NaN;b.g=c;a=this.f.getStats()}return a};_.h.isLive=function(){return-1===this.getDuration()};
|
|
81
|
+
_.h.load=function(a){var b=this,c,d;return _.z(function(e){b.f=new _.Cl;b.a.j=b.f.a;b.w=_.Zl(a);_.bj(a)&&(b.g=_.aj(b.o,a));if(b.B)return b.B=!1,e["return"]();c=b.w[b.j];d=new cast.framework.messages.LoadRequestData;d.autoplay=b.g.autoplay;typeof b.g.startTime===_.zd&&(d.currentTime=b.g.startTime);c.type&&(d.media.contentType=c.type);d.media.contentId=c.url;d.media.customData={playerConfiguration:WJ(b.g),local:!0};return _.v(e,PK().load(d),0)})};_.h.getBufferInfo=function(){this.C.warn(_.ma);return new _.Oh};
|
|
82
|
+
_.h.getTrackManager=function(){return this.h};_.h.getConfiguration=function(){return this.g};_.h.getSurface=function(){return this.A};_.h.setNetworkEngine=function(a){this.D=a};_.h.getNetworkEngine=function(){return this.D};_.h.getSourceIndex=function(){return this.j};_.h.setSourceIndex=function(a){this.j=a};_.h.getPeriods=function(){return[]};_.h.namespace=function(){return QJ};_.h.getTimelineCues=function(){return this.m&&this.m.getTimelineCues()||[]};_.h.resetAbr=function(){this.C.warn(MJ)};
|
|
83
|
+
_.h.onError=function(a){this.trigger(new _.E(_.Xc,{detail:a}))};_.h.canPlay=function(){return _.vi()?2:0};_.h.$i=function(a){a.customData||(a.customData={});a.customData.stats=WJ(this.getStats());return a};_.h.Bg=function(a,b){var c=null;a.media.customData&&(c=XJ(a.media.customData.playerConfiguration));var d=c?c.abr:null;d&&typeof d.defaultBandwidthEstimate===_.zd?b.initialBandwidth=d.defaultBandwidthEstimate:b.initialBandwidth=void 0;SK(c,b);return b};_.h.getTextDisplayer=function(){return null};
|
|
84
|
+
_.h.setDrmCustomDataModifier=function(){};_.h.setCdnErrorCallback=function(){};OK.prototype.getTextDisplayer=OK.prototype.getTextDisplayer;OK.prototype.getNetworkEngine=OK.prototype.getNetworkEngine;OK.prototype.setNetworkEngine=OK.prototype.setNetworkEngine;_.h=Z.prototype;_.h.mb=function(){return"Google Cast Framework"};_.h.nb=function(){return cast.framework.VERSION};_.h.sb=function(){return 0};_.h.ba=function(){return""};_.h.getCreativeId=function(){return""};_.h.getApiFramework=function(){return null};_.h.getAdSystem=function(){return""};_.h.getAdvertiserName=function(){return""};_.h.getTitle=function(){return this.a.title||""};_.h.getDuration=function(){return this.a.duration||0};_.h.getSkipTimeOffset=function(){return this.a.whenSkippable||0};
|
|
85
|
+
_.h.bc=function(){return!1};_.h.Hb=function(){return this.a.clickThroughUrl||null};_.h.getMediaUrl=function(){return this.a.contentUrl||this.a.contentId||null};_.h.pb=function(){return 0};_.h.ob=function(){return 0};_.h.ab=function(){return 0};_.h.Qa=function(){switch(this.Ib()){case 0:return 0;case -1:return 2;default:return 1}};_.h.getPodIndex=function(){return this.g};_.h.Ib=function(){return this.f.position};_.h.Jb=function(){return this.h};_.h.rb=function(){return this.j};
|
|
86
86
|
_.h.getWrapperAdIds=function(){return[]};_.h.getWrapperAdSystems=function(){return[]};_.h.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.rb;Z.prototype.getPositionInSequence=Z.prototype.Jb;Z.prototype.getPodTimeOffset=Z.prototype.Ib;Z.prototype.getPodIndex=Z.prototype.getPodIndex;
|
|
87
|
-
Z.prototype.getPodType=Z.prototype.Qa;Z.prototype.getMediaBitrate=Z.prototype
|
|
88
|
-
Z.prototype.getAdSystem=Z.prototype.getAdSystem;Z.prototype.getApiFramework=Z.prototype.getApiFramework;Z.prototype.getCreativeId=Z.prototype.getCreativeId;Z.prototype.getId=Z.prototype.ba;Z.prototype.getTechnology=Z.prototype.sb;Z.prototype.getAdManagerVersion=Z.prototype.nb;Z.prototype.getAdManagerName=Z.prototype.mb;
|
|
89
|
-
_.h.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.zd?a:-1};_.h.dispose=function(){var a=this;return _.z(function(b){
|
|
90
|
-
_.h.Ug=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=
|
|
91
|
-
_.
|
|
92
|
-
|
|
93
|
-
_.h.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=cast.framework.CastReceiverContext.getInstance(),b=a.getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[
|
|
94
|
-
d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.ti.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(
|
|
95
|
-
_.h.stop=function(){if(this.a){this.a=!1;this.o.release();var a=cast.framework.CastReceiverContext.getInstance();a.getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(
|
|
96
|
-
_.h.off=function(a,b){cast.framework.CastReceiverContext.getInstance().removeEventListener(a,b)};_.h.addMessageListener=function(a){typeof a===_.
|
|
87
|
+
Z.prototype.getPodType=Z.prototype.Qa;Z.prototype.getMediaBitrate=Z.prototype.ab;Z.prototype.getMediaHeight=Z.prototype.ob;Z.prototype.getMediaWidth=Z.prototype.pb;Z.prototype.getMediaUrl=Z.prototype.getMediaUrl;Z.prototype.getClickThroughUrl=Z.prototype.Hb;Z.prototype.isBumper=Z.prototype.bc;Z.prototype.getSkipTimeOffset=Z.prototype.getSkipTimeOffset;Z.prototype.getDuration=Z.prototype.getDuration;Z.prototype.getTitle=Z.prototype.getTitle;Z.prototype.getAdvertiserName=Z.prototype.getAdvertiserName;
|
|
88
|
+
Z.prototype.getAdSystem=Z.prototype.getAdSystem;Z.prototype.getApiFramework=Z.prototype.getApiFramework;Z.prototype.getCreativeId=Z.prototype.getCreativeId;Z.prototype.getId=Z.prototype.ba;Z.prototype.getTechnology=Z.prototype.sb;Z.prototype.getAdManagerVersion=Z.prototype.nb;Z.prototype.getAdManagerName=Z.prototype.mb;TK.prototype.getCuePoints=function(){return this.a.map(function(a){return a.position})};TK.prototype.Kb=function(){return!!this.a.find(function(a){return 0===a.position})};TK.prototype.bb=function(){return!!this.a.find(function(a){return-1===a.position})};TK.prototype.hasPostroll=TK.prototype.bb;TK.prototype.hasPreroll=TK.prototype.Kb;TK.prototype.getCuePoints=TK.prototype.getCuePoints;_.h=VK.prototype;_.h.load=function(){var a=this;return _.z(function(b){WK&&(WK=!1,aL(a,0));_.w(b)})};_.h.start=function(){return _.z(function(a){UK().play();_.w(a)})};_.h.resume=function(){-1!==this.getPosition()&&UK().play()};_.h.pause=function(){-1!==this.getPosition()&&UK().pause()};_.h.skip=function(){};_.h.getVolume=function(){return this.l.getVolume()||0};_.h.setVolume=function(a){this.l.setVolume(a)};
|
|
89
|
+
_.h.getPosition=function(){var a=this.a&&this.a.getBreakClipCurrentTimeSec();return typeof a===_.zd?a:-1};_.h.dispose=function(){var a=this;return _.z(function(b){UK().removeEventListener(a.f,a.g);_.w(b)})};
|
|
90
|
+
_.h.Ug=function(a){var b=cast.framework.events.EndedReason;switch(a.type){case cast.framework.events.EventType.PLAYER_LOADING:this.a=UK().getBreakManager();this.a.setPlayWatchedBreak(!0);a=this.a.getBreaks();this.l.trigger(new _.E(_.Mb,{adsTimeline:new TK(a)}));break;case cast.framework.events.EventType.BREAK_CLIP_LOADING:$K(this,_.Cb,a);break;case cast.framework.events.EventType.BREAK_STARTED:$K(this,_.vb,a);break;case cast.framework.events.EventType.BREAK_ENDED:$K(this,_.wb,a);break;case cast.framework.events.EventType.BREAK_CLIP_STARTED:$K(this,
|
|
91
|
+
_.Ib,a);break;case cast.framework.events.EventType.BREAK_CLIP_ENDED:a.endedReason===b.SKIPPED?($K(this,_.Hb,a),$K(this,_.Jb,a)):a.endedReason===b.STOPPED?$K(this,_.Jb,a):a.endedReason===b.END_OF_STREAM?($K(this,_.zb,a),$K(this,_.Jb,a)):a.endedReason===b.ERROR&&aL(this,1);break;case cast.framework.events.EventType.PLAYING:$K(this,_.Gb,a);break;case cast.framework.events.EventType.PAUSE:$K(this,_.Eb,a);break;case cast.framework.events.EventType.BUFFERING:a.isBuffering?$K(this,_.xb,a):$K(this,_.Gb,a)}};
|
|
92
|
+
VK.prototype.getPosition=VK.prototype.getPosition;VK.prototype.setVolume=VK.prototype.setVolume;VK.prototype.getVolume=VK.prototype.getVolume;VK.prototype.skip=VK.prototype.skip;VK.prototype.pause=VK.prototype.pause;VK.prototype.resume=VK.prototype.resume;var WK=!1;_.h=bL.prototype;_.h.init=function(a){var b=this;a&&(this.f=new OK,_.gn(a,this.f),this.l=a,this.o.on(window,"unload",function(){return _.z(function(c){return b.l&&b.l.getState()!==_.Hl?_.v(c,UJ(b.l),0):c.H(0)})}))};
|
|
93
|
+
_.h.start=function(){if(!this.a&&window.cast&&cast.framework&&cast.framework.CastReceiverContext){this.a=!0;var a=cast.framework.CastReceiverContext.getInstance(),b=a.getPlayerManager(),c=new cast.framework.CastReceiverOptions;c.customNamespaces={};c.customNamespaces[SJ]=cast.framework.system.MessageType.JSON;var d=new cast.framework.PlaybackConfig;d.manifestHandler=this.ui.bind(this);d.shakaConfig={streaming:{ignoreTextStreamFailures:!0}};c.playbackConfig=d;if(d=this.l&&this.l.getSurface().getMedia())c.mediaElement=
|
|
94
|
+
d;c.disableIdleTimeout=!0;c.maxInactivity=Infinity;b.setMessageInterceptor(cast.framework.messages.MessageType.LOAD,this.ti.bind(this));b.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.start(c);a.addCustomMessageListener(SJ,this.w)}};
|
|
95
|
+
_.h.stop=function(){if(this.a){this.a=!1;this.o.release();var a=cast.framework.CastReceiverContext.getInstance();a.getPlayerManager().removeEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE,this.A);a.removeCustomMessageListener(SJ,this.w);a.stop();this.l=this.f=null}};_.h.cd=function(a){this.j=a};_.h.Ej=function(a){this.m=a};_.h.on=function(a,b){cast.framework.CastReceiverContext.getInstance().addEventListener(a,b)};
|
|
96
|
+
_.h.off=function(a,b){cast.framework.CastReceiverContext.getInstance().removeEventListener(a,b)};_.h.addMessageListener=function(a){typeof a===_.Zc&&this.g.add(a)};_.h.removeMessageListener=function(a){typeof a===_.Zc&&this.g["delete"](a)};_.h.sendMessage=function(a,b){cast.framework.CastReceiverContext.getInstance().sendCustomMessage(SJ,b,WJ(a))};_.h.$b=function(){return this.a};
|
|
97
97
|
_.h.hi=function(){var a=null,b=cast.framework.CastReceiverContext.getInstance().getPlayerManager().getMediaInformation();b&&b.metadata&&(a=b.metadata);return _.H.ya(a)};
|
|
98
|
-
_.h.ui=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return
|
|
99
|
-
for(var k=e[f].getElementsByTagName(_.
|
|
100
|
-
b=cast.framework.CastReceiverContext.getInstance();c=a.getElementsByTagName("StreamIndex");for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.
|
|
101
|
-
_.h.ti=function(a){var b=this,c,d,e,f;return _.z(function(g){switch(g.a){case 1:a.media.customData&&(c=
|
|
102
|
-
c),8);case 8:return _.v(g,_.
|
|
103
|
-
_.h.Xi=function(a){!this.l||a.media.customData&&a.media.customData.local||_.
|
|
104
|
-
|
|
105
|
-
_.h.skip=function(){var a=this.f.a;a&&this.f.sendMessage(
|
|
106
|
-
_.h.nj=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.E(_.
|
|
107
|
-
|
|
98
|
+
_.h.ui=function(a){a=a.trim();if(a.startsWith("#EXTM3U"))return fL(this,a);try{var b=(new DOMParser).parseFromString(a,_.ve)}catch(r){return a}var c=b.getElementsByTagName("MPD")[0];if(c){a=c;this.h.debug("Detected DASH, parsing");b=cast.framework.CastReceiverContext.getInstance();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===_.Ie||g===_.$b){g=e[f].getAttribute(_.qd);
|
|
99
|
+
for(var k=e[f].getElementsByTagName(_.fb),l=k.length-1;0<=l;--l){var m=k[l].getAttribute(_.qd)||g,n=k[l].getAttribute(_.Bc),p=k[l].getAttribute(_.Xe)||void 0,q=k[l].getAttribute(_.$c)||void 0;void 0!==p&&(p=+p);void 0!==q&&(q=+q);b.canDisplayType(m,n,p,q)||e[f].removeChild(k[l])}e[f].getElementsByTagName(_.fb).length||c[d].removeChild(e[f])}}c[d].getElementsByTagName(_.fa).length||a.removeChild(c[d])}return(new XMLSerializer).serializeToString(a)}if(c=b.getElementsByTagName(_.lb)[0]){a=c;this.h.debug("Detected Smooth, parsing");
|
|
100
|
+
b=cast.framework.CastReceiverContext.getInstance();c=a.getElementsByTagName("StreamIndex");for(d=c.length-1;0<=d;--d)if(c[d].getAttribute("Type")===_.Ie){e=c[d].getElementsByTagName(_.db);for(f=e.length-1;0<=f;--f)g=e[f].getAttribute(_.Qa)||void 0,k=e[f].getAttribute(_.Pa)||void 0,void 0!==g&&(g=+g),void 0!==k&&(k=+k),b.canDisplayType(_.Ke,void 0,g,k)||c[d].removeChild(e[f]);c[d].getElementsByTagName(_.db).length||a.removeChild(c[d])}a=(new XMLSerializer).serializeToString(a)}return a};
|
|
101
|
+
_.h.ti=function(a){var b=this,c,d,e,f;return _.z(function(g){switch(g.a){case 1:a.media.customData&&(c=XJ(a.media.customData.playerConfiguration));if(!b.l||!c){g.H(2);break}if(!b.j){g.H(3);break}return _.v(g,Promise.resolve(b.j(c)),4);case 4:c=(d=g.f)||c;case 3:if(!c.ima){g.H(5);break}return _.v(g,YK(a.media,c.ima,b.l.getNetworkEngine()),5);case 5:typeof c.startTime===_.zd&&c.startTime!==a.currentTime&&(a.currentTime=c.startTime);if(a.media.customData.local){g.H(7);break}b.f.B=!0;return _.v(g,_.ln(b.l,
|
|
102
|
+
c),8);case 8:return _.v(g,_.mn(b.l),9);case 9:e=b.l.getLoadedSource(),a.media.contentId=e.url,a.media.contentType=e.type,e.Ab&&(a.media.hlsVideoSegmentFormat=ZJ(e.Ab,_.Bg)),e.audioMimeType&&(a.media.hlsSegmentFormat=ZJ(e.audioMimeType,_.N));case 7:void 0===a.autoplay&&(a.autoplay=b.l.getConfiguration().autoplay);case 2:if(!b.m){g.H(10);break}return _.v(g,Promise.resolve(b.m(a)),11);case 11:(f=g.f)&&(a=f);case 10:return g["return"](a)}})};
|
|
103
|
+
_.h.Xi=function(a){!this.l||a.media.customData&&a.media.customData.local||_.on(this.l)};_.h.Og=function(a){if(0<this.g.size){var b=XJ(a.data);this.g.forEach(function(c){return c(b)})}};_.A(RJ,bL);bL.prototype.getContentMetadata=bL.prototype.hi;bL.prototype.isApiReady=bL.prototype.$b;bL.prototype.sendMessage=bL.prototype.sendMessage;bL.prototype.removeMessageListener=bL.prototype.removeMessageListener;bL.prototype.addMessageListener=bL.prototype.addMessageListener;bL.prototype.off=bL.prototype.off;
|
|
104
|
+
bL.prototype.on=bL.prototype.on;bL.prototype.setLoadRequestDataInterceptor=bL.prototype.Ej;bL.prototype.setPlayerConfigInterceptor=bL.prototype.cd;bL.prototype.stop=bL.prototype.stop;bL.prototype.start=bL.prototype.start;bL.prototype.init=bL.prototype.init;bL.getInstance=dL;var cL=null;_.h=gL.prototype;_.h.load=function(){var a=this,b,c,d,e,f;return _.z(function(g){a.a=a.f.o;if(a.a)for(b=a.a.controller,c=a.nj.bind(a),d=_.t(a.h),e=d.next();!e.done;e=d.next())f=e.value,a.g.on(b,f,c);_.w(g)})};_.h.start=function(){return _.z(function(a){_.w(a)})};_.h.resume=function(){this.a&&this.a.isPlayingBreak&&this.a.isPaused&&this.a.controller.playOrPause()};_.h.pause=function(){this.a&&this.a.isPlayingBreak&&!this.a.isPaused&&this.a.controller.playOrPause()};
|
|
105
|
+
_.h.skip=function(){var a=this.f.a;a&&this.f.sendMessage(TJ,{type:"SKIP_AD",requestId:Math.round(1E3*Math.random()),mediaSessionId:a.mediaSessionId})};_.h.getVolume=function(){return this.f.getVolume()||0};_.h.setVolume=function(a){this.f.setVolume(a)};_.h.getPosition=function(){var a=-1,b=this.f.a;b&&(b=b.getEstimatedBreakClipTime(),typeof b===_.zd&&(a=b));return a};_.h.dispose=function(){var a=this;return _.z(function(b){a.g.release();_.w(b)})};
|
|
106
|
+
_.h.nj=function(a){switch(a.field){case "mediaInfo":a.value&&(a=a.value,a.breaks&&this.f.trigger(new _.E(_.Mb,{adsTimeline:new TK(a.breaks)})));break;case "isPlayingBreak":a.value?iL(this,_.vb):(iL(this,_.zb),iL(this,_.Jb),iL(this,_.wb));break;case "currentBreakClipNumber":0<=a.value&&(0<a.value&&(iL(this,_.zb),iL(this,_.Jb)),iL(this,_.Ib));break;case "isPaused":this.a.isPlayingBreak&&(a.value?iL(this,_.Eb):iL(this,_.Gb))}};gL.prototype.getPosition=gL.prototype.getPosition;
|
|
107
|
+
gL.prototype.setVolume=gL.prototype.setVolume;gL.prototype.getVolume=gL.prototype.getVolume;gL.prototype.skip=gL.prototype.skip;gL.prototype.pause=gL.prototype.pause;gL.prototype.resume=gL.prototype.resume;jL.prototype.name=function(){return"clpp.cast.ads.SenderAdsManagerFactory"};jL.prototype.W=function(a,b){return a.namespace()!==_.xc?!1:!(!b||!b.ima)};jL.prototype.create=function(a){return new gL(a.a)};jL.prototype.create=jL.prototype.create;jL.prototype.isSupported=jL.prototype.W;jL.prototype.name=jL.prototype.name;_.rm(new jL);kL.prototype.name=function(){return"clpp.cast.ads.AdsManagerFactory"};kL.prototype.W=function(a,b){return dL().$b()?!(!b||!b.ima):!1};kL.prototype.create=function(a){return new VK(a)};kL.prototype.create=kL.prototype.create;kL.prototype.isSupported=kL.prototype.W;kL.prototype.name=kL.prototype.name;_.rm(new kL);};
|
|
108
108
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
109
109
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
110
110
|
else{_=this.clpp._;(f.call(g,this));}
|