@castlabs/prestoplay 6.34.0-beta.1 → 6.34.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 +8 -2
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +18 -18
  5. package/cjs/cl.cast.js +127 -127
  6. package/cjs/cl.conviva.js +31 -31
  7. package/cjs/cl.core.js +541 -539
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +100 -100
  10. package/cjs/cl.externs.js +37 -38
  11. package/cjs/cl.freewheel.js +26 -26
  12. package/cjs/cl.hls.js +76 -76
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +25 -25
  16. package/cjs/cl.mediatailor.js +3 -3
  17. package/cjs/cl.mse.js +348 -349
  18. package/cjs/cl.muxdata.js +13 -13
  19. package/cjs/cl.onboard.js +4 -4
  20. package/cjs/cl.persistent.js +14 -14
  21. package/cjs/cl.playlist.js +5 -5
  22. package/cjs/cl.simid.js +16 -16
  23. package/cjs/cl.smooth.js +71 -71
  24. package/cjs/cl.thumbnails.js +26 -26
  25. package/cjs/cl.tizen.js +68 -68
  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 +3 -3
  32. package/cjs/cl.youbora.js +37 -37
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +14 -14
  36. package/cl.cast.js +98 -98
  37. package/cl.conviva.js +26 -26
  38. package/cl.core.js +435 -432
  39. package/cl.crypto.js +7 -7
  40. package/cl.dash.js +89 -89
  41. package/cl.externs.js +37 -38
  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 +19 -19
  47. package/cl.mediatailor.js +2 -2
  48. package/cl.mse.js +297 -299
  49. package/cl.muxdata.js +12 -12
  50. package/cl.onboard.js +5 -5
  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 +60 -60
  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 +7 -7
  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 +30 -30
  64. package/package.json +1 -1
  65. package/typings.d.ts +24 -125
package/CHANGELOG.md CHANGED
@@ -1,9 +1,9 @@
1
- # 6.34.O
1
+ # 6.34.0
2
2
 
3
3
  ## New Features
4
4
 
5
5
  * Add ABR stalled segment cancellation.
6
- * Improved ABR performance by cancelling long running segment requests.
6
+ * Improved ABR performance by cancelling long running segment requests.
7
7
  * Add SVTA error codes.
8
8
  * Add support for Broadpeak session options configuration.
9
9
 
@@ -11,6 +11,12 @@
11
11
 
12
12
  * Ignore autoplay attribute if found on `<video>` element. Autoplay should be
13
13
  configured in player configuration.
14
+ * Fix track selection by preferred language (`preferredTextLanguage`, `preferredAudioLanguage`)
15
+ on Safari (native player) in case of tracks with regional variants of the same
16
+ language (e.g. es, es-ES, es-MX).
17
+ * Fix text track selection and track IDs on Safari 16.
18
+ * Sort text and audio tracks on Safari by `NAME`.
19
+ * Fix `preferredTextLanguage` selection of subtitles by language on Safari.
14
20
 
15
21
  # 6.33.0
16
22
 
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var OX=function(){this.m=this.f=null;this.a="";this.g=new _.L("clpp.adobe.AdobePlugin")},RX=function(a){a.f=new _.ki;a.f.on(a.m,_.Fg,function(){return PX(a)});a.f.on(a.m,_.Eg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Fe,function(){return QX(a)});a.f.on(a.m,_.tf,function(b){b=b.detail;switch(b.currentState){case 8:a.a.length||QX(a);s.Media.play(a.a,a.m.getPosition());break;case 10:case 6:PX(a);break;case 11:case 0:case 3:a.g.info("Close session for "+a.a+" in player state "+(b.currentState+
3
- ".")),PX(a),s.Media.close(a.a),a.a=""}})},QX=function(a){var b=a.m.$a();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(),_.Ba)},PX=function(a){s.Media.stop(a.a,a.m.getPosition())},SX=function(){};_.w(OX,_.Rv);OX.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,RX(this)):this.g.warn("Adobe API not available.")};
4
- OX.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};OX.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",OX);OX.Id="adobe";SX.prototype.create=function(){return new OX};_.Yt(new SX);};
2
+ var f=function(window){var dY=function(){this.m=this.f=null;this.a="";this.g=new _.L("clpp.adobe.AdobePlugin")},gY=function(a){a.f=new _.ki;a.f.on(a.m,_.Fg,function(){return eY(a)});a.f.on(a.m,_.Eg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Fe,function(){return fY(a)});a.f.on(a.m,_.uf,function(b){b=b.detail;switch(b.currentState){case 8:a.a.length||fY(a);s.Media.play(a.a,a.m.getPosition());break;case 10:case 6:eY(a);break;case 11:case 0:case 3:a.g.info("Close session for "+a.a+" in player state "+(b.currentState+
3
+ ".")),eY(a),s.Media.close(a.a),a.a=""}})},fY=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(),_.Ba)},eY=function(a){s.Media.stop(a.a,a.m.getPosition())},hY=function(){};_.w(dY,_.hw);dY.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,gY(this)):this.g.warn("Adobe API not available.")};
4
+ dY.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};dY.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",dY);dY.Id="adobe";hY.prototype.create=function(){return new dY};_.eu(new hY);};
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 MX=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Wh(function(){a.m.play()["catch"](function(){})});this.h=new _.ki},NX=function(){};_.w(MX,_.Rv);_.r=MX.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.Cn.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.mo.bind(this)))};
3
- _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.Cn=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.R(_.Gc,{canCast:this.f}))};_.r.mo=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Fc:_.Ec;if(this.l||!this.m.isPaused()||8===this.m.getPlayerState())this.l?this.m.play()["catch"](function(){}):this.o.ia(.01);this.m.trigger(new _.R(a))};_.r.Da=function(){return this.j};
4
- _.r.zd=function(){return this.f};_.r.Zo=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",MX);MX.prototype.showCastMenu=MX.prototype.Zo;MX.prototype.canCast=MX.prototype.zd;MX.prototype.isCasting=MX.prototype.Da;MX.Id="airplay";NX.prototype.create=function(){return new MX};_.Yt(new NX);};
2
+ var f=function(window){var bY=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Wh(function(){a.m.play()["catch"](function(){})});this.h=new _.ki},cY=function(){};_.w(bY,_.hw);_.r=bY.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.Dn.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.no.bind(this)))};
3
+ _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.Dn=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.R(_.Gc,{canCast:this.f}))};_.r.no=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Fc:_.Ec;if(this.l||!this.m.isPaused()||8===this.m.getPlayerState())this.l?this.m.play()["catch"](function(){}):this.o.ia(.01);this.m.trigger(new _.R(a))};_.r.Da=function(){return this.j};
4
+ _.r.zd=function(){return this.f};_.r.$o=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",bY);bY.prototype.showCastMenu=bY.prototype.$o;bY.prototype.canCast=bY.prototype.zd;bY.prototype.isCasting=bY.prototype.Da;bY.Id="airplay";cY.prototype.create=function(){return new bY};_.eu(new cY);};
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 zX=function(a,b,c){this.a=a||{};this.f=b||{};this.w=c||0;this.o=0;this.l=this.j=this.h=!1},AX=function(a,b){this.m=a;this.a=b;this.f=new _.ki;this.h=!1},BX=function(a){this.m=a;this.l=new _.ki;this.h=this.j=this.f=this.a=null;this.o=this.xn.bind(this)},CX=function(a){var b=a.m.getSurface().getMedia();b&&(a.h=a.lo.bind(a),b.addEventListener("click",a.h))},DX=function(a){a.l.off(a.m,_.ug,a.o)},EX=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.f=_.Si();d.a=0;return d}_.w(b,
2
+ var f=function(window){var PX=function(a,b,c){this.a=a||{};this.f=b||{};this.w=c||0;this.o=0;this.l=this.j=this.h=!1},QX=function(a,b){this.m=a;this.a=b;this.f=new _.ki;this.h=!1},RX=function(a){this.m=a;this.l=new _.ki;this.h=this.j=this.f=this.a=null;this.o=this.yn.bind(this)},SX=function(a){var b=a.m.getSurface().getMedia();b&&(a.h=a.mo.bind(a),b.addEventListener("click",a.h))},TX=function(a){a.l.off(a.m,_.ug,a.o)},UX=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.f=_.Si();d.a=0;return d}_.w(b,
3
3
  GenericPlayerApi);b.prototype.getPlayerName=function(){return _.Ba};b.prototype.getVersion=function(){return _.ja};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 11===this.m.getPlayerState()?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)},FX=function(){this.o=this.f=this.a=this.h=this.m=null;this.w=new _.ki;this.l=!1;this.j=null},GX=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
- _.gg&&a.h.setUUID(f))},HX=function(a,b,c){var d=c.customParameters||{},e=a.h.createStreamingSession();a.a=e;var f=c.sessionOptions||{},g;for(g in f){var k=f[g];if(null!=k){var l=Number(g);Number.isNaN(l)||e.setOption(l,k)}}null==f[StreamingSessionOptions.SESSION_PRECACHE]&&e.setOption(StreamingSessionOptions.SESSION_PRECACHE,!1);for(var m in d)a.a.setCustomParameter(m,d[m]);c.adTracking&&(a.j=b.getAdsManager(),a.j.initialize(a.a,c.adParameters||{}));a.w.on(b,_.le,a.Ek.bind(a));a.o=EX(b);a.a.attachPlayer(a.o)},
6
- IX=function(a,b){_.ni(a.w);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},JX=function(){return!window.SmartLib||!window.GenericPlayerApi},KX=function(){},LX=function(){};_.r=zX.prototype;_.r.kb=function(){return"Broadpeak"};_.r.lb=function(){return""};_.r.ob=function(){return 1};_.r.getId=function(){return this.a.adId};_.r.getCreativeId=function(){return this.a.creativeId};_.r.Ib=function(){return null};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};
7
- _.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return""};_.r.getDuration=function(){return 0>=this.a.duration?-1:this.a.duration/1E3};_.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.Kb=function(){return!1};_.r.Za=function(){return this.a.clickURL};_.r.getMediaUrl=function(){return null};_.r.eb=function(){return 0};_.r.cb=function(){return 0};
8
- _.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?_.Bk:_.Ek};_.r.getPodIndex=function(){return 1};_.r.yb=function(){return this.f.startPosition/1E3};_.r.nb=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.Jb=function(){return null};
9
- _.r.canSeek=function(){return!1};zX.prototype.canSeek=zX.prototype.canSeek;zX.prototype.getVideoElement=zX.prototype.Jb;zX.prototype.getWrapperCreativeIds=zX.prototype.getWrapperCreativeIds;zX.prototype.getWrapperAdSystems=zX.prototype.getWrapperAdSystems;zX.prototype.getWrapperAdIds=zX.prototype.getWrapperAdIds;zX.prototype.getSequenceLength=zX.prototype.fb;zX.prototype.getPositionInSequence=zX.prototype.nb;zX.prototype.getPodTimeOffset=zX.prototype.yb;zX.prototype.getPodIndex=zX.prototype.getPodIndex;
10
- zX.prototype.getPodType=zX.prototype.Ha;zX.prototype.getMediaBitrate=zX.prototype.Ga;zX.prototype.getMediaHeight=zX.prototype.cb;zX.prototype.getMediaWidth=zX.prototype.eb;zX.prototype.getMediaUrl=zX.prototype.getMediaUrl;zX.prototype.getClickThroughUrl=zX.prototype.Za;zX.prototype.isBumper=zX.prototype.Kb;zX.prototype.getSkipTimeOffset=zX.prototype.getSkipTimeOffset;zX.prototype.getPosition=zX.prototype.getPosition;zX.prototype.getDuration=zX.prototype.getDuration;zX.prototype.getTitle=zX.prototype.getTitle;
11
- zX.prototype.getAdvertiserName=zX.prototype.getAdvertiserName;zX.prototype.getAdSystem=zX.prototype.getAdSystem;zX.prototype.getApiFramework=zX.prototype.getApiFramework;zX.prototype.getSourceId=zX.prototype.Ib;zX.prototype.getCreativeId=zX.prototype.getCreativeId;zX.prototype.getId=zX.prototype.getId;zX.prototype.getTechnology=zX.prototype.ob;zX.prototype.getAdManagerVersion=zX.prototype.lb;zX.prototype.getAdManagerName=zX.prototype.kb;_.r=AX.prototype;_.r.init=function(){var a=this.m,b=this.f;b.on(a,_.tf,this.Hk.bind(this));b.on(a,_.ad,this.Fk.bind(this));b.on(a,"seek",this.Gk.bind(this))};_.r.Fk=function(a){a=a.detail;typeof a.bandwidth===_.h&&this.a.notifyLayerSwitch(a.bandwidth/1E3)};
12
- _.r.Hk=function(a){var b=this.m,c=this.a;a=a.detail;var d=a.currentState;6===a.previousState&&c.notifyStallEnd(!b.isPaused());switch(d){case 6:c.notifyStallStart();break;case 8:this.h?c.notifyResume():(this.a.notifyFirstImage(),this.h=!0);break;case 10:this.h||(this.a.notifyFirstImage(),this.h=!0),c.notifyPause()}};_.r.Gk=function(){var a=1E3*this.m.getPosition();this.a.notifySeek(a)};_.r.release=function(){this.f&&(_.ni(this.f),this.f=null)};_.r=BX.prototype;
13
- _.r.initialize=function(a,b){var c=this;this.j=a;a.activateAdvertising();CX(this);for(var d in b)a.setAdParameter(d,b[d]);a.setAdEventsListener({onAdBreakBegin:function(){c.m.trigger(new _.R(_.gc,{ad:null}));c.l.on(c.m,_.ug,c.o)},onAdBegin:function(e,f){c.f=e;c.a=new zX(e,f,1E3*c.m.getDuration());c.m.trigger(new _.R(_.yc,{ad:c.a}))},onAdSkippable:function(){},onAdEnd:function(){if(c.a){var e={ad:c.a};c.m.trigger(new _.R(_.kc,e));c.m.trigger(new _.R(_.Ac,e));c.a=null;c.f=null}},onAdBreakEnd:function(){DX(c);c.m.trigger(new _.R(_.hc));
14
- c.a=null}})};_.r.lo=function(){if(this.a&&this.j){var a=this.a.Za();a&&(this.j.adUserInteraction("click"),this.m.trigger(new _.R(_.jc,{ad:this.a})),this.m.pause(),(a=window.open(a,"_blank"))&&a.focus())}};
15
- _.r.xn=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 _.R(_.uc,{ad:this.a})),!this.a.h&&a>=b/4&&(this.a.h=!0,this.m.trigger(new _.R(_.lc,{ad:this.a}))),!this.a.j&&a>=b/2&&(this.a.j=!0,this.m.trigger(new _.R(_.rc,{ad:this.a}))),!this.a.l&&a>=3*b/4&&(this.a.l=!0,this.m.trigger(new _.R(_.Bc,{ad:this.a}))))}};_.r.load=function(){return Promise.resolve()};_.r.Bb=function(){return!0};_.r.Sc=function(){};
16
- _.r.Pc=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,DX(this),this.m.trigger(new _.R(_.wc,{ad:b})),this.m.setPosition(a))}};_.r.Ra=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.zb=function(){return!1};_.r.getPosition=function(){return this.a?this.a.getPosition():-1};_.r.Ac=function(){DX(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()};BX.prototype.getPosition=BX.prototype.getPosition;BX.prototype.setVolume=BX.prototype.setVolume;BX.prototype.getVolume=BX.prototype.getVolume;BX.prototype.resume=BX.prototype.resume;
18
- BX.prototype.pause=BX.prototype.pause;BX.prototype.skip=BX.prototype.skip;_.w(FX,_.Rv);_.r=FX.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(JX())return a.onError(new _.O(1,9,11E3));this.l=!0;GX(this,d);HX(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}));IX(c,void 0)}else b.url=e.getURL(),c.f=new AX(c.m,c.o),c.f.init()})}};
19
- _.r.onContentLoaded=function(){!1!==this.l&&this.a.precacheEnded()};_.r.Ek=function(a){a=a.detail;if(7003===a.code)IX(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:IX(this,SmartLib.BPDecodingError);break;case 1:IX(this,SmartLib.BPNetworkingError);break;case 6:IX(this,SmartLib.BPAccessRightError);break;default:IX(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){this.j=null;JX()||IX(this,SmartLib.BPSessionEndsNormally);this.l=!1};
20
- _.r.id=function(){return"broadpeak"};_.J("clpp.broadpeak.BroadpeakPlugin",FX);FX.isSdkMissing=JX;FX.Id="broadpeak";KX.prototype.create=function(){return new FX};LX.prototype.name=function(){return"clpp.broadpeak.AdsManagerFactory"};LX.prototype.a=function(a,b){return JX()?!1:!!(b&&b.broadpeak&&b.broadpeak.adTracking)};LX.prototype.create=function(a){return new BX(a)};_.Yt(new KX);_.cr(new LX);};
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)},VX=function(){this.o=this.f=this.a=this.h=this.m=null;this.w=new _.ki;this.l=!1;this.j=null},WX=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
+ _.hg&&a.h.setUUID(f))},XX=function(a,b,c){var d=c.customParameters||{},e=a.h.createStreamingSession();a.a=e;var f=c.sessionOptions||{},g;for(g in f){var k=f[g];if(null!=k){var l=Number(g);Number.isNaN(l)||e.setOption(l,k)}}null==f[StreamingSessionOptions.SESSION_PRECACHE]&&e.setOption(StreamingSessionOptions.SESSION_PRECACHE,!1);for(var m in d)a.a.setCustomParameter(m,d[m]);c.adTracking&&(a.j=b.getAdsManager(),a.j.initialize(a.a,c.adParameters||{}));a.w.on(b,_.le,a.Fk.bind(a));a.o=UX(b);a.a.attachPlayer(a.o)},
6
+ YX=function(a,b){_.ni(a.w);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},ZX=function(){return!window.SmartLib||!window.GenericPlayerApi},$X=function(){},aY=function(){};_.r=PX.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.Ib=function(){return null};_.r.getApiFramework=function(){return null};_.r.getAdSystem=function(){return""};
7
+ _.r.getAdvertiserName=function(){return""};_.r.getTitle=function(){return""};_.r.getDuration=function(){return 0>=this.a.duration?-1:this.a.duration/1E3};_.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.Kb=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};
8
+ _.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?_.Bk:_.Ek};_.r.getPodIndex=function(){return 1};_.r.yb=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.Jb=function(){return null};
9
+ _.r.canSeek=function(){return!1};PX.prototype.canSeek=PX.prototype.canSeek;PX.prototype.getVideoElement=PX.prototype.Jb;PX.prototype.getWrapperCreativeIds=PX.prototype.getWrapperCreativeIds;PX.prototype.getWrapperAdSystems=PX.prototype.getWrapperAdSystems;PX.prototype.getWrapperAdIds=PX.prototype.getWrapperAdIds;PX.prototype.getSequenceLength=PX.prototype.gb;PX.prototype.getPositionInSequence=PX.prototype.ob;PX.prototype.getPodTimeOffset=PX.prototype.yb;PX.prototype.getPodIndex=PX.prototype.getPodIndex;
10
+ PX.prototype.getPodType=PX.prototype.Ha;PX.prototype.getMediaBitrate=PX.prototype.Ga;PX.prototype.getMediaHeight=PX.prototype.eb;PX.prototype.getMediaWidth=PX.prototype.fb;PX.prototype.getMediaUrl=PX.prototype.getMediaUrl;PX.prototype.getClickThroughUrl=PX.prototype.$a;PX.prototype.isBumper=PX.prototype.Kb;PX.prototype.getSkipTimeOffset=PX.prototype.getSkipTimeOffset;PX.prototype.getPosition=PX.prototype.getPosition;PX.prototype.getDuration=PX.prototype.getDuration;PX.prototype.getTitle=PX.prototype.getTitle;
11
+ PX.prototype.getAdvertiserName=PX.prototype.getAdvertiserName;PX.prototype.getAdSystem=PX.prototype.getAdSystem;PX.prototype.getApiFramework=PX.prototype.getApiFramework;PX.prototype.getSourceId=PX.prototype.Ib;PX.prototype.getCreativeId=PX.prototype.getCreativeId;PX.prototype.getId=PX.prototype.getId;PX.prototype.getTechnology=PX.prototype.pb;PX.prototype.getAdManagerVersion=PX.prototype.nb;PX.prototype.getAdManagerName=PX.prototype.lb;_.r=QX.prototype;_.r.init=function(){var a=this.m,b=this.f;b.on(a,_.uf,this.Ik.bind(this));b.on(a,_.ad,this.Gk.bind(this));b.on(a,"seek",this.Hk.bind(this))};_.r.Gk=function(a){a=a.detail;typeof a.bandwidth===_.h&&this.a.notifyLayerSwitch(a.bandwidth/1E3)};
12
+ _.r.Ik=function(a){var b=this.m,c=this.a;a=a.detail;var d=a.currentState;6===a.previousState&&c.notifyStallEnd(!b.isPaused());switch(d){case 6:c.notifyStallStart();break;case 8:this.h?c.notifyResume():(this.a.notifyFirstImage(),this.h=!0);break;case 10:this.h||(this.a.notifyFirstImage(),this.h=!0),c.notifyPause()}};_.r.Hk=function(){var a=1E3*this.m.getPosition();this.a.notifySeek(a)};_.r.release=function(){this.f&&(_.ni(this.f),this.f=null)};_.r=RX.prototype;
13
+ _.r.initialize=function(a,b){var c=this;this.j=a;a.activateAdvertising();SX(this);for(var d in b)a.setAdParameter(d,b[d]);a.setAdEventsListener({onAdBreakBegin:function(){c.m.trigger(new _.R(_.gc,{ad:null}));c.l.on(c.m,_.ug,c.o)},onAdBegin:function(e,f){c.f=e;c.a=new PX(e,f,1E3*c.m.getDuration());c.m.trigger(new _.R(_.xc,{ad:c.a}))},onAdSkippable:function(){},onAdEnd:function(){if(c.a){var e={ad:c.a};c.m.trigger(new _.R(_.kc,e));c.m.trigger(new _.R(_.zc,e));c.a=null;c.f=null}},onAdBreakEnd:function(){TX(c);c.m.trigger(new _.R(_.hc));
14
+ c.a=null}})};_.r.mo=function(){if(this.a&&this.j){var a=this.a.$a();a&&(this.j.adUserInteraction("click"),this.m.trigger(new _.R(_.jc,{ad:this.a})),this.m.pause(),(a=window.open(a,"_blank"))&&a.focus())}};
15
+ _.r.yn=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 _.R(_.uc,{ad:this.a})),!this.a.h&&a>=b/4&&(this.a.h=!0,this.m.trigger(new _.R(_.lc,{ad:this.a}))),!this.a.j&&a>=b/2&&(this.a.j=!0,this.m.trigger(new _.R(_.rc,{ad:this.a}))),!this.a.l&&a>=3*b/4&&(this.a.l=!0,this.m.trigger(new _.R(_.Bc,{ad:this.a}))))}};_.r.load=function(){return Promise.resolve()};_.r.Bb=function(){return!0};_.r.Sc=function(){};
16
+ _.r.Pc=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,TX(this),this.m.trigger(new _.R(_.wc,{ad:b})),this.m.setPosition(a))}};_.r.Sa=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.zb=function(){return!1};_.r.getPosition=function(){return this.a?this.a.getPosition():-1};_.r.Ac=function(){TX(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()};RX.prototype.getPosition=RX.prototype.getPosition;RX.prototype.setVolume=RX.prototype.setVolume;RX.prototype.getVolume=RX.prototype.getVolume;RX.prototype.resume=RX.prototype.resume;
18
+ RX.prototype.pause=RX.prototype.pause;RX.prototype.skip=RX.prototype.skip;_.w(VX,_.hw);_.r=VX.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(ZX())return a.onError(new _.O(1,9,11E3));this.l=!0;WX(this,d);XX(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}));YX(c,void 0)}else b.url=e.getURL(),c.f=new QX(c.m,c.o),c.f.init()})}};
19
+ _.r.onContentLoaded=function(){!1!==this.l&&this.a.precacheEnded()};_.r.Fk=function(a){a=a.detail;if(7003===a.code)YX(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:YX(this,SmartLib.BPDecodingError);break;case 1:YX(this,SmartLib.BPNetworkingError);break;case 6:YX(this,SmartLib.BPAccessRightError);break;default:YX(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){this.j=null;ZX()||YX(this,SmartLib.BPSessionEndsNormally);this.l=!1};
20
+ _.r.id=function(){return"broadpeak"};_.J("clpp.broadpeak.BroadpeakPlugin",VX);VX.isSdkMissing=ZX;VX.Id="broadpeak";$X.prototype.create=function(){return new VX};aY.prototype.name=function(){return"clpp.broadpeak.AdsManagerFactory"};aY.prototype.a=function(a,b){return ZX()?!1:!!(b&&b.broadpeak&&b.broadpeak.adTracking)};aY.prototype.create=function(a){return new RX(a)};_.eu(new $X);_.Yq(new aY);};
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));}