@castlabs/prestoplay 6.27.0 → 6.29.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 (67) hide show
  1. package/CHANGELOG.md +34 -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 +125 -114
  6. package/cjs/cl.conviva.js +32 -32
  7. package/cjs/cl.core.js +632 -624
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +89 -89
  10. package/cjs/cl.externs.js +201 -100
  11. package/cjs/cl.freewheel.js +25 -25
  12. package/cjs/cl.hls.js +78 -78
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +24 -24
  16. package/cjs/cl.mediatailor.js +3 -3
  17. package/cjs/cl.mse.js +351 -351
  18. package/cjs/cl.muxdata.js +14 -15
  19. package/cjs/cl.onboard.js +4 -3
  20. package/cjs/cl.persistent.js +14 -14
  21. package/cjs/cl.playlist.js +6 -6
  22. package/cjs/cl.simid.js +16 -17
  23. package/cjs/cl.smooth.js +71 -72
  24. package/cjs/cl.thumbnails.js +26 -26
  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 +12 -12
  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 +39 -39
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +6 -5
  36. package/cl.cast.js +98 -90
  37. package/cl.conviva.js +27 -27
  38. package/cl.core.js +509 -501
  39. package/cl.crypto.js +8 -8
  40. package/cl.dash.js +83 -82
  41. package/cl.externs.js +197 -100
  42. package/cl.freewheel.js +19 -19
  43. package/cl.hls.js +82 -80
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +18 -17
  47. package/cl.mediatailor.js +2 -3
  48. package/cl.mse.js +303 -305
  49. package/cl.muxdata.js +13 -13
  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 +60 -60
  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 +15 -15
  61. package/cl.vtt.js +12 -12
  62. package/cl.yospace.js +3 -3
  63. package/cl.youbora.js +31 -29
  64. package/package.json +1 -1
  65. package/typings.d.ts +221 -152
  66. package/cjs/cl.sessions.js +0 -21
  67. package/cl.sessions.js +0 -10
package/CHANGELOG.md CHANGED
@@ -1,3 +1,37 @@
1
+ # 6.29.0
2
+
3
+ ## New Features
4
+
5
+ * Add `clpp.cast.playlist.CastPlaylist`. Use this class to create and manage playlists in Cast.
6
+ See https://demo.castlabs.com/docs/cast#cast-playlist for more information.
7
+
8
+ ## Changes
9
+
10
+ * Fix HLS EXT-X-DATERANGE parsing when multiple tags have the same ID.
11
+ Omitting already defined attributes is now allowed.
12
+ * Fix IMA SDK Plugin mid-roll behavior on Tizen Smart TV devices.
13
+ * Expose Google Cast `audioTrackInfo` and `roles` on `Track`'s `customData` property.
14
+ * Add support for multiple HLS interstitials with the same start date.
15
+
16
+ # 6.28.0
17
+
18
+ ## **Warning**
19
+
20
+ DRMToday onboard component now uses Widevine V2 certificate by default.
21
+ If your deployment uses a different Widevine server certificate, you need to specify it via `drm.customData.serverCertificate`
22
+ or pass in `null` to configure the component to fetch the certificate from the server before a license request.
23
+
24
+ For more information, see https://demo.castlabs.com/docs/drm#drm-with-drmtoday-onboard.
25
+
26
+ ## New Features
27
+
28
+ * DRMToday onboard component now uses Widevine V2 certificate by default.
29
+ * Trigger error events for network errors that get retried.
30
+
31
+ ## Changes
32
+
33
+ * Fix timeline calculation for certain live DASH streams with thumbnails.
34
+
1
35
  # 6.27.0
2
36
 
3
37
  ## New Features
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var PY=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},SY=function(a){a.f=new _.gi;a.f.on(a.m,_.Dg,function(){return QY(a)});a.f.on(a.m,_.Cg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.De,function(){return RY(a)});a.f.on(a.m,_.bg,function(b){b=b.detail;switch(b.currentState){case _.Zq:a.a.length||RY(a);s.Media.play(a.a,a.m.getPosition());break;case _.Yq:case _.Qq:QY(a);break;case _.Sq:case _.Lq:case _.Wq:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),QY(a),s.Media.close(a.a),a.a=""}})},RY=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(),_.xa)},QY=function(a){s.Media.stop(a.a,a.m.getPosition())},TY=function(){};_.w(PY,_.Hv);PY.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,SY(this)):this.g.warn("Adobe API not available.")};
4
- PY.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};PY.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",PY);PY.Id="adobe";TY.prototype.create=function(){return new PY};_.ru(new TY);};
2
+ var f=function(window){var RX=function(){this.m=this.f=null;this.a="";this.g=new _.L("clpp.adobe.AdobePlugin")},UX=function(a){a.f=new _.si;a.f.on(a.m,_.Ig,function(){return SX(a)});a.f.on(a.m,_.Hg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Fe,function(){return TX(a)});a.f.on(a.m,_.eg,function(b){b=b.detail;switch(b.currentState){case 3:a.a.length||TX(a);s.Media.play(a.a,a.m.getPosition());break;case 4:case 2:SX(a);break;case 5:case _.gu:case _.Ko:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),SX(a),s.Media.close(a.a),a.a=""}})},TX=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(),_.xa)},SX=function(a){s.Media.stop(a.a,a.m.getPosition())},VX=function(){};_.w(RX,_.ew);RX.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,UX(this)):this.g.warn("Adobe API not available.")};
4
+ RX.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};RX.prototype.id=function(){return"adobe"};_.K("clpp.adobe.AdobeAnalyticsPlugin",RX);RX.Id="adobe";VX.prototype.create=function(){return new RX};_.dp(new VX);};
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 NY=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Vh(function(){a.m.play()["catch"](function(){})});this.h=new _.gi},OY=function(){};_.w(NY,_.Hv);_.r=NY.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.Sm.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.yn.bind(this)))};
3
- _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.Sm=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.M(_.Ec,{canCast:this.f}))};_.r.yn=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Dc:_.Cc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Zq)this.l?this.m.play()["catch"](function(){}):this.o.ha(.01);this.m.trigger(new _.M(a))};_.r.Pb=function(){return this.j};
4
- _.r.Tf=function(){return this.f};_.r.po=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",NY);NY.prototype.showCastMenu=NY.prototype.po;NY.prototype.canCast=NY.prototype.Tf;NY.prototype.isCasting=NY.prototype.Pb;NY.Id="airplay";OY.prototype.create=function(){return new NY};_.ru(new OY);};
2
+ var f=function(window){var PX=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.cj(function(){a.m.play()["catch"](function(){})});this.h=new _.si},QX=function(){};_.w(PX,_.ew);_.r=PX.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.nn.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Tn.bind(this)))};
3
+ _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.nn=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.Q(_.Ec,{canCast:this.f}))};_.r.Tn=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Dc:_.Cc;if(this.l||!this.m.isPaused()||3===this.m.getState())this.l?this.m.play()["catch"](function(){}):this.o.ha(.01);this.m.trigger(new _.Q(a))};_.r.Ca=function(){return this.j};
4
+ _.r.jd=function(){return this.f};_.r.Io=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.K("clpp.airplay.AirPlayPlugin",PX);PX.prototype.showCastMenu=PX.prototype.Io;PX.prototype.canCast=PX.prototype.jd;PX.prototype.isCasting=PX.prototype.Ca;PX.Id="airplay";QX.prototype.create=function(){return new PX};_.dp(new QX);};
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 FY=function(a,b){this.m=a;this.f=b;this.a=new _.gi;this.h=!1},GY=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.gl();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.xa};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)},HY=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.gi;this.j=!1},IY=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===_.eg&&a.h.setUUID(f))},JY=
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,_.he,a.Sj.bind(a));a.l=GY(a.m);a.a.attachPlayer(a.l)},KY=function(a,b){_.ji(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},LY=function(){return!window.SmartLib||!window.GenericPlayerApi},MY=function(){};_.r=FY.prototype;
5
- _.r.init=function(){var a=this.m,b=this.a;b.on(a,_.bg,this.Vj.bind(this));b.on(a,_.Xc,this.Tj.bind(this));b.on(a,"seek",this.Uj.bind(this))};_.r.Tj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.Vj=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Qq&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Qq:c.notifyStallStart();break;case _.Zq:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.Yq:c.notifyPause()}};
6
- _.r.Uj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.ji(this.a),this.a=null)};_.w(HY,_.Hv);_.r=HY.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(LY())return a.onError(new _.O(1,9,11E3));this.j=!0;IY(this,d);JY(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}));KY(c,void 0)}else b.url=e.getURL(),c.f=new FY(c.m,c.l),c.f.init()})}};
7
- _.r.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.r.Sj=function(a){a=a.detail;if(7003===a.code)KY(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:KY(this,SmartLib.BPDecodingError);break;case 1:KY(this,SmartLib.BPNetworkingError);break;case 6:KY(this,SmartLib.BPAccessRightError);break;default:KY(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){LY()||KY(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.r.id=function(){return"broadpeak"};
8
- _.J("clpp.broadpeak.BroadpeakPlugin",HY);HY.isSdkMissing=LY;HY.Id="broadpeak";MY.prototype.create=function(){return new HY};_.ru(new MY);};
2
+ var f=function(window){var HX=function(a,b){this.m=a;this.f=b;this.a=new _.si;this.h=!1},IX=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Kj();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.xa};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)},JX=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.si;this.j=!1},KX=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===_.hg&&a.h.setUUID(f))},LX=
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,_.ke,a.pk.bind(a));a.l=IX(a.m);a.a.attachPlayer(a.l)},MX=function(a,b){_.vi(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},NX=function(){return!window.SmartLib||!window.GenericPlayerApi},OX=function(){};_.r=HX.prototype;
5
+ _.r.init=function(){var a=this.m,b=this.a;b.on(a,_.eg,this.sk.bind(this));b.on(a,_.Xc,this.qk.bind(this));b.on(a,"seek",this.rk.bind(this))};_.r.qk=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.sk=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.rk=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.vi(this.a),this.a=null)};_.w(JX,_.ew);_.r=JX.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(NX())return a.onError(new _.N(1,9,11E3));this.j=!0;KX(this,d);LX(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}));MX(c,void 0)}else b.url=e.getURL(),c.f=new HX(c.m,c.l),c.f.init()})}};
7
+ _.r.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.r.pk=function(a){a=a.detail;if(7003===a.code)MX(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.O)switch(a.category){case 3:MX(this,SmartLib.BPDecodingError);break;case 1:MX(this,SmartLib.BPNetworkingError);break;case 6:MX(this,SmartLib.BPAccessRightError);break;default:MX(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){NX()||MX(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.r.id=function(){return"broadpeak"};
8
+ _.K("clpp.broadpeak.BroadpeakPlugin",JX);JX.isSdkMissing=NX;JX.Id="broadpeak";OX.prototype.create=function(){return new JX};_.dp(new OX);};
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));}