@castlabs/prestoplay 6.11.0 → 6.11.1-beta.2

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 (62) hide show
  1. package/CHANGELOG.md +17 -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 +111 -111
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +526 -461
  8. package/cjs/cl.crypto.js +10 -10
  9. package/cjs/cl.dash.js +72 -71
  10. package/cjs/cl.externs.js +156 -35
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +67 -78
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -29
  15. package/cjs/cl.ima.js +23 -23
  16. package/cjs/cl.mse.js +274 -278
  17. package/cjs/cl.muxdata.js +14 -14
  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 +21 -0
  22. package/cjs/cl.smooth.js +71 -71
  23. package/cjs/cl.thumbnails.js +24 -24
  24. package/cjs/cl.tizen.js +71 -71
  25. package/cjs/cl.ttml.js +28 -29
  26. package/cjs/cl.verimatrix.js +5 -5
  27. package/cjs/cl.vimond.js +13 -13
  28. package/cjs/cl.vr.js +20 -20
  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 +87 -87
  35. package/cl.conviva.js +27 -27
  36. package/cl.core.js +428 -391
  37. package/cl.crypto.js +8 -8
  38. package/cl.dash.js +67 -67
  39. package/cl.externs.js +156 -35
  40. package/cl.freewheel.js +19 -19
  41. package/cl.hls.js +69 -64
  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 +237 -236
  46. package/cl.muxdata.js +12 -12
  47. package/cl.onboard.js +4 -4
  48. package/cl.persistent.js +10 -10
  49. package/cl.playlist.js +5 -5
  50. package/cl.simid.js +13 -0
  51. package/cl.smooth.js +59 -59
  52. package/cl.thumbnails.js +17 -17
  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/clpp.styles.css +5 -1
  61. package/package.json +1 -1
  62. package/typings.d.ts +551 -22
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # 6.11.1
2
+
3
+ ## New Features
4
+
5
+ * Spatial audio detection and configuration:
6
+ * Added detection of E-AC3 JOC audio content using DD+JOC signaling.
7
+ * Added `clpp.Track.spatialAudio` value to indicate spatial audio content.
8
+ * Added `config.preferSpatialAudio` to support manual prioritization of spatial audio.
9
+
10
+ ## Changes
11
+
12
+ * Fix support for CR and CRLF line endings on Safari related to configs
13
+ `safari.enableHlsVideoTrackInfo` and `safari.enableMetadata`.
14
+ * Fixed position attribute of the `clpp-fill` css class and made it `absolute`
15
+ * Fixed issue with typescript types where namespace functions were not exposed
16
+ * Fixed issue with ESM module dependencies where required files were not automatically imported
17
+
1
18
  # 6.11.0
2
19
 
3
20
  ## New Features
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var RP=function(){this.m=this.f=null;this.a="";this.h=new _.K("clpp.adobe.AdobePlugin")},UP=function(a){a.f=new _.Eg;a.f.on(a.m,_.mf,function(){return SP(a)});a.f.on(a.m,_.lf,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Od,function(){return TP(a)});a.f.on(a.m,_.Re,function(b){b=b.detail;switch(b.currentState){case _.Xn:a.a.length||TP(a);s.Media.play(a.a,a.m.getPosition());break;case _.Wn:case _.On:SP(a);break;case _.Qn:case _.Jn:case _.Un:a.h.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),SP(a),s.Media.close(a.a),a.a=""}})},TP=function(a){var b=a.m.getLoadedSource();a.a=b?b.name||b.url:"";a.h.info("Open session for "+a.a+" with duration "+a.m.getDuration());s.Media.open(a.a,a.m.getDuration(),_.sa)},SP=function(a){s.Media.stop(a.a,a.m.getPosition())},VP=function(){};_.w(RP,_.rr);RP.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.m=a,UP(this)):this.h.warn("Adobe API not available.")};
4
- RP.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};RP.prototype.id=function(){return"adobe"};_.I("clpp.adobe.AdobeAnalyticsPlugin",RP);RP.Id="adobe";VP.prototype.create=function(){return new RP};_.qp(new VP);};
2
+ var f=function(window){var KR=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},NR=function(a){a.f=new _.Dh;a.f.on(a.m,_.mg,function(){return LR(a)});a.f.on(a.m,_.lg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Ee,function(){return MR(a)});a.f.on(a.m,_.Sf,function(b){b=b.detail;switch(b.currentState){case _.Ro:a.a.length||MR(a);s.Media.play(a.a,a.m.getPosition());break;case _.Qo:case _.Io:LR(a);break;case _.Ko:case _.Do:case _.Oo:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),LR(a),s.Media.close(a.a),a.a=""}})},MR=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(),_.xa)},LR=function(a){s.Media.stop(a.a,a.m.getPosition())},OR=function(){};_.w(KR,_.gt);KR.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.m=a,NR(this)):this.g.warn("Adobe API not available.")};
4
+ KR.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};KR.prototype.id=function(){return"adobe"};_.H("clpp.adobe.AdobeAnalyticsPlugin",KR);KR.Id="adobe";OR.prototype.create=function(){return new KR};_.jq(new OR);};
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 PP=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.xj(function(){a.m.play()["catch"](function(){})});this.g=new _.Eg},QP=function(){};_.w(PP,_.rr);_.r=PP.prototype;_.r.onPlayerCreated=function(a){this.m=a;this.a=a.getSurface().getMedia()};_.r.onContentWillLoad=function(){this.a&&(this.g.on(this.a,"webkitplaybacktargetavailabilitychanged",this.vk.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Wk.bind(this)))};
3
- _.r.onPlayerWillRelease=function(){this.o.stop();this.g.release()};_.r.id=function(){return"airplay"};_.r.vk=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.L(_.hc,{canCast:this.f}))};_.r.Wk=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.fc:_.ec;if(this.l||!this.m.isPaused()||this.m.getState()===_.Xn)this.l?this.m.play()["catch"](function(){}):this.o.$(.01);this.m.trigger(new _.L(a))};_.r.lb=function(){return this.j};
4
- _.r.ye=function(){return this.f};_.r.Bl=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.I("clpp.airplay.AirPlayPlugin",PP);PP.prototype.showCastMenu=PP.prototype.Bl;PP.prototype.canCast=PP.prototype.ye;PP.prototype.isCasting=PP.prototype.lb;PP.Id="airplay";QP.prototype.create=function(){return new PP};_.qp(new QP);};
2
+ var f=function(window){var IR=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.rk(function(){a.m.play()["catch"](function(){})});this.h=new _.Dh},JR=function(){};_.w(IR,_.gt);_.r=IR.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.dl.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.El.bind(this)))};
3
+ _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.dl=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.El=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Pc:_.Oc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Ro)this.l?this.m.play()["catch"](function(){}):this.o.aa(.01);this.m.trigger(new _.L(a))};_.r.ob=function(){return this.j};
4
+ _.r.Te=function(){return this.f};_.r.mm=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.H("clpp.airplay.AirPlayPlugin",IR);IR.prototype.showCastMenu=IR.prototype.mm;IR.prototype.canCast=IR.prototype.Te;IR.prototype.isCasting=IR.prototype.ob;IR.Id="airplay";JR.prototype.create=function(){return new IR};_.jq(new JR);};
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 HP=function(a,b){this.m=a;this.f=b;this.a=new _.Eg;this.g=!1},IP=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Oi();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.sa};b.prototype.getVersion=function(){return _.fa};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)},JP=function(){this.j=this.f=this.a=this.g=this.m=null;this.l=new _.Eg},KP=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))},LP=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.l.on(a.m,_.yd,a.U.bind(a));a.j=IP(a.m);a.a.attachPlayer(a.j)},MP=function(a,b){_.Hg(a.l);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},NP=function(){return!window.SmartLib||!window.GenericPlayerApi},OP=function(){};_.r=HP.prototype;_.r.init=function(){var a=this.m,b=this.a;b.on(a,_.Re,this.Qh.bind(this));b.on(a,_.yc,this.Oh.bind(this));b.on(a,"seek",this.Ph.bind(this))};
5
- _.r.Oh=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.Qh=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.On&&c.notifyStallEnd(!b.isPaused());switch(d){case _.On:c.notifyStallStart();break;case _.Xn:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.Wn:c.notifyPause()}};_.r.Ph=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.Hg(this.a),this.a=null)};_.w(JP,_.rr);_.r=JP.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(NP())return a.onError(new _.N(1,9,11E3));KP(this,d);LP(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 _.N(1,9,11001,{bpkErrorCode:f,message:e}));MP(c,void 0)}else b.url=e.getURL(),c.f=new HP(c.m,c.j),c.f.init()})}};
6
- _.r.U=function(a){a=a.detail;if(7003===a.code)MP(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.O)switch(a.category){case 3:MP(this,SmartLib.BPDecodingError);break;case 1:MP(this,SmartLib.BPNetworkingError);break;case 6:MP(this,SmartLib.BPAccessRightError);break;default:MP(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){NP()||MP(this,SmartLib.BPSessionEndsNormally)};_.r.id=function(){return"broadpeak"};_.I("clpp.broadpeak.BroadpeakPlugin",JP);
7
- JP.isSdkMissing=NP;JP.Id="broadpeak";OP.prototype.create=function(){return new JP};_.qp(new OP);};
2
+ var f=function(window){var AR=function(a,b){this.m=a;this.f=b;this.a=new _.Dh;this.h=!1},BR=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Ej();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.xa};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)},CR=function(){this.j=this.f=this.a=this.h=this.m=null;this.l=new _.Dh},DR=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===_.Vf&&a.h.setUUID(f))},ER=function(a,
4
+ b){var c=b.customParameters||{};a.a=a.h.createStreamingSession();for(var d in c)a.a.setCustomParameter(d,c[d]);a.l.on(a.m,_.me,a.U.bind(a));a.j=BR(a.m);a.a.attachPlayer(a.j)},FR=function(a,b){_.Gh(a.l);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},GR=function(){return!window.SmartLib||!window.GenericPlayerApi},HR=function(){};_.r=AR.prototype;_.r.init=function(){var a=this.m,b=this.a;b.on(a,_.Sf,this.wi.bind(this));b.on(a,_.gd,this.si.bind(this));b.on(a,"seek",this.vi.bind(this))};
5
+ _.r.si=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.wi=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Io&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Io:c.notifyStallStart();break;case _.Ro:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.Qo:c.notifyPause()}};_.r.vi=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.Gh(this.a),this.a=null)};_.w(CR,_.gt);_.r=CR.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(GR())return a.onError(new _.P(1,9,11E3));DR(this,d);ER(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}));FR(c,void 0)}else b.url=e.getURL(),c.f=new AR(c.m,c.j),c.f.init()})}};
6
+ _.r.U=function(a){a=a.detail;if(7003===a.code)FR(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:FR(this,SmartLib.BPDecodingError);break;case 1:FR(this,SmartLib.BPNetworkingError);break;case 6:FR(this,SmartLib.BPAccessRightError);break;default:FR(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){GR()||FR(this,SmartLib.BPSessionEndsNormally)};_.r.id=function(){return"broadpeak"};_.H("clpp.broadpeak.BroadpeakPlugin",CR);
7
+ CR.isSdkMissing=GR;CR.Id="broadpeak";HR.prototype.create=function(){return new CR};_.jq(new HR);};
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));}