@castlabs/prestoplay 6.6.1 → 6.8.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 (59) hide show
  1. package/CHANGELOG.md +36 -1
  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 +418 -419
  8. package/cjs/cl.crypto.js +10 -10
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +48 -42
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +68 -49
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +31 -31
  15. package/cjs/cl.ima.js +24 -23
  16. package/cjs/cl.mse.js +275 -261
  17. package/cjs/cl.muxdata.js +15 -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 +71 -71
  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 -19
  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 +362 -365
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +67 -67
  38. package/cl.externs.js +48 -42
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +58 -40
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -25
  43. package/cl.ima.js +17 -16
  44. package/cl.mse.js +238 -228
  45. package/cl.muxdata.js +12 -8
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +10 -10
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +58 -59
  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 -15
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +15 -15
  58. package/package.json +1 -1
  59. package/typings.d.ts +147 -19
package/CHANGELOG.md CHANGED
@@ -1,3 +1,39 @@
1
+ # 6.8.0
2
+
3
+ ## New Features
4
+
5
+ * Add support for Managed Media Source (MMS).
6
+ * Add support for changing initialization sections and encryption in
7
+ discontinuous VOD HLS.
8
+ * Add config options `streaming.disableAudioTracks` and `streaming.disableVideoTracks`
9
+ to disable audio and video of the MSE Player (not applicable to Safari or Tizen
10
+ native playback).
11
+ * Add config option `drm.ignoreUnrecognizedInitData`. If the player encounters init data
12
+ that cannot be processed (e.g., due to a malformed data payload), it will not pass it
13
+ to the CDM to avoid license requests errors. This option allows to disable this behavior
14
+ and pass the init data even if we couldn't parse it.
15
+ * Add IMA SDK support to MSE player on Tizen devices.
16
+ * **Warning!** There are limitations related to analytics reporting for IMA SDK Plugin and SmartTV devices. Refer to the [IMA Plugin](https://demo.castlabs.com/#/docs/advertising#ima-sdk-smarttv-support) documentation for more information.
17
+ * Add Mux Data Plugin support for [Bandwidth Throughput Events](https://docs.mux.com/guides/mux-data-playback-events#bandwidth-throughput-events).
18
+
19
+ ## Changes
20
+
21
+ * Improve handling of segment duration drift in multi-period content.
22
+ * Fix track switching in audio-only content.
23
+
24
+ # 6.7.0
25
+
26
+ ## Changes
27
+
28
+ * HLS related fixes:
29
+ * Fix corner cases in the handling of segment byte ranges.
30
+ * Improve playlist validation and support check.
31
+ * Low latency support:
32
+ * Fix playlist validation with respect to `#EXT-X-SERVER-CONTROL:PART-HOLD-BACK`.
33
+ * Fix handling of low-latency playlist segments when low-latency support is
34
+ disabled (It is disabled by default).
35
+ * Fixed Chromecast Cast Web Sender track manager issue, restoring the ability to list and change text/audio tracks during casting.
36
+
1
37
  # 6.6.1
2
38
 
3
39
  ## Changes
@@ -14,7 +50,6 @@
14
50
  implementation more consistent though and is slightly more performant since we are
15
51
  saving some calls.
16
52
 
17
-
18
53
  # 6.6.0
19
54
 
20
55
  ## New Features
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var gN=function(){this.l=this.f=null;this.a="";this.g=new _.H("clpp.adobe.AdobePlugin")},jN=function(a){a.f=new _.eg;a.f.on(a.l,_.Ne,function(){return hN(a)});a.f.on(a.l,_.Me,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.xd,function(){return iN(a)});a.f.on(a.l,_.se,function(b){b=b.detail;switch(b.currentState){case _.ln:a.a.length||iN(a);s.Media.play(a.a,a.l.getPosition());break;case _.kn:case _.bn:hN(a);break;case _.dn:case _.Xm:case _.hn:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),hN(a),s.Media.close(a.a),a.a=""}})},iN=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)},hN=function(a){s.Media.stop(a.a,a.l.getPosition())},kN=function(){};_.v(gN,_.mq);gN.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,jN(this)):this.g.warn("Adobe API not available.")};
4
- gN.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};gN.prototype.id=function(){return"adobe"};_.D("clpp.adobe.AdobeAnalyticsPlugin",gN);gN.Id="adobe";kN.prototype.create=function(){return new gN};_.Eo(new kN);};
2
+ var f=function(window){var aO=function(){this.l=this.f=null;this.a="";this.h=new _.H("clpp.adobe.AdobePlugin")},dO=function(a){a.f=new _.dg;a.f.on(a.l,_.Me,function(){return bO(a)});a.f.on(a.l,_.Le,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.wd,function(){return cO(a)});a.f.on(a.l,_.qe,function(b){b=b.detail;switch(b.currentState){case _.an:a.a.length||cO(a);s.Media.play(a.a,a.l.getPosition());break;case _.$m:case _.Sm:bO(a);break;case _.Um:case _.Nm:case _.Ym:a.h.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),bO(a),s.Media.close(a.a),a.a=""}})},cO=function(a){var b=a.l.getLoadedSource();a.a=b?b.name||b.url:"";a.h.info("Open session for "+a.a+" with duration "+a.l.getDuration());s.Media.open(a.a,a.l.getDuration(),_.ra)},bO=function(a){s.Media.stop(a.a,a.l.getPosition())},eO=function(){};_.w(aO,_.cq);aO.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,dO(this)):this.h.warn("Adobe API not available.")};
4
+ aO.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};aO.prototype.id=function(){return"adobe"};_.C("clpp.adobe.AdobeAnalyticsPlugin",aO);aO.Id="adobe";eO.prototype.create=function(){return new aO};_.uo(new eO);};
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 eN=function(){var a=this;this.a=this.l=null;this.j=this.f=this.h=!1;this.m=new _.Qi(function(){a.l.play()["catch"](function(){})});this.g=new _.eg},fN=function(){};_.v(eN,_.mq);_.t=eN.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 _.J(_.ac,{canCast:this.f}))};_.t.sj=function(){var a=(this.h=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Zb:_.Yb;if(this.j||!this.l.isPaused()||this.l.getState()===_.ln)this.j?this.l.play()["catch"](function(){}):this.m.Z(.01);this.l.trigger(new _.J(a))};_.t.ib=function(){return this.h};
4
- _.t.fe=function(){return this.f};_.t.Lj=function(){this.f&&(this.j=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.D("clpp.airplay.AirPlayPlugin",eN);eN.prototype.showCastMenu=eN.prototype.Lj;eN.prototype.canCast=eN.prototype.fe;eN.prototype.isCasting=eN.prototype.ib;eN.Id="airplay";fN.prototype.create=function(){return new eN};_.Eo(new fN);};
2
+ var f=function(window){var ZN=function(){var a=this;this.a=this.l=null;this.m=this.f=this.j=!1;this.o=new _.Yi(function(){a.l.play()["catch"](function(){})});this.g=new _.dg},$N=function(){};_.w(ZN,_.cq);_.t=ZN.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.$j.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Bk.bind(this)))};
3
+ _.t.onPlayerWillRelease=function(){this.o.stop();this.g.release()};_.t.id=function(){return"airplay"};_.t.$j=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.J(_.ac,{canCast:this.f}))};_.t.Bk=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.$b:_.Zb;if(this.m||!this.l.isPaused()||this.l.getState()===_.an)this.m?this.l.play()["catch"](function(){}):this.o.$(.01);this.l.trigger(new _.J(a))};_.t.kb=function(){return this.j};
4
+ _.t.qe=function(){return this.f};_.t.bl=function(){this.f&&(this.m=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.C("clpp.airplay.AirPlayPlugin",ZN);ZN.prototype.showCastMenu=ZN.prototype.bl;ZN.prototype.canCast=ZN.prototype.qe;ZN.prototype.isCasting=ZN.prototype.kb;ZN.Id="airplay";$N.prototype.create=function(){return new ZN};_.uo(new $N);};
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 XM=function(a,b){this.l=a;this.f=b;this.a=new _.eg;this.g=!1},YM=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.l=c;d.a=_.ai();return d}_.v(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.sa};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)},ZM=function(){this.h=this.f=this.a=this.g=this.l=null;this.j=new _.eg},$M=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===_.ve&&a.g.setUUID(f))},aN=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,_.jd,a.T.bind(a));a.h=YM(a.l);a.a.attachPlayer(a.h)},bN=function(a,b){_.hg(a.j);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},cN=function(){return!window.SmartLib||!window.GenericPlayerApi},dN=function(){};_.t=XM.prototype;_.t.init=function(){var a=this.l,b=this.a;b.on(a,_.se,this.Og.bind(this));b.on(a,_.tc,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===_.bn&&c.notifyStallEnd(!b.isPaused());switch(d){case _.bn:c.notifyStallStart();break;case _.ln:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.kn:c.notifyPause()}};_.t.Ng=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.t.release=function(){this.a&&(_.hg(this.a),this.a=null)};_.v(ZM,_.mq);_.t=ZM.prototype;_.t.onPlayerCreated=function(a){this.l=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(cN())return a.onError(new _.L(1,9,11E3));$M(this,d);aN(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}));bN(c,void 0)}else b.url=e.getURL(),c.f=new XM(c.l,c.h),c.f.init()})}};
6
- _.t.T=function(a){a=a.detail;if(7003===a.code)bN(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.M)switch(a.category){case 3:bN(this,SmartLib.BPDecodingError);break;case 1:bN(this,SmartLib.BPNetworkingError);break;case 6:bN(this,SmartLib.BPAccessRightError);break;default:bN(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){cN()||bN(this,SmartLib.BPSessionEndsNormally)};_.t.id=function(){return"broadpeak"};_.D("clpp.broadpeak.BroadpeakPlugin",ZM);
7
- ZM.isSdkMissing=cN;ZM.Id="broadpeak";dN.prototype.create=function(){return new ZM};_.Eo(new dN);};
2
+ var f=function(window){var RN=function(a,b){this.l=a;this.f=b;this.a=new _.dg;this.g=!1},SN=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.l=c;d.a=_.li();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.ra};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)},TN=function(){this.j=this.f=this.a=this.g=this.l=null;this.m=new _.dg},UN=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))},VN=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.m.on(a.l,_.id,a.T.bind(a));a.j=SN(a.l);a.a.attachPlayer(a.j)},WN=function(a,b){_.gg(a.m);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},XN=function(){return!window.SmartLib||!window.GenericPlayerApi},YN=function(){};_.t=RN.prototype;_.t.init=function(){var a=this.l,b=this.a;b.on(a,_.qe,this.zh.bind(this));b.on(a,_.tc,this.xh.bind(this));b.on(a,"seek",this.yh.bind(this))};
5
+ _.t.xh=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.t.zh=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Sm&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Sm:c.notifyStallStart();break;case _.an:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.$m:c.notifyPause()}};_.t.yh=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.t.release=function(){this.a&&(_.gg(this.a),this.a=null)};_.w(TN,_.cq);_.t=TN.prototype;_.t.onPlayerCreated=function(a){this.l=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(XN())return a.onError(new _.L(1,9,11E3));UN(this,d);VN(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}));WN(c,void 0)}else b.url=e.getURL(),c.f=new RN(c.l,c.j),c.f.init()})}};
6
+ _.t.T=function(a){a=a.detail;if(7003===a.code)WN(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.M)switch(a.category){case 3:WN(this,SmartLib.BPDecodingError);break;case 1:WN(this,SmartLib.BPNetworkingError);break;case 6:WN(this,SmartLib.BPAccessRightError);break;default:WN(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){XN()||WN(this,SmartLib.BPSessionEndsNormally)};_.t.id=function(){return"broadpeak"};_.C("clpp.broadpeak.BroadpeakPlugin",TN);
7
+ TN.isSdkMissing=XN;TN.Id="broadpeak";YN.prototype.create=function(){return new TN};_.uo(new YN);};
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));}