@castlabs/prestoplay 6.4.1 → 6.5.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 (58) 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 +6 -6
  5. package/cjs/cl.cast.js +110 -110
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +419 -416
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +26 -26
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +47 -47
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +31 -31
  15. package/cjs/cl.ima.js +22 -22
  16. package/cjs/cl.mse.js +258 -255
  17. package/cjs/cl.muxdata.js +12 -12
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.smooth.js +69 -69
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +27 -27
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +19 -18
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +20 -20
  30. package/cl.adobe.js +3 -3
  31. package/cl.airplay.js +3 -3
  32. package/cl.broadpeak.js +5 -5
  33. package/cl.cast.js +88 -88
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +354 -351
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +66 -66
  38. package/cl.externs.js +26 -26
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +40 -39
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -25
  43. package/cl.ima.js +16 -16
  44. package/cl.mse.js +230 -231
  45. package/cl.muxdata.js +8 -8
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +9 -9
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +58 -58
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +22 -22
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +15 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +15 -16
  58. package/package.json +6 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,38 @@
1
+ # 6.5.0
2
+
3
+ ## New Features
4
+
5
+ * Add an option for filtering of Youbora error events. Configure a custom
6
+ error filter via the `youbora.errorFilter` config option.
7
+ * Add new configuration options of 360-degree video playback `clpp.VrConfiguration`.
8
+ * `vr.sensitivity` sets the mouse/touch controls sensitivity. Must be a positive number.
9
+ * `vr.invertHorizontalControl` inverts the mouse/touch movement for horizontal axis.
10
+ * `vr.invertVerticalControl` inverts the mouse/touch movement for vertical axis.
11
+
12
+ ## Changes
13
+
14
+ * Upgrade supported version of `youboralib` to 6.8.49. Please upgrade to this version (e.g. `npm i youboralib@6.8.49`).
15
+ * Fixed issue with parsing WV PSSH data from Version 1 PSSH boxes
16
+ * Fixed persistent license removal
17
+ * Added `enableSessionCacheForSkd` as an option to the DRM Configuration.
18
+ We encountered issues with FairPlay in native Safari when SKD initialization
19
+ is used. What happens is that we do received multiple requests for the same
20
+ key request from the native engine and if we are not full-filling the
21
+ requests, it can cause a decryption error.
22
+ The default implementation ignores the session cache and will handle each
23
+ `encrypted` event. In this case, there might be duplicated
24
+ requests triggered by the player for license keys that were already fetched.
25
+ This is done to avoid any potential decryption errors. Setting this option to
26
+ true will enable the session cache also for SKD init data and avoid any
27
+ redundant license requests. **Note** that you might encounter more 3016 decode
28
+ errors on Safari with native playback and SKD initialization when enabling the
29
+ session cache.
30
+ * Work around a Safari 16.5 issue where in certain cases HLS live streams do
31
+ not start playback at current time (live edge) as they should, but instead
32
+ they start some time in the past.
33
+ * Fix an issue with the import of Broadpeak SDK occurring when code is bundled
34
+ with a bundler, which performs hoisting of import statements (such as Webpack).
35
+
1
36
  # 6.4.1
2
37
 
3
38
  ## **Warning!**
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var SM=function(){this.l=this.f=null;this.a="";this.g=new _.H("clpp.adobe.AdobePlugin")},VM=function(a){a.f=new _.cg;a.f.on(a.l,_.Le,function(){return TM(a)});a.f.on(a.l,_.Ke,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.ud,function(){return UM(a)});a.f.on(a.l,_.pe,function(b){b=b.detail;switch(b.currentState){case _.bn:a.a.length||UM(a);s.Media.play(a.a,a.l.getPosition());break;case _.an:case _.Tm:TM(a);break;case _.Vm:case _.Om:case _.Zm:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),TM(a),s.Media.close(a.a),a.a=""}})},UM=function(a){var b=a.l.getLoadedSource();a.a=b?b.name||b.url:"";a.g.info("Open session for "+a.a+" with duration "+a.l.getDuration());s.Media.open(a.a,a.l.getDuration(),_.ta)},TM=function(a){s.Media.stop(a.a,a.l.getPosition())},WM=function(){};_.v(SM,_.cq);SM.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,VM(this)):this.g.warn("Adobe API not available.")};
4
- SM.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};SM.prototype.id=function(){return"adobe"};_.B("clpp.adobe.AdobeAnalyticsPlugin",SM);SM.Id="adobe";WM.prototype.create=function(){return new SM};_.uo(new WM);};
2
+ var f=function(window){var XM=function(){this.l=this.f=null;this.a="";this.g=new _.H("clpp.adobe.AdobePlugin")},$M=function(a){a.f=new _.dg;a.f.on(a.l,_.Me,function(){return YM(a)});a.f.on(a.l,_.Le,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.vd,function(){return ZM(a)});a.f.on(a.l,_.re,function(b){b=b.detail;switch(b.currentState){case _.cn:a.a.length||ZM(a);s.Media.play(a.a,a.l.getPosition());break;case _.bn:case _.Um:YM(a);break;case _.Wm:case _.Pm:case _.$m:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),YM(a),s.Media.close(a.a),a.a=""}})},ZM=function(a){var b=a.l.getLoadedSource();a.a=b?b.name||b.url:"";a.g.info("Open session for "+a.a+" with duration "+a.l.getDuration());s.Media.open(a.a,a.l.getDuration(),_.ta)},YM=function(a){s.Media.stop(a.a,a.l.getPosition())},aN=function(){};_.v(XM,_.eq);XM.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,$M(this)):this.g.warn("Adobe API not available.")};
4
+ XM.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};XM.prototype.id=function(){return"adobe"};_.C("clpp.adobe.AdobeAnalyticsPlugin",XM);XM.Id="adobe";aN.prototype.create=function(){return new XM};_.wo(new aN);};
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 QM=function(){var a=this;this.a=this.l=null;this.j=this.f=this.h=!1;this.m=new _.Ji(function(){a.l.play()["catch"](function(){})});this.g=new _.cg},RM=function(){};_.v(QM,_.cq);_.t=QM.prototype;_.t.onPlayerCreated=function(a){this.l=a;this.a=a.getSurface().getMedia()};_.t.onContentWillLoad=function(){this.a&&(this.g.on(this.a,"webkitplaybacktargetavailabilitychanged",this.Si.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.sj.bind(this)))};
3
- _.t.onPlayerWillRelease=function(){this.m.stop();this.g.release()};_.t.id=function(){return"airplay"};_.t.Si=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.I(_.Zb,{canCast:this.f}))};_.t.sj=function(){var a=(this.h=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Yb:_.Xb;if(this.j||!this.l.isPaused()||this.l.getState()===_.bn)this.j?this.l.play()["catch"](function(){}):this.m.Z(.01);this.l.trigger(new _.I(a))};_.t.ib=function(){return this.h};
4
- _.t.ee=function(){return this.f};_.t.Kj=function(){this.f&&(this.j=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.B("clpp.airplay.AirPlayPlugin",QM);QM.prototype.showCastMenu=QM.prototype.Kj;QM.prototype.canCast=QM.prototype.ee;QM.prototype.isCasting=QM.prototype.ib;QM.Id="airplay";RM.prototype.create=function(){return new QM};_.uo(new RM);};
2
+ var f=function(window){var VM=function(){var a=this;this.a=this.l=null;this.j=this.f=this.h=!1;this.m=new _.Ki(function(){a.l.play()["catch"](function(){})});this.g=new _.dg},WM=function(){};_.v(VM,_.eq);_.t=VM.prototype;_.t.onPlayerCreated=function(a){this.l=a;this.a=a.getSurface().getMedia()};_.t.onContentWillLoad=function(){this.a&&(this.g.on(this.a,"webkitplaybacktargetavailabilitychanged",this.Ti.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.tj.bind(this)))};
3
+ _.t.onPlayerWillRelease=function(){this.m.stop();this.g.release()};_.t.id=function(){return"airplay"};_.t.Ti=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.J(_.Zb,{canCast:this.f}))};_.t.tj=function(){var a=(this.h=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Yb:_.Xb;if(this.j||!this.l.isPaused()||this.l.getState()===_.cn)this.j?this.l.play()["catch"](function(){}):this.m.Z(.01);this.l.trigger(new _.J(a))};_.t.jb=function(){return this.h};
4
+ _.t.ge=function(){return this.f};_.t.Mj=function(){this.f&&(this.j=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.C("clpp.airplay.AirPlayPlugin",VM);VM.prototype.showCastMenu=VM.prototype.Mj;VM.prototype.canCast=VM.prototype.ge;VM.prototype.isCasting=VM.prototype.jb;VM.Id="airplay";WM.prototype.create=function(){return new VM};_.wo(new WM);};
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,10 +1,10 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var IM=function(a,b){this.l=a;this.f=b;this.a=new _.cg;this.g=!1},JM=function(a){var b=GenericPlayerApi.call(this)||this;b.l=a;b.a=_.Vh();return b},KM=function(){this.h=this.f=this.a=this.g=this.l=null;this.j=new _.cg},LM=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.g||(a.g=SmartLib.getInstance(),a.g.init(c,d,e),typeof f===_.te&&a.g.setUUID(f))},MM=function(a,b){var c=b.customParameters||{};a.a=a.g.createStreamingSession();for(var d in c)a.a.setCustomParameter(d,
3
- c[d]);a.j.on(a.l,_.fd,a.T.bind(a));a.h=new JM(a.l);a.a.attachPlayer(a.h)},NM=function(a,b){_.fg(a.j);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},OM=function(){return!window.SmartLib||!window.GenericPlayerApi},PM=function(){};_.t=IM.prototype;_.t.init=function(){var a=this.l,b=this.a;b.on(a,_.pe,this.Lg.bind(this));b.on(a,_.qc,this.Jg.bind(this));b.on(a,"seek",this.Kg.bind(this))};
4
- _.t.Jg=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.t.Lg=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Tm&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Tm:c.notifyStallStart();break;case _.bn:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.an:c.notifyPause()}};_.t.Kg=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.t.release=function(){this.a&&(_.fg(this.a),this.a=null)};_.v(JM,GenericPlayerApi);_.t=JM.prototype;_.t.getPlayerName=function(){return _.ta};_.t.getVersion=function(){return _.ia};_.t.getOSName=function(){return this.a.os};_.t.getDeviceVersion=function(){return this.a.osVersion.name};_.t.getDeviceType=function(){return"browser"};_.t.getTotalDuration=function(){return this.l.isLive()?0:1E3*this.l.getDuration()};_.t.getCurrentPosition=function(){return 1E3*this.l.getPosition()};
5
- _.t.getCurrentBitrate=function(){var a=this.l.getStats();return(a?a.streamBandwidth:0)/1E3};_.v(KM,_.cq);_.t=KM.prototype;_.t.onPlayerCreated=function(a){this.l=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(OM())return a.onError(new _.L(1,9,11E3));LM(this,d);MM(this,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.l.onError(new _.L(1,9,11001,{bpkErrorCode:f,message:e}));NM(c,void 0)}else b.url=e.getURL(),c.f=new IM(c.l,c.h),c.f.init()})}};
6
- _.t.T=function(a){a=a.detail;if(7003===a.code)NM(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.M)switch(a.category){case 3:NM(this,SmartLib.BPDecodingError);break;case 1:NM(this,SmartLib.BPNetworkingError);break;case 6:NM(this,SmartLib.BPAccessRightError);break;default:NM(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){OM()||NM(this,SmartLib.BPSessionEndsNormally)};_.t.id=function(){return"broadpeak"};_.B("clpp.broadpeak.BroadpeakPlugin",KM);
7
- KM.isSdkMissing=OM;KM.Id="broadpeak";PM.prototype.create=function(){return new KM};_.uo(new PM);};
2
+ var f=function(window){var NM=function(a,b){this.l=a;this.f=b;this.a=new _.dg;this.g=!1},OM=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.l=c;d.a=_.Wh();return d}_.v(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.ta};b.prototype.getVersion=function(){return _.ea};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.l.isLive()?
3
+ 0:1E3*this.l.getDuration()};b.prototype.getCurrentPosition=function(){return 1E3*this.l.getPosition()};b.prototype.getCurrentBitrate=function(){var c=this.l.getStats();return(c?c.streamBandwidth:0)/1E3};return new b(a)},PM=function(){this.h=this.f=this.a=this.g=this.l=null;this.j=new _.dg},QM=function(a,b){var c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"",f=b.uuid||null;a.g||(a.g=SmartLib.getInstance(),a.g.init(c,d,e),typeof f===_.ue&&a.g.setUUID(f))},RM=function(a,
4
+ b){var c=b.customParameters||{};a.a=a.g.createStreamingSession();for(var d in c)a.a.setCustomParameter(d,c[d]);a.j.on(a.l,_.gd,a.U.bind(a));a.h=OM(a.l);a.a.attachPlayer(a.h)},SM=function(a,b){_.gg(a.j);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},TM=function(){return!window.SmartLib||!window.GenericPlayerApi},UM=function(){};_.t=NM.prototype;_.t.init=function(){var a=this.l,b=this.a;b.on(a,_.re,this.Og.bind(this));b.on(a,_.qc,this.Mg.bind(this));b.on(a,"seek",this.Ng.bind(this))};
5
+ _.t.Mg=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.t.Og=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Um&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Um:c.notifyStallStart();break;case _.cn:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.bn:c.notifyPause()}};_.t.Ng=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.t.release=function(){this.a&&(_.gg(this.a),this.a=null)};_.v(PM,_.eq);_.t=PM.prototype;_.t.onPlayerCreated=function(a){this.l=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(TM())return a.onError(new _.L(1,9,11E3));QM(this,d);RM(this,d);return this.a.getURL(b.url).then(function(e){if(e.isError()){var f=e.getDetailedErrorCode();e=e.getDetailedErrorMessage();c.l.onError(new _.L(1,9,11001,{bpkErrorCode:f,message:e}));SM(c,void 0)}else b.url=e.getURL(),c.f=new NM(c.l,c.h),c.f.init()})}};
6
+ _.t.U=function(a){a=a.detail;if(7003===a.code)SM(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.M)switch(a.category){case 3:SM(this,SmartLib.BPDecodingError);break;case 1:SM(this,SmartLib.BPNetworkingError);break;case 6:SM(this,SmartLib.BPAccessRightError);break;default:SM(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){TM()||SM(this,SmartLib.BPSessionEndsNormally)};_.t.id=function(){return"broadpeak"};_.C("clpp.broadpeak.BroadpeakPlugin",PM);
7
+ PM.isSdkMissing=TM;PM.Id="broadpeak";UM.prototype.create=function(){return new PM};_.wo(new UM);};
8
8
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
9
9
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
10
10
  else{_=this.clpp._;(f.call(g,this));}