@castlabs/prestoplay 6.10.0 → 6.11.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 (60) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +6 -6
  5. package/cjs/cl.cast.js +112 -112
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +467 -435
  8. package/cjs/cl.crypto.js +9 -10
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +132 -33
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +78 -74
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +24 -24
  16. package/cjs/cl.mse.js +274 -274
  17. package/cjs/cl.muxdata.js +14 -14
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.smooth.js +71 -71
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +29 -27
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +19 -19
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +20 -20
  30. package/cl.adobe.js +3 -3
  31. package/cl.airplay.js +3 -3
  32. package/cl.broadpeak.js +5 -5
  33. package/cl.cast.js +88 -88
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +395 -368
  36. package/cl.crypto.js +9 -9
  37. package/cl.dash.js +67 -66
  38. package/cl.externs.js +128 -33
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +64 -61
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +26 -26
  43. package/cl.ima.js +17 -17
  44. package/cl.mse.js +238 -239
  45. package/cl.muxdata.js +12 -12
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +11 -11
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +59 -59
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +22 -22
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +14 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +15 -15
  58. package/clpp.styles.css +15 -0
  59. package/package.json +1 -1
  60. package/typings.d.ts +202 -19
@@ -1,28 +1,28 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var JL="clpp-freewheel",KL="clpp.freewheel.AdsManagerFactory",LL="freewheel",ML=function(){this.f=this.a=null},NL=function(){},OL=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""}},PL=function(a,b,c){this.g=a;this.f=b;this.a=c},QL=function(a){this.a=a},RL=function(a){this.h=new _.I("clpp.freewheel.AdsManager");this.l=a;this.g=new _.eg;this.w=new tv.freewheel.SDK.AdManager;
3
- this.f=this.a=null;this.B=[];this.o=[];this.A=[];this.m=new _.fi;this.j=null},SL=function(a){var b=[];typeof a.networkId!==_.k&&b.push("networkId");typeof a.serverUrl!==_.ve&&b.push("serverUrl");typeof a.profileId!==_.ve&&b.push("profileId");typeof a.videoAssetId!==_.ve&&typeof a.videoAssetId!==_.k&&b.push("videoAssetId");if(b.length)throw new _.L(1,9,12001,{missingKeys:b.join(", ")});},TL=function(){var a,b,c,d;return _.B(function(e){if(1==e.a)return a=new _.tp,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)})},WL=function(a){return _.B(function(b){if(a.B.length)return UL(a),a.f=a.B.shift(),a.f.play(),b.G(0);VL(a);return _.x(b,a.l.a.play(),0)})},XL=function(a){a.A.length?(UL(a),a.f=a.A.shift(),a.f.play()):VL(a)},UL=function(a){var b=a.l.dc(LL).Lc();b&&(a.l.getSurface().show(b),a.l.getSurface().hideMediaElement(),
5
- a.a.registerVideoDisplayBase(JL),a.l.isMuted()?a.setVolume(0):a.setVolume(a.l.getVolume()||1))},VL=function(a){var b=a.l.dc(LL).Lc();b&&a.l.getSurface().hide(b);a.l.getSurface().showMediaElement()},YL=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 PL(a.a,c,d)});a.l.trigger(new _.J(b,d))},ZL=function(){this.a=new _.I(KL)};_.w(ML,_.eq);_.t=ML.prototype;
6
- _.t.onPlayerCreated=function(a){if(window.tv&&tv.freewheel&&tv.freewheel.SDK)this.a=_.yn(_.Zc,{id:JL}),this.f=_.yn(_.Re,{"class":_.Hc}),this.a.appendChild(this.f),a.getSurface().addElementToContainer(this.a,!0),a.getSurface().hide(this.a);else a.onError(new _.L(1,9,12E3))};_.t.onPlayerWillDestroy=function(a){this.a&&(a.getSurface().removeElementFromContainer(this.a),this.f=this.a=null)};_.t.id=function(){return LL};_.t.Lc=function(){return this.a};_.t.jj=function(){return this.f};
7
- _.C("clpp.freewheel.FreeWheelPlugin",ML);ML.prototype.getAdVideo=ML.prototype.jj;ML.prototype.getAdContainer=ML.prototype.Lc;ML.Id=LL;ML.AD_CONTAINER_ID=JL;NL.prototype.create=function(){return new ML};_.vo(new NL);_.t=PL.prototype;_.t.vb=function(){return"FreeWheel AdManager SDK"};_.t.wb=function(){return tv.freewheel.SDK.version};_.t.Bb=function(){return 0};_.t.getId=function(){return this.a?this.a.getAdId():""};_.t.getCreativeId=function(){var a=(this.a||{})._creativeId;return typeof a===_.ve?a:""};_.t.getApiFramework=function(){return this.a?this.a.getActiveCreativeRendition().getCreativeApi():""};_.t.getAdSystem=function(){return""};_.t.getAdvertiserName=function(){return""};_.t.getTitle=function(){return""};
8
- _.t.getDuration=function(){return this.a?this.a.getActiveCreativeRendition().getDuration():0};_.t.getSkipTimeOffset=function(){return 0};_.t.ic=function(){return!1};_.t.Nb=function(){return this.a&&this.a.getEventCallbackUrls(tv.freewheel.SDK.EVENT_AD_CLICK,tv.freewheel.SDK.EVENT_TYPE_CLICK)[0]||""};_.t.getMediaUrl=function(){return this.a?this.a.getActiveCreativeRendition().getPrimaryCreativeRenditionAsset().getUrl():""};
9
- _.t.yb=function(){return this.a?this.a.getActiveCreativeRendition().getWidth():0};_.t.xb=function(){return this.a?this.a.getActiveCreativeRendition().getHeight():0};_.t.kb=function(){return 0};_.t.$a=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
- _.t.getPodIndex=function(){switch(this.$a()){case 0:return 0;case 2:return-1}return this.g.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL).indexOf(this.f)+1};_.t.Ob=function(){switch(this.$a()){case 0:return 0;case 2:return-1;default:return this.f.getTimePosition()}};_.t.Pb=function(){return this.a?this.f.getAdInstances().indexOf(this.a)+1:1};_.t.Ab=function(){return this.f.getAdCount()};_.t.getWrapperAdIds=function(){return[]};_.t.getWrapperAdSystems=function(){return[]};
11
- _.t.getWrapperCreativeIds=function(){return[]};PL.prototype.getWrapperCreativeIds=PL.prototype.getWrapperCreativeIds;PL.prototype.getWrapperAdSystems=PL.prototype.getWrapperAdSystems;PL.prototype.getWrapperAdIds=PL.prototype.getWrapperAdIds;PL.prototype.getSequenceLength=PL.prototype.Ab;PL.prototype.getPositionInSequence=PL.prototype.Pb;PL.prototype.getPodTimeOffset=PL.prototype.Ob;PL.prototype.getPodIndex=PL.prototype.getPodIndex;PL.prototype.getPodType=PL.prototype.$a;
12
- PL.prototype.getMediaBitrate=PL.prototype.kb;PL.prototype.getMediaHeight=PL.prototype.xb;PL.prototype.getMediaWidth=PL.prototype.yb;PL.prototype.getMediaUrl=PL.prototype.getMediaUrl;PL.prototype.getClickThroughUrl=PL.prototype.Nb;PL.prototype.isBumper=PL.prototype.ic;PL.prototype.getSkipTimeOffset=PL.prototype.getSkipTimeOffset;PL.prototype.getDuration=PL.prototype.getDuration;PL.prototype.getTitle=PL.prototype.getTitle;PL.prototype.getAdvertiserName=PL.prototype.getAdvertiserName;
13
- PL.prototype.getAdSystem=PL.prototype.getAdSystem;PL.prototype.getApiFramework=PL.prototype.getApiFramework;PL.prototype.getCreativeId=PL.prototype.getCreativeId;PL.prototype.getId=PL.prototype.getId;PL.prototype.getTechnology=PL.prototype.Bb;PL.prototype.getAdManagerVersion=PL.prototype.wb;PL.prototype.getAdManagerName=PL.prototype.vb;QL.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()}})};QL.prototype.Qb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL).length};QL.prototype.lb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL).length};
14
- QL.prototype.hasPostroll=QL.prototype.lb;QL.prototype.hasPreroll=QL.prototype.Qb;QL.prototype.getCuePoints=QL.prototype.getCuePoints;_.t=RL.prototype;
15
- _.t.load=function(){var a=this,b,c,d,e,f,g,h,l;return _.B(function(m){if(1==m.a){b=a.l.getConfiguration().freewheel||{};try{SL(b)}catch(n){return a.l.onError(n),a.m.resolve(),m["return"](a.m)}a.w.setNetwork(b.networkId);a.w.setServer(b.serverUrl);a.a=a.w.newContext();a.a.setProfile(b.profileId);typeof b.siteSectionId!==_.ve&&typeof b.siteSectionId!==_.k||a.a.setSiteSection(b.siteSectionId);return _.x(m,TL(),2)}c=m.f;a.a.setVideoAsset(b.videoAssetId,a.l.getDuration(),void 0,void 0,c);if(Array.isArray(b.pods))for(d=
16
- _.u(b.pods),e=d.next();!e.done;e=d.next())f=e.value,a.a.addTemporalSlot(f.id,OL(f.type),f.position,f.slotProfile,f.cuepointSequence,f.maxDuration,f.minDuration,f.acceptContentType);b.keyValues&&typeof b.keyValues===_.Ld&&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=
17
- g.next())l=h.value,a.a.setParameter(l.name,l.value,l.level);a.g.on(a.a,tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,a.Ek.bind(a));a.g.on(a.a,tv.freewheel.SDK.EVENT_SLOT_STARTED,a.Ik.bind(a));a.g.on(a.a,tv.freewheel.SDK.EVENT_SLOT_ENDED,a.Hk.bind(a));a.g.on(a.a,tv.freewheel.SDK.EVENT_AD,a.Zj.bind(a));a.g.on(a.l,_.Fe,a.gi.bind(a));a.g.on(a.l,_.re,a.fi.bind(a));a.a.submitRequest();return m["return"](a.m)})};_.t.start=function(){var a=this;return _.B(function(b){return _.x(b,WL(a),0)})};
18
- _.t.resume=function(){this.f&&this.f.resume()};_.t.pause=function(){this.f&&this.f.pause()};_.t.skip=function(){this.f&&this.f.skipCurrentAd()};_.t.getVolume=function(){return this.a?this.a.getAdVolume():1};_.t.setVolume=function(a){this.a&&this.a.setAdVolume(a)};_.t.getPosition=function(){return this.f?this.f.getPlayheadTime():-1};_.t.dispose=function(){var a=this;return _.B(function(b){a.g.release();a.j&&(a.j.stop(),a.j=null);VL(a);a.a&&(a.a.dispose(),a.a=null);_.y(b)})};
19
- _.t.Ek=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.l.trigger(new _.J(_.Zb,{adsTimeline:new QL(this.a)})),this.j=new _.rp(this.l.getSurface(),function(c,d){return b.a.resize(c,d)},this.l.dc(LL).f);else this.l.onError(new _.L(1,9,10003,{errorType:0},
20
- void 0));this.m.resolve()};_.t.Ik=function(a){YL(this,_.Fb,a);this.j.start()};_.t.Hk=function(a){this.f=null;a=a.slot;YL(this,_.Hb);this.j.stop();if(a)switch(a.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL:WL(this);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:VL(this);this.l.play();break;case tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL:XL(this)}};
21
- _.t.Zj=function(a){var b=a.subType;this.h.debug("ad event",b);switch(b){case tv.freewheel.SDK.EVENT_AD_IMPRESSION:YL(this,_.Vb,a);YL(this,_.Nb,a);break;case tv.freewheel.SDK.EVENT_AD_IMPRESSION_END:YL(this,_.Wb,a);break;case tv.freewheel.SDK.EVENT_AD_FIRST_QUARTILE:YL(this,_.Lb,a);break;case tv.freewheel.SDK.EVENT_AD_MIDPOINT:YL(this,_.Pb,a);break;case tv.freewheel.SDK.EVENT_AD_THIRD_QUARTILE:YL(this,_.Xb,a);break;case tv.freewheel.SDK.EVENT_AD_COMPLETE:YL(this,_.Kb,a);break;case tv.freewheel.SDK.EVENT_AD_CLICK:YL(this,
22
- _.Jb,a);break;case tv.freewheel.SDK.EVENT_AD_PAUSE:YL(this,_.Qb,a);break;case tv.freewheel.SDK.EVENT_AD_RESUME:YL(this,_.Tb,a);break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:YL(this,_.Ub,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_START:YL(this,_.Ib,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_END:YL(this,_.Sb,a);break;case tv.freewheel.SDK.EVENT_ERROR:this.l.onError(new _.L(1,9,10003,{errorType:1},{fwCode:a[tv.freewheel.SDK.INFO_KEY_ERROR_CODE],fwInfo:a[tv.freewheel.SDK.INFO_KEY_ERROR_INFO],
23
- fwModule:a[tv.freewheel.SDK.INFO_KEY_ERROR_MODULE]}))}};_.t.gi=function(){var a=this;if(!this.f){var b=this.l.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.l.pause();UL(this);this.f.play()}}};
24
- _.t.fi=function(a){if((a=a.detail)&&this.a)switch(a.currentState){case _.bn:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PLAYING);break;case _.an:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PAUSED);break;case _.Vm:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_COMPLETED);XL(this);break;case _.Om:case _.Zm:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED)}};RL.prototype.getPosition=RL.prototype.getPosition;RL.prototype.setVolume=RL.prototype.setVolume;
25
- RL.prototype.getVolume=RL.prototype.getVolume;RL.prototype.skip=RL.prototype.skip;RL.prototype.pause=RL.prototype.pause;RL.prototype.resume=RL.prototype.resume;RL.prototype.start=RL.prototype.start;ZL.prototype.name=function(){return KL};ZL.prototype.ba=function(a,b){return a.namespace()===_.Jc?!1:window.tv&&tv.freewheel&&tv.freewheel.SDK?!(!b||!b.freewheel):(this.a.warn("FreeWheel SDK is not loaded."),!1)};ZL.prototype.create=function(a){return new RL(a)};ZL.prototype.create=ZL.prototype.create;ZL.prototype.isSupported=ZL.prototype.ba;ZL.prototype.name=ZL.prototype.name;_.vn(new ZL);};
2
+ var f=function(window){var YM="clpp-freewheel",ZM="clpp.freewheel.AdsManagerFactory",$M="freewheel",aN=function(){this.f=this.a=null},bN=function(){},cN=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""}},dN=function(a,b,c){this.g=a;this.f=b;this.a=c},eN=function(a){this.a=a},fN=function(a){this.h=new _.K("clpp.freewheel.AdsManager");this.m=a;this.g=new _.Eg;this.w=new tv.freewheel.SDK.AdManager;
3
+ this.f=this.a=null;this.B=[];this.o=[];this.A=[];this.l=new _.Fi;this.j=null},gN=function(a){var b=[];typeof a.networkId!==_.k&&b.push("networkId");typeof a.serverUrl!==_.Ue&&b.push("serverUrl");typeof a.profileId!==_.Ue&&b.push("profileId");typeof a.videoAssetId!==_.Ue&&typeof a.videoAssetId!==_.k&&b.push("videoAssetId");if(b.length)throw new _.N(1,9,12001,{missingKeys:b.join(", ")});},hN=function(){var a,b,c,d;return _.G(function(e){if(1==e.a)return a=new _.Eq,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)})},kN=function(a){return _.G(function(b){if(a.B.length)return iN(a),a.f=a.B.shift(),a.f.play(),b.G(0);jN(a);return _.x(b,a.m.a.play(),0)})},lN=function(a){a.A.length?(iN(a),a.f=a.A.shift(),a.f.play()):jN(a)},iN=function(a){var b=a.m.cc($M).Ic();b&&(a.m.getSurface().show(b),a.m.getSurface().hideMediaElement(),
5
+ a.a.registerVideoDisplayBase(YM),a.m.isMuted()?a.setVolume(0):a.setVolume(a.m.getVolume()||1))},jN=function(a){var b=a.m.cc($M).Ic();b&&a.m.getSurface().hide(b);a.m.getSurface().showMediaElement()},mN=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 dN(a.a,c,d)});a.m.trigger(new _.L(b,d))},nN=function(){this.a=new _.K(ZM)};_.w(aN,_.rr);_.r=aN.prototype;
6
+ _.r.onPlayerCreated=function(a){if(window.tv&&tv.freewheel&&tv.freewheel.SDK)this.a=_.to(_.gd,{id:YM}),this.f=_.to(_.uf,{"class":_.Mc}),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 $M};_.r.Ic=function(){return this.a};_.r.rj=function(){return this.f};
7
+ _.I("clpp.freewheel.FreeWheelPlugin",aN);aN.prototype.getAdVideo=aN.prototype.rj;aN.prototype.getAdContainer=aN.prototype.Ic;aN.Id=$M;aN.AD_CONTAINER_ID=YM;bN.prototype.create=function(){return new aN};_.qp(new bN);_.r=dN.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===_.Ue?a:""};_.r.getApiFramework=function(){return this.a?this.a.getActiveCreativeRendition().getCreativeApi():""};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return""};
8
+ _.r.getDuration=function(){return this.a?this.a.getActiveCreativeRendition().getDuration():0};_.r.getSkipTimeOffset=function(){return 0};_.r.gc=function(){return!1};_.r.Lb=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.xb=function(){return this.a?this.a.getActiveCreativeRendition().getWidth():0};_.r.wb=function(){return this.a?this.a.getActiveCreativeRendition().getHeight():0};_.r.jb=function(){return 0};_.r.Za=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.Za()){case 0:return 0;case 2:return-1}return this.g.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL).indexOf(this.f)+1};_.r.Mb=function(){switch(this.Za()){case 0:return 0;case 2:return-1;default:return this.f.getTimePosition()}};_.r.Nb=function(){return this.a?this.f.getAdInstances().indexOf(this.a)+1:1};_.r.zb=function(){return this.f.getAdCount()};_.r.getWrapperAdIds=function(){return[]};_.r.getWrapperAdSystems=function(){return[]};
11
+ _.r.getWrapperCreativeIds=function(){return[]};dN.prototype.getWrapperCreativeIds=dN.prototype.getWrapperCreativeIds;dN.prototype.getWrapperAdSystems=dN.prototype.getWrapperAdSystems;dN.prototype.getWrapperAdIds=dN.prototype.getWrapperAdIds;dN.prototype.getSequenceLength=dN.prototype.zb;dN.prototype.getPositionInSequence=dN.prototype.Nb;dN.prototype.getPodTimeOffset=dN.prototype.Mb;dN.prototype.getPodIndex=dN.prototype.getPodIndex;dN.prototype.getPodType=dN.prototype.Za;
12
+ dN.prototype.getMediaBitrate=dN.prototype.jb;dN.prototype.getMediaHeight=dN.prototype.wb;dN.prototype.getMediaWidth=dN.prototype.xb;dN.prototype.getMediaUrl=dN.prototype.getMediaUrl;dN.prototype.getClickThroughUrl=dN.prototype.Lb;dN.prototype.isBumper=dN.prototype.gc;dN.prototype.getSkipTimeOffset=dN.prototype.getSkipTimeOffset;dN.prototype.getDuration=dN.prototype.getDuration;dN.prototype.getTitle=dN.prototype.getTitle;dN.prototype.getAdvertiserName=dN.prototype.getAdvertiserName;
13
+ dN.prototype.getAdSystem=dN.prototype.getAdSystem;dN.prototype.getApiFramework=dN.prototype.getApiFramework;dN.prototype.getCreativeId=dN.prototype.getCreativeId;dN.prototype.getId=dN.prototype.getId;dN.prototype.getTechnology=dN.prototype.Ab;dN.prototype.getAdManagerVersion=dN.prototype.vb;dN.prototype.getAdManagerName=dN.prototype.ub;eN.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()}})};eN.prototype.Ob=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL).length};eN.prototype.kb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL).length};
14
+ eN.prototype.hasPostroll=eN.prototype.kb;eN.prototype.hasPreroll=eN.prototype.Ob;eN.prototype.getCuePoints=eN.prototype.getCuePoints;_.r=fN.prototype;
15
+ _.r.load=function(){var a=this,b,c,d,e,f,g,h,l;return _.G(function(m){if(1==m.a){b=a.m.getConfiguration().freewheel||{};try{gN(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!==_.Ue&&typeof b.siteSectionId!==_.k||a.a.setSiteSection(b.siteSectionId);return _.x(m,hN(),2)}c=m.f;a.a.setVideoAsset(b.videoAssetId,a.m.getDuration(),void 0,void 0,c);if(Array.isArray(b.pods))for(d=
16
+ _.u(b.pods),e=d.next();!e.done;e=d.next())f=e.value,a.a.addTemporalSlot(f.id,cN(f.type),f.position,f.slotProfile,f.cuepointSequence,f.maxDuration,f.minDuration,f.acceptContentType);b.keyValues&&typeof b.keyValues===_.ae&&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=
17
+ g.next())l=h.value,a.a.setParameter(l.name,l.value,l.level);a.g.on(a.a,tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,a.Ok.bind(a));a.g.on(a.a,tv.freewheel.SDK.EVENT_SLOT_STARTED,a.Sk.bind(a));a.g.on(a.a,tv.freewheel.SDK.EVENT_SLOT_ENDED,a.Rk.bind(a));a.g.on(a.a,tv.freewheel.SDK.EVENT_AD,a.ik.bind(a));a.g.on(a.m,_.cf,a.oi.bind(a));a.g.on(a.m,_.Re,a.ni.bind(a));a.a.submitRequest();return m["return"](a.l)})};_.r.start=function(){var a=this;return _.G(function(b){return _.x(b,kN(a),0)})};
18
+ _.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.dispose=function(){var a=this;return _.G(function(b){a.g.release();a.j&&(a.j.stop(),a.j=null);jN(a);a.a&&(a.a.dispose(),a.a=null);_.y(b)})};
19
+ _.r.Ok=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 _.L(_.dc,{adsTimeline:new eN(this.a)})),this.j=new _.Cq(this.m.getSurface(),function(c,d){return b.a.resize(c,d)},this.m.cc($M).f);else this.m.onError(new _.N(1,9,10003,{errorType:0},
20
+ void 0));this.l.resolve()};_.r.Sk=function(a){mN(this,_.Mb,a);this.j.start()};_.r.Rk=function(a){this.f=null;a=a.slot;mN(this,_.Nb);this.j.stop();if(a)switch(a.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL:kN(this);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:jN(this);this.m.play();break;case tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL:lN(this)}};
21
+ _.r.ik=function(a){var b=a.subType;this.h.debug("ad event",b);switch(b){case tv.freewheel.SDK.EVENT_AD_IMPRESSION:mN(this,_.$b,a);mN(this,_.Sb,a);break;case tv.freewheel.SDK.EVENT_AD_IMPRESSION_END:mN(this,_.ac,a);break;case tv.freewheel.SDK.EVENT_AD_FIRST_QUARTILE:mN(this,_.Rb,a);break;case tv.freewheel.SDK.EVENT_AD_MIDPOINT:mN(this,_.Ub,a);break;case tv.freewheel.SDK.EVENT_AD_THIRD_QUARTILE:mN(this,_.bc,a);break;case tv.freewheel.SDK.EVENT_AD_COMPLETE:mN(this,_.Qb,a);break;case tv.freewheel.SDK.EVENT_AD_CLICK:mN(this,
22
+ _.Pb,a);break;case tv.freewheel.SDK.EVENT_AD_PAUSE:mN(this,_.Vb,a);break;case tv.freewheel.SDK.EVENT_AD_RESUME:mN(this,_.Yb,a);break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:mN(this,_.Zb,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_START:mN(this,_.Ob,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_END:mN(this,_.Xb,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],
23
+ fwModule:a[tv.freewheel.SDK.INFO_KEY_ERROR_MODULE]}))}};_.r.oi=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();iN(this);this.f.play()}}};
24
+ _.r.ni=function(a){if((a=a.detail)&&this.a)switch(a.currentState){case _.Xn:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PLAYING);break;case _.Wn:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PAUSED);break;case _.Qn:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_COMPLETED);lN(this);break;case _.Jn:case _.Un:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED)}};fN.prototype.getPosition=fN.prototype.getPosition;fN.prototype.setVolume=fN.prototype.setVolume;
25
+ fN.prototype.getVolume=fN.prototype.getVolume;fN.prototype.skip=fN.prototype.skip;fN.prototype.pause=fN.prototype.pause;fN.prototype.resume=fN.prototype.resume;fN.prototype.start=fN.prototype.start;nN.prototype.name=function(){return ZM};nN.prototype.aa=function(a,b){return a.namespace()===_.Pc?!1:window.tv&&tv.freewheel&&tv.freewheel.SDK?!(!b||!b.freewheel):(this.a.warn("FreeWheel SDK is not loaded."),!1)};nN.prototype.create=function(a){return new fN(a)};nN.prototype.create=nN.prototype.create;nN.prototype.isSupported=nN.prototype.aa;nN.prototype.name=nN.prototype.name;_.qo(new nN);};
26
26
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
27
27
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
28
28
  else{_=this.clpp._;(f.call(g,this));}