@castlabs/prestoplay 6.25.2 → 6.27.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 +38 -0
- package/README.md +5 -5
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +7 -7
- package/cjs/cl.cast.js +115 -114
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +620 -620
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +89 -88
- package/cjs/cl.externs.js +89 -51
- package/cjs/cl.freewheel.js +25 -25
- package/cjs/cl.hls.js +79 -77
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +24 -24
- package/cjs/cl.mediatailor.js +3 -3
- package/cjs/cl.mse.js +351 -336
- package/cjs/cl.muxdata.js +15 -15
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +15 -15
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.sessions.js +16 -16
- package/cjs/cl.simid.js +17 -17
- package/cjs/cl.smooth.js +72 -72
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +73 -72
- package/cjs/cl.ttml.js +29 -29
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +12 -12
- package/cjs/cl.vr.js +19 -19
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.yospace.js +4 -4
- package/cjs/cl.youbora.js +39 -37
- package/cjs/polyfill.min.js +15 -3
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +92 -90
- package/cl.conviva.js +27 -27
- package/cl.core.js +496 -500
- package/cl.crypto.js +9 -9
- package/cl.dash.js +82 -82
- package/cl.externs.js +89 -51
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +80 -80
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +17 -17
- package/cl.mediatailor.js +3 -3
- package/cl.mse.js +305 -294
- package/cl.muxdata.js +13 -13
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +11 -11
- package/cl.playlist.js +5 -5
- package/cl.sessions.js +10 -10
- package/cl.simid.js +14 -14
- package/cl.smooth.js +60 -60
- package/cl.thumbnails.js +19 -19
- package/cl.tizen.js +57 -57
- package/cl.ttml.js +22 -22
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +8 -8
- package/cl.vr.js +15 -15
- package/cl.vtt.js +12 -12
- package/cl.yospace.js +3 -3
- package/cl.youbora.js +29 -28
- package/package.json +3 -3
- package/typings.d.ts +124 -3
package/cjs/cl.freewheel.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
this.f=this.a=null;this.B=[];this.o=[];this.A=[];this.l=new _.
|
|
4
|
-
_.x(e,a.canPlay(!1),2);if(3!=e.a)return c=e.f,_.x(e,a.canPlay(!0),3);d=e.f;c?b=tv.freewheel.SDK.VIDEO_ASSET_AUTO_PLAY_TYPE_ATTENDED:d&&(b=tv.freewheel.SDK.VIDEO_ASSET_AUTO_PLAY_TYPE_UNATTENDED);return e["return"](b)})},
|
|
5
|
-
a.a.registerVideoDisplayBase(
|
|
6
|
-
_.r.onPlayerCreated=function(a){if(window.tv&&tv.freewheel&&tv.freewheel.SDK)this.a=_.
|
|
7
|
-
_.
|
|
8
|
-
_.r.getTitle=function(){return""};_.r.getDuration=function(){return this.a?this.a.getActiveCreativeRendition().getDuration():0};_.r.getPosition=function(){return 0};_.r.getSkipTimeOffset=function(){return 0};_.r.
|
|
9
|
-
_.r.
|
|
10
|
-
_.r.getPodIndex=function(){switch(this.
|
|
11
|
-
_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
_.r.load=function(){var a=this,b,c,d,e,f,g,h,l;return _.
|
|
17
|
-
_.
|
|
18
|
-
g.next())l=h.value,a.a.setParameter(l.name,l.value,l.level);a.h.on(a.a,tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,a.
|
|
19
|
-
_.r.resume=function(){this.f&&this.f.resume()};_.r.pause=function(){this.f&&this.f.pause()};_.r.skip=function(){this.f&&this.f.skipCurrentAd()};_.r.getVolume=function(){return this.a?this.a.getAdVolume():1};_.r.setVolume=function(a){this.a&&this.a.setAdVolume(a)};_.r.getPosition=function(){return this.f?this.f.getPlayheadTime():-1};_.r.
|
|
20
|
-
_.r.
|
|
21
|
-
void 0));this.l.resolve()};_.r.
|
|
22
|
-
_.r.
|
|
23
|
-
_.
|
|
24
|
-
fwModule:a[tv.freewheel.SDK.INFO_KEY_ERROR_MODULE]}))}};_.r.
|
|
25
|
-
_.r.
|
|
26
|
-
|
|
2
|
+
var f=function(window){var RV="clpp-freewheel",SV="clpp.freewheel.AdsManagerFactory",TV="freewheel",UV=function(){this.f=this.a=null},VV=function(){},WV=function(a){switch(a){case 0:return tv.freewheel.SDK.ADUNIT_PREROLL;case 1:return tv.freewheel.SDK.ADUNIT_MIDROLL;case 2:return tv.freewheel.SDK.ADUNIT_POSTROLL;default:return""}},XV=function(a,b,c){this.h=a;this.f=b;this.a=c},YV=function(a){this.a=a},ZV=function(a){this.g=new _.K("clpp.freewheel.AdsManager");this.m=a;this.h=new _.gi;this.w=new tv.freewheel.SDK.AdManager;
|
|
3
|
+
this.f=this.a=null;this.B=[];this.o=[];this.A=[];this.l=new _.gk;this.j=null},$V=function(a){var b=[];typeof a.networkId!==_.k&&b.push("networkId");typeof a.serverUrl!==_.eg&&b.push("serverUrl");typeof a.profileId!==_.eg&&b.push("profileId");typeof a.videoAssetId!==_.eg&&typeof a.videoAssetId!==_.k&&b.push("videoAssetId");if(b.length)throw new _.O(1,9,12001,{missingKeys:b.join(", ")});},aW=function(){var a,b,c,d;return _.I(function(e){if(1==e.a)return a=new _.kv,b=tv.freewheel.SDK.VIDEO_ASSET_AUTO_PLAY_TYPE_NONE,
|
|
4
|
+
_.x(e,a.canPlay(!1),2);if(3!=e.a)return c=e.f,_.x(e,a.canPlay(!0),3);d=e.f;c?b=tv.freewheel.SDK.VIDEO_ASSET_AUTO_PLAY_TYPE_ATTENDED:d&&(b=tv.freewheel.SDK.VIDEO_ASSET_AUTO_PLAY_TYPE_UNATTENDED);return e["return"](b)})},dW=function(a){return _.I(function(b){if(a.B.length)return bW(a),a.f=a.B.shift(),a.f.play(),b.C(0);cW(a);return _.x(b,a.m.a.play(),0)})},eW=function(a){a.A.length?(bW(a),a.f=a.A.shift(),a.f.play()):cW(a)},bW=function(a){var b=a.m.be(TV).md();b&&(a.m.getSurface().show(b),a.m.getSurface().hideMediaElement(),
|
|
5
|
+
a.a.registerVideoDisplayBase(RV),a.m.isMuted()?a.setVolume(0):a.setVolume(a.m.getVolume()||1))},cW=function(a){var b=a.m.be(TV).md();b&&a.m.getSurface().hide(b);a.m.getSurface().showMediaElement()},fW=function(a,b,c){var d=null;a.a&&c&&(c.adInstance||c.slot)&&(c=(d=c.adInstance||null)?d.getSlot():c.slot,d={ad:new XV(a.a,c,d)});a.m.trigger(new _.M(b,d))},gW=function(){this.Ca=new _.K(SV)};_.w(UV,_.Hv);_.r=UV.prototype;
|
|
6
|
+
_.r.onPlayerCreated=function(a){if(window.tv&&tv.freewheel&&tv.freewheel.SDK)this.a=_.xr(_.Od,{id:RV}),this.f=_.xr(_.Jg,{"class":_.ld}),this.a.appendChild(this.f),a.getSurface().addElementToContainer(this.a,!0),a.getSurface().hide(this.a);else a.onError(new _.O(1,9,12E3))};_.r.onPlayerWillDestroy=function(a){this.a&&(a.getSurface().removeElementFromContainer(this.a),this.f=this.a=null)};_.r.id=function(){return TV};_.r.md=function(){return this.a};_.r.Gl=function(){return this.f};
|
|
7
|
+
_.J("clpp.freewheel.FreeWheelPlugin",UV);UV.prototype.getAdVideo=UV.prototype.Gl;UV.prototype.getAdContainer=UV.prototype.md;UV.Id=TV;UV.AD_CONTAINER_ID=RV;VV.prototype.create=function(){return new UV};_.ru(new VV);_.r=XV.prototype;_.r.ub=function(){return"FreeWheel AdManager SDK"};_.r.vb=function(){return tv.freewheel.SDK.version};_.r.Ab=function(){return 0};_.r.getId=function(){return this.a?this.a.getAdId():""};_.r.getCreativeId=function(){var a=(this.a||{})._creativeId;return typeof a===_.eg?a:""};_.r.Xb=function(){return""};_.r.getApiFramework=function(){return this.a?this.a.getActiveCreativeRendition().getCreativeApi():""};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};
|
|
8
|
+
_.r.getTitle=function(){return""};_.r.getDuration=function(){return this.a?this.a.getActiveCreativeRendition().getDuration():0};_.r.getPosition=function(){return 0};_.r.getSkipTimeOffset=function(){return 0};_.r.ac=function(){return!1};_.r.wb=function(){return this.a&&this.a.getEventCallbackUrls(tv.freewheel.SDK.EVENT_AD_CLICK,tv.freewheel.SDK.EVENT_TYPE_CLICK)[0]||""};_.r.getMediaUrl=function(){return this.a?this.a.getActiveCreativeRendition().getPrimaryCreativeRenditionAsset().getUrl():""};
|
|
9
|
+
_.r.kb=function(){return this.a?this.a.getActiveCreativeRendition().getWidth():0};_.r.jb=function(){return this.a?this.a.getActiveCreativeRendition().getHeight():0};_.r.Va=function(){return 0};_.r.Wa=function(){switch(this.f.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL:return 0;case tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL:return 2;default:return 1}};
|
|
10
|
+
_.r.getPodIndex=function(){switch(this.Wa()){case 0:return 0;case 2:return-1}return this.h.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL).indexOf(this.f)+1};_.r.Lb=function(){switch(this.Wa()){case 0:return 0;case 2:return-1;default:return this.f.getTimePosition()}};_.r.yb=function(){return this.a?this.f.getAdInstances().indexOf(this.a)+1:1};_.r.lb=function(){return this.f.getAdCount()};_.r.getWrapperAdIds=function(){return[]};_.r.canSeek=function(){return!1};
|
|
11
|
+
_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.$b=function(){return null};XV.prototype.getVideoElement=XV.prototype.$b;XV.prototype.getWrapperCreativeIds=XV.prototype.getWrapperCreativeIds;XV.prototype.getWrapperAdSystems=XV.prototype.getWrapperAdSystems;XV.prototype.canSeek=XV.prototype.canSeek;XV.prototype.getWrapperAdIds=XV.prototype.getWrapperAdIds;XV.prototype.getSequenceLength=XV.prototype.lb;XV.prototype.getPositionInSequence=XV.prototype.yb;
|
|
12
|
+
XV.prototype.getPodTimeOffset=XV.prototype.Lb;XV.prototype.getPodIndex=XV.prototype.getPodIndex;XV.prototype.getPodType=XV.prototype.Wa;XV.prototype.getMediaBitrate=XV.prototype.Va;XV.prototype.getMediaHeight=XV.prototype.jb;XV.prototype.getMediaWidth=XV.prototype.kb;XV.prototype.getMediaUrl=XV.prototype.getMediaUrl;XV.prototype.getClickThroughUrl=XV.prototype.wb;XV.prototype.isBumper=XV.prototype.ac;XV.prototype.getSkipTimeOffset=XV.prototype.getSkipTimeOffset;XV.prototype.getPosition=XV.prototype.getPosition;
|
|
13
|
+
XV.prototype.getDuration=XV.prototype.getDuration;XV.prototype.getTitle=XV.prototype.getTitle;XV.prototype.getAdvertiserName=XV.prototype.getAdvertiserName;XV.prototype.getAdSystem=XV.prototype.getAdSystem;XV.prototype.getApiFramework=XV.prototype.getApiFramework;XV.prototype.getSourceId=XV.prototype.Xb;XV.prototype.getCreativeId=XV.prototype.getCreativeId;XV.prototype.getId=XV.prototype.getId;XV.prototype.getTechnology=XV.prototype.Ab;XV.prototype.getAdManagerVersion=XV.prototype.vb;
|
|
14
|
+
XV.prototype.getAdManagerName=XV.prototype.ub;YV.prototype.getCuePoints=function(){return this.a.getTemporalSlots().map(function(a){switch(a.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL:return 0;case tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL:return-1;default:return a.getTimePosition()}})};YV.prototype.Nb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL).length};YV.prototype.Mb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL).length};
|
|
15
|
+
YV.prototype.hasPostroll=YV.prototype.Mb;YV.prototype.hasPreroll=YV.prototype.Nb;YV.prototype.getCuePoints=YV.prototype.getCuePoints;_.r=ZV.prototype;
|
|
16
|
+
_.r.load=function(){var a=this,b,c,d,e,f,g,h,l;return _.I(function(m){if(1==m.a){b=a.m.getConfiguration().freewheel||{};try{$V(b)}catch(n){return a.m.onError(n),a.l.resolve(),m["return"](a.l)}a.w.setNetwork(b.networkId);a.w.setServer(b.serverUrl);a.a=a.w.newContext();a.a.setProfile(b.profileId);typeof b.siteSectionId!==_.eg&&typeof b.siteSectionId!==_.k||a.a.setSiteSection(b.siteSectionId);return _.x(m,aW(),2)}c=m.f;a.a.setVideoAsset(b.videoAssetId,a.m.getDuration(),void 0,void 0,c);if(Array.isArray(b.pods))for(d=
|
|
17
|
+
_.v(b.pods),e=d.next();!e.done;e=d.next())f=e.value,a.a.addTemporalSlot(f.id,WV(f.type),f.position,f.slotProfile,f.cuepointSequence,f.maxDuration,f.minDuration,f.acceptContentType);b.keyValues&&typeof b.keyValues===_.Re&&Object.keys(b.keyValues).forEach(function(n){return a.a.addKeyValue(n,b.keyValues[n])});a.a.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);if(Array.isArray(b.parameters))for(g=_.v(b.parameters),h=g.next();!h.done;h=
|
|
18
|
+
g.next())l=h.value,a.a.setParameter(l.name,l.value,l.level);a.h.on(a.a,tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,a.pn.bind(a));a.h.on(a.a,tv.freewheel.SDK.EVENT_SLOT_STARTED,a.un.bind(a));a.h.on(a.a,tv.freewheel.SDK.EVENT_SLOT_ENDED,a.tn.bind(a));a.h.on(a.a,tv.freewheel.SDK.EVENT_AD,a.Im.bind(a));a.h.on(a.m,_.sg,a.vk.bind(a));a.h.on(a.m,_.bg,a.uk.bind(a));a.a.submitRequest();return m["return"](a.l)})};_.r.start=function(){var a=this;return _.I(function(b){return _.x(b,dW(a),0)})};_.r.fd=function(){};
|
|
19
|
+
_.r.resume=function(){this.f&&this.f.resume()};_.r.pause=function(){this.f&&this.f.pause()};_.r.skip=function(){this.f&&this.f.skipCurrentAd()};_.r.getVolume=function(){return this.a?this.a.getAdVolume():1};_.r.setVolume=function(a){this.a&&this.a.setAdVolume(a)};_.r.getPosition=function(){return this.f?this.f.getPlayheadTime():-1};_.r.cd=function(){return!0};_.r.zc=function(){var a=this;return _.I(function(b){a.h.release();a.j&&(a.j.stop(),a.j=null);cW(a);a.a&&(a.a.dispose(),a.a=null);_.z(b)})};
|
|
20
|
+
_.r.pn=function(a){var b=this;if(a.success)this.B=this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL),this.o=this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL),this.A=this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL),this.m.trigger(new _.M(_.Bc,{adsTimeline:new YV(this.a)})),this.j=new _.iv(this.m.getSurface(),function(c,d){return b.a.resize(c,d)},this.m.be(TV).f);else this.m.onError(new _.O(1,9,10003,{errorType:0},
|
|
21
|
+
void 0));this.l.resolve()};_.r.un=function(a){fW(this,_.gc,a);this.j.start()};_.r.tn=function(a){this.f=null;a=a.slot;fW(this,_.hc);this.j.stop();if(a)switch(a.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL:dW(this);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:cW(this);this.m.play();break;case tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL:eW(this)}};
|
|
22
|
+
_.r.Im=function(a){var b=a.subType;this.g.debug("ad event",b);switch(b){case tv.freewheel.SDK.EVENT_AD_IMPRESSION:fW(this,_.wc,a);fW(this,_.pc,a);break;case tv.freewheel.SDK.EVENT_AD_IMPRESSION_END:fW(this,_.yc,a);break;case tv.freewheel.SDK.EVENT_AD_FIRST_QUARTILE:fW(this,_.lc,a);break;case tv.freewheel.SDK.EVENT_AD_MIDPOINT:fW(this,_.rc,a);break;case tv.freewheel.SDK.EVENT_AD_THIRD_QUARTILE:fW(this,_.zc,a);break;case tv.freewheel.SDK.EVENT_AD_COMPLETE:fW(this,_.kc,a);break;case tv.freewheel.SDK.EVENT_AD_CLICK:fW(this,
|
|
23
|
+
_.jc,a);break;case tv.freewheel.SDK.EVENT_AD_PAUSE:fW(this,_.sc,a);break;case tv.freewheel.SDK.EVENT_AD_RESUME:fW(this,_.uc,a);break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:fW(this,_.vc,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_START:fW(this,_.ic,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_END:fW(this,_.tc,a);break;case tv.freewheel.SDK.EVENT_ERROR:this.m.onError(new _.O(1,9,10003,{errorType:1},{fwCode:a[tv.freewheel.SDK.INFO_KEY_ERROR_CODE],fwInfo:a[tv.freewheel.SDK.INFO_KEY_ERROR_INFO],
|
|
24
|
+
fwModule:a[tv.freewheel.SDK.INFO_KEY_ERROR_MODULE]}))}};_.r.vk=function(){var a=this;if(!this.f){var b=this.m.getPosition();if(this.f=this.o.find(function(d){return.5>Math.abs(b-d.getTimePosition())})||null){var c=this.o.findIndex(function(d){return d===a.f});this.o.splice(c,1);this.m.pause();bW(this);this.f.play()}}};
|
|
25
|
+
_.r.uk=function(a){if((a=a.detail)&&this.a)switch(a.currentState){case _.Zq:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PLAYING);break;case _.Yq:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PAUSED);break;case _.Sq:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_COMPLETED);eW(this);break;case _.Lq:case _.Wq:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED)}};ZV.prototype.getPosition=ZV.prototype.getPosition;ZV.prototype.setVolume=ZV.prototype.setVolume;
|
|
26
|
+
ZV.prototype.getVolume=ZV.prototype.getVolume;ZV.prototype.skip=ZV.prototype.skip;ZV.prototype.pause=ZV.prototype.pause;ZV.prototype.resume=ZV.prototype.resume;gW.prototype.name=function(){return SV};gW.prototype.a=function(a,b){return a.namespace()!==_.rd&&b&&b.freewheel?window.tv&&tv.freewheel&&tv.freewheel.SDK?!0:(this.Ca.warn("FreeWheel SDK is not loaded."),!1):!1};gW.prototype.create=function(a){return new ZV(a)};_.rr(new gW);};
|
|
27
27
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
28
28
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
29
29
|
else{_=this.clpp._;(f.call(g,this));}
|