@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.
Files changed (68) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +7 -7
  5. package/cjs/cl.cast.js +115 -113
  6. package/cjs/cl.conviva.js +32 -32
  7. package/cjs/cl.core.js +623 -623
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +89 -89
  10. package/cjs/cl.externs.js +112 -72
  11. package/cjs/cl.freewheel.js +25 -25
  12. package/cjs/cl.hls.js +78 -77
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +23 -24
  16. package/cjs/cl.mediatailor.js +3 -3
  17. package/cjs/cl.mse.js +353 -345
  18. package/cjs/cl.muxdata.js +14 -15
  19. package/cjs/cl.onboard.js +4 -3
  20. package/cjs/cl.persistent.js +15 -15
  21. package/cjs/cl.playlist.js +6 -6
  22. package/cjs/cl.simid.js +16 -17
  23. package/cjs/cl.smooth.js +72 -72
  24. package/cjs/cl.thumbnails.js +26 -26
  25. package/cjs/cl.tizen.js +73 -72
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +12 -12
  29. package/cjs/cl.vr.js +19 -19
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.yospace.js +4 -4
  32. package/cjs/cl.youbora.js +38 -38
  33. package/cjs/polyfill.min.js +15 -3
  34. package/cl.adobe.js +3 -3
  35. package/cl.airplay.js +3 -3
  36. package/cl.broadpeak.js +6 -5
  37. package/cl.cast.js +93 -90
  38. package/cl.conviva.js +27 -27
  39. package/cl.core.js +506 -507
  40. package/cl.crypto.js +9 -9
  41. package/cl.dash.js +83 -82
  42. package/cl.externs.js +112 -72
  43. package/cl.freewheel.js +19 -19
  44. package/cl.hls.js +80 -79
  45. package/cl.hlssmpte.js +5 -5
  46. package/cl.htmlcue.js +26 -26
  47. package/cl.ima.js +17 -17
  48. package/cl.mediatailor.js +2 -3
  49. package/cl.mse.js +308 -305
  50. package/cl.muxdata.js +13 -13
  51. package/cl.onboard.js +4 -4
  52. package/cl.persistent.js +11 -11
  53. package/cl.playlist.js +5 -5
  54. package/cl.simid.js +14 -14
  55. package/cl.smooth.js +60 -60
  56. package/cl.thumbnails.js +19 -19
  57. package/cl.tizen.js +57 -57
  58. package/cl.ttml.js +22 -22
  59. package/cl.verimatrix.js +4 -4
  60. package/cl.vimond.js +8 -8
  61. package/cl.vr.js +15 -15
  62. package/cl.vtt.js +12 -12
  63. package/cl.yospace.js +3 -3
  64. package/cl.youbora.js +31 -29
  65. package/package.json +1 -1
  66. package/typings.d.ts +115 -63
  67. package/cjs/cl.sessions.js +0 -21
  68. package/cl.sessions.js +0 -10
@@ -1,29 +1,29 @@
1
1
  (function(){var g={}; var _ = _ || {}
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 _.J("clpp.freewheel.AdsManager");this.m=a;this.h=new _.hi;this.w=new tv.freewheel.SDK.AdManager;
3
- this.f=this.a=null;this.B=[];this.o=[];this.A=[];this.l=new _.qk;this.j=null},$V=function(a){var b=[];typeof a.networkId!==_.k&&b.push("networkId");typeof a.serverUrl!==_.fg&&b.push("serverUrl");typeof a.profileId!==_.fg&&b.push("profileId");typeof a.videoAssetId!==_.fg&&typeof a.videoAssetId!==_.k&&b.push("videoAssetId");if(b.length)throw new _.N(1,9,12001,{missingKeys:b.join(", ")});},aW=function(){var a,b,c,d;return _.H(function(e){if(1==e.a)return a=new _.av,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 _.H(function(b){if(a.B.length)return bW(a),a.f=a.B.shift(),a.f.play(),b.D(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.je(TV).ud();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.je(TV).ud();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 _.K(b,d))},gW=function(){this.Da=new _.J(SV)};_.w(UV,_.ew);_.r=UV.prototype;
6
- _.r.onPlayerCreated=function(a){if(window.tv&&tv.freewheel&&tv.freewheel.SDK)this.a=_.hr(_.Pd,{id:RV}),this.f=_.hr(_.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 TV};_.r.ud=function(){return this.a};_.r.Pl=function(){return this.f};
7
- _.I("clpp.freewheel.FreeWheelPlugin",UV);UV.prototype.getAdVideo=UV.prototype.Pl;UV.prototype.getAdContainer=UV.prototype.ud;UV.Id=TV;UV.AD_CONTAINER_ID=RV;VV.prototype.create=function(){return new UV};_.bu(new VV);_.r=XV.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===_.fg?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.Wa=function(){return 0};_.r.Xa=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.Xa()){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.Xa()){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};XV.prototype.getVideoElement=XV.prototype.ec;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.pb;XV.prototype.getPositionInSequence=XV.prototype.Bb;
12
- XV.prototype.getPodTimeOffset=XV.prototype.Ob;XV.prototype.getPodIndex=XV.prototype.getPodIndex;XV.prototype.getPodType=XV.prototype.Xa;XV.prototype.getMediaBitrate=XV.prototype.Wa;XV.prototype.getMediaHeight=XV.prototype.nb;XV.prototype.getMediaWidth=XV.prototype.ob;XV.prototype.getMediaUrl=XV.prototype.getMediaUrl;XV.prototype.getClickThroughUrl=XV.prototype.zb;XV.prototype.isBumper=XV.prototype.fc;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.bc;XV.prototype.getCreativeId=XV.prototype.getCreativeId;XV.prototype.getId=XV.prototype.getId;XV.prototype.getTechnology=XV.prototype.Cb;XV.prototype.getAdManagerVersion=XV.prototype.yb;
14
- XV.prototype.getAdManagerName=XV.prototype.xb;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.Rb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL).length};YV.prototype.Qb=function(){return 0<this.a.getSlotsByTimePositionClass(tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL).length};
15
- YV.prototype.hasPostroll=YV.prototype.Qb;YV.prototype.hasPreroll=YV.prototype.Rb;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 _.H(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!==_.fg&&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===_.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.zn.bind(a));a.h.on(a.a,tv.freewheel.SDK.EVENT_SLOT_STARTED,a.En.bind(a));a.h.on(a.a,tv.freewheel.SDK.EVENT_SLOT_ENDED,a.Dn.bind(a));a.h.on(a.a,tv.freewheel.SDK.EVENT_AD,a.Tm.bind(a));a.h.on(a.m,_.sg,a.Ck.bind(a));a.h.on(a.m,_.cg,a.Bk.bind(a));a.a.submitRequest();return m["return"](a.l)})};_.r.start=function(){var a=this;return _.H(function(b){return _.x(b,dW(a),0)})};_.r.md=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.hd=function(){return!0};_.r.Dc=function(){var a=this;return _.H(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.zn=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 YV(this.a)})),this.j=new _.Zu(this.m.getSurface(),function(c,d){return b.a.resize(c,d)},this.m.je(TV).f);else this.m.onError(new _.N(1,9,10003,{errorType:0},
21
- void 0));this.l.resolve()};_.r.En=function(a){fW(this,_.hc,a);this.j.start()};_.r.Dn=function(a){this.f=null;a=a.slot;fW(this,_.ic);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.Tm=function(a){var b=a.subType;this.g.debug("ad event",b);switch(b){case tv.freewheel.SDK.EVENT_AD_IMPRESSION:fW(this,_.xc,a);fW(this,_.qc,a);break;case tv.freewheel.SDK.EVENT_AD_IMPRESSION_END:fW(this,_.zc,a);break;case tv.freewheel.SDK.EVENT_AD_FIRST_QUARTILE:fW(this,_.mc,a);break;case tv.freewheel.SDK.EVENT_AD_MIDPOINT:fW(this,_.sc,a);break;case tv.freewheel.SDK.EVENT_AD_THIRD_QUARTILE:fW(this,_.Ac,a);break;case tv.freewheel.SDK.EVENT_AD_COMPLETE:fW(this,_.lc,a);break;case tv.freewheel.SDK.EVENT_AD_CLICK:fW(this,
23
- _.kc,a);break;case tv.freewheel.SDK.EVENT_AD_PAUSE:fW(this,_.tc,a);break;case tv.freewheel.SDK.EVENT_AD_RESUME:fW(this,_.vc,a);break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:fW(this,_.wc,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_START:fW(this,_.jc,a);break;case tv.freewheel.SDK.EVENT_AD_BUFFERING_END:fW(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.Ck=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.Bk=function(a){if((a=a.detail)&&this.a)switch(a.currentState){case _.Kq:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PLAYING);break;case _.Jq:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_PAUSED);break;case _.Dq:this.a.setVideoState(tv.freewheel.SDK.VIDEO_STATE_COMPLETED);eW(this);break;case _.wq:case _.Hq: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()!==_.sd&&b&&b.freewheel?window.tv&&tv.freewheel&&tv.freewheel.SDK?!0:(this.Da.warn("FreeWheel SDK is not loaded."),!1):!1};gW.prototype.create=function(a){return new ZV(a)};_.cr(new gW);};
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));}