@castlabs/prestoplay 6.30.0 → 6.31.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 +247 -179
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +19 -7
- package/cjs/cl.cast.js +120 -120
- package/cjs/cl.conviva.js +31 -31
- package/cjs/cl.core.js +567 -566
- package/cjs/cl.crypto.js +10 -10
- package/cjs/cl.dash.js +95 -92
- package/cjs/cl.externs.js +224 -40
- package/cjs/cl.freewheel.js +26 -25
- package/cjs/cl.hls.js +79 -78
- package/cjs/cl.hlssmpte.js +4 -4
- package/cjs/cl.htmlcue.js +19 -19
- package/cjs/cl.ima.js +26 -25
- package/cjs/cl.mediatailor.js +3 -3
- package/cjs/cl.mse.js +352 -350
- package/cjs/cl.muxdata.js +13 -13
- package/cjs/cl.onboard.js +2 -2
- package/cjs/cl.persistent.js +13 -13
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.simid.js +10 -10
- package/cjs/cl.smooth.js +71 -71
- package/cjs/cl.thumbnails.js +16 -16
- package/cjs/cl.tizen.js +72 -72
- package/cjs/cl.ttml.js +15 -15
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +11 -11
- package/cjs/cl.vr.js +12 -12
- package/cjs/cl.vtt.js +12 -12
- package/cjs/cl.yospace.js +4 -4
- package/cjs/cl.youbora.js +35 -35
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +14 -6
- package/cl.cast.js +99 -98
- package/cl.conviva.js +26 -26
- package/cl.core.js +413 -412
- package/cl.crypto.js +8 -8
- package/cl.dash.js +87 -84
- package/cl.externs.js +225 -37
- package/cl.freewheel.js +20 -19
- package/cl.hls.js +76 -76
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +20 -19
- package/cl.mediatailor.js +2 -2
- package/cl.mse.js +299 -300
- package/cl.muxdata.js +12 -12
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +10 -10
- package/cl.playlist.js +5 -5
- package/cl.simid.js +14 -14
- package/cl.smooth.js +62 -60
- package/cl.thumbnails.js +17 -17
- package/cl.tizen.js +55 -55
- 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.yospace.js +3 -3
- package/cl.youbora.js +31 -31
- package/package.json +8 -7
- package/typings.d.ts +85 -61
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 NX=function(){this.m=this.f=null;this.a="";this.g=new _.M("clpp.adobe.AdobePlugin")},QX=function(a){a.f=new _.wi;a.f.on(a.m,_.Ng,function(){return OX(a)});a.f.on(a.m,_.Mg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Le,function(){return PX(a)});a.f.on(a.m,_.ig,function(b){b=b.detail;switch(b.currentState){case 3:a.a.length||PX(a);s.Media.play(a.a,a.m.getPosition());break;case 4:case 2:OX(a);break;case 5:case _.du:case _.Bo:a.g.info("Close session for "+a.a+" in player state "+
|
|
3
|
+
(b.currentState+".")),OX(a),s.Media.close(a.a),a.a=""}})},PX=function(a){var b=a.m.getLoadedSource();a.a=b?b.name||b.url:"";a.g.info("Open session for "+a.a+" with duration "+a.m.getDuration());s.Media.open(a.a,a.m.getDuration(),_.ya)},OX=function(a){s.Media.stop(a.a,a.m.getPosition())},RX=function(){};_.w(NX,_.Yv);NX.prototype.onPlayerCreated=function(a){var b=a.getConfiguration().adobe;b&&!1===b.enabled?this.g.debug("Adobe plugin is disabled."):window.s&&s.Media?(this.m=a,QX(this)):this.g.warn("Adobe API not available.")};
|
|
4
|
+
NX.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};NX.prototype.id=function(){return"adobe"};_.K("clpp.adobe.AdobeAnalyticsPlugin",NX);NX.Id="adobe";RX.prototype.create=function(){return new NX};_.bp(new RX);};
|
|
5
5
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
6
6
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
7
7
|
else{_=this.clpp._;(f.call(g,this));}
|
package/cjs/cl.airplay.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
_.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.
|
|
4
|
-
_.r.
|
|
2
|
+
var f=function(window){var LX=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.ej(function(){a.m.play()["catch"](function(){})});this.h=new _.wi},MX=function(){};_.w(LX,_.Yv);_.r=LX.prototype;_.r.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.r.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.zn.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.ho.bind(this)))};
|
|
3
|
+
_.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.zn=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.Q(_.Ic,{canCast:this.f}))};_.r.ho=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Hc:_.Gc;if(this.l||!this.m.isPaused()||3===this.m.getState())this.l?this.m.play()["catch"](function(){}):this.o.ia(.01);this.m.trigger(new _.Q(a))};_.r.Ea=function(){return this.j};
|
|
4
|
+
_.r.pd=function(){return this.f};_.r.Uo=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.K("clpp.airplay.AirPlayPlugin",LX);LX.prototype.showCastMenu=LX.prototype.Uo;LX.prototype.canCast=LX.prototype.pd;LX.prototype.isCasting=LX.prototype.Ea;LX.Id="airplay";MX.prototype.create=function(){return new LX};_.bp(new MX);};
|
|
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,11 +1,23 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var yX=function(a,b){this.
|
|
3
|
-
|
|
4
|
-
function(
|
|
5
|
-
_.
|
|
6
|
-
|
|
7
|
-
_.r.
|
|
8
|
-
_.
|
|
2
|
+
var f=function(window){var yX=function(a,b,c){this.a=a||{};this.f=b||{};this.w=c||0;this.o=0;this.l=this.j=this.h=!1},zX=function(a,b){this.m=a;this.f=b;this.a=new _.wi;this.h=!1},AX=function(a){this.m=a;this.l=new _.wi;this.h=this.j=this.f=this.a=null;this.o=this.un.bind(this)},BX=function(a){var b=a.m.getSurface().getMedia();b&&(a.h=a.fo.bind(a),b.addEventListener("click",a.h))},CX=function(a){a.l.off(a.m,_.zg,a.o)},DX=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.f=_.Lj();d.a=0;return d}_.w(b,
|
|
3
|
+
GenericPlayerApi);b.prototype.getPlayerName=function(){return _.ya};b.prototype.getVersion=function(){return _.ia};b.prototype.getOSName=function(){return this.f.os};b.prototype.getDeviceVersion=function(){return this.f.osVersion.name};b.prototype.getDeviceType=function(){return"browser"};b.prototype.getTotalDuration=function(){return this.m.isLive()?0:this.a=1E3*this.m.getDuration()};b.prototype.getCurrentPosition=function(){var c=1E3*this.m.getPosition();return 5===this.m.getState()?Math.max(c,
|
|
4
|
+
this.a):c};b.prototype.getCurrentBitrate=function(){var c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3};b.prototype.getCapabilities=function(){return{adTracking:this.m.getConfiguration().broadpeak.adTracking}};return new b(a)},EX=function(){this.o=this.f=this.a=this.h=this.m=null;this.w=new _.wi;this.l=!1;this.j=null},FX=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.h||(a.h=SmartLib.getInstance(),a.h.init(c,d,e),typeof f===
|
|
5
|
+
_.lg&&a.h.setUUID(f))},GX=function(a,b,c){var d=c.customParameters||{};a.a=a.h.createStreamingSession();a.a.setOption(StreamingSessionOptions.SESSION_PRECACHE,!0);for(var e in d)a.a.setCustomParameter(e,d[e]);c.adTracking&&(a.j=b.getAdsManager(),a.j.initialize(a.a,c.adParameters||{}));a.w.on(b,_.qe,a.zk.bind(a));a.o=DX(b);a.a.attachPlayer(a.o)},HX=function(a,b){_.zi(a.w);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},IX=function(){return!window.SmartLib||!window.GenericPlayerApi},
|
|
6
|
+
JX=function(){},KX=function(){};_.r=yX.prototype;_.r.jb=function(){return"Broadpeak"};_.r.kb=function(){return""};_.r.nb=function(){return 1};_.r.getId=function(){return this.a.adId};_.r.getCreativeId=function(){return this.a.creativeId};_.r.Hb=function(){return null};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return""};_.r.getDuration=function(){return 0>=this.a.duration?-1:this.a.duration/1E3};
|
|
7
|
+
_.r.getPosition=function(){return this.o};_.r.getSkipTimeOffset=function(){return 0===this.a.skipPosition?-1:(this.a.skipPosition-this.a.startPosition)/1E3};_.r.Jb=function(){return!1};_.r.$a=function(){return this.a.clickURL};_.r.getMediaUrl=function(){return null};_.r.eb=function(){return 0};_.r.cb=function(){return 0};_.r.Ga=function(){return 0};_.r.Ha=function(){return 0===this.f.startPosition?0:0<this.w&&this.f.startPosition+this.f.duration>=this.w?2:1};_.r.getPodIndex=function(){return 1};
|
|
8
|
+
_.r.yb=function(){return this.f.startPosition/1E3};_.r.lb=function(){return this.a.index+1};_.r.fb=function(){return 0>=this.f.adCount?-1:this.f.adCount};_.r.getWrapperAdIds=function(){return[]};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.Ib=function(){return null};_.r.canSeek=function(){return!1};yX.prototype.canSeek=yX.prototype.canSeek;yX.prototype.getVideoElement=yX.prototype.Ib;yX.prototype.getWrapperCreativeIds=yX.prototype.getWrapperCreativeIds;
|
|
9
|
+
yX.prototype.getWrapperAdSystems=yX.prototype.getWrapperAdSystems;yX.prototype.getWrapperAdIds=yX.prototype.getWrapperAdIds;yX.prototype.getSequenceLength=yX.prototype.fb;yX.prototype.getPositionInSequence=yX.prototype.lb;yX.prototype.getPodTimeOffset=yX.prototype.yb;yX.prototype.getPodIndex=yX.prototype.getPodIndex;yX.prototype.getPodType=yX.prototype.Ha;yX.prototype.getMediaBitrate=yX.prototype.Ga;yX.prototype.getMediaHeight=yX.prototype.cb;yX.prototype.getMediaWidth=yX.prototype.eb;
|
|
10
|
+
yX.prototype.getMediaUrl=yX.prototype.getMediaUrl;yX.prototype.getClickThroughUrl=yX.prototype.$a;yX.prototype.isBumper=yX.prototype.Jb;yX.prototype.getSkipTimeOffset=yX.prototype.getSkipTimeOffset;yX.prototype.getPosition=yX.prototype.getPosition;yX.prototype.getDuration=yX.prototype.getDuration;yX.prototype.getTitle=yX.prototype.getTitle;yX.prototype.getAdvertiserName=yX.prototype.getAdvertiserName;yX.prototype.getAdSystem=yX.prototype.getAdSystem;yX.prototype.getApiFramework=yX.prototype.getApiFramework;
|
|
11
|
+
yX.prototype.getSourceId=yX.prototype.Hb;yX.prototype.getCreativeId=yX.prototype.getCreativeId;yX.prototype.getId=yX.prototype.getId;yX.prototype.getTechnology=yX.prototype.nb;yX.prototype.getAdManagerVersion=yX.prototype.kb;yX.prototype.getAdManagerName=yX.prototype.jb;_.r=zX.prototype;_.r.init=function(){var a=this.m,b=this.a;b.on(a,_.ig,this.Ck.bind(this));b.on(a,_.ad,this.Ak.bind(this));b.on(a,"seek",this.Bk.bind(this))};_.r.Ak=function(a){a=a.detail;typeof a.bandwidth===_.h&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.Ck=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;2===a.previousState&&c.notifyStallEnd(!b.isPaused());switch(d){case 2:c.notifyStallStart();break;case 3:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case 4:c.notifyPause()}};
|
|
12
|
+
_.r.Bk=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.zi(this.a),this.a=null)};_.r=AX.prototype;
|
|
13
|
+
_.r.initialize=function(a,b){var c=this;this.j=a;a.activateAdvertising();BX(this);for(var d in b)a.setAdParameter(d,b[d]);a.setAdEventsListener({onAdBreakBegin:function(){c.m.trigger(new _.Q(_.jc,{ad:null}));c.l.on(c.m,_.zg,c.o)},onAdBegin:function(e,f){c.f=e;c.a=new yX(e,f,1E3*c.m.getDuration());c.m.trigger(new _.Q(_.Bc,{ad:c.a}))},onAdSkippable:function(){},onAdEnd:function(){if(c.a){var e={ad:c.a};c.m.trigger(new _.Q(_.nc,e));c.m.trigger(new _.Q(_.Cc,e));c.a=null;c.f=null}},onAdBreakEnd:function(){CX(c);c.m.trigger(new _.Q(_.kc));
|
|
14
|
+
c.a=null}})};_.r.fo=function(){if(this.a&&this.j){var a=this.a.$a();a&&(this.j.adUserInteraction("click"),this.m.trigger(new _.Q(_.mc,{ad:this.a})),this.m.pause(),(a=window.open(a,"_blank"))&&a.focus())}};
|
|
15
|
+
_.r.un=function(){if(this.a&&this.f){var a=this.m.getPosition()-this.f.startPosition/1E3,b=this.a.getDuration();0<b&&a>b||(this.a.o=a,this.m.trigger(new _.Q(_.yc,{ad:this.a})),!this.a.h&&a>=b/4&&(this.a.h=!0,this.m.trigger(new _.Q(_.oc,{ad:this.a}))),!this.a.j&&a>=b/2&&(this.a.j=!0,this.m.trigger(new _.Q(_.wc,{ad:this.a}))),!this.a.l&&a>=3*b/4&&(this.a.l=!0,this.m.trigger(new _.Q(_.Dc,{ad:this.a}))))}};_.r.load=function(){return Promise.resolve()};_.r.Ab=function(){return!0};_.r.Nc=function(){};
|
|
16
|
+
_.r.Kc=function(){return!0};_.r.skip=function(){if(this.a){var a=this.a.getPosition(),b=this.a.getSkipTimeOffset();-1===b||a<b||(a=this.m.getPosition()-a+this.a.getDuration(),b=this.a,this.f=this.a=null,CX(this),this.m.trigger(new _.Q(_.Ac,{ad:b})),this.m.seek(a))}};_.r.pb=function(){};_.r.isPaused=function(){};_.r.pause=function(){};_.r.resume=function(){};_.r.getAdVolume=function(){return 0};_.r.Oa=function(){};_.r.getVolume=function(){return 0};_.r.setVolume=function(){};_.r.setMuted=function(){};
|
|
17
|
+
_.r.isMuted=function(){return!1};_.r.jc=function(){return!1};_.r.getPosition=function(){return this.a?this.a.getPosition():-1};_.r.xc=function(){CX(this);this.l.release();var a=this.m.getSurface().getMedia();a&&this.h&&(a.removeEventListener("click",this.h),this.h=null);this.j=this.f=this.a=null;return Promise.resolve()};AX.prototype.getPosition=AX.prototype.getPosition;AX.prototype.setVolume=AX.prototype.setVolume;AX.prototype.getVolume=AX.prototype.getVolume;AX.prototype.resume=AX.prototype.resume;
|
|
18
|
+
AX.prototype.pause=AX.prototype.pause;AX.prototype.skip=AX.prototype.skip;_.w(EX,_.Yv);_.r=EX.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(IX())return a.onError(new _.O(1,9,11E3));this.l=!0;FX(this,d);GX(this,a,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.m.onError(new _.O(1,9,11001,{bpkErrorCode:f,message:e}));HX(c,void 0)}else b.url=e.getURL(),c.f=new zX(c.m,c.o),c.f.init()})}};
|
|
19
|
+
_.r.onContentLoaded=function(){!1!==this.l&&this.a.precacheEnded()};_.r.zk=function(a){a=a.detail;if(7003===a.code)HX(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.P)switch(a.category){case 3:HX(this,SmartLib.BPDecodingError);break;case 1:HX(this,SmartLib.BPNetworkingError);break;case 6:HX(this,SmartLib.BPAccessRightError);break;default:HX(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){this.j=null;IX()||HX(this,SmartLib.BPSessionEndsNormally);this.l=!1};
|
|
20
|
+
_.r.id=function(){return"broadpeak"};_.K("clpp.broadpeak.BroadpeakPlugin",EX);EX.isSdkMissing=IX;EX.Id="broadpeak";JX.prototype.create=function(){return new EX};KX.prototype.name=function(){return"clpp.broadpeak.AdsManagerFactory"};KX.prototype.a=function(a,b){return IX()?!1:!!(b&&b.broadpeak&&b.broadpeak.adTracking)};KX.prototype.create=function(a){return new AX(a)};_.bp(new JX);_.ei(new KX);};
|
|
9
21
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
10
22
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
11
23
|
else{_=this.clpp._;(f.call(g,this));}
|