@castlabs/prestoplay 6.16.1-beta.6 → 6.17.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 +3 -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 -114
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +556 -556
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +74 -74
  10. package/cjs/cl.freewheel.js +24 -24
  11. package/cjs/cl.hls.js +69 -69
  12. package/cjs/cl.hlssmpte.js +6 -6
  13. package/cjs/cl.htmlcue.js +29 -29
  14. package/cjs/cl.ima.js +24 -24
  15. package/cjs/cl.mse.js +313 -368
  16. package/cjs/cl.muxdata.js +15 -15
  17. package/cjs/cl.onboard.js +3 -3
  18. package/cjs/cl.persistent.js +14 -14
  19. package/cjs/cl.playlist.js +6 -6
  20. package/cjs/cl.sessions.js +15 -15
  21. package/cjs/cl.simid.js +15 -15
  22. package/cjs/cl.smooth.js +72 -72
  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 +88 -88
  35. package/cl.conviva.js +26 -26
  36. package/cl.core.js +409 -409
  37. package/cl.crypto.js +9 -9
  38. package/cl.dash.js +70 -70
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +72 -72
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +26 -26
  43. package/cl.ima.js +17 -17
  44. package/cl.mse.js +274 -318
  45. package/cl.muxdata.js +13 -13
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +10 -10
  48. package/cl.playlist.js +5 -5
  49. package/cl.sessions.js +10 -10
  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 +2 -2
package/CHANGELOG.md CHANGED
@@ -6,11 +6,14 @@
6
6
 
7
7
  ## Changes
8
8
 
9
+ * Fix `clpp.Player.getTextDisplayer()` API.
9
10
  * Fix docs of `clpp.Player.setMuted()` API.
10
11
  * Fix handling of empty attribute values in HLS.
11
12
  * Upgrade supported version of `youboralib` to 6.8.57. Please upgrade to this version (e.g. `npm i youboralib@6.8.57`).
12
13
  * Fix a corner case with HLS VOD streams in which `EXT-X-DATE-RANGE` tags are
13
14
  not being parsed when program date time is equal to the start of Unix epoch.
15
+ * Add support for `EventStream@presentationTimeOffset`
16
+ * If present, `presentationTimeOffset` attribute is now used to calculate the presentation time of Events.
14
17
 
15
18
  # 6.16.0
16
19
 
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var NY=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},QY=function(a){a.f=new _.Vh;a.f.on(a.m,_.Cg,function(){return OY(a)});a.f.on(a.m,_.Bg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Le,function(){return PY(a)});a.f.on(a.m,_.ig,function(b){b=b.detail;switch(b.currentState){case _.Ap:a.a.length||PY(a);s.Media.play(a.a,a.m.getPosition());break;case _.zp:case _.rp:OY(a);break;case _.tp:case _.mp:case _.xp:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),OY(a),s.Media.close(a.a),a.a=""}})},PY=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)},OY=function(a){s.Media.stop(a.a,a.m.getPosition())},RY=function(){};_.x(NY,_.wu);NY.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.m=a,QY(this)):this.g.warn("Adobe API not available.")};
4
- NY.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};NY.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",NY);NY.Id="adobe";RY.prototype.create=function(){return new NY};_.Yq(new RY);};
2
+ var f=function(window){var TV=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},WV=function(a){a.f=new _.Uh;a.f.on(a.m,_.Dg,function(){return UV(a)});a.f.on(a.m,_.Cg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Ke,function(){return VV(a)});a.f.on(a.m,_.hg,function(b){b=b.detail;switch(b.currentState){case _.zp:a.a.length||VV(a);s.Media.play(a.a,a.m.getPosition());break;case _.yp:case _.qp:UV(a);break;case _.sp:case _.lp:case _.wp:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),UV(a),s.Media.close(a.a),a.a=""}})},VV=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)},UV=function(a){s.Media.stop(a.a,a.m.getPosition())},XV=function(){};_.x(TV,_.wu);TV.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.m=a,WV(this)):this.g.warn("Adobe API not available.")};
4
+ TV.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};TV.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",TV);TV.Id="adobe";XV.prototype.create=function(){return new TV};_.Xq(new XV);};
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 LY=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Wk(function(){a.m.play()["catch"](function(){})});this.h=new _.Vh},MY=function(){};_.x(LY,_.wu);_.u=LY.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.om.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Nm.bind(this)))};
3
- _.u.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.u.id=function(){return"airplay"};_.u.om=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.L(_.Tc,{canCast:this.f}))};_.u.Nm=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Sc:_.Rc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Ap)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.Af=function(){return this.f};_.u.vn=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",LY);LY.prototype.showCastMenu=LY.prototype.vn;LY.prototype.canCast=LY.prototype.Af;LY.prototype.isCasting=LY.prototype.Gb;LY.Id="airplay";MY.prototype.create=function(){return new LY};_.Yq(new MY);};
2
+ var f=function(window){var RV=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Uk(function(){a.m.play()["catch"](function(){})});this.h=new _.Uh},SV=function(){};_.x(RV,_.wu);_.t=RV.prototype;_.t.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.t.onContentWillLoad=function(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.Wl.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.ym.bind(this)))};
3
+ _.t.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.t.id=function(){return"airplay"};_.t.Wl=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}))};_.t.ym=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Rc:_.Qc;if(this.l||!this.m.isPaused()||this.m.getState()===_.zp)this.l?this.m.play()["catch"](function(){}):this.o.da(.01);this.m.trigger(new _.L(a))};_.t.tb=function(){return this.j};
4
+ _.t.jf=function(){return this.f};_.t.fn=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",RV);RV.prototype.showCastMenu=RV.prototype.fn;RV.prototype.canCast=RV.prototype.jf;RV.prototype.isCasting=RV.prototype.tb;RV.Id="airplay";SV.prototype.create=function(){return new RV};_.Xq(new SV);};
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 DY=function(a,b){this.m=a;this.f=b;this.a=new _.Vh;this.h=!1},EY=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Yj();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)},FY=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.Vh;this.j=!1},GY=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===_.lg&&a.h.setUUID(f))},HY=
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,_.te,a.U.bind(a));a.l=EY(a.m);a.a.attachPlayer(a.l)},IY=function(a,b){_.Yh(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},JY=function(){return!window.SmartLib||!window.GenericPlayerApi},KY=function(){};_.u=DY.prototype;
5
- _.u.init=function(){var a=this.m,b=this.a;b.on(a,_.ig,this.uj.bind(this));b.on(a,_.ld,this.sj.bind(this));b.on(a,"seek",this.tj.bind(this))};_.u.sj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.u.uj=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.rp&&c.notifyStallEnd(!b.isPaused());switch(d){case _.rp:c.notifyStallStart();break;case _.Ap:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.zp:c.notifyPause()}};
6
- _.u.tj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.u.release=function(){this.a&&(_.Yh(this.a),this.a=null)};_.x(FY,_.wu);_.u=FY.prototype;_.u.onPlayerCreated=function(a){this.m=a};_.u.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(JY())return a.onError(new _.P(1,9,11E3));this.j=!0;GY(this,d);HY(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}));IY(c,void 0)}else b.url=e.getURL(),c.f=new DY(c.m,c.l),c.f.init()})}};
7
- _.u.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.u.U=function(a){a=a.detail;if(7003===a.code)IY(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:IY(this,SmartLib.BPDecodingError);break;case 1:IY(this,SmartLib.BPNetworkingError);break;case 6:IY(this,SmartLib.BPAccessRightError);break;default:IY(this,SmartLib.BPUnspecifiedError)}};_.u.onPlayerWillRelease=function(){JY()||IY(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.u.id=function(){return"broadpeak"};
8
- _.J("clpp.broadpeak.BroadpeakPlugin",FY);FY.isSdkMissing=JY;FY.Id="broadpeak";KY.prototype.create=function(){return new FY};_.Yq(new KY);};
2
+ var f=function(window){var JV=function(a,b){this.m=a;this.f=b;this.a=new _.Uh;this.h=!1},KV=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Xj();return d}_.x(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)},LV=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.Uh;this.j=!1},MV=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))},NV=
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.T.bind(a));a.l=KV(a.m);a.a.attachPlayer(a.l)},OV=function(a,b){_.Xh(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},PV=function(){return!window.SmartLib||!window.GenericPlayerApi},QV=function(){};_.t=JV.prototype;
5
+ _.t.init=function(){var a=this.m,b=this.a;b.on(a,_.hg,this.cj.bind(this));b.on(a,_.kd,this.aj.bind(this));b.on(a,"seek",this.bj.bind(this))};_.t.aj=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.t.cj=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.qp&&c.notifyStallEnd(!b.isPaused());switch(d){case _.qp:c.notifyStallStart();break;case _.zp:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.yp:c.notifyPause()}};
6
+ _.t.bj=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.t.release=function(){this.a&&(_.Xh(this.a),this.a=null)};_.x(LV,_.wu);_.t=LV.prototype;_.t.onPlayerCreated=function(a){this.m=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(PV())return a.onError(new _.P(1,9,11E3));this.j=!0;MV(this,d);NV(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}));OV(c,void 0)}else b.url=e.getURL(),c.f=new JV(c.m,c.l),c.f.init()})}};
7
+ _.t.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.t.T=function(a){a=a.detail;if(7003===a.code)OV(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:OV(this,SmartLib.BPDecodingError);break;case 1:OV(this,SmartLib.BPNetworkingError);break;case 6:OV(this,SmartLib.BPAccessRightError);break;default:OV(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){PV()||OV(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.t.id=function(){return"broadpeak"};
8
+ _.J("clpp.broadpeak.BroadpeakPlugin",LV);LV.isSdkMissing=PV;LV.Id="broadpeak";QV.prototype.create=function(){return new LV};_.Xq(new QV);};
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));}