@castlabs/prestoplay 6.4.0 → 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 +57 -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 +421 -402
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +54 -133
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +47 -49
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +31 -32
  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 +363 -351
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +67 -67
  38. package/cl.externs.js +49 -132
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +40 -40
  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 +8 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,60 @@
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
+
36
+ # 6.4.1
37
+
38
+ ## **Warning!**
39
+ Changes in this release might be breaking for some very specific use cases:
40
+ * Removed `clpp.EventBus` from the API. *It is unlikely that this will cause
41
+ any issues, since this API is not intended to be public and is not relevant
42
+ to player functionality.*
43
+
44
+ ## New Features
45
+
46
+ * Add an option to enable detailed video track info and player stats for HLS on Safari.
47
+ To enable this experimental feature configure `safari.enableHlsVideoTrackInfo: true`.
48
+
49
+ ## Changes
50
+
51
+ * Fix the `textStyle` config option for subtitle styles.
52
+ * Make sure it always overrides styles embedded in TTML and WebVTT files and any other styles.
53
+ * Make sure `textStyle.edgeType: "none"` config removes any existing text shadow from the subtitles.
54
+ * Fix handling of HDR CICP EssentialProperty schemes for DASH streams.
55
+ * Add CICP ColourPrimaries, Transfer-Characteristics, MatrixCoefficients as valid EssentialProperty.
56
+ * Fix `ReferenceError` due to unavailable `MediaEncryptedEvent` on Safari < 12.1.
57
+
1
58
  # 6.4.0
2
59
 
3
60
  ## New Features
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var BM=function(){this.l=this.f=null;this.a="";this.g=new _.H("clpp.adobe.AdobePlugin")},EM=function(a){a.f=new _.bg;a.f.on(a.l,_.Ke,function(){return CM(a)});a.f.on(a.l,_.Je,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.rd,function(){return DM(a)});a.f.on(a.l,_.oe,function(b){b=b.detail;switch(b.currentState){case _.xm:a.a.length||DM(a);s.Media.play(a.a,a.l.getPosition());break;case _.wm:case _.om:CM(a);break;case _.qm:case _.jm:case _.um:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),CM(a),s.Media.close(a.a),a.a=""}})},DM=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(),_.sa)},CM=function(a){s.Media.stop(a.a,a.l.getPosition())},FM=function(){};_.v(BM,_.Gp);BM.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,EM(this)):this.g.warn("Adobe API not available.")};
4
- BM.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};BM.prototype.id=function(){return"adobe"};_.C("clpp.adobe.AdobeAnalyticsPlugin",BM);BM.Id="adobe";FM.prototype.create=function(){return new BM};_.Un(new FM);};
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 zM=function(){var a=this;this.a=this.l=null;this.j=this.f=this.h=!1;this.m=new _.Ah(function(){a.l.play()["catch"](function(){})});this.g=new _.bg},AM=function(){};_.v(zM,_.Gp);_.t=zM.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.Qi.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.qj.bind(this)))};
3
- _.t.onPlayerWillRelease=function(){this.m.stop();this.g.release()};_.t.id=function(){return"airplay"};_.t.Qi=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.J(_.Wb,{canCast:this.f}))};_.t.qj=function(){var a=(this.h=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Vb:_.Ub;if(this.j||!this.l.isPaused()||this.l.getState()===_.xm)this.j?this.l.play()["catch"](function(){}):this.m.$(.01);this.l.trigger(new _.J(a))};_.t.ib=function(){return this.h};
4
- _.t.de=function(){return this.f};_.t.Ij=function(){this.f&&(this.j=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.C("clpp.airplay.AirPlayPlugin",zM);zM.prototype.showCastMenu=zM.prototype.Ij;zM.prototype.canCast=zM.prototype.de;zM.prototype.isCasting=zM.prototype.ib;zM.Id="airplay";AM.prototype.create=function(){return new zM};_.Un(new AM);};
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 rM=function(a,b){this.l=a;this.f=b;this.a=new _.bg;this.g=!1},sM=function(a){var b=GenericPlayerApi.call(this)||this;b.l=a;b.a=_.vi();return b},tM=function(){this.h=this.f=this.a=this.g=this.l=null;this.j=new _.bg},uM=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===_.se&&a.g.setUUID(f))},vM=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,_.dd,a.S.bind(a));a.h=new sM(a.l);a.a.attachPlayer(a.h)},wM=function(a,b){_.eg(a.j);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},xM=function(){return!window.SmartLib||!window.GenericPlayerApi},yM=function(){};_.t=rM.prototype;_.t.init=function(){var a=this.l,b=this.a;b.on(a,_.oe,this.Jg.bind(this));b.on(a,_.oc,this.Hg.bind(this));b.on(a,"seek",this.Ig.bind(this))};
4
- _.t.Hg=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.t.Jg=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.om&&c.notifyStallEnd(!b.isPaused());switch(d){case _.om:c.notifyStallStart();break;case _.xm:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.wm:c.notifyPause()}};_.t.Ig=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.t.release=function(){this.a&&(_.eg(this.a),this.a=null)};_.v(sM,GenericPlayerApi);_.t=sM.prototype;_.t.getPlayerName=function(){return _.sa};_.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(tM,_.Gp);_.t=tM.prototype;_.t.onPlayerCreated=function(a){this.l=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(xM())return a.onError(new _.L(1,9,11E3));uM(this,d);vM(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}));wM(c,void 0)}else b.url=e.getURL(),c.f=new rM(c.l,c.h),c.f.init()})}};
6
- _.t.S=function(a){a=a.detail;if(7003===a.code)wM(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.M)switch(a.category){case 3:wM(this,SmartLib.BPDecodingError);break;case 1:wM(this,SmartLib.BPNetworkingError);break;case 6:wM(this,SmartLib.BPAccessRightError);break;default:wM(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){xM()||wM(this,SmartLib.BPSessionEndsNormally)};_.t.id=function(){return"broadpeak"};_.C("clpp.broadpeak.BroadpeakPlugin",tM);
7
- tM.isSdkMissing=xM;tM.Id="broadpeak";yM.prototype.create=function(){return new tM};_.Un(new yM);};
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));}