@castlabs/prestoplay 6.2.8 → 6.3.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 (58) hide show
  1. package/CHANGELOG.md +34 -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 -106
  6. package/cjs/cl.conviva.js +32 -31
  7. package/cjs/cl.core.js +371 -360
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +69 -69
  10. package/cjs/cl.externs.js +68 -17
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +44 -44
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +32 -30
  15. package/cjs/cl.ima.js +23 -23
  16. package/cjs/cl.mse.js +250 -255
  17. package/cjs/cl.muxdata.js +12 -11
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -5
  21. package/cjs/cl.smooth.js +70 -70
  22. package/cjs/cl.thumbnails.js +22 -22
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +26 -26
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +18 -18
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +19 -18
  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 +85 -81
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +346 -337
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +62 -63
  38. package/cl.externs.js +68 -17
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +37 -37
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -24
  43. package/cl.ima.js +16 -16
  44. package/cl.mse.js +220 -224
  45. package/cl.muxdata.js +8 -9
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +9 -9
  48. package/cl.playlist.js +5 -4
  49. package/cl.smooth.js +57 -57
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +21 -21
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +14 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +15 -15
  58. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,8 +1,41 @@
1
+ # 6.3.0
2
+
3
+ ## **Warning!**
4
+ Changes in this release might cause breaking changes for some use cases. Please double-check your current usage of the following:
5
+ * `player.getPresentationStartTime()` - For non-live content, this method now returns `null`, instead of the previous `0`.
6
+
7
+ ## Changes
8
+
9
+ * Fix issues with `YouboraPlugin`.
10
+ * Fix crash when Youbora configuration is not passed via `clpp.Player` constructor.
11
+ * Fix an issue where Youbora plugin stopped reporting events after a call to `setYouboraPlugin`.
12
+ * Fix an issue with the import of `youboralib` and `@castlabs/prestoplay/cl.youbora`
13
+ when used with a bundler which performs hoisting of import statements (such as Webpack).
14
+ * Improvements on FPS License management. This release includes several improvements
15
+ related to the FairPlay License management with the Apple Prefixed implementation
16
+ as well as the EME implementation. Handling of multiple license requests is
17
+ improved, and we added a few workarounds that allow us to handle rejected payloads
18
+ better and reduce the number of failed playback attempts which previously
19
+ caused 3016 decode errors.
20
+ * Fixed an issue where the initials FPS license request with the EME implementation
21
+ was incorrectly reported as a renewal request.
22
+ * Changed the behavior of `player.getPresentationStartTime()`. The method now only returns numerical values when the stream is
23
+ live and the calculation of presentation start time is possible; otherwise, it returns `null`. **Note: potentially breaking change!**
24
+ * Chromecast Cast Web Sender & Web Receiver related changes:
25
+ * Fixed time synchronization issues for DASH live streams between cast sender and receiver. The updates address
26
+ problems related to seeking, switching between sender/receiver, and incorrect values returned from SDK during active casting.
27
+ * Fix `player.getDuration()` return value during live stream casting. The function now correctly returns `Infinity`,
28
+ addressing the previous bug where `-1` was incorrectly returned. This fix applies to both receiver and sender sides
29
+ during active casting.
30
+ * Changed the behavior of the `clpp.cast.CastProxy.setContentMetadata()` method. This method now also accepts null, which will clear the metadata.
31
+ * Added the `clpp.cast.CastProxy.getContentMetadata()` method.
32
+ * In an effort to simplify the `clpp.cast.CastProxy` metadata API, we are deprecating the following methods: `setContentTitle()`, `setContentImage()`, `setContentArtist()`, `setContentReleaseDate()`, `clearContentMetadata()`. These methods will still work, but they will be removed in the next release. Please use the `setContentMetadata()` method instead. Refer to the documentation for details.
33
+
1
34
  # 6.2.8
2
35
 
3
36
  ## Changes
4
37
 
5
- * Fix clock sync fallback in DASH.
38
+ * Fix clock sync fallback in DASH.
6
39
  * This fixes an issue where one failing `UTCTiming` tag
7
40
  cancelled the whole time sync. Now all `UTCTiming` tags are tried one-by-one until one
8
41
  succeeds, or if all fail, only then the time sync is cancelled.
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var vL=function(){this.l=this.f=null;this.a="";this.g=new _.D("clpp.adobe.AdobePlugin")},yL=function(a){a.f=new _.Yf;a.f.on(a.l,_.Ee,function(){return wL(a)});a.f.on(a.l,_.De,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.kd,function(){return xL(a)});a.f.on(a.l,_.ie,function(b){b=b.detail;switch(b.currentState){case _.Vl:a.a.length||xL(a);s.Media.play(a.a,a.l.getPosition());break;case _.Ul:case _.Ml:wL(a);break;case _.Ol:case _.Hl:case _.Sl:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),wL(a),s.Media.close(a.a),a.a=""}})},xL=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(),_.na)},wL=function(a){s.Media.stop(a.a,a.l.getPosition())},zL=function(){};_.u(vL,_.ap);vL.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,yL(this)):this.g.warn("Adobe API not available.")};
4
- vL.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};vL.prototype.id=function(){return"adobe"};_.A("clpp.adobe.AdobeAnalyticsPlugin",vL);vL.Id="adobe";zL.prototype.create=function(){return new vL};_.pn(new zL);};
2
+ var f=function(window){var HL=function(){this.l=this.f=null;this.a="";this.g=new _.G("clpp.adobe.AdobePlugin")},KL=function(a){a.f=new _.Wf;a.f.on(a.l,_.Ee,function(){return IL(a)});a.f.on(a.l,_.De,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.md,function(){return JL(a)});a.f.on(a.l,_.ie,function(b){b=b.detail;switch(b.currentState){case _.km:a.a.length||JL(a);s.Media.play(a.a,a.l.getPosition());break;case _.jm:case _.bm:IL(a);break;case _.dm:case _.Xl:case _.hm:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),IL(a),s.Media.close(a.a),a.a=""}})},JL=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(),_.oa)},IL=function(a){s.Media.stop(a.a,a.l.getPosition())},LL=function(){};_.v(HL,_.rp);HL.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,KL(this)):this.g.warn("Adobe API not available.")};
4
+ HL.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};HL.prototype.id=function(){return"adobe"};_.B("clpp.adobe.AdobeAnalyticsPlugin",HL);HL.Id="adobe";LL.prototype.create=function(){return new HL};_.Fn(new LL);};
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 tL=function(){var a=this;this.a=this.l=null;this.j=this.f=this.h=!1;this.m=new _.oh(function(){a.l.play()["catch"](function(){})});this.g=new _.Yf},uL=function(){};_.u(tL,_.ap);_.h=tL.prototype;_.h.onPlayerCreated=function(a){this.l=a;this.a=a.getSurface().getMedia()};_.h.onContentWillLoad=function(){this.a&&(this.g.on(this.a,"webkitplaybacktargetavailabilitychanged",this.Mi.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.oj.bind(this)))};
3
- _.h.onPlayerWillRelease=function(){this.m.stop();this.g.release()};_.h.id=function(){return"airplay"};_.h.Mi=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.E(_.Pb,{canCast:this.f}))};_.h.oj=function(){var a=(this.h=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Ob:_.Nb;if(this.j||!this.l.isPaused()||this.l.getState()===_.Vl)this.j?this.l.play()["catch"](function(){}):this.m.$(.01);this.l.trigger(new _.E(a))};_.h.cb=function(){return this.h};
4
- _.h.Yd=function(){return this.f};_.h.Gj=function(){this.f&&(this.j=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.A("clpp.airplay.AirPlayPlugin",tL);tL.prototype.showCastMenu=tL.prototype.Gj;tL.prototype.canCast=tL.prototype.Yd;tL.prototype.isCasting=tL.prototype.cb;tL.Id="airplay";uL.prototype.create=function(){return new tL};_.pn(new uL);};
2
+ var f=function(window){var FL=function(){var a=this;this.a=this.l=null;this.j=this.f=this.h=!1;this.m=new _.oh(function(){a.l.play()["catch"](function(){})});this.g=new _.Wf},GL=function(){};_.v(FL,_.rp);_.t=FL.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.Ai.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.aj.bind(this)))};
3
+ _.t.onPlayerWillRelease=function(){this.m.stop();this.g.release()};_.t.id=function(){return"airplay"};_.t.Ai=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.I(_.Qb,{canCast:this.f}))};_.t.aj=function(){var a=(this.h=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Pb:_.Ob;if(this.j||!this.l.isPaused()||this.l.getState()===_.km)this.j?this.l.play()["catch"](function(){}):this.m.$(.01);this.l.trigger(new _.I(a))};_.t.eb=function(){return this.h};
4
+ _.t.Xd=function(){return this.f};_.t.qj=function(){this.f&&(this.j=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.B("clpp.airplay.AirPlayPlugin",FL);FL.prototype.showCastMenu=FL.prototype.qj;FL.prototype.canCast=FL.prototype.Xd;FL.prototype.isCasting=FL.prototype.eb;FL.Id="airplay";GL.prototype.create=function(){return new FL};_.Fn(new GL);};
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 lL=function(a,b){this.l=a;this.f=b;this.a=new _.Yf;this.g=!1},mL=function(a){var b=GenericPlayerApi.call(this)||this;b.l=a;b.a=_.ji();return b},nL=function(){this.h=this.f=this.a=this.g=this.l=null;this.j=new _.Yf},oL=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===_.me&&a.g.setUUID(f))},pL=function(a,b){var c=b.customParameters||{};a.a=a.g.createStreamingSession();for(var d in c)a.a.setCustomParameter(d,
3
- c[d]);a.j.on(a.l,_.Xc,a.S.bind(a));a.h=new mL(a.l);a.a.attachPlayer(a.h)},qL=function(a,b){_.ag(a.j);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},rL=function(){return!window.SmartLib||!window.GenericPlayerApi},sL=function(){};_.h=lL.prototype;_.h.init=function(){var a=this.l,b=this.a;b.on(a,_.ie,this.Mg.bind(this));b.on(a,_.hc,this.Kg.bind(this));b.on(a,"seek",this.Lg.bind(this))};
4
- _.h.Kg=function(a){a=a.detail;typeof a.bandwidth===_.zd&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.h.Mg=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Ml&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Ml:c.notifyStallStart();break;case _.Vl:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.Ul:c.notifyPause()}};_.h.Lg=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.h.release=function(){this.a&&(_.ag(this.a),this.a=null)};_.u(mL,GenericPlayerApi);_.h=mL.prototype;_.h.getPlayerName=function(){return _.na};_.h.getVersion=function(){return _.ea};_.h.getOSName=function(){return this.a.os};_.h.getDeviceVersion=function(){return this.a.osVersion.name};_.h.getDeviceType=function(){return"browser"};_.h.getTotalDuration=function(){return this.l.isLive()?0:1E3*this.l.getDuration()};_.h.getCurrentPosition=function(){return 1E3*this.l.getPosition()};
5
- _.h.getCurrentBitrate=function(){var a=this.l.getStats();return(a?a.streamBandwidth:0)/1E3};_.u(nL,_.ap);_.h=nL.prototype;_.h.onPlayerCreated=function(a){this.l=a};_.h.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(rL())return a.onError(new _.J(1,9,11E3));oL(this,d);pL(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 _.J(1,9,11001,{bpkErrorCode:f,message:e}));qL(c,void 0)}else b.url=e.getURL(),c.f=new lL(c.l,c.h),c.f.init()})}};
6
- _.h.S=function(a){a=a.detail;if(7003===a.code)qL(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.K)switch(a.category){case 3:qL(this,SmartLib.BPDecodingError);break;case 1:qL(this,SmartLib.BPNetworkingError);break;case 6:qL(this,SmartLib.BPAccessRightError);break;default:qL(this,SmartLib.BPUnspecifiedError)}};_.h.onPlayerWillRelease=function(){rL()||qL(this,SmartLib.BPSessionEndsNormally)};_.h.id=function(){return"broadpeak"};_.A("clpp.broadpeak.BroadpeakPlugin",nL);
7
- nL.isSdkMissing=rL;nL.Id="broadpeak";sL.prototype.create=function(){return new nL};_.pn(new sL);};
2
+ var f=function(window){var xL=function(a,b){this.l=a;this.f=b;this.a=new _.Wf;this.g=!1},yL=function(a){var b=GenericPlayerApi.call(this)||this;b.l=a;b.a=_.ji();return b},zL=function(){this.h=this.f=this.a=this.g=this.l=null;this.j=new _.Wf},AL=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===_.me&&a.g.setUUID(f))},BL=function(a,b){var c=b.customParameters||{};a.a=a.g.createStreamingSession();for(var d in c)a.a.setCustomParameter(d,
3
+ c[d]);a.j.on(a.l,_.Zc,a.S.bind(a));a.h=new yL(a.l);a.a.attachPlayer(a.h)},CL=function(a,b){_.ag(a.j);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},DL=function(){return!window.SmartLib||!window.GenericPlayerApi},EL=function(){};_.t=xL.prototype;_.t.init=function(){var a=this.l,b=this.a;b.on(a,_.ie,this.Ag.bind(this));b.on(a,_.ic,this.yg.bind(this));b.on(a,"seek",this.zg.bind(this))};
4
+ _.t.yg=function(a){a=a.detail;typeof a.bandwidth===_.h&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.t.Ag=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.bm&&c.notifyStallEnd(!b.isPaused());switch(d){case _.bm:c.notifyStallStart();break;case _.km:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.jm:c.notifyPause()}};_.t.zg=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.t.release=function(){this.a&&(_.ag(this.a),this.a=null)};_.v(yL,GenericPlayerApi);_.t=yL.prototype;_.t.getPlayerName=function(){return _.oa};_.t.getVersion=function(){return _.ea};_.t.getOSName=function(){return this.a.os};_.t.getDeviceVersion=function(){return this.a.osVersion.name};_.t.getDeviceType=function(){return"browser"};_.t.getTotalDuration=function(){return this.l.isLive()?0:1E3*this.l.getDuration()};_.t.getCurrentPosition=function(){return 1E3*this.l.getPosition()};
5
+ _.t.getCurrentBitrate=function(){var a=this.l.getStats();return(a?a.streamBandwidth:0)/1E3};_.v(zL,_.rp);_.t=zL.prototype;_.t.onPlayerCreated=function(a){this.l=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(DL())return a.onError(new _.K(1,9,11E3));AL(this,d);BL(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 _.K(1,9,11001,{bpkErrorCode:f,message:e}));CL(c,void 0)}else b.url=e.getURL(),c.f=new xL(c.l,c.h),c.f.init()})}};
6
+ _.t.S=function(a){a=a.detail;if(7003===a.code)CL(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.M)switch(a.category){case 3:CL(this,SmartLib.BPDecodingError);break;case 1:CL(this,SmartLib.BPNetworkingError);break;case 6:CL(this,SmartLib.BPAccessRightError);break;default:CL(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){DL()||CL(this,SmartLib.BPSessionEndsNormally)};_.t.id=function(){return"broadpeak"};_.B("clpp.broadpeak.BroadpeakPlugin",zL);
7
+ zL.isSdkMissing=DL;zL.Id="broadpeak";EL.prototype.create=function(){return new zL};_.Fn(new EL);};
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));}