@castlabs/prestoplay 6.20.0 → 6.21.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 +35 -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 +109 -110
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +553 -550
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +78 -77
  10. package/cjs/cl.externs.js +81 -97
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +69 -69
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +22 -24
  16. package/cjs/cl.mse.js +305 -305
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.sessions.js +16 -16
  22. package/cjs/cl.simid.js +15 -15
  23. package/cjs/cl.smooth.js +72 -72
  24. package/cjs/cl.thumbnails.js +25 -25
  25. package/cjs/cl.tizen.js +70 -69
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +13 -13
  29. package/cjs/cl.vr.js +18 -18
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.yospace.js +9 -0
  32. package/cjs/cl.youbora.js +38 -20
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +5 -5
  36. package/cl.cast.js +88 -89
  37. package/cl.conviva.js +27 -27
  38. package/cl.core.js +471 -468
  39. package/cl.crypto.js +8 -8
  40. package/cl.dash.js +74 -72
  41. package/cl.externs.js +71 -99
  42. package/cl.freewheel.js +19 -19
  43. package/cl.hls.js +74 -74
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +16 -17
  47. package/cl.mse.js +276 -276
  48. package/cl.muxdata.js +13 -13
  49. package/cl.onboard.js +4 -4
  50. package/cl.persistent.js +11 -11
  51. package/cl.playlist.js +5 -5
  52. package/cl.sessions.js +10 -10
  53. package/cl.simid.js +13 -13
  54. package/cl.smooth.js +59 -59
  55. package/cl.thumbnails.js +19 -19
  56. package/cl.tizen.js +57 -57
  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 -0
  63. package/cl.youbora.js +27 -15
  64. package/package.json +3 -1
  65. package/typings.d.ts +123 -24
package/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ # 6.21.0
2
+
3
+ ## **Warning!**
4
+
5
+ Changes in this release might be breaking for some very specific use cases:
6
+
7
+ * Change the default EME API version used by the player on Apple devices from
8
+ the Apple-prefixed EME (`clpp.drm.eme.EmeFactory.Apis.APPLE`) to
9
+ the standard EME (`clpp.drm.eme.EmeFactory.Apis.STANDARD`).
10
+ If needed, this can be changed back by configuring `drm.emeApi: clpp.drm.eme.EmeFactory.Apis.APPLE`.
11
+
12
+ ## New Features
13
+
14
+ * Add Yospace plugin.
15
+ * Support playback of CENC-protected DASH and SMOOTH content
16
+ on Safari.
17
+ * Add the `mse.sendPlaybackSessionIdHeader` config option which when enabled
18
+ adds the `X-Playback-Session-Id` header to every playback-related HTTP
19
+ request of the MSE player.
20
+ * Add support for the `_HLS_primary_id` query param for HLS interstitials.
21
+ * Add integration for NPAW SDK v7 (Youbora).
22
+ * Supported version 7.3.4, for more details refer to [NPAW v7 docs](https://demo.castlabs.com/#/docs/analytics#npaw-v7-youbora).
23
+ * Add support for License Acquisition URL elements `<dashif:Laurl>`
24
+ in DASH.
25
+
26
+ ## Changes
27
+
28
+ * Switch to using default Shaka version instead of fixed version 4.3.4 for CC receiver.
29
+ * CAF's version of Shaka Player now follows default.
30
+ * Fix support for License Acquisition URL elements `<urn:microsoft:laurl>`
31
+ in Widevine-protected DASH.
32
+ * Fix an issue with ABR bandwidth estimation.
33
+
1
34
  # 6.20.0
2
35
 
3
36
  ## **Warning!**
@@ -19,6 +52,8 @@ Changes in this release might be breaking for some very specific use cases:
19
52
 
20
53
  ## Changes
21
54
 
55
+ * Make sure the IMA plugin does not play postroll ads of the previous source
56
+ when a new sources is loaded or after the player is released or destroyed.
22
57
  * Recognize MP3 file extension.
23
58
  * Fix the payload of ad events emitted for HLS interstitial ads.
24
59
  * Fix audio and subtitle track selection when casting to Chromecast devices.
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var FW=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},IW=function(a){a.f=new _.Qh;a.f.on(a.m,_.xg,function(){return GW(a)});a.f.on(a.m,_.wg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.He,function(){return HW(a)});a.f.on(a.m,_.cg,function(b){b=b.detail;switch(b.currentState){case _.Mp:a.a.length||HW(a);s.Media.play(a.a,a.m.getPosition());break;case _.Lp:case _.Dp:GW(a);break;case _.Fp:case _.yp:case _.Jp:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),GW(a),s.Media.close(a.a),a.a=""}})},HW=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(),_.va)},GW=function(a){s.Media.stop(a.a,a.m.getPosition())},JW=function(){};_.x(FW,_.ev);FW.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,IW(this)):this.g.warn("Adobe API not available.")};
4
- FW.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};FW.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",FW);FW.Id="adobe";JW.prototype.create=function(){return new FW};_.Fs(new JW);};
2
+ var f=function(window){var pX=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},sX=function(a){a.f=new _.Sh;a.f.on(a.m,_.xg,function(){return qX(a)});a.f.on(a.m,_.wg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Ge,function(){return rX(a)});a.f.on(a.m,_.cg,function(b){b=b.detail;switch(b.currentState){case _.Up:a.a.length||rX(a);s.Media.play(a.a,a.m.getPosition());break;case _.Tp:case _.Lp:qX(a);break;case _.Np:case _.Gp:case _.Rp:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),qX(a),s.Media.close(a.a),a.a=""}})},rX=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(),_.va)},qX=function(a){s.Media.stop(a.a,a.m.getPosition())},tX=function(){};_.x(pX,_.pv);pX.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,sX(this)):this.g.warn("Adobe API not available.")};
4
+ pX.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};pX.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",pX);pX.Id="adobe";tX.prototype.create=function(){return new pX};_.Qs(new tX);};
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 DW=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.jl(function(){a.m.play()["catch"](function(){})});this.h=new _.Qh},EW=function(){};_.x(DW,_.ev);_.u=DW.prototype;_.u.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.u.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.gm.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Jm.bind(this)))};
3
- _.u.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.u.id=function(){return"airplay"};_.u.gm=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.L(_.Qc,{canCast:this.f}))};_.u.Jm=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Pc:_.Oc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Mp)this.l?this.m.play()["catch"](function(){}):this.o.ea(.01);this.m.trigger(new _.L(a))};_.u.Hb=function(){return this.j};
4
- _.u.tf=function(){return this.f};_.u.yn=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",DW);DW.prototype.showCastMenu=DW.prototype.yn;DW.prototype.canCast=DW.prototype.tf;DW.prototype.isCasting=DW.prototype.Hb;DW.Id="airplay";EW.prototype.create=function(){return new DW};_.Fs(new EW);};
2
+ var f=function(window){var nX=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.nl(function(){a.m.play()["catch"](function(){})});this.h=new _.Sh},oX=function(){};_.x(nX,_.pv);_.u=nX.prototype;_.u.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.u.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.im.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Lm.bind(this)))};
3
+ _.u.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.u.id=function(){return"airplay"};_.u.im=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.L(_.Qc,{canCast:this.f}))};_.u.Lm=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Pc:_.Oc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Up)this.l?this.m.play()["catch"](function(){}):this.o.ea(.01);this.m.trigger(new _.L(a))};_.u.Hb=function(){return this.j};
4
+ _.u.tf=function(){return this.f};_.u.Bn=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",nX);nX.prototype.showCastMenu=nX.prototype.Bn;nX.prototype.canCast=nX.prototype.tf;nX.prototype.isCasting=nX.prototype.Hb;nX.Id="airplay";oX.prototype.create=function(){return new nX};_.Qs(new oX);};
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,11 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var vW=function(a,b){this.m=a;this.f=b;this.a=new _.Qh;this.h=!1},wW=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.ok();return d}_.x(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.va};b.prototype.getVersion=function(){return _.ja};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)},xW=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.Qh;this.j=!1},yW=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===_.fg&&a.h.setUUID(f))},zW=
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,_.ne,a.S.bind(a));a.l=wW(a.m);a.a.attachPlayer(a.l)},AW=function(a,b){_.Th(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},BW=function(){return!window.SmartLib||!window.GenericPlayerApi},CW=function(){};_.u=vW.prototype;
5
- _.u.init=function(){var a=this.m,b=this.a;b.on(a,_.cg,this.sj.bind(this));b.on(a,_.hd,this.qj.bind(this));b.on(a,"seek",this.rj.bind(this))};_.u.qj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.u.sj=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Dp&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Dp:c.notifyStallStart();break;case _.Mp:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.Lp:c.notifyPause()}};
6
- _.u.rj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.u.release=function(){this.a&&(_.Th(this.a),this.a=null)};_.x(xW,_.ev);_.u=xW.prototype;_.u.onPlayerCreated=function(a){this.m=a};_.u.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(BW())return a.onError(new _.N(1,9,11E3));this.j=!0;yW(this,d);zW(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 _.N(1,9,11001,{bpkErrorCode:f,message:e}));AW(c,void 0)}else b.url=e.getURL(),c.f=new vW(c.m,c.l),c.f.init()})}};
7
- _.u.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.u.S=function(a){a=a.detail;if(7003===a.code)AW(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.P)switch(a.category){case 3:AW(this,SmartLib.BPDecodingError);break;case 1:AW(this,SmartLib.BPNetworkingError);break;case 6:AW(this,SmartLib.BPAccessRightError);break;default:AW(this,SmartLib.BPUnspecifiedError)}};_.u.onPlayerWillRelease=function(){BW()||AW(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.u.id=function(){return"broadpeak"};
8
- _.J("clpp.broadpeak.BroadpeakPlugin",xW);xW.isSdkMissing=BW;xW.Id="broadpeak";CW.prototype.create=function(){return new xW};_.Fs(new CW);};
2
+ var f=function(window){var fX=function(a,b){this.m=a;this.f=b;this.a=new _.Sh;this.h=!1},gX=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.qk();return d}_.x(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.va};b.prototype.getVersion=function(){return _.ja};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)},hX=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.Sh;this.j=!1},iX=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===_.fg&&a.h.setUUID(f))},jX=
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,_.ne,a.S.bind(a));a.l=gX(a.m);a.a.attachPlayer(a.l)},kX=function(a,b){_.Vh(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},lX=function(){return!window.SmartLib||!window.GenericPlayerApi},mX=function(){};_.u=fX.prototype;
5
+ _.u.init=function(){var a=this.m,b=this.a;b.on(a,_.cg,this.vj.bind(this));b.on(a,_.hd,this.tj.bind(this));b.on(a,"seek",this.uj.bind(this))};_.u.tj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.u.vj=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Lp&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Lp:c.notifyStallStart();break;case _.Up:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.Tp:c.notifyPause()}};
6
+ _.u.uj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.u.release=function(){this.a&&(_.Vh(this.a),this.a=null)};_.x(hX,_.pv);_.u=hX.prototype;_.u.onPlayerCreated=function(a){this.m=a};_.u.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(lX())return a.onError(new _.N(1,9,11E3));this.j=!0;iX(this,d);jX(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 _.N(1,9,11001,{bpkErrorCode:f,message:e}));kX(c,void 0)}else b.url=e.getURL(),c.f=new fX(c.m,c.l),c.f.init()})}};
7
+ _.u.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.u.S=function(a){a=a.detail;if(7003===a.code)kX(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.P)switch(a.category){case 3:kX(this,SmartLib.BPDecodingError);break;case 1:kX(this,SmartLib.BPNetworkingError);break;case 6:kX(this,SmartLib.BPAccessRightError);break;default:kX(this,SmartLib.BPUnspecifiedError)}};_.u.onPlayerWillRelease=function(){lX()||kX(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.u.id=function(){return"broadpeak"};
8
+ _.J("clpp.broadpeak.BroadpeakPlugin",hX);hX.isSdkMissing=lX;hX.Id="broadpeak";mX.prototype.create=function(){return new hX};_.Qs(new mX);};
9
9
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
10
10
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
11
11
  else{_=this.clpp._;(f.call(g,this));}