@castlabs/prestoplay 6.31.0 → 6.32.0-beta.2

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 +38 -0
  2. package/README.md +2 -2
  3. package/cjs/cl.adobe.js +3 -3
  4. package/cjs/cl.airplay.js +3 -3
  5. package/cjs/cl.broadpeak.js +18 -18
  6. package/cjs/cl.cast.js +127 -125
  7. package/cjs/cl.cdn.js +13 -0
  8. package/cjs/cl.conviva.js +32 -32
  9. package/cjs/cl.core.js +615 -610
  10. package/cjs/cl.crypto.js +9 -9
  11. package/cjs/cl.dash.js +101 -95
  12. package/cjs/cl.externs.js +113 -44
  13. package/cjs/cl.freewheel.js +26 -26
  14. package/cjs/cl.hls.js +78 -78
  15. package/cjs/cl.hlssmpte.js +6 -6
  16. package/cjs/cl.htmlcue.js +30 -30
  17. package/cjs/cl.ima.js +26 -26
  18. package/cjs/cl.mediatailor.js +3 -3
  19. package/cjs/cl.mse.js +351 -350
  20. package/cjs/cl.muxdata.js +14 -14
  21. package/cjs/cl.onboard.js +4 -4
  22. package/cjs/cl.persistent.js +14 -14
  23. package/cjs/cl.playlist.js +6 -6
  24. package/cjs/cl.simid.js +16 -16
  25. package/cjs/cl.smooth.js +71 -71
  26. package/cjs/cl.thumbnails.js +26 -26
  27. package/cjs/cl.tizen.js +71 -71
  28. package/cjs/cl.ttml.js +29 -29
  29. package/cjs/cl.verimatrix.js +5 -5
  30. package/cjs/cl.vimond.js +11 -11
  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 +40 -40
  35. package/cl.adobe.js +3 -3
  36. package/cl.airplay.js +3 -3
  37. package/cl.broadpeak.js +14 -14
  38. package/cl.cast.js +102 -101
  39. package/cl.cdn.js +7 -0
  40. package/cl.conviva.js +27 -27
  41. package/cl.core.js +498 -495
  42. package/cl.crypto.js +9 -9
  43. package/cl.dash.js +91 -87
  44. package/cl.externs.js +109 -44
  45. package/cl.freewheel.js +20 -20
  46. package/cl.hls.js +82 -82
  47. package/cl.hlssmpte.js +5 -5
  48. package/cl.htmlcue.js +26 -26
  49. package/cl.ima.js +20 -20
  50. package/cl.mediatailor.js +2 -2
  51. package/cl.mse.js +301 -300
  52. package/cl.muxdata.js +13 -13
  53. package/cl.onboard.js +4 -4
  54. package/cl.persistent.js +10 -10
  55. package/cl.playlist.js +5 -5
  56. package/cl.simid.js +14 -14
  57. package/cl.smooth.js +61 -61
  58. package/cl.thumbnails.js +19 -19
  59. package/cl.tizen.js +56 -56
  60. package/cl.ttml.js +22 -22
  61. package/cl.verimatrix.js +4 -4
  62. package/cl.vimond.js +8 -8
  63. package/cl.vr.js +14 -14
  64. package/cl.vtt.js +12 -12
  65. package/cl.yospace.js +3 -3
  66. package/cl.youbora.js +31 -31
  67. package/package.json +10 -1
  68. package/typings.d.ts +328 -114
package/CHANGELOG.md CHANGED
@@ -1,3 +1,41 @@
1
+ # 6.32.0
2
+
3
+ ## Changes
4
+
5
+ * Add `ReceiverConfiguration` to `start()` method of `clpp.cast.Receiver`.
6
+ It is now possible to configure the player engine used under the hood
7
+ by the Chromecast Receiver SDK.
8
+ * Fix buffering issues with low-latency HLS streams.
9
+ * Reduce live delay in HLS with interstitials.
10
+ * `clpp.Player` API changes:
11
+ * Added `open()`, same as `load()`.
12
+ * Added `setPosition()`, same as `seek()`.
13
+ * Added `stop()`, same as `release()`.
14
+ * Added `isPlayingAd()`, returns `true` if currently playing an ad.
15
+ * Added `getCurrentSource()`, same as `getLoadedSource()`.
16
+ * Added `setRate()`, same as `setPlaybackRate()`.
17
+ * Added `getRate()`, same as `getPlaybackRate()`.
18
+ * NPAW SDK v7 is now the default analytics integration. The minimum recommended version is v7.3.21.
19
+ * NPAW analytics are now configured via the `npaw` player configuration key. The `youbora` key is deprecated and will be removed in a future version.
20
+ * The legacy Youbora v6 integration remains available by using the `youbora` configuration key instead of `npaw`.
21
+
22
+ ## Deprecations
23
+
24
+ * The following `clpp.Player` API methods are now deprecated and will be removed in version 7:
25
+ * `load()`, use `open()` instead.
26
+ * `seek()`, use `setPosition()` instead.
27
+ * `getLoadedSource()`, use `getCurrentSource()` instead.
28
+ * `setPlaybackRate()`, use `setRate()` instead.
29
+ * `getPlaybackRate()`, use `getRate()` instead.
30
+ * The `youbora` player configuration key is deprecated. Use `npaw` instead.
31
+ * `player.getPlugin('youbora')` should be replaced with `player.getPlugin('npaw')`.
32
+
33
+ # 6.31.1
34
+
35
+ ## Changes
36
+
37
+ * Patch issue with peer dependencies in `package.json`.
38
+
1
39
  # 6.31.0
2
40
 
3
41
  Please update dependencies if you are using them:
package/README.md CHANGED
@@ -19,7 +19,7 @@ npm install @castlabs/prestoplay
19
19
  Once installed, you can follow the [getting started guide](https://demo.castlabs.com/docs/getting_started) for a full
20
20
  example, but here is how it would look like:
21
21
 
22
- ```javascript
22
+ ```js
23
23
  import { clpp } from "@castlabs/prestoplay";
24
24
  import "@castlabs/prestoplay/cl.mse";
25
25
  import "@castlabs/prestoplay/cl.dash";
@@ -28,7 +28,7 @@ clpp.install(clpp.dash.DashComponent);
28
28
 
29
29
  const player = new clpp.Player("video");
30
30
 
31
- player.load({
31
+ player.open({
32
32
  source: "https://content.players.castlabs.com/demos/clear-segmented/manifest.mpd",
33
33
  autoplay: true,
34
34
  });
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var NX=function(){this.m=this.f=null;this.a="";this.g=new _.M("clpp.adobe.AdobePlugin")},QX=function(a){a.f=new _.wi;a.f.on(a.m,_.Ng,function(){return OX(a)});a.f.on(a.m,_.Mg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Le,function(){return PX(a)});a.f.on(a.m,_.ig,function(b){b=b.detail;switch(b.currentState){case 3:a.a.length||PX(a);s.Media.play(a.a,a.m.getPosition());break;case 4:case 2:OX(a);break;case 5:case _.du:case _.Bo:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),OX(a),s.Media.close(a.a),a.a=""}})},PX=function(a){var b=a.m.getLoadedSource();a.a=b?b.name||b.url:"";a.g.info("Open session for "+a.a+" with duration "+a.m.getDuration());s.Media.open(a.a,a.m.getDuration(),_.ya)},OX=function(a){s.Media.stop(a.a,a.m.getPosition())},RX=function(){};_.w(NX,_.Yv);NX.prototype.onPlayerCreated=function(a){var b=a.getConfiguration().adobe;b&&!1===b.enabled?this.g.debug("Adobe plugin is disabled."):window.s&&s.Media?(this.m=a,QX(this)):this.g.warn("Adobe API not available.")};
4
- NX.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};NX.prototype.id=function(){return"adobe"};_.K("clpp.adobe.AdobeAnalyticsPlugin",NX);NX.Id="adobe";RX.prototype.create=function(){return new NX};_.bp(new RX);};
2
+ var f=function(window){var gY=function(){this.m=this.f=null;this.a="";this.g=new _.M("clpp.adobe.AdobePlugin")},jY=function(a){a.f=new _.Bi;a.f.on(a.m,_.Og,function(){return hY(a)});a.f.on(a.m,_.Ng,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Me,function(){return iY(a)});a.f.on(a.m,_.kg,function(b){b=b.detail;switch(b.currentState){case 3:a.a.length||iY(a);s.Media.play(a.a,a.m.getPosition());break;case 4:case 2:hY(a);break;case 5:case _.mu:case _.Fo:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),hY(a),s.Media.close(a.a),a.a=""}})},iY=function(a){var b=a.m.ab();a.a=b?b.name||b.url:"";a.g.info("Open session for "+a.a+" with duration "+a.m.getDuration());s.Media.open(a.a,a.m.getDuration(),_.ya)},hY=function(a){s.Media.stop(a.a,a.m.getPosition())},kY=function(){};_.w(gY,_.gw);gY.prototype.onPlayerCreated=function(a){var b=a.getConfiguration().adobe;b&&!1===b.enabled?this.g.debug("Adobe plugin is disabled."):window.s&&s.Media?(this.m=a,jY(this)):this.g.warn("Adobe API not available.")};
4
+ gY.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};gY.prototype.id=function(){return"adobe"};_.K("clpp.adobe.AdobeAnalyticsPlugin",gY);gY.Id="adobe";kY.prototype.create=function(){return new gY};_.fp(new kY);};
5
5
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
6
6
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
7
7
  else{_=this.clpp._;(f.call(g,this));}
package/cjs/cl.airplay.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var LX=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.ej(function(){a.m.play()["catch"](function(){})});this.h=new _.wi},MX=function(){};_.w(LX,_.Yv);_.r=LX.prototype;_.r.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.r.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.zn.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.ho.bind(this)))};
3
- _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.zn=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.Q(_.Ic,{canCast:this.f}))};_.r.ho=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Hc:_.Gc;if(this.l||!this.m.isPaused()||3===this.m.getState())this.l?this.m.play()["catch"](function(){}):this.o.ia(.01);this.m.trigger(new _.Q(a))};_.r.Ea=function(){return this.j};
4
- _.r.pd=function(){return this.f};_.r.Uo=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.K("clpp.airplay.AirPlayPlugin",LX);LX.prototype.showCastMenu=LX.prototype.Uo;LX.prototype.canCast=LX.prototype.pd;LX.prototype.isCasting=LX.prototype.Ea;LX.Id="airplay";MX.prototype.create=function(){return new LX};_.bp(new MX);};
2
+ var f=function(window){var eY=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.jj(function(){a.m.play()["catch"](function(){})});this.h=new _.Bi},fY=function(){};_.w(eY,_.gw);_.r=eY.prototype;_.r.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.r.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.In.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.qo.bind(this)))};
3
+ _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.In=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.Q(_.Ic,{canCast:this.f}))};_.r.qo=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Hc:_.Gc;if(this.l||!this.m.isPaused()||3===this.m.getState())this.l?this.m.play()["catch"](function(){}):this.o.ia(.01);this.m.trigger(new _.Q(a))};_.r.Ea=function(){return this.j};
4
+ _.r.zd=function(){return this.f};_.r.cp=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.K("clpp.airplay.AirPlayPlugin",eY);eY.prototype.showCastMenu=eY.prototype.cp;eY.prototype.canCast=eY.prototype.zd;eY.prototype.isCasting=eY.prototype.Ea;eY.Id="airplay";fY.prototype.create=function(){return new eY};_.fp(new fY);};
5
5
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
6
6
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
7
7
  else{_=this.clpp._;(f.call(g,this));}
@@ -1,23 +1,23 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var yX=function(a,b,c){this.a=a||{};this.f=b||{};this.w=c||0;this.o=0;this.l=this.j=this.h=!1},zX=function(a,b){this.m=a;this.f=b;this.a=new _.wi;this.h=!1},AX=function(a){this.m=a;this.l=new _.wi;this.h=this.j=this.f=this.a=null;this.o=this.un.bind(this)},BX=function(a){var b=a.m.getSurface().getMedia();b&&(a.h=a.fo.bind(a),b.addEventListener("click",a.h))},CX=function(a){a.l.off(a.m,_.zg,a.o)},DX=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.f=_.Lj();d.a=0;return d}_.w(b,
2
+ var f=function(window){var SX=function(a,b,c){this.a=a||{};this.f=b||{};this.w=c||0;this.o=0;this.l=this.j=this.h=!1},TX=function(a,b){this.m=a;this.f=b;this.a=new _.Bi;this.h=!1},UX=function(a){this.m=a;this.l=new _.Bi;this.h=this.j=this.f=this.a=null;this.o=this.Dn.bind(this)},VX=function(a){var b=a.m.getSurface().getMedia();b&&(a.h=a.po.bind(a),b.addEventListener("click",a.h))},WX=function(a){a.l.off(a.m,_.Bg,a.o)},XX=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.f=_.Qj();d.a=0;return d}_.w(b,
3
3
  GenericPlayerApi);b.prototype.getPlayerName=function(){return _.ya};b.prototype.getVersion=function(){return _.ia};b.prototype.getOSName=function(){return this.f.os};b.prototype.getDeviceVersion=function(){return this.f.osVersion.name};b.prototype.getDeviceType=function(){return"browser"};b.prototype.getTotalDuration=function(){return this.m.isLive()?0:this.a=1E3*this.m.getDuration()};b.prototype.getCurrentPosition=function(){var c=1E3*this.m.getPosition();return 5===this.m.getState()?Math.max(c,
4
- this.a):c};b.prototype.getCurrentBitrate=function(){var c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3};b.prototype.getCapabilities=function(){return{adTracking:this.m.getConfiguration().broadpeak.adTracking}};return new b(a)},EX=function(){this.o=this.f=this.a=this.h=this.m=null;this.w=new _.wi;this.l=!1;this.j=null},FX=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.h||(a.h=SmartLib.getInstance(),a.h.init(c,d,e),typeof f===
5
- _.lg&&a.h.setUUID(f))},GX=function(a,b,c){var d=c.customParameters||{};a.a=a.h.createStreamingSession();a.a.setOption(StreamingSessionOptions.SESSION_PRECACHE,!0);for(var e in d)a.a.setCustomParameter(e,d[e]);c.adTracking&&(a.j=b.getAdsManager(),a.j.initialize(a.a,c.adParameters||{}));a.w.on(b,_.qe,a.zk.bind(a));a.o=DX(b);a.a.attachPlayer(a.o)},HX=function(a,b){_.zi(a.w);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},IX=function(){return!window.SmartLib||!window.GenericPlayerApi},
6
- JX=function(){},KX=function(){};_.r=yX.prototype;_.r.jb=function(){return"Broadpeak"};_.r.kb=function(){return""};_.r.nb=function(){return 1};_.r.getId=function(){return this.a.adId};_.r.getCreativeId=function(){return this.a.creativeId};_.r.Hb=function(){return null};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return""};_.r.getDuration=function(){return 0>=this.a.duration?-1:this.a.duration/1E3};
7
- _.r.getPosition=function(){return this.o};_.r.getSkipTimeOffset=function(){return 0===this.a.skipPosition?-1:(this.a.skipPosition-this.a.startPosition)/1E3};_.r.Jb=function(){return!1};_.r.$a=function(){return this.a.clickURL};_.r.getMediaUrl=function(){return null};_.r.eb=function(){return 0};_.r.cb=function(){return 0};_.r.Ga=function(){return 0};_.r.Ha=function(){return 0===this.f.startPosition?0:0<this.w&&this.f.startPosition+this.f.duration>=this.w?2:1};_.r.getPodIndex=function(){return 1};
8
- _.r.yb=function(){return this.f.startPosition/1E3};_.r.lb=function(){return this.a.index+1};_.r.fb=function(){return 0>=this.f.adCount?-1:this.f.adCount};_.r.getWrapperAdIds=function(){return[]};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.Ib=function(){return null};_.r.canSeek=function(){return!1};yX.prototype.canSeek=yX.prototype.canSeek;yX.prototype.getVideoElement=yX.prototype.Ib;yX.prototype.getWrapperCreativeIds=yX.prototype.getWrapperCreativeIds;
9
- yX.prototype.getWrapperAdSystems=yX.prototype.getWrapperAdSystems;yX.prototype.getWrapperAdIds=yX.prototype.getWrapperAdIds;yX.prototype.getSequenceLength=yX.prototype.fb;yX.prototype.getPositionInSequence=yX.prototype.lb;yX.prototype.getPodTimeOffset=yX.prototype.yb;yX.prototype.getPodIndex=yX.prototype.getPodIndex;yX.prototype.getPodType=yX.prototype.Ha;yX.prototype.getMediaBitrate=yX.prototype.Ga;yX.prototype.getMediaHeight=yX.prototype.cb;yX.prototype.getMediaWidth=yX.prototype.eb;
10
- yX.prototype.getMediaUrl=yX.prototype.getMediaUrl;yX.prototype.getClickThroughUrl=yX.prototype.$a;yX.prototype.isBumper=yX.prototype.Jb;yX.prototype.getSkipTimeOffset=yX.prototype.getSkipTimeOffset;yX.prototype.getPosition=yX.prototype.getPosition;yX.prototype.getDuration=yX.prototype.getDuration;yX.prototype.getTitle=yX.prototype.getTitle;yX.prototype.getAdvertiserName=yX.prototype.getAdvertiserName;yX.prototype.getAdSystem=yX.prototype.getAdSystem;yX.prototype.getApiFramework=yX.prototype.getApiFramework;
11
- yX.prototype.getSourceId=yX.prototype.Hb;yX.prototype.getCreativeId=yX.prototype.getCreativeId;yX.prototype.getId=yX.prototype.getId;yX.prototype.getTechnology=yX.prototype.nb;yX.prototype.getAdManagerVersion=yX.prototype.kb;yX.prototype.getAdManagerName=yX.prototype.jb;_.r=zX.prototype;_.r.init=function(){var a=this.m,b=this.a;b.on(a,_.ig,this.Ck.bind(this));b.on(a,_.ad,this.Ak.bind(this));b.on(a,"seek",this.Bk.bind(this))};_.r.Ak=function(a){a=a.detail;typeof a.bandwidth===_.h&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.Ck=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;2===a.previousState&&c.notifyStallEnd(!b.isPaused());switch(d){case 2:c.notifyStallStart();break;case 3:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case 4:c.notifyPause()}};
12
- _.r.Bk=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.zi(this.a),this.a=null)};_.r=AX.prototype;
13
- _.r.initialize=function(a,b){var c=this;this.j=a;a.activateAdvertising();BX(this);for(var d in b)a.setAdParameter(d,b[d]);a.setAdEventsListener({onAdBreakBegin:function(){c.m.trigger(new _.Q(_.jc,{ad:null}));c.l.on(c.m,_.zg,c.o)},onAdBegin:function(e,f){c.f=e;c.a=new yX(e,f,1E3*c.m.getDuration());c.m.trigger(new _.Q(_.Bc,{ad:c.a}))},onAdSkippable:function(){},onAdEnd:function(){if(c.a){var e={ad:c.a};c.m.trigger(new _.Q(_.nc,e));c.m.trigger(new _.Q(_.Cc,e));c.a=null;c.f=null}},onAdBreakEnd:function(){CX(c);c.m.trigger(new _.Q(_.kc));
14
- c.a=null}})};_.r.fo=function(){if(this.a&&this.j){var a=this.a.$a();a&&(this.j.adUserInteraction("click"),this.m.trigger(new _.Q(_.mc,{ad:this.a})),this.m.pause(),(a=window.open(a,"_blank"))&&a.focus())}};
15
- _.r.un=function(){if(this.a&&this.f){var a=this.m.getPosition()-this.f.startPosition/1E3,b=this.a.getDuration();0<b&&a>b||(this.a.o=a,this.m.trigger(new _.Q(_.yc,{ad:this.a})),!this.a.h&&a>=b/4&&(this.a.h=!0,this.m.trigger(new _.Q(_.oc,{ad:this.a}))),!this.a.j&&a>=b/2&&(this.a.j=!0,this.m.trigger(new _.Q(_.wc,{ad:this.a}))),!this.a.l&&a>=3*b/4&&(this.a.l=!0,this.m.trigger(new _.Q(_.Dc,{ad:this.a}))))}};_.r.load=function(){return Promise.resolve()};_.r.Ab=function(){return!0};_.r.Nc=function(){};
16
- _.r.Kc=function(){return!0};_.r.skip=function(){if(this.a){var a=this.a.getPosition(),b=this.a.getSkipTimeOffset();-1===b||a<b||(a=this.m.getPosition()-a+this.a.getDuration(),b=this.a,this.f=this.a=null,CX(this),this.m.trigger(new _.Q(_.Ac,{ad:b})),this.m.seek(a))}};_.r.pb=function(){};_.r.isPaused=function(){};_.r.pause=function(){};_.r.resume=function(){};_.r.getAdVolume=function(){return 0};_.r.Oa=function(){};_.r.getVolume=function(){return 0};_.r.setVolume=function(){};_.r.setMuted=function(){};
17
- _.r.isMuted=function(){return!1};_.r.jc=function(){return!1};_.r.getPosition=function(){return this.a?this.a.getPosition():-1};_.r.xc=function(){CX(this);this.l.release();var a=this.m.getSurface().getMedia();a&&this.h&&(a.removeEventListener("click",this.h),this.h=null);this.j=this.f=this.a=null;return Promise.resolve()};AX.prototype.getPosition=AX.prototype.getPosition;AX.prototype.setVolume=AX.prototype.setVolume;AX.prototype.getVolume=AX.prototype.getVolume;AX.prototype.resume=AX.prototype.resume;
18
- AX.prototype.pause=AX.prototype.pause;AX.prototype.skip=AX.prototype.skip;_.w(EX,_.Yv);_.r=EX.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(IX())return a.onError(new _.O(1,9,11E3));this.l=!0;FX(this,d);GX(this,a,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.m.onError(new _.O(1,9,11001,{bpkErrorCode:f,message:e}));HX(c,void 0)}else b.url=e.getURL(),c.f=new zX(c.m,c.o),c.f.init()})}};
19
- _.r.onContentLoaded=function(){!1!==this.l&&this.a.precacheEnded()};_.r.zk=function(a){a=a.detail;if(7003===a.code)HX(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.P)switch(a.category){case 3:HX(this,SmartLib.BPDecodingError);break;case 1:HX(this,SmartLib.BPNetworkingError);break;case 6:HX(this,SmartLib.BPAccessRightError);break;default:HX(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){this.j=null;IX()||HX(this,SmartLib.BPSessionEndsNormally);this.l=!1};
20
- _.r.id=function(){return"broadpeak"};_.K("clpp.broadpeak.BroadpeakPlugin",EX);EX.isSdkMissing=IX;EX.Id="broadpeak";JX.prototype.create=function(){return new EX};KX.prototype.name=function(){return"clpp.broadpeak.AdsManagerFactory"};KX.prototype.a=function(a,b){return IX()?!1:!!(b&&b.broadpeak&&b.broadpeak.adTracking)};KX.prototype.create=function(a){return new AX(a)};_.bp(new JX);_.ei(new KX);};
4
+ this.a):c};b.prototype.getCurrentBitrate=function(){var c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3};b.prototype.getCapabilities=function(){return{adTracking:this.m.getConfiguration().broadpeak.adTracking}};return new b(a)},YX=function(){this.o=this.f=this.a=this.h=this.m=null;this.w=new _.Bi;this.l=!1;this.j=null},ZX=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.h||(a.h=SmartLib.getInstance(),a.h.init(c,d,e),typeof f===
5
+ _.ng&&a.h.setUUID(f))},$X=function(a,b,c){var d=c.customParameters||{};a.a=a.h.createStreamingSession();a.a.setOption(StreamingSessionOptions.SESSION_PRECACHE,!0);for(var e in d)a.a.setCustomParameter(e,d[e]);c.adTracking&&(a.j=b.getAdsManager(),a.j.initialize(a.a,c.adParameters||{}));a.w.on(b,_.qe,a.Ik.bind(a));a.o=XX(b);a.a.attachPlayer(a.o)},aY=function(a,b){_.Ei(a.w);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},bY=function(){return!window.SmartLib||!window.GenericPlayerApi},
6
+ cY=function(){},dY=function(){};_.r=SX.prototype;_.r.lb=function(){return"Broadpeak"};_.r.nb=function(){return""};_.r.pb=function(){return 1};_.r.getId=function(){return this.a.adId};_.r.getCreativeId=function(){return this.a.creativeId};_.r.Jb=function(){return null};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};_.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return""};_.r.getDuration=function(){return 0>=this.a.duration?-1:this.a.duration/1E3};
7
+ _.r.getPosition=function(){return this.o};_.r.setPosition=function(a){this.o=a};_.r.getSkipTimeOffset=function(){return 0===this.a.skipPosition?-1:(this.a.skipPosition-this.a.startPosition)/1E3};_.r.Lb=function(){return!1};_.r.$a=function(){return this.a.clickURL};_.r.getMediaUrl=function(){return null};_.r.fb=function(){return 0};_.r.eb=function(){return 0};_.r.Ga=function(){return 0};_.r.Ha=function(){return 0===this.f.startPosition?0:0<this.w&&this.f.startPosition+this.f.duration>=this.w?2:1};
8
+ _.r.getPodIndex=function(){return 1};_.r.zb=function(){return this.f.startPosition/1E3};_.r.ob=function(){return this.a.index+1};_.r.gb=function(){return 0>=this.f.adCount?-1:this.f.adCount};_.r.getWrapperAdIds=function(){return[]};_.r.getWrapperAdSystems=function(){return[]};_.r.getWrapperCreativeIds=function(){return[]};_.r.Kb=function(){return null};_.r.canSeek=function(){return!1};SX.prototype.canSeek=SX.prototype.canSeek;SX.prototype.getVideoElement=SX.prototype.Kb;
9
+ SX.prototype.getWrapperCreativeIds=SX.prototype.getWrapperCreativeIds;SX.prototype.getWrapperAdSystems=SX.prototype.getWrapperAdSystems;SX.prototype.getWrapperAdIds=SX.prototype.getWrapperAdIds;SX.prototype.getSequenceLength=SX.prototype.gb;SX.prototype.getPositionInSequence=SX.prototype.ob;SX.prototype.getPodTimeOffset=SX.prototype.zb;SX.prototype.getPodIndex=SX.prototype.getPodIndex;SX.prototype.getPodType=SX.prototype.Ha;SX.prototype.getMediaBitrate=SX.prototype.Ga;
10
+ SX.prototype.getMediaHeight=SX.prototype.eb;SX.prototype.getMediaWidth=SX.prototype.fb;SX.prototype.getMediaUrl=SX.prototype.getMediaUrl;SX.prototype.getClickThroughUrl=SX.prototype.$a;SX.prototype.isBumper=SX.prototype.Lb;SX.prototype.getSkipTimeOffset=SX.prototype.getSkipTimeOffset;SX.prototype.getPosition=SX.prototype.getPosition;SX.prototype.getDuration=SX.prototype.getDuration;SX.prototype.getTitle=SX.prototype.getTitle;SX.prototype.getAdvertiserName=SX.prototype.getAdvertiserName;
11
+ SX.prototype.getAdSystem=SX.prototype.getAdSystem;SX.prototype.getApiFramework=SX.prototype.getApiFramework;SX.prototype.getSourceId=SX.prototype.Jb;SX.prototype.getCreativeId=SX.prototype.getCreativeId;SX.prototype.getId=SX.prototype.getId;SX.prototype.getTechnology=SX.prototype.pb;SX.prototype.getAdManagerVersion=SX.prototype.nb;SX.prototype.getAdManagerName=SX.prototype.lb;_.r=TX.prototype;_.r.init=function(){var a=this.m,b=this.a;b.on(a,_.kg,this.Lk.bind(this));b.on(a,_.bd,this.Jk.bind(this));b.on(a,"seek",this.Kk.bind(this))};_.r.Jk=function(a){a=a.detail;typeof a.bandwidth===_.h&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.Lk=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;2===a.previousState&&c.notifyStallEnd(!b.isPaused());switch(d){case 2:c.notifyStallStart();break;case 3:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case 4:c.notifyPause()}};
12
+ _.r.Kk=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.Ei(this.a),this.a=null)};_.r=UX.prototype;
13
+ _.r.initialize=function(a,b){var c=this;this.j=a;a.activateAdvertising();VX(this);for(var d in b)a.setAdParameter(d,b[d]);a.setAdEventsListener({onAdBreakBegin:function(){c.m.trigger(new _.Q(_.ic,{ad:null}));c.l.on(c.m,_.Bg,c.o)},onAdBegin:function(e,f){c.f=e;c.a=new SX(e,f,1E3*c.m.getDuration());c.m.trigger(new _.Q(_.Bc,{ad:c.a}))},onAdSkippable:function(){},onAdEnd:function(){if(c.a){var e={ad:c.a};c.m.trigger(new _.Q(_.mc,e));c.m.trigger(new _.Q(_.Cc,e));c.a=null;c.f=null}},onAdBreakEnd:function(){WX(c);c.m.trigger(new _.Q(_.jc));
14
+ c.a=null}})};_.r.po=function(){if(this.a&&this.j){var a=this.a.$a();a&&(this.j.adUserInteraction("click"),this.m.trigger(new _.Q(_.lc,{ad:this.a})),this.m.pause(),(a=window.open(a,"_blank"))&&a.focus())}};
15
+ _.r.Dn=function(){if(this.a&&this.f){var a=this.m.getPosition()-this.f.startPosition/1E3,b=this.a.getDuration();0<b&&a>b||(this.a.setPosition(a),this.m.trigger(new _.Q(_.yc,{ad:this.a})),!this.a.h&&a>=b/4&&(this.a.h=!0,this.m.trigger(new _.Q(_.nc,{ad:this.a}))),!this.a.j&&a>=b/2&&(this.a.j=!0,this.m.trigger(new _.Q(_.vc,{ad:this.a}))),!this.a.l&&a>=3*b/4&&(this.a.l=!0,this.m.trigger(new _.Q(_.Dc,{ad:this.a}))))}};_.r.load=function(){return Promise.resolve()};_.r.Cb=function(){return!0};_.r.Uc=function(){};
16
+ _.r.Rc=function(){return!0};_.r.skip=function(){if(this.a){var a=this.a.getPosition(),b=this.a.getSkipTimeOffset();-1===b||a<b||(a=this.m.getPosition()-a+this.a.getDuration(),b=this.a,this.f=this.a=null,WX(this),this.m.trigger(new _.Q(_.Ac,{ad:b})),this.m.setPosition(a))}};_.r.rb=function(){};_.r.isPaused=function(){};_.r.pause=function(){};_.r.resume=function(){};_.r.getAdVolume=function(){return 0};_.r.Pa=function(){};_.r.getVolume=function(){return 0};_.r.setVolume=function(){};_.r.setMuted=function(){};
17
+ _.r.isMuted=function(){return!1};_.r.Ab=function(){return!1};_.r.getPosition=function(){return this.a?this.a.getPosition():-1};_.r.Cc=function(){WX(this);this.l.release();var a=this.m.getSurface().getMedia();a&&this.h&&(a.removeEventListener("click",this.h),this.h=null);this.j=this.f=this.a=null;return Promise.resolve()};UX.prototype.getPosition=UX.prototype.getPosition;UX.prototype.setVolume=UX.prototype.setVolume;UX.prototype.getVolume=UX.prototype.getVolume;UX.prototype.resume=UX.prototype.resume;
18
+ UX.prototype.pause=UX.prototype.pause;UX.prototype.skip=UX.prototype.skip;_.w(YX,_.gw);_.r=YX.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(bY())return a.onError(new _.O(1,9,11E3));this.l=!0;ZX(this,d);$X(this,a,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.m.onError(new _.O(1,9,11001,{bpkErrorCode:f,message:e}));aY(c,void 0)}else b.url=e.getURL(),c.f=new TX(c.m,c.o),c.f.init()})}};
19
+ _.r.onContentLoaded=function(){!1!==this.l&&this.a.precacheEnded()};_.r.Ik=function(a){a=a.detail;if(7003===a.code)aY(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.P)switch(a.category){case 3:aY(this,SmartLib.BPDecodingError);break;case 1:aY(this,SmartLib.BPNetworkingError);break;case 6:aY(this,SmartLib.BPAccessRightError);break;default:aY(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){this.j=null;bY()||aY(this,SmartLib.BPSessionEndsNormally);this.l=!1};
20
+ _.r.id=function(){return"broadpeak"};_.K("clpp.broadpeak.BroadpeakPlugin",YX);YX.isSdkMissing=bY;YX.Id="broadpeak";cY.prototype.create=function(){return new YX};dY.prototype.name=function(){return"clpp.broadpeak.AdsManagerFactory"};dY.prototype.a=function(a,b){return bY()?!1:!!(b&&b.broadpeak&&b.broadpeak.adTracking)};dY.prototype.create=function(a){return new UX(a)};_.fp(new cY);_.ki(new dY);};
21
21
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
22
22
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
23
23
  else{_=this.clpp._;(f.call(g,this));}