@castlabs/prestoplay 6.14.1 → 6.16.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 (61) hide show
  1. package/CHANGELOG.md +28 -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 +114 -112
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +553 -538
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +74 -73
  10. package/cjs/cl.externs.js +193 -58
  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 +24 -24
  16. package/cjs/cl.mse.js +368 -264
  17. package/cjs/cl.muxdata.js +15 -15
  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.simid.js +15 -15
  22. package/cjs/cl.smooth.js +72 -71
  23. package/cjs/cl.thumbnails.js +26 -26
  24. package/cjs/cl.tizen.js +71 -71
  25. package/cjs/cl.ttml.js +28 -28
  26. package/cjs/cl.verimatrix.js +5 -5
  27. package/cjs/cl.vimond.js +13 -13
  28. package/cjs/cl.vr.js +19 -19
  29. package/cjs/cl.vtt.js +14 -14
  30. package/cjs/cl.youbora.js +20 -20
  31. package/cl.adobe.js +3 -3
  32. package/cl.airplay.js +3 -3
  33. package/cl.broadpeak.js +5 -5
  34. package/cl.cast.js +89 -88
  35. package/cl.conviva.js +27 -27
  36. package/cl.core.js +455 -443
  37. package/cl.crypto.js +9 -9
  38. package/cl.dash.js +70 -68
  39. package/cl.externs.js +189 -58
  40. package/cl.freewheel.js +19 -19
  41. package/cl.hls.js +71 -71
  42. package/cl.hlssmpte.js +5 -5
  43. package/cl.htmlcue.js +26 -26
  44. package/cl.ima.js +17 -17
  45. package/cl.mse.js +318 -236
  46. package/cl.muxdata.js +13 -13
  47. package/cl.onboard.js +4 -4
  48. package/cl.persistent.js +11 -11
  49. package/cl.playlist.js +5 -5
  50. package/cl.simid.js +13 -13
  51. package/cl.smooth.js +59 -59
  52. package/cl.thumbnails.js +19 -19
  53. package/cl.tizen.js +57 -57
  54. package/cl.ttml.js +22 -22
  55. package/cl.verimatrix.js +4 -4
  56. package/cl.vimond.js +8 -8
  57. package/cl.vr.js +15 -15
  58. package/cl.vtt.js +12 -12
  59. package/cl.youbora.js +15 -15
  60. package/package.json +1 -1
  61. package/typings.d.ts +393 -57
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ # 6.16.0
2
+
3
+ ## New Features
4
+ * Add support for smooth codec switching in multi-codec AdaptationSet scenarios.
5
+ * This support is disabled by default and can be enabled by configuring `config.mediaSource.codecSwitchingStrategy` to `clpp.CodecSwitchingStrategy.SMOOTH`.
6
+ * Smooth codec switching is only supported on platforms compatible with `SourceBuffer.changeType()` and is currently limited to sources that do not require transmuxing. It's also disabled by default on platforms known to have issues with `SourceBuffer.changeType()`; currently, this applies to Tizen 6.0 and 6.5 though the list may be expanded in the future.
7
+ * For more details, refer to [clpp.MediaSourceConfiguration](https://demo.castlabs.com/#/docs?q=clpp#MediaSourceConfiguration)
8
+ and [clpp.CodecSwitchingStrategy](https://demo.castlabs.com/#/docs?q=clpp#CodecSwitchingStrategy).
9
+
10
+ ## Changes
11
+
12
+ * Fix an LL-HLS issue of playback stuck on buffering after first segment.
13
+
14
+ # 6.15.0
15
+
16
+ ## New Features
17
+
18
+ * Add `clpp.events.LIVE_TURNED_STATIC` event triggered when a live stream
19
+ becomes static.
20
+
21
+ ## Changes
22
+
23
+ * Fix an issue with some timeline cue events not being emitted for cues which
24
+ coincide with a gap between media segments.
25
+ * Fix an issue with playback of certain multi-period MPEG-TS HLS streams.
26
+ * Fix support of VAST Ads of IMA SDK Plugin.
27
+ * VAST Ads are now supported and scheduled as a pre-roll.
28
+
1
29
  # 6.14.1
2
30
 
3
31
  ## Changes
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var wS=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},zS=function(a){a.f=new _.Eh;a.f.on(a.m,_.pg,function(){return xS(a)});a.f.on(a.m,_.og,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Ie,function(){return yS(a)});a.f.on(a.m,_.Vf,function(b){b=b.detail;switch(b.currentState){case _.ip:a.a.length||yS(a);s.Media.play(a.a,a.m.getPosition());break;case _.hp:case _.$o:xS(a);break;case _.bp:case _.Vo:case _.fp:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),xS(a),s.Media.close(a.a),a.a=""}})},yS=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)},xS=function(a){s.Media.stop(a.a,a.m.getPosition())},AS=function(){};_.w(wS,_.fu);wS.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.m=a,zS(this)):this.g.warn("Adobe API not available.")};
4
- wS.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};wS.prototype.id=function(){return"adobe"};_.I("clpp.adobe.AdobeAnalyticsPlugin",wS);wS.Id="adobe";AS.prototype.create=function(){return new wS};_.Dq(new AS);};
2
+ var f=function(window){var DX=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},GX=function(a){a.f=new _.Uh;a.f.on(a.m,_.Bg,function(){return EX(a)});a.f.on(a.m,_.Ag,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Ke,function(){return FX(a)});a.f.on(a.m,_.hg,function(b){b=b.detail;switch(b.currentState){case _.Bp:a.a.length||FX(a);s.Media.play(a.a,a.m.getPosition());break;case _.Ap:case _.sp:EX(a);break;case _.up:case _.np:case _.yp:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),EX(a),s.Media.close(a.a),a.a=""}})},FX=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(),_.wa)},EX=function(a){s.Media.stop(a.a,a.m.getPosition())},HX=function(){};_.x(DX,_.tu);DX.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.m=a,GX(this)):this.g.warn("Adobe API not available.")};
4
+ DX.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};DX.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",DX);DX.Id="adobe";HX.prototype.create=function(){return new DX};_.Zq(new HX);};
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 uS=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Ek(function(){a.m.play()["catch"](function(){})});this.h=new _.Eh},vS=function(){};_.w(uS,_.fu);_.r=uS.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.fl.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Gl.bind(this)))};
3
- _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.fl=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}))};_.r.Gl=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Nc:_.Mc;if(this.l||!this.m.isPaused()||this.m.getState()===_.ip)this.l?this.m.play()["catch"](function(){}):this.o.aa(.01);this.m.trigger(new _.L(a))};_.r.qb=function(){return this.j};
4
- _.r.Se=function(){return this.f};_.r.pm=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.I("clpp.airplay.AirPlayPlugin",uS);uS.prototype.showCastMenu=uS.prototype.pm;uS.prototype.canCast=uS.prototype.Se;uS.prototype.isCasting=uS.prototype.qb;uS.Id="airplay";vS.prototype.create=function(){return new uS};_.Dq(new vS);};
2
+ var f=function(window){var BX=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Xk(function(){a.m.play()["catch"](function(){})});this.h=new _.Uh},CX=function(){};_.x(BX,_.tu);_.u=BX.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.jm.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Gm.bind(this)))};
3
+ _.u.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.u.id=function(){return"airplay"};_.u.jm=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.L(_.Sc,{canCast:this.f}))};_.u.Gm=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Rc:_.Qc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Bp)this.l?this.m.play()["catch"](function(){}):this.o.fa(.01);this.m.trigger(new _.L(a))};_.u.Gb=function(){return this.j};
4
+ _.u.zf=function(){return this.f};_.u.nn=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",BX);BX.prototype.showCastMenu=BX.prototype.nn;BX.prototype.canCast=BX.prototype.zf;BX.prototype.isCasting=BX.prototype.Gb;BX.Id="airplay";CX.prototype.create=function(){return new BX};_.Zq(new CX);};
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 mS=function(a,b){this.m=a;this.f=b;this.a=new _.Eh;this.h=!1},nS=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Ij();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.va};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)},oS=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.Eh;this.j=!1},pS=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===_.Yf&&a.h.setUUID(f))},qS=
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,_.pe,a.T.bind(a));a.l=nS(a.m);a.a.attachPlayer(a.l)},rS=function(a,b){_.Hh(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},sS=function(){return!window.SmartLib||!window.GenericPlayerApi},tS=function(){};_.r=mS.prototype;
5
- _.r.init=function(){var a=this.m,b=this.a;b.on(a,_.Vf,this.xi.bind(this));b.on(a,_.hd,this.vi.bind(this));b.on(a,"seek",this.wi.bind(this))};_.r.vi=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.xi=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.$o&&c.notifyStallEnd(!b.isPaused());switch(d){case _.$o:c.notifyStallStart();break;case _.ip:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.hp:c.notifyPause()}};
6
- _.r.wi=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.Hh(this.a),this.a=null)};_.w(oS,_.fu);_.r=oS.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(sS())return a.onError(new _.P(1,9,11E3));this.j=!0;pS(this,d);qS(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 _.P(1,9,11001,{bpkErrorCode:f,message:e}));rS(c,void 0)}else b.url=e.getURL(),c.f=new mS(c.m,c.l),c.f.init()})}};
7
- _.r.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.r.T=function(a){a=a.detail;if(7003===a.code)rS(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:rS(this,SmartLib.BPDecodingError);break;case 1:rS(this,SmartLib.BPNetworkingError);break;case 6:rS(this,SmartLib.BPAccessRightError);break;default:rS(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){sS()||rS(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.r.id=function(){return"broadpeak"};
8
- _.I("clpp.broadpeak.BroadpeakPlugin",oS);oS.isSdkMissing=sS;oS.Id="broadpeak";tS.prototype.create=function(){return new oS};_.Dq(new tS);};
2
+ var f=function(window){var tX=function(a,b){this.m=a;this.f=b;this.a=new _.Uh;this.h=!1},uX=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Zj();return d}_.x(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.wa};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)},vX=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.Uh;this.j=!1},wX=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===_.kg&&a.h.setUUID(f))},xX=
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,_.se,a.V.bind(a));a.l=uX(a.m);a.a.attachPlayer(a.l)},yX=function(a,b){_.Xh(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},zX=function(){return!window.SmartLib||!window.GenericPlayerApi},AX=function(){};_.u=tX.prototype;
5
+ _.u.init=function(){var a=this.m,b=this.a;b.on(a,_.hg,this.tj.bind(this));b.on(a,_.kd,this.rj.bind(this));b.on(a,"seek",this.sj.bind(this))};_.u.rj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.u.tj=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.sp&&c.notifyStallEnd(!b.isPaused());switch(d){case _.sp:c.notifyStallStart();break;case _.Bp:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.Ap:c.notifyPause()}};
6
+ _.u.sj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.u.release=function(){this.a&&(_.Xh(this.a),this.a=null)};_.x(vX,_.tu);_.u=vX.prototype;_.u.onPlayerCreated=function(a){this.m=a};_.u.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(zX())return a.onError(new _.P(1,9,11E3));this.j=!0;wX(this,d);xX(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 _.P(1,9,11001,{bpkErrorCode:f,message:e}));yX(c,void 0)}else b.url=e.getURL(),c.f=new tX(c.m,c.l),c.f.init()})}};
7
+ _.u.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.u.V=function(a){a=a.detail;if(7003===a.code)yX(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:yX(this,SmartLib.BPDecodingError);break;case 1:yX(this,SmartLib.BPNetworkingError);break;case 6:yX(this,SmartLib.BPAccessRightError);break;default:yX(this,SmartLib.BPUnspecifiedError)}};_.u.onPlayerWillRelease=function(){zX()||yX(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.u.id=function(){return"broadpeak"};
8
+ _.J("clpp.broadpeak.BroadpeakPlugin",vX);vX.isSdkMissing=zX;vX.Id="broadpeak";AX.prototype.create=function(){return new vX};_.Zq(new AX);};
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));}