@castlabs/prestoplay 6.14.0 → 6.15.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 (62) hide show
  1. package/CHANGELOG.md +25 -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 +113 -111
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +550 -529
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +74 -73
  10. package/cjs/cl.externs.js +191 -64
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +69 -68
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -30
  15. package/cjs/cl.ima.js +23 -23
  16. package/cjs/cl.mse.js +290 -275
  17. package/cjs/cl.muxdata.js +15 -15
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.simid.js +15 -15
  22. package/cjs/cl.smooth.js +72 -71
  23. package/cjs/cl.thumbnails.js +26 -26
  24. package/cjs/cl.tizen.js +70 -70
  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 +89 -88
  35. package/cl.conviva.js +27 -27
  36. package/cl.core.js +457 -438
  37. package/cl.crypto.js +9 -9
  38. package/cl.dash.js +70 -68
  39. package/cl.externs.js +187 -64
  40. package/cl.freewheel.js +19 -19
  41. package/cl.hls.js +71 -69
  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 +255 -240
  46. package/cl.muxdata.js +13 -13
  47. package/cl.onboard.js +4 -4
  48. package/cl.persistent.js +11 -11
  49. package/cl.playlist.js +5 -5
  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/clpp.styles.css +2 -0
  61. package/package.json +1 -1
  62. package/typings.d.ts +387 -90
package/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ # 6.15.0
2
+
3
+ ## New Features
4
+
5
+ * Add `clpp.events.LIVE_TURNED_STATIC` event triggered when a live stream
6
+ becomes static.
7
+
8
+ ## Changes
9
+
10
+ * Fix an issue with some timeline cue events not being emitted for cues which
11
+ coincide with a gap between media segments.
12
+ * Fix an issue with playback of certain multi-period MPEG-TS HLS streams.
13
+ * Fix support of VAST Ads of IMA SDK Plugin.
14
+ * VAST Ads are now supported and scheduled as a pre-roll.
15
+
16
+ # 6.14.1
17
+
18
+ ## Changes
19
+
20
+ * Improve error handling of the `load()` method.
21
+ * Fix an issue on Safari where the player might get paused after seeking to
22
+ the very end of the video.
23
+ * Fix an issue with the player going to ENDED state early.
24
+ * Fix an issue where Tizen devices misreport AC-3 support for encrypted content.
25
+
1
26
  # 6.14.0
2
27
 
3
28
  ## New Features
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var $R=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},cS=function(a){a.f=new _.Eh;a.f.on(a.m,_.og,function(){return aS(a)});a.f.on(a.m,_.mg,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Fe,function(){return bS(a)});a.f.on(a.m,_.Tf,function(b){b=b.detail;switch(b.currentState){case _.Vo:a.a.length||bS(a);s.Media.play(a.a,a.m.getPosition());break;case _.Uo:case _.Mo:aS(a);break;case _.Oo:case _.Ho:case _.So:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),aS(a),s.Media.close(a.a),a.a=""}})},bS=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)},aS=function(a){s.Media.stop(a.a,a.m.getPosition())},dS=function(){};_.w($R,_.rt);$R.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.m=a,cS(this)):this.g.warn("Adobe API not available.")};
4
- $R.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};$R.prototype.id=function(){return"adobe"};_.H("clpp.adobe.AdobeAnalyticsPlugin",$R);$R.Id="adobe";dS.prototype.create=function(){return new $R};_.nq(new dS);};
2
+ var f=function(window){var LT=function(){this.m=this.f=null;this.a="";this.g=new _.K("clpp.adobe.AdobePlugin")},OT=function(a){a.f=new _.Sh;a.f.on(a.m,_.Bg,function(){return MT(a)});a.f.on(a.m,_.Ag,function(){s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.Ke,function(){return NT(a)});a.f.on(a.m,_.eg,function(b){b=b.detail;switch(b.currentState){case _.xp:a.a.length||NT(a);s.Media.play(a.a,a.m.getPosition());break;case _.wp:case _.op:MT(a);break;case _.qp:case _.jp:case _.up:a.g.info("Close session for "+a.a+" in player state "+
3
+ (b.currentState+".")),MT(a),s.Media.close(a.a),a.a=""}})},NT=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)},MT=function(a){s.Media.stop(a.a,a.m.getPosition())},PT=function(){};_.w(LT,_.Eu);LT.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.m=a,OT(this)):this.g.warn("Adobe API not available.")};
4
+ LT.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""};LT.prototype.id=function(){return"adobe"};_.H("clpp.adobe.AdobeAnalyticsPlugin",LT);LT.Id="adobe";PT.prototype.create=function(){return new LT};_.Vq(new PT);};
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 YR=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.sk(function(){a.m.play()["catch"](function(){})});this.h=new _.Eh},ZR=function(){};_.w(YR,_.rt);_.r=YR.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.el.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Fl.bind(this)))};
3
- _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.el=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.Fl=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Pc:_.Oc;if(this.l||!this.m.isPaused()||this.m.getState()===_.Vo)this.l?this.m.play()["catch"](function(){}):this.o.aa(.01);this.m.trigger(new _.L(a))};_.r.qb=function(){return this.j};
4
- _.r.Te=function(){return this.f};_.r.om=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.H("clpp.airplay.AirPlayPlugin",YR);YR.prototype.showCastMenu=YR.prototype.om;YR.prototype.canCast=YR.prototype.Te;YR.prototype.isCasting=YR.prototype.qb;YR.Id="airplay";ZR.prototype.create=function(){return new YR};_.nq(new ZR);};
2
+ var f=function(window){var JT=function(){var a=this;this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Tk(function(){a.m.play()["catch"](function(){})});this.h=new _.Sh},KT=function(){};_.w(JT,_.Eu);_.r=JT.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.Cl.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.cm.bind(this)))};
3
+ _.r.onPlayerWillRelease=function(){this.o.stop();this.h.release()};_.r.id=function(){return"airplay"};_.r.Cl=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.m.trigger(new _.L(_.Rc,{canCast:this.f}))};_.r.cm=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Qc:_.Pc;if(this.l||!this.m.isPaused()||this.m.getState()===_.xp)this.l?this.m.play()["catch"](function(){}):this.o.da(.01);this.m.trigger(new _.L(a))};_.r.rb=function(){return this.j};
4
+ _.r.ff=function(){return this.f};_.r.Lm=function(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.H("clpp.airplay.AirPlayPlugin",JT);JT.prototype.showCastMenu=JT.prototype.Lm;JT.prototype.canCast=JT.prototype.ff;JT.prototype.isCasting=JT.prototype.rb;JT.Id="airplay";KT.prototype.create=function(){return new JT};_.Vq(new KT);};
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 PR=function(a,b){this.m=a;this.f=b;this.a=new _.Eh;this.h=!1},QR=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Fj();return d}_.w(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)},RR=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.Eh;this.j=!1},SR=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===_.Wf&&a.h.setUUID(f))},TR=
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,_.ne,a.U.bind(a));a.l=QR(a.m);a.a.attachPlayer(a.l)},UR=function(a,b){_.Hh(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},VR=function(){return!window.SmartLib||!window.GenericPlayerApi},WR=function(){};_.r=PR.prototype;
5
- _.r.init=function(){var a=this.m,b=this.a;b.on(a,_.Tf,this.vi.bind(this));b.on(a,_.gd,this.ri.bind(this));b.on(a,"seek",this.si.bind(this))};_.r.ri=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.vi=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Mo&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Mo:c.notifyStallStart();break;case _.Vo:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.Uo:c.notifyPause()}};
6
- _.r.si=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.Hh(this.a),this.a=null)};_.w(RR,_.rt);_.r=RR.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(VR())return a.onError(new _.P(1,9,11E3));this.j=!0;SR(this,d);TR(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}));UR(c,void 0)}else b.url=e.getURL(),c.f=new PR(c.m,c.l),c.f.init()})}};
7
- _.r.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.r.U=function(a){a=a.detail;if(7003===a.code)UR(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:UR(this,SmartLib.BPDecodingError);break;case 1:UR(this,SmartLib.BPNetworkingError);break;case 6:UR(this,SmartLib.BPAccessRightError);break;default:UR(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){VR()||UR(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.r.id=function(){return"broadpeak"};
8
- _.H("clpp.broadpeak.BroadpeakPlugin",RR);RR.isSdkMissing=VR;RR.Id="broadpeak";WR.prototype.create=function(){return new RR};_.nq(new WR);};
2
+ var f=function(window){var BT=function(a,b){this.m=a;this.f=b;this.a=new _.Sh;this.h=!1},CT=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.m=c;d.a=_.Zj();return d}_.w(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)},DT=function(){this.l=this.f=this.a=this.h=this.m=null;this.o=new _.Sh;this.j=!1},ET=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===_.hg&&a.h.setUUID(f))},FT=
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,_.re,a.U.bind(a));a.l=CT(a.m);a.a.attachPlayer(a.l)},GT=function(a,b){_.Vh(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},HT=function(){return!window.SmartLib||!window.GenericPlayerApi},IT=function(){};_.r=BT.prototype;
5
+ _.r.init=function(){var a=this.m,b=this.a;b.on(a,_.eg,this.Pi.bind(this));b.on(a,_.jd,this.Ni.bind(this));b.on(a,"seek",this.Oi.bind(this))};_.r.Ni=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.r.Pi=function(a){var b=this.m,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.op&&c.notifyStallEnd(!b.isPaused());switch(d){case _.op:c.notifyStallStart();break;case _.xp:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.wp:c.notifyPause()}};
6
+ _.r.Oi=function(){var a=1E3*this.m.getPosition();this.f.notifySeek(a)};_.r.release=function(){this.a&&(_.Vh(this.a),this.a=null)};_.w(DT,_.Eu);_.r=DT.prototype;_.r.onPlayerCreated=function(a){this.m=a};_.r.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(HT())return a.onError(new _.P(1,9,11E3));this.j=!0;ET(this,d);FT(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}));GT(c,void 0)}else b.url=e.getURL(),c.f=new BT(c.m,c.l),c.f.init()})}};
7
+ _.r.onContentLoaded=function(){!1!==this.j&&this.a.precacheEnded()};_.r.U=function(a){a=a.detail;if(7003===a.code)GT(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.Q)switch(a.category){case 3:GT(this,SmartLib.BPDecodingError);break;case 1:GT(this,SmartLib.BPNetworkingError);break;case 6:GT(this,SmartLib.BPAccessRightError);break;default:GT(this,SmartLib.BPUnspecifiedError)}};_.r.onPlayerWillRelease=function(){HT()||GT(this,SmartLib.BPSessionEndsNormally);this.j=!1};_.r.id=function(){return"broadpeak"};
8
+ _.H("clpp.broadpeak.BroadpeakPlugin",DT);DT.isSdkMissing=HT;DT.Id="broadpeak";IT.prototype.create=function(){return new DT};_.Vq(new IT);};
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));}