@castlabs/prestoplay 6.26.0 → 6.28.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 +42 -0
- 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 -113
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +623 -623
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +89 -89
- package/cjs/cl.externs.js +112 -72
- package/cjs/cl.freewheel.js +25 -25
- package/cjs/cl.hls.js +78 -77
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +23 -24
- package/cjs/cl.mediatailor.js +3 -3
- package/cjs/cl.mse.js +353 -345
- package/cjs/cl.muxdata.js +14 -15
- package/cjs/cl.onboard.js +4 -3
- package/cjs/cl.persistent.js +15 -15
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.simid.js +16 -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 +38 -38
- package/cjs/polyfill.min.js +15 -3
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +6 -5
- package/cl.cast.js +93 -90
- package/cl.conviva.js +27 -27
- package/cl.core.js +506 -507
- package/cl.crypto.js +9 -9
- package/cl.dash.js +83 -82
- package/cl.externs.js +112 -72
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +80 -79
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +17 -17
- package/cl.mediatailor.js +2 -3
- package/cl.mse.js +308 -305
- 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.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 +31 -29
- package/package.json +1 -1
- package/typings.d.ts +115 -63
- package/cjs/cl.sessions.js +0 -21
- package/cl.sessions.js +0 -10
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
|
-
_.v(b.pods),e=d.next();!e.done;e=d.next())f=e.value,a.a.addTemporalSlot(f.id,
|
|
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 FU="clpp-freewheel",GU="clpp.freewheel.AdsManagerFactory",HU="freewheel",IU=function(){this.f=this.a=null},JU=function(){},KU=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""}},LU=function(a,b,c){this.h=a;this.f=b;this.a=c},MU=function(a){this.a=a},NU=function(a){this.g=new _.L("clpp.freewheel.AdsManager");this.m=a;this.h=new _.ti;this.w=new tv.freewheel.SDK.AdManager;
|
|
3
|
+
this.f=this.a=null;this.B=[];this.o=[];this.A=[];this.l=new _.am;this.j=null},OU=function(a){var b=[];typeof a.networkId!==_.k&&b.push("networkId");typeof a.serverUrl!==_.gg&&b.push("serverUrl");typeof a.profileId!==_.gg&&b.push("profileId");typeof a.videoAssetId!==_.gg&&typeof a.videoAssetId!==_.k&&b.push("videoAssetId");if(b.length)throw new _.N(1,9,12001,{missingKeys:b.join(", ")});},PU=function(){var a,b,c,d;return _.I(function(e){if(1==e.a)return a=new _.xv,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)})},SU=function(a){return _.I(function(b){if(a.B.length)return QU(a),a.f=a.B.shift(),a.f.play(),b.C(0);RU(a);return _.x(b,a.m.a.play(),0)})},TU=function(a){a.A.length?(QU(a),a.f=a.A.shift(),a.f.play()):RU(a)},QU=function(a){var b=a.m.de(HU).nd();b&&(a.m.getSurface().show(b),a.m.getSurface().hideMediaElement(),
|
|
5
|
+
a.a.registerVideoDisplayBase(FU),a.m.isMuted()?a.setVolume(0):a.setVolume(a.m.getVolume()||1))},RU=function(a){var b=a.m.de(HU).nd();b&&a.m.getSurface().hide(b);a.m.getSurface().showMediaElement()},UU=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 LU(a.a,c,d)});a.m.trigger(new _.Q(b,d))},VU=function(){this.Ca=new _.L(GU)};_.w(IU,_.Tv);_.r=IU.prototype;
|
|
6
|
+
_.r.onPlayerCreated=function(a){if(window.tv&&tv.freewheel&&tv.freewheel.SDK)this.a=_.Vi(_.Pd,{id:FU}),this.f=_.Vi(_.Mg,{"class":_.ld}),this.a.appendChild(this.f),a.getSurface().addElementToContainer(this.a,!0),a.getSurface().hide(this.a);else a.onError(new _.N(1,9,12E3))};_.r.onPlayerWillDestroy=function(a){this.a&&(a.getSurface().removeElementFromContainer(this.a),this.f=this.a=null)};_.r.id=function(){return HU};_.r.nd=function(){return this.a};_.r.Pl=function(){return this.f};
|
|
7
|
+
_.K("clpp.freewheel.FreeWheelPlugin",IU);IU.prototype.getAdVideo=IU.prototype.Pl;IU.prototype.getAdContainer=IU.prototype.nd;IU.Id=HU;IU.AD_CONTAINER_ID=FU;JU.prototype.create=function(){return new IU};_.r=LU.prototype;_.r.vb=function(){return"FreeWheel AdManager SDK"};_.r.wb=function(){return tv.freewheel.SDK.version};_.r.Bb=function(){return 0};_.r.getId=function(){return this.a?this.a.getAdId():""};_.r.getCreativeId=function(){var a=(this.a||{})._creativeId;return typeof a===_.gg?a:""};_.r.Yb=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.bc=function(){return!1};_.r.xb=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.lb=function(){return this.a?this.a.getActiveCreativeRendition().getWidth():0};_.r.kb=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.Mb=function(){switch(this.Wa()){case 0:return 0;case 2:return-1;default:return this.f.getTimePosition()}};_.r.zb=function(){return this.a?this.f.getAdInstances().indexOf(this.a)+1:1};_.r.nb=function(){return this.f.getAdCount()};_.r.getWrapperAdIds=function(){return[]};_.r.canSeek=function(){return!1};
|
|
11
|
+
_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.ac=function(){return null};LU.prototype.getVideoElement=LU.prototype.ac;LU.prototype.getWrapperCreativeIds=LU.prototype.getWrapperCreativeIds;LU.prototype.getWrapperAdSystems=LU.prototype.getWrapperAdSystems;LU.prototype.canSeek=LU.prototype.canSeek;LU.prototype.getWrapperAdIds=LU.prototype.getWrapperAdIds;LU.prototype.getSequenceLength=LU.prototype.nb;LU.prototype.getPositionInSequence=LU.prototype.zb;
|
|
12
|
+
LU.prototype.getPodTimeOffset=LU.prototype.Mb;LU.prototype.getPodIndex=LU.prototype.getPodIndex;LU.prototype.getPodType=LU.prototype.Wa;LU.prototype.getMediaBitrate=LU.prototype.Va;LU.prototype.getMediaHeight=LU.prototype.kb;LU.prototype.getMediaWidth=LU.prototype.lb;LU.prototype.getMediaUrl=LU.prototype.getMediaUrl;LU.prototype.getClickThroughUrl=LU.prototype.xb;LU.prototype.isBumper=LU.prototype.bc;LU.prototype.getSkipTimeOffset=LU.prototype.getSkipTimeOffset;LU.prototype.getPosition=LU.prototype.getPosition;
|
|
13
|
+
LU.prototype.getDuration=LU.prototype.getDuration;LU.prototype.getTitle=LU.prototype.getTitle;LU.prototype.getAdvertiserName=LU.prototype.getAdvertiserName;LU.prototype.getAdSystem=LU.prototype.getAdSystem;LU.prototype.getApiFramework=LU.prototype.getApiFramework;LU.prototype.getSourceId=LU.prototype.Yb;LU.prototype.getCreativeId=LU.prototype.getCreativeId;LU.prototype.getId=LU.prototype.getId;LU.prototype.getTechnology=LU.prototype.Bb;LU.prototype.getAdManagerVersion=LU.prototype.wb;
|
|
14
|
+
LU.prototype.getAdManagerName=LU.prototype.vb;MU.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()}})};MU.prototype.Ob=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL).length};MU.prototype.Nb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL).length};
|
|
15
|
+
MU.prototype.hasPostroll=MU.prototype.Nb;MU.prototype.hasPreroll=MU.prototype.Ob;MU.prototype.getCuePoints=MU.prototype.getCuePoints;_.r=NU.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{OU(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!==_.gg&&typeof b.siteSectionId!==_.k||a.a.setSiteSection(b.siteSectionId);return _.x(m,PU(),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,KU(f.type),f.position,f.slotProfile,f.cuepointSequence,f.maxDuration,f.minDuration,f.acceptContentType);b.keyValues&&typeof b.keyValues===_.Se&&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.wn.bind(a));a.h.on(a.a,tv.freewheel.SDK.EVENT_SLOT_STARTED,a.Bn.bind(a));a.h.on(a.a,tv.freewheel.SDK.EVENT_SLOT_ENDED,a.An.bind(a));a.h.on(a.a,tv.freewheel.SDK.EVENT_AD,a.Rm.bind(a));a.h.on(a.m,_.ug,a.Ik.bind(a));a.h.on(a.m,_.dg,a.Hk.bind(a));a.a.submitRequest();return m["return"](a.l)})};_.r.start=function(){var a=this;return _.I(function(b){return _.x(b,SU(a),0)})};_.r.gd=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.ed=function(){return!0};_.r.Dc=function(){var a=this;return _.I(function(b){a.h.release();a.j&&(a.j.stop(),a.j=null);RU(a);a.a&&(a.a.dispose(),a.a=null);_.z(b)})};
|
|
20
|
+
_.r.wn=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 _.Q(_.Ac,{adsTimeline:new MU(this.a)})),this.j=new _.vv(this.m.getSurface(),function(c,d){return b.a.resize(c,d)},this.m.de(HU).f);else this.m.onError(new _.N(1,9,10003,{errorType:0},
|
|
21
|
+
void 0));this.l.resolve()};_.r.Bn=function(a){UU(this,_.fc,a);this.j.start()};_.r.An=function(a){this.f=null;a=a.slot;UU(this,_.gc);this.j.stop();if(a)switch(a.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL:SU(this);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:RU(this);this.m.play();break;case tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL:TU(this)}};
|
|
22
|
+
_.r.Rm=function(a){var b=a.subType;this.g.debug("ad event",b);switch(b){case tv.freewheel.SDK.EVENT_AD_IMPRESSION:UU(this,_.wc,a);UU(this,_.pc,a);break;case tv.freewheel.SDK.EVENT_AD_IMPRESSION_END:UU(this,_.xc,a);break;case tv.freewheel.SDK.EVENT_AD_FIRST_QUARTILE:UU(this,_.kc,a);break;case tv.freewheel.SDK.EVENT_AD_MIDPOINT:UU(this,_.rc,a);break;case tv.freewheel.SDK.EVENT_AD_THIRD_QUARTILE:UU(this,_.yc,a);break;case tv.freewheel.SDK.EVENT_AD_COMPLETE:UU(this,_.jc,a);break;case tv.freewheel.SDK.EVENT_AD_CLICK:UU(this,
|
|
23
|
+
_.ic,a);break;case tv.freewheel.SDK.EVENT_AD_PAUSE:UU(this,_.sc,a);break;case tv.freewheel.SDK.EVENT_AD_RESUME:UU(this,_.uc,a);break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:UU(this,_.vc,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_START:UU(this,_.hc,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_END:UU(this,_.tc,a);break;case tv.freewheel.SDK.EVENT_ERROR:this.m.onError(new _.N(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.Ik=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();QU(this);this.f.play()}}};
|
|
25
|
+
_.r.Hk=function(a){if((a=a.detail)&&this.a)switch(a.currentState){case 3:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PLAYING);break;case 4:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PAUSED);break;case 5:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_COMPLETED);TU(this);break;case _.Wt:case _.zo:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED)}};NU.prototype.getPosition=NU.prototype.getPosition;NU.prototype.setVolume=NU.prototype.setVolume;NU.prototype.getVolume=NU.prototype.getVolume;
|
|
26
|
+
NU.prototype.skip=NU.prototype.skip;NU.prototype.pause=NU.prototype.pause;NU.prototype.resume=NU.prototype.resume;VU.prototype.name=function(){return GU};VU.prototype.a=function(a,b){return a.namespace()!==_.qd&&b&&b.freewheel?window.tv&&tv.freewheel&&tv.freewheel.SDK?!0:(this.Ca.warn("FreeWheel SDK is not loaded."),!1):!1};VU.prototype.create=function(a){return new NU(a)};_.Zh(new VU);_.To(new JU);};
|
|
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));}
|