@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.
Files changed (69) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +5 -5
  3. package/cjs/cl.adobe.js +3 -3
  4. package/cjs/cl.airplay.js +3 -3
  5. package/cjs/cl.broadpeak.js +7 -7
  6. package/cjs/cl.cast.js +115 -114
  7. package/cjs/cl.conviva.js +32 -32
  8. package/cjs/cl.core.js +620 -620
  9. package/cjs/cl.crypto.js +9 -9
  10. package/cjs/cl.dash.js +89 -88
  11. package/cjs/cl.externs.js +89 -51
  12. package/cjs/cl.freewheel.js +25 -25
  13. package/cjs/cl.hls.js +79 -77
  14. package/cjs/cl.hlssmpte.js +6 -6
  15. package/cjs/cl.htmlcue.js +30 -30
  16. package/cjs/cl.ima.js +24 -24
  17. package/cjs/cl.mediatailor.js +3 -3
  18. package/cjs/cl.mse.js +351 -336
  19. package/cjs/cl.muxdata.js +15 -15
  20. package/cjs/cl.onboard.js +3 -3
  21. package/cjs/cl.persistent.js +15 -15
  22. package/cjs/cl.playlist.js +6 -6
  23. package/cjs/cl.sessions.js +16 -16
  24. package/cjs/cl.simid.js +17 -17
  25. package/cjs/cl.smooth.js +72 -72
  26. package/cjs/cl.thumbnails.js +26 -26
  27. package/cjs/cl.tizen.js +73 -72
  28. package/cjs/cl.ttml.js +29 -29
  29. package/cjs/cl.verimatrix.js +5 -5
  30. package/cjs/cl.vimond.js +12 -12
  31. package/cjs/cl.vr.js +19 -19
  32. package/cjs/cl.vtt.js +14 -14
  33. package/cjs/cl.yospace.js +4 -4
  34. package/cjs/cl.youbora.js +39 -37
  35. package/cjs/polyfill.min.js +15 -3
  36. package/cl.adobe.js +3 -3
  37. package/cl.airplay.js +3 -3
  38. package/cl.broadpeak.js +5 -5
  39. package/cl.cast.js +92 -90
  40. package/cl.conviva.js +27 -27
  41. package/cl.core.js +496 -500
  42. package/cl.crypto.js +9 -9
  43. package/cl.dash.js +82 -82
  44. package/cl.externs.js +89 -51
  45. package/cl.freewheel.js +19 -19
  46. package/cl.hls.js +80 -80
  47. package/cl.hlssmpte.js +5 -5
  48. package/cl.htmlcue.js +26 -26
  49. package/cl.ima.js +17 -17
  50. package/cl.mediatailor.js +3 -3
  51. package/cl.mse.js +305 -294
  52. package/cl.muxdata.js +13 -13
  53. package/cl.onboard.js +4 -4
  54. package/cl.persistent.js +11 -11
  55. package/cl.playlist.js +5 -5
  56. package/cl.sessions.js +10 -10
  57. package/cl.simid.js +14 -14
  58. package/cl.smooth.js +60 -60
  59. package/cl.thumbnails.js +19 -19
  60. package/cl.tizen.js +57 -57
  61. package/cl.ttml.js +22 -22
  62. package/cl.verimatrix.js +4 -4
  63. package/cl.vimond.js +8 -8
  64. package/cl.vr.js +15 -15
  65. package/cl.vtt.js +12 -12
  66. package/cl.yospace.js +3 -3
  67. package/cl.youbora.js +29 -28
  68. package/package.json +3 -3
  69. package/typings.d.ts +124 -3
@@ -1,29 +1,29 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var CV="clpp-freewheel",DV="clpp.freewheel.AdsManagerFactory",EV="freewheel",FV=function(){this.f=this.a=null},GV=function(){},HV=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""}},IV=function(a,b,c){this.h=a;this.f=b;this.a=c},JV=function(a){this.a=a},KV=function(a){this.g=new _.J("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 _.kk;this.j=null},LV=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 _.N(1,9,12001,{missingKeys:b.join(", ")});},MV=function(){var a,b,c,d;return _.H(function(e){if(1==e.a)return a=new _.Xu,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)})},PV=function(a){return _.H(function(b){if(a.B.length)return NV(a),a.f=a.B.shift(),a.f.play(),b.D(0);OV(a);return _.x(b,a.m.a.play(),0)})},QV=function(a){a.A.length?(NV(a),a.f=a.A.shift(),a.f.play()):OV(a)},NV=function(a){var b=a.m.he(EV).td();b&&(a.m.getSurface().show(b),a.m.getSurface().hideMediaElement(),
5
- a.a.registerVideoDisplayBase(CV),a.m.isMuted()?a.setVolume(0):a.setVolume(a.m.getVolume()||1))},OV=function(a){var b=a.m.he(EV).td();b&&a.m.getSurface().hide(b);a.m.getSurface().showMediaElement()},RV=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 IV(a.a,c,d)});a.m.trigger(new _.K(b,d))},SV=function(){this.Ca=new _.J(DV)};_.w(FV,_.bw);_.r=FV.prototype;
6
- _.r.onPlayerCreated=function(a){if(window.tv&&tv.freewheel&&tv.freewheel.SDK)this.a=_.er(_.Qd,{id:CV}),this.f=_.er(_.Jg,{"class":_.md}),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 EV};_.r.td=function(){return this.a};_.r.Ml=function(){return this.f};
7
- _.I("clpp.freewheel.FreeWheelPlugin",FV);FV.prototype.getAdVideo=FV.prototype.Ml;FV.prototype.getAdContainer=FV.prototype.td;FV.Id=EV;FV.AD_CONTAINER_ID=CV;GV.prototype.create=function(){return new FV};_.Yt(new GV);_.r=IV.prototype;_.r.xb=function(){return"FreeWheel AdManager SDK"};_.r.yb=function(){return tv.freewheel.SDK.version};_.r.Cb=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.bc=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.fc=function(){return!1};_.r.zb=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.ob=function(){return this.a?this.a.getActiveCreativeRendition().getWidth():0};_.r.nb=function(){return this.a?this.a.getActiveCreativeRendition().getHeight():0};_.r.Ua=function(){return 0};_.r.Va=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.Va()){case 0:return 0;case 2:return-1}return this.h.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL).indexOf(this.f)+1};_.r.Ob=function(){switch(this.Va()){case 0:return 0;case 2:return-1;default:return this.f.getTimePosition()}};_.r.Bb=function(){return this.a?this.f.getAdInstances().indexOf(this.a)+1:1};_.r.pb=function(){return this.f.getAdCount()};_.r.getWrapperAdIds=function(){return[]};_.r.canSeek=function(){return!1};
11
- _.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.ec=function(){return null};IV.prototype.getVideoElement=IV.prototype.ec;IV.prototype.getWrapperCreativeIds=IV.prototype.getWrapperCreativeIds;IV.prototype.getWrapperAdSystems=IV.prototype.getWrapperAdSystems;IV.prototype.canSeek=IV.prototype.canSeek;IV.prototype.getWrapperAdIds=IV.prototype.getWrapperAdIds;IV.prototype.getSequenceLength=IV.prototype.pb;IV.prototype.getPositionInSequence=IV.prototype.Bb;
12
- IV.prototype.getPodTimeOffset=IV.prototype.Ob;IV.prototype.getPodIndex=IV.prototype.getPodIndex;IV.prototype.getPodType=IV.prototype.Va;IV.prototype.getMediaBitrate=IV.prototype.Ua;IV.prototype.getMediaHeight=IV.prototype.nb;IV.prototype.getMediaWidth=IV.prototype.ob;IV.prototype.getMediaUrl=IV.prototype.getMediaUrl;IV.prototype.getClickThroughUrl=IV.prototype.zb;IV.prototype.isBumper=IV.prototype.fc;IV.prototype.getSkipTimeOffset=IV.prototype.getSkipTimeOffset;IV.prototype.getPosition=IV.prototype.getPosition;
13
- IV.prototype.getDuration=IV.prototype.getDuration;IV.prototype.getTitle=IV.prototype.getTitle;IV.prototype.getAdvertiserName=IV.prototype.getAdvertiserName;IV.prototype.getAdSystem=IV.prototype.getAdSystem;IV.prototype.getApiFramework=IV.prototype.getApiFramework;IV.prototype.getSourceId=IV.prototype.bc;IV.prototype.getCreativeId=IV.prototype.getCreativeId;IV.prototype.getId=IV.prototype.getId;IV.prototype.getTechnology=IV.prototype.Cb;IV.prototype.getAdManagerVersion=IV.prototype.yb;
14
- IV.prototype.getAdManagerName=IV.prototype.xb;JV.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()}})};JV.prototype.Rb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL).length};JV.prototype.Qb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL).length};
15
- JV.prototype.hasPostroll=JV.prototype.Qb;JV.prototype.hasPreroll=JV.prototype.Rb;JV.prototype.getCuePoints=JV.prototype.getCuePoints;_.r=KV.prototype;
16
- _.r.load=function(){var a=this,b,c,d,e,f,g,h,l;return _.H(function(m){if(1==m.a){b=a.m.getConfiguration().freewheel||{};try{LV(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,MV(),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
- _.u(b.pods),e=d.next();!e.done;e=d.next())f=e.value,a.a.addTemporalSlot(f.id,HV(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=_.u(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.Qm.bind(a));a.h.on(a.m,_.rg,a.zk.bind(a));a.h.on(a.m,_.bg,a.yk.bind(a));a.a.submitRequest();return m["return"](a.l)})};_.r.start=function(){var a=this;return _.H(function(b){return _.x(b,PV(a),0)})};_.r.kd=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.gd=function(){return!0};_.r.Dc=function(){var a=this;return _.H(function(b){a.h.release();a.j&&(a.j.stop(),a.j=null);OV(a);a.a&&(a.a.dispose(),a.a=null);_.y(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 _.K(_.Cc,{adsTimeline:new JV(this.a)})),this.j=new _.Vu(this.m.getSurface(),function(c,d){return b.a.resize(c,d)},this.m.he(EV).f);else this.m.onError(new _.N(1,9,10003,{errorType:0},
21
- void 0));this.l.resolve()};_.r.Bn=function(a){RV(this,_.hc,a);this.j.start()};_.r.An=function(a){this.f=null;a=a.slot;RV(this,_.ic);this.j.stop();if(a)switch(a.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL:PV(this);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:OV(this);this.m.play();break;case tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL:QV(this)}};
22
- _.r.Qm=function(a){var b=a.subType;this.g.debug("ad event",b);switch(b){case tv.freewheel.SDK.EVENT_AD_IMPRESSION:RV(this,_.xc,a);RV(this,_.qc,a);break;case tv.freewheel.SDK.EVENT_AD_IMPRESSION_END:RV(this,_.zc,a);break;case tv.freewheel.SDK.EVENT_AD_FIRST_QUARTILE:RV(this,_.mc,a);break;case tv.freewheel.SDK.EVENT_AD_MIDPOINT:RV(this,_.sc,a);break;case tv.freewheel.SDK.EVENT_AD_THIRD_QUARTILE:RV(this,_.Ac,a);break;case tv.freewheel.SDK.EVENT_AD_COMPLETE:RV(this,_.lc,a);break;case tv.freewheel.SDK.EVENT_AD_CLICK:RV(this,
23
- _.kc,a);break;case tv.freewheel.SDK.EVENT_AD_PAUSE:RV(this,_.tc,a);break;case tv.freewheel.SDK.EVENT_AD_RESUME:RV(this,_.vc,a);break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:RV(this,_.wc,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_START:RV(this,_.jc,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_END:RV(this,_.uc,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.zk=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();NV(this);this.f.play()}}};
25
- _.r.yk=function(a){if((a=a.detail)&&this.a)switch(a.currentState){case _.Hq:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PLAYING);break;case _.Gq:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PAUSED);break;case _.Aq:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_COMPLETED);QV(this);break;case _.tq:case _.Eq:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED)}};KV.prototype.getPosition=KV.prototype.getPosition;KV.prototype.setVolume=KV.prototype.setVolume;
26
- KV.prototype.getVolume=KV.prototype.getVolume;KV.prototype.skip=KV.prototype.skip;KV.prototype.pause=KV.prototype.pause;KV.prototype.resume=KV.prototype.resume;SV.prototype.name=function(){return DV};SV.prototype.a=function(a,b){return a.namespace()!==_.sd&&b&&b.freewheel?window.tv&&tv.freewheel&&tv.freewheel.SDK?!0:(this.Ca.warn("FreeWheel SDK is not loaded."),!1):!1};SV.prototype.create=function(a){return new KV(a)};_.$q(new SV);};
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));}