@castlabs/prestoplay 6.6.1-beta.2 → 6.7.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 +20 -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 +403 -403
  8. package/cjs/cl.crypto.js +10 -10
  9. package/cjs/cl.dash.js +71 -71
  10. package/cjs/cl.externs.js +47 -41
  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 +263 -260
  17. package/cjs/cl.muxdata.js +11 -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 +70 -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 +13 -13
  28. package/cjs/cl.vtt.js +11 -11
  29. package/cjs/cl.youbora.js +19 -19
  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 +345 -343
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +67 -67
  38. package/cl.externs.js +47 -41
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +57 -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 +227 -227
  45. package/cl.muxdata.js +9 -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 -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 -15
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +14 -14
  58. package/package.json +1 -1
  59. package/typings.d.ts +118 -12
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # 6.7.0
2
+
3
+ ## Changes
4
+
5
+ * HLS related fixes:
6
+ * Fix corner cases in the handling of segment byte ranges.
7
+ * Improve playlist validation and support check.
8
+ * Low latency support:
9
+ * Fix playlist validation with respect to `#EXT-X-SERVER-CONTROL:PART-HOLD-BACK`.
10
+ * Fix handling of low-latency playlist segments when low-latency support is
11
+ disabled (It is disabled by default).
12
+ * Fixed Chromecast Cast Web Sender track manager issue, restoring the ability to list and change text/audio tracks during casting.
13
+
1
14
  # 6.6.1
2
15
 
3
16
  ## Changes
@@ -6,6 +19,13 @@
6
19
  and `clpp.utils.Mp4Parser.headerSize()`.
7
20
  * HLS related fixes:
8
21
  * Improve MIME type detection by leveraging `#EXT-X-MAP` tags.
22
+ * Fixed issue with some Smooth Streaming playback scenarios where the timeline
23
+ was adjusted but the wrong base media decode time was used.
24
+ * Fixed minor issue with Youbora receiving consecutive buffering ended events during
25
+ ad playback. The state was tracked already internally so these events were not
26
+ reported and this has not affect on the data exposed to Youbora. It makes the internal
27
+ implementation more consistent though and is slightly more performant since we are
28
+ saving some calls.
9
29
 
10
30
  # 6.6.0
11
31
 
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var eN=function(){this.l=this.f=null;this.a="";this.g=new _.H("clpp.adobe.AdobePlugin")},hN=function(a){a.f=new _.eg;a.f.on(a.l,_.Ne,function(){return fN(a)});a.f.on(a.l,_.Me,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.xd,function(){return gN(a)});a.f.on(a.l,_.se,function(b){b=b.detail;switch(b.currentState){case _.mn:a.a.length||gN(a);s.Media.play(a.a,a.l.getPosition());break;case _.ln:case _.cn:fN(a);break;case _.en:case _.Ym:case _.jn:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),fN(a),s.Media.close(a.a),a.a=""}})},gN=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)},fN=function(a){s.Media.stop(a.a,a.l.getPosition())},iN=function(){};_.v(eN,_.nq);eN.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,hN(this)):this.g.warn("Adobe API not available.")};
4
- eN.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};eN.prototype.id=function(){return"adobe"};_.C("clpp.adobe.AdobeAnalyticsPlugin",eN);eN.Id="adobe";iN.prototype.create=function(){return new eN};_.Fo(new iN);};
2
+ var f=function(window){var PN=function(){this.l=this.f=null;this.a="";this.h=new _.H("clpp.adobe.AdobePlugin")},SN=function(a){a.f=new _.eg;a.f.on(a.l,_.Ne,function(){return QN(a)});a.f.on(a.l,_.Me,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.xd,function(){return RN(a)});a.f.on(a.l,_.se,function(b){b=b.detail;switch(b.currentState){case _.mn:a.a.length||RN(a);s.Media.play(a.a,a.l.getPosition());break;case _.ln:case _.cn:QN(a);break;case _.en:case _.Ym:case _.jn:a.h.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),QN(a),s.Media.close(a.a),a.a=""}})},RN=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)},QN=function(a){s.Media.stop(a.a,a.l.getPosition())},TN=function(){};_.w(PN,_.nq);PN.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,SN(this)):this.h.warn("Adobe API not available.")};
4
+ PN.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};PN.prototype.id=function(){return"adobe"};_.C("clpp.adobe.AdobeAnalyticsPlugin",PN);PN.Id="adobe";TN.prototype.create=function(){return new PN};_.Fo(new TN);};
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 cN=function(){var a=this;this.a=this.l=null;this.j=this.f=this.h=!1;this.m=new _.Ri(function(){a.l.play()["catch"](function(){})});this.g=new _.eg},dN=function(){};_.v(cN,_.nq);_.t=cN.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 _.I(_.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()===_.mn)this.j?this.l.play()["catch"](function(){}):this.m.Y(.01);this.l.trigger(new _.I(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())};_.C("clpp.airplay.AirPlayPlugin",cN);cN.prototype.showCastMenu=cN.prototype.Lj;cN.prototype.canCast=cN.prototype.fe;cN.prototype.isCasting=cN.prototype.ib;cN.Id="airplay";dN.prototype.create=function(){return new cN};_.Fo(new dN);};
2
+ var f=function(window){var NN=function(){var a=this;this.a=this.l=null;this.m=this.f=this.j=!1;this.o=new _.Zi(function(){a.l.play()["catch"](function(){})});this.g=new _.eg},ON=function(){};_.w(NN,_.nq);_.t=NN.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.Xj.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.xk.bind(this)))};
3
+ _.t.onPlayerWillRelease=function(){this.o.stop();this.g.release()};_.t.id=function(){return"airplay"};_.t.Xj=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.I(_.bc,{canCast:this.f}))};_.t.xk=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.ac:_.$b;if(this.m||!this.l.isPaused()||this.l.getState()===_.mn)this.m?this.l.play()["catch"](function(){}):this.o.Z(.01);this.l.trigger(new _.I(a))};_.t.lb=function(){return this.j};
4
+ _.t.qe=function(){return this.f};_.t.Wk=function(){this.f&&(this.m=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.C("clpp.airplay.AirPlayPlugin",NN);NN.prototype.showCastMenu=NN.prototype.Wk;NN.prototype.canCast=NN.prototype.qe;NN.prototype.isCasting=NN.prototype.lb;NN.Id="airplay";ON.prototype.create=function(){return new NN};_.Fo(new ON);};
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 VM=function(a,b){this.l=a;this.f=b;this.a=new _.eg;this.g=!1},WM=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.l=c;d.a=_.bi();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)},XM=function(){this.h=this.f=this.a=this.g=this.l=null;this.j=new _.eg},YM=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))},ZM=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=WM(a.l);a.a.attachPlayer(a.h)},$M=function(a,b){_.hg(a.j);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},aN=function(){return!window.SmartLib||!window.GenericPlayerApi},bN=function(){};_.t=VM.prototype;_.t.init=function(){var a=this.l,b=this.a;b.on(a,_.se,this.Og.bind(this));b.on(a,_.sc,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===_.cn&&c.notifyStallEnd(!b.isPaused());switch(d){case _.cn:c.notifyStallStart();break;case _.mn:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.ln: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(XM,_.nq);_.t=XM.prototype;_.t.onPlayerCreated=function(a){this.l=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(aN())return a.onError(new _.L(1,9,11E3));YM(this,d);ZM(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}));$M(c,void 0)}else b.url=e.getURL(),c.f=new VM(c.l,c.h),c.f.init()})}};
6
- _.t.T=function(a){a=a.detail;if(7003===a.code)$M(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.M)switch(a.category){case 3:$M(this,SmartLib.BPDecodingError);break;case 1:$M(this,SmartLib.BPNetworkingError);break;case 6:$M(this,SmartLib.BPAccessRightError);break;default:$M(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){aN()||$M(this,SmartLib.BPSessionEndsNormally)};_.t.id=function(){return"broadpeak"};_.C("clpp.broadpeak.BroadpeakPlugin",XM);
7
- XM.isSdkMissing=aN;XM.Id="broadpeak";bN.prototype.create=function(){return new XM};_.Fo(new bN);};
2
+ var f=function(window){var FN=function(a,b){this.l=a;this.f=b;this.a=new _.eg;this.g=!1},GN=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.l=c;d.a=_.mi();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)},HN=function(){this.j=this.f=this.a=this.g=this.l=null;this.m=new _.eg},IN=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))},JN=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,_.jd,a.S.bind(a));a.j=GN(a.l);a.a.attachPlayer(a.j)},KN=function(a,b){_.hg(a.m);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},LN=function(){return!window.SmartLib||!window.GenericPlayerApi},MN=function(){};_.t=FN.prototype;_.t.init=function(){var a=this.l,b=this.a;b.on(a,_.se,this.xh.bind(this));b.on(a,_.uc,this.vh.bind(this));b.on(a,"seek",this.wh.bind(this))};
5
+ _.t.vh=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.t.xh=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.cn&&c.notifyStallEnd(!b.isPaused());switch(d){case _.cn:c.notifyStallStart();break;case _.mn:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.ln:c.notifyPause()}};_.t.wh=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.t.release=function(){this.a&&(_.hg(this.a),this.a=null)};_.w(HN,_.nq);_.t=HN.prototype;_.t.onPlayerCreated=function(a){this.l=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(LN())return a.onError(new _.L(1,9,11E3));IN(this,d);JN(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}));KN(c,void 0)}else b.url=e.getURL(),c.f=new FN(c.l,c.j),c.f.init()})}};
6
+ _.t.S=function(a){a=a.detail;if(7003===a.code)KN(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.M)switch(a.category){case 3:KN(this,SmartLib.BPDecodingError);break;case 1:KN(this,SmartLib.BPNetworkingError);break;case 6:KN(this,SmartLib.BPAccessRightError);break;default:KN(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){LN()||KN(this,SmartLib.BPSessionEndsNormally)};_.t.id=function(){return"broadpeak"};_.C("clpp.broadpeak.BroadpeakPlugin",HN);
7
+ HN.isSdkMissing=LN;HN.Id="broadpeak";MN.prototype.create=function(){return new HN};_.Fo(new MN);};
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));}