@castlabs/prestoplay 6.24.0 → 6.25.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 (65) hide show
  1. package/CHANGELOG.md +21 -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 +116 -116
  6. package/cjs/cl.conviva.js +32 -32
  7. package/cjs/cl.core.js +596 -597
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +88 -87
  10. package/cjs/cl.externs.js +42 -55
  11. package/cjs/cl.freewheel.js +25 -25
  12. package/cjs/cl.hls.js +77 -73
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +24 -23
  16. package/cjs/cl.mse.js +346 -341
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +15 -15
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.sessions.js +16 -16
  22. package/cjs/cl.simid.js +15 -15
  23. package/cjs/cl.smooth.js +72 -72
  24. package/cjs/cl.thumbnails.js +26 -26
  25. package/cjs/cl.tizen.js +72 -72
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +12 -12
  29. package/cjs/cl.vr.js +19 -19
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.yospace.js +4 -4
  32. package/cjs/cl.youbora.js +31 -31
  33. package/cl.adobe.js +3 -3
  34. package/cl.airplay.js +3 -3
  35. package/cl.broadpeak.js +5 -5
  36. package/cl.cast.js +84 -84
  37. package/cl.conviva.js +27 -27
  38. package/cl.core.js +473 -474
  39. package/cl.crypto.js +9 -9
  40. package/cl.dash.js +75 -74
  41. package/cl.externs.js +42 -55
  42. package/cl.freewheel.js +15 -15
  43. package/cl.hls.js +79 -75
  44. package/cl.hlssmpte.js +5 -5
  45. package/cl.htmlcue.js +26 -26
  46. package/cl.ima.js +15 -14
  47. package/cl.mse.js +306 -304
  48. package/cl.muxdata.js +13 -13
  49. package/cl.onboard.js +4 -4
  50. package/cl.persistent.js +10 -10
  51. package/cl.playlist.js +5 -5
  52. package/cl.sessions.js +10 -10
  53. package/cl.simid.js +13 -13
  54. package/cl.smooth.js +60 -59
  55. package/cl.thumbnails.js +19 -19
  56. package/cl.tizen.js +57 -57
  57. package/cl.ttml.js +22 -22
  58. package/cl.verimatrix.js +4 -4
  59. package/cl.vimond.js +8 -8
  60. package/cl.vr.js +14 -14
  61. package/cl.vtt.js +12 -12
  62. package/cl.yospace.js +3 -3
  63. package/cl.youbora.js +26 -26
  64. package/package.json +1 -1
  65. package/typings.d.ts +10 -15
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ # 6.25.0
2
+
3
+ ## New Features
4
+
5
+ * Add config option `streaming.gapTolerance`.
6
+ * Add support for IMA SDK Plugin on webOS devices.
7
+ * Refer to the [IMA Plugin](https://demo.castlabs.com/#/docs/advertising#ima-sdk-smarttv-support) documentation for more information.
8
+
9
+ ## Changes
10
+
11
+ * Fix an issue with playing media playlists directly with media segment file
12
+ extension `.m4f` in HLS.
13
+ * Fix issues with preroll sometimes not playing with IMA SDK Plugin on Tizen and WebOS devices.
14
+ * Fix issues with the IMA SDK plugin on Tizen where the main content fails to resume at the correct position after a mid-roll ad.
15
+ * Fix support for METHOD AES-128 encryption in HLS.
16
+ * Fix an issue with AirPlay on iOS when switching between DASH and HLS playback.
17
+ * Fix `streaming.disableAudioTracks` config option for multi-period streams.
18
+ * Support EXT-X-DEFINE tags anywhere in the playlist in HLS.
19
+ * Fix an issues with upper case values of `Content-Type` HTTP header in media
20
+ segment responses in HLS.
21
+
1
22
  # 6.24.0
2
23
 
3
24
  ## New Features
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var eZ=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},hZ=function(a){a.f=new _.vi;a.f.on(a.m,_.Sg,function(){return fZ(a)});a.f.on(a.m,_.Rg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Te,function(){return gZ(a)});a.f.on(a.m,_.qg,function(b){b=b.detail;switch(b.currentState){case _.Uq:a.a.length||gZ(a);s.Media.play(a.a,a.m.getPosition());break;case _.Tq:case _.Lq:fZ(a);break;case _.Nq:case _.Gq:case _.Rq:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),fZ(a),s.Media.close(a.a),a.a=""}})},gZ=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)},fZ=function(a){s.Media.stop(a.a,a.m.getPosition())},iZ=function(){};_.x(eZ,_.ew);eZ.prototype.onPlayerCreated=function(a){var b=a.getConfiguration().adobe;b&&!1===b.enabled?this.g.debug("Adobe plugin is disabled."):window.s&&s.Media?(this.m=a,hZ(this)):this.g.warn("Adobe API not available.")};
4
- eZ.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};eZ.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",eZ);eZ.Id="adobe";iZ.prototype.create=function(){return new eZ};_.bu(new iZ);};
2
+ var f=function(window){var nZ=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},qZ=function(a){a.f=new _.wi;a.f.on(a.m,_.Ug,function(){return oZ(a)});a.f.on(a.m,_.Tg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Ue,function(){return pZ(a)});a.f.on(a.m,_.rg,function(b){b=b.detail;switch(b.currentState){case _.Vq:a.a.length||pZ(a);s.Media.play(a.a,a.m.getPosition());break;case _.Uq:case _.Mq:oZ(a);break;case _.Oq:case _.Hq:case _.Sq:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),oZ(a),s.Media.close(a.a),a.a=""}})},pZ=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)},oZ=function(a){s.Media.stop(a.a,a.m.getPosition())},rZ=function(){};_.x(nZ,_.gw);nZ.prototype.onPlayerCreated=function(a){var b=a.getConfiguration().adobe;b&&!1===b.enabled?this.g.debug("Adobe plugin is disabled."):window.s&&s.Media?(this.m=a,qZ(this)):this.g.warn("Adobe API not available.")};
4
+ nZ.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};nZ.prototype.id=function(){return"adobe"};_.J("clpp.adobe.AdobeAnalyticsPlugin",nZ);nZ.Id="adobe";rZ.prototype.create=function(){return new nZ};_.cu(new rZ);};
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 cZ=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.ji(function(){a.m.play()["catch"](function(){})});this.h=new _.vi},dZ=function(){};_.x(cZ,_.ew);_.t=cZ.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.fn.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Kn.bind(this)))};
3
- _.t.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.t.id=function(){return"airplay"};_.t.fn=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}))};_.t.Kn=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Sc:_.Rc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Uq)this.l?this.m.play()["catch"](function(){}):this.o.fa(.01);this.m.trigger(new _.L(a))};_.t.Ub=function(){return this.j};
4
- _.t.Xf=function(){return this.f};_.t.Ao=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",cZ);cZ.prototype.showCastMenu=cZ.prototype.Ao;cZ.prototype.canCast=cZ.prototype.Xf;cZ.prototype.isCasting=cZ.prototype.Ub;cZ.Id="airplay";dZ.prototype.create=function(){return new cZ};_.bu(new dZ);};
2
+ var f=function(window){var lZ=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.ji(function(){a.m.play()["catch"](function(){})});this.h=new _.wi},mZ=function(){};_.x(lZ,_.gw);_.u=lZ.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.fn.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Kn.bind(this)))};
3
+ _.u.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.u.id=function(){return"airplay"};_.u.fn=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.L(_.Uc,{canCast:this.f}))};_.u.Kn=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Tc:_.Sc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Vq)this.l?this.m.play()["catch"](function(){}):this.o.fa(.01);this.m.trigger(new _.L(a))};_.u.Ub=function(){return this.j};
4
+ _.u.Xf=function(){return this.f};_.u.Ao=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.J("clpp.airplay.AirPlayPlugin",lZ);lZ.prototype.showCastMenu=lZ.prototype.Ao;lZ.prototype.canCast=lZ.prototype.Xf;lZ.prototype.isCasting=lZ.prototype.Ub;lZ.Id="airplay";mZ.prototype.create=function(){return new lZ};_.cu(new mZ);};
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 VY=function(a,b){this.m=a;this.f=b;this.a=new _.vi;this.h=!1},WY=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Ok();return d}_.x(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.wa};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)},XY=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.vi;this.j=!1},YY=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===_.tg&&a.h.setUUID(f))},ZY=
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,_.ze,a.ik.bind(a));a.l=WY(a.m);a.a.attachPlayer(a.l)},$Y=function(a,b){_.yi(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},aZ=function(){return!window.SmartLib||!window.GenericPlayerApi},bZ=function(){};_.t=VY.prototype;
5
- _.t.init=function(){var a=this.m,b=this.a;b.on(a,_.qg,this.lk.bind(this));b.on(a,_.ld,this.jk.bind(this));b.on(a,"seek",this.kk.bind(this))};_.t.jk=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.t.lk=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Lq&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Lq:c.notifyStallStart();break;case _.Uq:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.Tq:c.notifyPause()}};
6
- _.t.kk=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.t.release=function(){this.a&&(_.yi(this.a),this.a=null)};_.x(XY,_.ew);_.t=XY.prototype;_.t.onPlayerCreated=function(a){this.m=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(aZ())return a.onError(new _.O(1,9,11E3));this.j=!0;YY(this,d);ZY(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 _.O(1,9,11001,{bpkErrorCode:f,message:e}));$Y(c,void 0)}else b.url=e.getURL(),c.f=new VY(c.m,c.l),c.f.init()})}};
7
- _.t.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.t.ik=function(a){a=a.detail;if(7003===a.code)$Y(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.P)switch(a.category){case 3:$Y(this,SmartLib.BPDecodingError);break;case 1:$Y(this,SmartLib.BPNetworkingError);break;case 6:$Y(this,SmartLib.BPAccessRightError);break;default:$Y(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){aZ()||$Y(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.t.id=function(){return"broadpeak"};
8
- _.J("clpp.broadpeak.BroadpeakPlugin",XY);XY.isSdkMissing=aZ;XY.Id="broadpeak";bZ.prototype.create=function(){return new XY};_.bu(new bZ);};
2
+ var f=function(window){var dZ=function(a,b){this.m=a;this.f=b;this.a=new _.wi;this.h=!1},eZ=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Hk();return d}_.x(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)},fZ=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.wi;this.j=!1},gZ=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===_.ug&&a.h.setUUID(f))},hZ=
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,_.Ae,a.fk.bind(a));a.l=eZ(a.m);a.a.attachPlayer(a.l)},iZ=function(a,b){_.zi(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},jZ=function(){return!window.SmartLib||!window.GenericPlayerApi},kZ=function(){};_.u=dZ.prototype;
5
+ _.u.init=function(){var a=this.m,b=this.a;b.on(a,_.rg,this.ik.bind(this));b.on(a,_.md,this.gk.bind(this));b.on(a,"seek",this.hk.bind(this))};_.u.gk=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.u.ik=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Mq&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Mq:c.notifyStallStart();break;case _.Vq:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.Uq:c.notifyPause()}};
6
+ _.u.hk=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.u.release=function(){this.a&&(_.zi(this.a),this.a=null)};_.x(fZ,_.gw);_.u=fZ.prototype;_.u.onPlayerCreated=function(a){this.m=a};_.u.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(jZ())return a.onError(new _.O(1,9,11E3));this.j=!0;gZ(this,d);hZ(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 _.O(1,9,11001,{bpkErrorCode:f,message:e}));iZ(c,void 0)}else b.url=e.getURL(),c.f=new dZ(c.m,c.l),c.f.init()})}};
7
+ _.u.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.u.fk=function(a){a=a.detail;if(7003===a.code)iZ(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.P)switch(a.category){case 3:iZ(this,SmartLib.BPDecodingError);break;case 1:iZ(this,SmartLib.BPNetworkingError);break;case 6:iZ(this,SmartLib.BPAccessRightError);break;default:iZ(this,SmartLib.BPUnspecifiedError)}};_.u.onPlayerWillRelease=function(){jZ()||iZ(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.u.id=function(){return"broadpeak"};
8
+ _.J("clpp.broadpeak.BroadpeakPlugin",fZ);fZ.isSdkMissing=jZ;fZ.Id="broadpeak";kZ.prototype.create=function(){return new fZ};_.cu(new kZ);};
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));}