@castlabs/prestoplay 6.9.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 +66 -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 -111
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +467 -432
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +143 -45
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +78 -73
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -31
  15. package/cjs/cl.ima.js +24 -24
  16. package/cjs/cl.mse.js +276 -275
  17. package/cjs/cl.muxdata.js +14 -15
  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 +396 -365
  36. package/cl.crypto.js +9 -9
  37. package/cl.dash.js +68 -67
  38. package/cl.externs.js +139 -45
  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 -25
  43. package/cl.ima.js +17 -17
  44. package/cl.mse.js +240 -242
  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 -58
  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 +249 -21
@@ -1,28 +1,28 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var xL="clpp-freewheel",yL="clpp.freewheel.AdsManagerFactory",zL="freewheel",AL=function(){this.f=this.a=null},BL=function(){},CL=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""}},DL=function(a,b,c){this.g=a;this.f=b;this.a=c},EL=function(a){this.a=a},FL=function(a){this.h=new _.I("clpp.freewheel.AdsManager");this.l=a;this.g=new _.dg;this.w=new tv.freewheel.SDK.AdManager;
3
- this.f=this.a=null;this.B=[];this.o=[];this.A=[];this.m=new _.bi;this.j=null},GL=function(a){var b=[];typeof a.networkId!==_.k&&b.push("networkId");typeof a.serverUrl!==_.te&&b.push("serverUrl");typeof a.profileId!==_.te&&b.push("profileId");typeof a.videoAssetId!==_.te&&typeof a.videoAssetId!==_.k&&b.push("videoAssetId");if(b.length)throw new _.L(1,9,12001,{missingKeys:b.join(", ")});},HL=function(){var a,b,c,d;return _.B(function(e){if(1==e.a)return a=new _.op,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)})},KL=function(a){return _.B(function(b){if(a.B.length)return IL(a),a.f=a.B.shift(),a.f.play(),b.G(0);JL(a);return _.x(b,a.l.a.play(),0)})},LL=function(a){a.A.length?(IL(a),a.f=a.A.shift(),a.f.play()):JL(a)},IL=function(a){var b=a.l.dc(zL).Lc();b&&(a.l.getSurface().show(b),a.l.getSurface().hideMediaElement(),
5
- a.a.registerVideoDisplayBase(xL),a.l.isMuted()?a.setVolume(0):a.setVolume(a.l.getVolume()||1))},JL=function(a){var b=a.l.dc(zL).Lc();b&&a.l.getSurface().hide(b);a.l.getSurface().showMediaElement()},ML=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 DL(a.a,c,d)});a.l.trigger(new _.J(b,d))},NL=function(){this.a=new _.I(yL)};_.w(AL,_.$p);_.t=AL.prototype;
6
- _.t.onPlayerCreated=function(a){if(window.tv&&tv.freewheel&&tv.freewheel.SDK)this.a=_.tn(_.Xc,{id:xL}),this.f=_.tn(_.Pe,{"class":_.Fc}),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 zL};_.t.Lc=function(){return this.a};_.t.gj=function(){return this.f};
7
- _.C("clpp.freewheel.FreeWheelPlugin",AL);AL.prototype.getAdVideo=AL.prototype.gj;AL.prototype.getAdContainer=AL.prototype.Lc;AL.Id=zL;AL.AD_CONTAINER_ID=xL;BL.prototype.create=function(){return new AL};_.qo(new BL);_.t=DL.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===_.te?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[]};DL.prototype.getWrapperCreativeIds=DL.prototype.getWrapperCreativeIds;DL.prototype.getWrapperAdSystems=DL.prototype.getWrapperAdSystems;DL.prototype.getWrapperAdIds=DL.prototype.getWrapperAdIds;DL.prototype.getSequenceLength=DL.prototype.Ab;DL.prototype.getPositionInSequence=DL.prototype.Pb;DL.prototype.getPodTimeOffset=DL.prototype.Ob;DL.prototype.getPodIndex=DL.prototype.getPodIndex;DL.prototype.getPodType=DL.prototype.$a;
12
- DL.prototype.getMediaBitrate=DL.prototype.kb;DL.prototype.getMediaHeight=DL.prototype.xb;DL.prototype.getMediaWidth=DL.prototype.yb;DL.prototype.getMediaUrl=DL.prototype.getMediaUrl;DL.prototype.getClickThroughUrl=DL.prototype.Nb;DL.prototype.isBumper=DL.prototype.ic;DL.prototype.getSkipTimeOffset=DL.prototype.getSkipTimeOffset;DL.prototype.getDuration=DL.prototype.getDuration;DL.prototype.getTitle=DL.prototype.getTitle;DL.prototype.getAdvertiserName=DL.prototype.getAdvertiserName;
13
- DL.prototype.getAdSystem=DL.prototype.getAdSystem;DL.prototype.getApiFramework=DL.prototype.getApiFramework;DL.prototype.getCreativeId=DL.prototype.getCreativeId;DL.prototype.getId=DL.prototype.getId;DL.prototype.getTechnology=DL.prototype.Bb;DL.prototype.getAdManagerVersion=DL.prototype.wb;DL.prototype.getAdManagerName=DL.prototype.vb;EL.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()}})};EL.prototype.Qb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL).length};EL.prototype.lb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL).length};
14
- EL.prototype.hasPostroll=EL.prototype.lb;EL.prototype.hasPreroll=EL.prototype.Qb;EL.prototype.getCuePoints=EL.prototype.getCuePoints;_.t=FL.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{GL(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!==_.te&&typeof b.siteSectionId!==_.k||a.a.setSiteSection(b.siteSectionId);return _.x(m,HL(),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,CL(f.type),f.position,f.slotProfile,f.cuepointSequence,f.maxDuration,f.minDuration,f.acceptContentType);b.keyValues&&typeof b.keyValues===_.Jd&&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.Bk.bind(a));a.g.on(a.a,tv.freewheel.SDK.EVENT_SLOT_STARTED,a.Fk.bind(a));a.g.on(a.a,tv.freewheel.SDK.EVENT_SLOT_ENDED,a.Ek.bind(a));a.g.on(a.a,tv.freewheel.SDK.EVENT_AD,a.Wj.bind(a));a.g.on(a.l,_.De,a.di.bind(a));a.g.on(a.l,_.pe,a.ci.bind(a));a.a.submitRequest();return m["return"](a.m)})};_.t.start=function(){var a=this;return _.B(function(b){return _.x(b,KL(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);JL(a);a.a&&(a.a.dispose(),a.a=null);_.y(b)})};
19
- _.t.Bk=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(_.Wb,{adsTimeline:new EL(this.a)})),this.j=new _.mp(this.l.getSurface(),function(c,d){return b.a.resize(c,d)},this.l.dc(zL).f);else this.l.onError(new _.L(1,9,10003,{errorType:0},
20
- void 0));this.m.resolve()};_.t.Fk=function(a){ML(this,_.Fb,a);this.j.start()};_.t.Ek=function(a){this.f=null;a=a.slot;ML(this,_.Gb);this.j.stop();if(a)switch(a.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL:KL(this);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:JL(this);this.l.play();break;case tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL:LL(this)}};
21
- _.t.Wj=function(a){var b=a.subType;this.h.debug("ad event",b);switch(b){case tv.freewheel.SDK.EVENT_AD_IMPRESSION:ML(this,_.Sb,a);ML(this,_.Lb,a);break;case tv.freewheel.SDK.EVENT_AD_IMPRESSION_END:ML(this,_.Tb,a);break;case tv.freewheel.SDK.EVENT_AD_FIRST_QUARTILE:ML(this,_.Kb,a);break;case tv.freewheel.SDK.EVENT_AD_MIDPOINT:ML(this,_.Nb,a);break;case tv.freewheel.SDK.EVENT_AD_THIRD_QUARTILE:ML(this,_.Ub,a);break;case tv.freewheel.SDK.EVENT_AD_COMPLETE:ML(this,_.Jb,a);break;case tv.freewheel.SDK.EVENT_AD_CLICK:ML(this,
22
- _.Ib,a);break;case tv.freewheel.SDK.EVENT_AD_PAUSE:ML(this,_.Ob,a);break;case tv.freewheel.SDK.EVENT_AD_RESUME:ML(this,_.Qb,a);break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:ML(this,_.Rb,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_START:ML(this,_.Hb,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_END:ML(this,_.Pb,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.di=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();IL(this);this.f.play()}}};
24
- _.t.ci=function(a){if((a=a.detail)&&this.a)switch(a.currentState){case _.Xm:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PLAYING);break;case _.Wm:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PAUSED);break;case _.Qm:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_COMPLETED);LL(this);break;case _.Em:case _.Um:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED)}};FL.prototype.getPosition=FL.prototype.getPosition;FL.prototype.setVolume=FL.prototype.setVolume;
25
- FL.prototype.getVolume=FL.prototype.getVolume;FL.prototype.skip=FL.prototype.skip;FL.prototype.pause=FL.prototype.pause;FL.prototype.resume=FL.prototype.resume;FL.prototype.start=FL.prototype.start;NL.prototype.name=function(){return yL};NL.prototype.ba=function(a,b){return a.namespace()===_.Hc?!1:window.tv&&tv.freewheel&&tv.freewheel.SDK?!(!b||!b.freewheel):(this.a.warn("FreeWheel SDK is not loaded."),!1)};NL.prototype.create=function(a){return new FL(a)};NL.prototype.create=NL.prototype.create;NL.prototype.isSupported=NL.prototype.ba;NL.prototype.name=NL.prototype.name;_.qn(new NL);};
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));}