@castlabs/prestoplay 6.30.1-beta.1 → 6.31.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 (65) hide show
  1. package/CHANGELOG.md +38 -9
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +19 -7
  5. package/cjs/cl.cast.js +127 -127
  6. package/cjs/cl.conviva.js +32 -32
  7. package/cjs/cl.core.js +509 -510
  8. package/cjs/cl.crypto.js +10 -10
  9. package/cjs/cl.dash.js +95 -95
  10. package/cjs/cl.externs.js +214 -40
  11. package/cjs/cl.freewheel.js +26 -26
  12. package/cjs/cl.hls.js +79 -78
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +26 -26
  16. package/cjs/cl.mediatailor.js +3 -3
  17. package/cjs/cl.mse.js +350 -348
  18. package/cjs/cl.muxdata.js +14 -14
  19. package/cjs/cl.onboard.js +4 -4
  20. package/cjs/cl.persistent.js +15 -15
  21. package/cjs/cl.playlist.js +6 -6
  22. package/cjs/cl.simid.js +16 -16
  23. package/cjs/cl.smooth.js +71 -71
  24. package/cjs/cl.thumbnails.js +25 -25
  25. package/cjs/cl.tizen.js +72 -72
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +11 -11
  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/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +14 -6
  36. package/cl.cast.js +99 -99
  37. package/cl.conviva.js +26 -26
  38. package/cl.core.js +387 -386
  39. package/cl.crypto.js +8 -8
  40. package/cl.dash.js +86 -86
  41. package/cl.externs.js +215 -37
  42. package/cl.freewheel.js +20 -20
  43. package/cl.hls.js +82 -82
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +20 -19
  47. package/cl.mediatailor.js +2 -2
  48. package/cl.mse.js +300 -298
  49. package/cl.muxdata.js +12 -12
  50. package/cl.onboard.js +4 -4
  51. package/cl.persistent.js +10 -10
  52. package/cl.playlist.js +5 -5
  53. package/cl.simid.js +14 -14
  54. package/cl.smooth.js +61 -61
  55. package/cl.thumbnails.js +17 -17
  56. package/cl.tizen.js +55 -55
  57. package/cl.ttml.js +22 -22
  58. package/cl.verimatrix.js +4 -4
  59. package/cl.vimond.js +8 -8
  60. package/cl.vr.js +14 -14
  61. package/cl.vtt.js +12 -12
  62. package/cl.yospace.js +3 -3
  63. package/cl.youbora.js +31 -31
  64. package/package.json +7 -6
  65. package/typings.d.ts +84 -60
package/CHANGELOG.md CHANGED
@@ -1,17 +1,46 @@
1
- # 6.30.1
1
+ # 6.31.0
2
+
3
+ Please update dependencies if you are using them:
4
+ * `npm i @broadpeak/smartlib-all-compatibility@5.4.4-808048b`
5
+ * `npm i mux.js@6`
6
+ * `npm i npaw-plugin@7.3.21`
7
+ * `npm i npaw-plugin-adapters@7.3.21`
8
+
9
+ ## New Features
10
+
11
+ * Enable IMA on iOS.
12
+ * Add support for SSAI ad management to Broadpeak plugin.
2
13
 
3
14
  ## Changes
4
15
 
5
- * Simplify ad management API. Ads can now be controlled by calling methods of `clpp.Player`
6
- such as `play()`, `pause()`, `setVolume()` and `setMuted()`. The corresponding methods
7
- of `clpp.ads.IAdsManager` are now deprecated (`resume()`, `pause()`, `setVolume()`,
8
- `getVolume()`).
9
- * Fix issues with controlling volume of ads (Freewheel, HLS interstitials, IMA).
10
- * Fix issues with controlling volume by Chromecast sender.
11
- * Update the minimum supported version of mux.js to 6.0.0.
12
- * Please upgrade mux.js to major version 6.
16
+ * Simplify ad management API. Ads can now be controlled by calling methods
17
+ of `clpp.Player` such as `play()`, `pause()`, `setVolume()` and `setMuted()`.
18
+ * Fix issues with controlling volume:
19
+ * During playback of CSAI and SGAI ads (IMA, Freewheel, HLS interstitials).
20
+ * On Chromecast sender.
21
+ * Update the minimum supported version of dependencies:
22
+ * Update mux.js to 6.0.0.
23
+ * Update Broadpeak SmartLib to 5.4.4-808048b.
24
+ * Update NPAW SDK to v7.3.21.
13
25
  * Player surface configuration option `webOSStartupPatch` is set to `false` by default.
26
+ This shouldn't have any negative impact on performance or behavior.
14
27
  * For more details refer to: https://demo.castlabs.com/docs/surface#webos-startup-patch
28
+ * Fix issues with live HLS streams:
29
+ * Fix playback of streams where `EXT-X-TARGETDURATION` differs significantly from segment durations.
30
+ * Fix issues with streams that contain discontinuities.
31
+ * Fix corner-case issues with listing HLS audio tracks in `clpp.TrackManager` on iOS.
32
+ * Fix triggering of `clpp.events.AD_LOADED` for interstitial ads in HLS.
33
+ * Fix a crash in low-latency HLS.
34
+
35
+ ## Deprecations
36
+
37
+ * Old APIs for management of ads are now deprecated and will be removed in
38
+ version 7.0.0, these are methods `resume()`, `pause()`, `setVolume()`, `getVolume()`
39
+ on `clpp.ads.IAdsManager`. Use methods of `clpp.Player` instead.
40
+ * The `clpp.cast.Receiver.isApiReady` API is now deprecated and will be removed in
41
+ version 7.0.0, there is no need to call this API.
42
+ * Volume controls on Chromecast Receiver are now deprecated, the feature is not
43
+ supported by the platform.
15
44
 
16
45
  # 6.30.0
17
46
 
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var GX=function(){this.m=this.f=null;this.a="";this.g=new _.L("clpp.adobe.AdobePlugin")},JX=function(a){a.f=new _.wi;a.f.on(a.m,_.Ng,function(){return HX(a)});a.f.on(a.m,_.Mg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Me,function(){return IX(a)});a.f.on(a.m,_.ig,function(b){b=b.detail;switch(b.currentState){case 3:a.a.length||IX(a);s.Media.play(a.a,a.m.getPosition());break;case 4:case 2:HX(a);break;case 5:case _.du:case _.Ho:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),HX(a),s.Media.close(a.a),a.a=""}})},IX=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)},HX=function(a){s.Media.stop(a.a,a.m.getPosition())},KX=function(){};_.w(GX,_.Yv);GX.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,JX(this)):this.g.warn("Adobe API not available.")};
4
- GX.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};GX.prototype.id=function(){return"adobe"};_.K("clpp.adobe.AdobeAnalyticsPlugin",GX);GX.Id="adobe";KX.prototype.create=function(){return new GX};_.ap(new KX);};
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);};
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 EX=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},FX=function(){};_.w(EX,_.Yv);_.r=EX.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.xn.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.co.bind(this)))};
3
- _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.xn=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.co=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.Da=function(){return this.j};
4
- _.r.od=function(){return this.f};_.r.Ro=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.K("clpp.airplay.AirPlayPlugin",EX);EX.prototype.showCastMenu=EX.prototype.Ro;EX.prototype.canCast=EX.prototype.od;EX.prototype.isCasting=EX.prototype.Da;EX.Id="airplay";FX.prototype.create=function(){return new EX};_.ap(new FX);};
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);};
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,11 +1,23 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var wX=function(a,b){this.m=a;this.f=b;this.a=new _.wi;this.h=!1},xX=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Lj();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.ya};b.prototype.getVersion=function(){return _.ia};b.prototype.getOSName=function(){return this.a.os};b.prototype.getDeviceVersion=function(){return this.a.osVersion.name};b.prototype.getDeviceType=function(){return"browser"};b.prototype.getTotalDuration=function(){return this.m.isLive()?
3
- 0:1E3*this.m.getDuration()};b.prototype.getCurrentPosition=function(){return 1E3*this.m.getPosition()};b.prototype.getCurrentBitrate=function(){var c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3};return new b(a)},yX=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.wi;this.j=!1},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===_.lg&&a.h.setUUID(f))},AX=
4
- function(a,b){var c=b.customParameters||{};a.a=a.h.createStreamingSession();a.a.setOption(StreamingSessionOptions.SESSION_PRECACHE,!0);for(var d in c)a.a.setCustomParameter(d,c[d]);a.o.on(a.m,_.qe,a.xk.bind(a));a.l=xX(a.m);a.a.attachPlayer(a.l)},BX=function(a,b){_.zi(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},CX=function(){return!window.SmartLib||!window.GenericPlayerApi},DX=function(){};_.r=wX.prototype;
5
- _.r.init=function(){var a=this.m,b=this.a;b.on(a,_.ig,this.Ak.bind(this));b.on(a,_.ad,this.yk.bind(this));b.on(a,"seek",this.zk.bind(this))};_.r.yk=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.Ak=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()}};
6
- _.r.zk=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.zi(this.a),this.a=null)};_.w(yX,_.Yv);_.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(CX())return a.onError(new _.O(1,9,11E3));this.j=!0;zX(this,d);AX(this,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}));BX(c,void 0)}else b.url=e.getURL(),c.f=new wX(c.m,c.l),c.f.init()})}};
7
- _.r.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.r.xk=function(a){a=a.detail;if(7003===a.code)BX(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.P)switch(a.category){case 3:BX(this,SmartLib.BPDecodingError);break;case 1:BX(this,SmartLib.BPNetworkingError);break;case 6:BX(this,SmartLib.BPAccessRightError);break;default:BX(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){CX()||BX(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.r.id=function(){return"broadpeak"};
8
- _.K("clpp.broadpeak.BroadpeakPlugin",yX);yX.isSdkMissing=CX;yX.Id="broadpeak";DX.prototype.create=function(){return new yX};_.ap(new DX);};
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,
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);};
9
21
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
10
22
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
11
23
  else{_=this.clpp._;(f.call(g,this));}