@castlabs/prestoplay 6.9.0 → 6.11.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 (60) hide show
  1. package/CHANGELOG.md +66 -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 +112 -111
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +467 -432
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +143 -45
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +78 -73
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -31
  15. package/cjs/cl.ima.js +24 -24
  16. package/cjs/cl.mse.js +276 -275
  17. package/cjs/cl.muxdata.js +14 -15
  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 +71 -71
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +29 -27
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +19 -19
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +20 -20
  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 +396 -365
  36. package/cl.crypto.js +9 -9
  37. package/cl.dash.js +68 -67
  38. package/cl.externs.js +139 -45
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +64 -61
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +26 -25
  43. package/cl.ima.js +17 -17
  44. package/cl.mse.js +240 -242
  45. package/cl.muxdata.js +12 -12
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +11 -11
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +59 -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 +14 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +15 -15
  58. package/clpp.styles.css +15 -0
  59. package/package.json +1 -1
  60. package/typings.d.ts +249 -21
package/CHANGELOG.md CHANGED
@@ -1,3 +1,69 @@
1
+ # 6.11.0
2
+
3
+ ## New Features
4
+
5
+ * Add the `clpp.install` API which is now the official API for installing
6
+ components and adding player capabilities. Components can be uninstalled
7
+ via `clpp.uninstall`.
8
+ * Add support for TTMLv2 `tts:textShadow` style attribute.
9
+
10
+ ## Changes
11
+
12
+ * Fix issue when parsing PlayReady PSSH data.
13
+ * Make Widevine robustness configurable on Android Chrome.
14
+ * Fixed issue when parsing directly embedded PlayReady Header Objects.
15
+ * Fix support for multiple parallel player instances.
16
+ * Stop using the DASH attribute `minBufferTime` to decide the minimum buffer
17
+ size. Note that the existing config `streaming.rebufferingGoal` should be
18
+ used for that purpose instead.
19
+
20
+ ## Deprecations
21
+
22
+ * The `clpp.Player.use` and `clpp.Player.remove` API is now deprecated and will
23
+ be removed in version 7.0.0, use `clpp.install` and `clpp.uninstall` instead.
24
+ * The third parameter of `clpp.persistent.fetchLicense` is now deprecated and
25
+ will be removed in version 7.0.0, use `clpp.install` instead.
26
+
27
+ # 6.10.0
28
+
29
+ ## New Features
30
+
31
+ * Add Tracks original language value from manifest
32
+ * Extend `clpp.Track` with `clpp.Track.originalLanguage` value which contains the original language string as it is present in manifest.
33
+ * For details refer to [Track](https://demo.castlabs.com/#/docs?q=clpp.Track).
34
+ * Add support for the `EXT-X-PROGRAM-DATE-TIME` tag in live HLS to the MSE
35
+ player. If the tag is present its value is now accessible via
36
+ `player.getTimelineOffset().seekRangeStartDateTime`. The timeline offset can
37
+ be used to display wall-clock time in the UI like so:
38
+ ```js
39
+ const offset = player.getTimelineOffset();
40
+ if (offset) {
41
+ // Get the wall-clock values for UI
42
+ const position = player.getPosition() + offset.offsetDateTime;
43
+ const start = player.getSeekRange().start + offset.offsetDateTime;
44
+ const end = player.getSeekRange().end + offset.offsetDateTime;
45
+ }
46
+ ```
47
+ * Add support for fetching decryption keys from DRMtoday for
48
+ clear-key-encrypted HLS content (`METHOD=AES-128`).
49
+ * Add support for Widevine EME configuration options
50
+ * `persistentState` can be configured via the boolean option
51
+ `drm.customData.widevinePersistentStateRequired`
52
+ * `distinctiveIdentifier` can be configured via the boolean option
53
+ `drm.customData.widevineDistinctiveIdentifierRequired`
54
+
55
+
56
+ ## Changes
57
+
58
+ * Added `PlayerSurface` option to control webOS long startup patch `webOSStartupPatch`
59
+ * This patch could cause unexpected behavior for specific player setups.
60
+ * For details refer to [PlayerSurface Configuration](https://demo.castlabs.com/#/docs/surface#disabling-webos-startup-optimization).
61
+ * Fix a glitch where WebVTT XML tags were being displayed along with the subtitle
62
+ text in case of WebVTT subtitles embedded inside of MP4 media files.
63
+ * Fix an issue of the `HtmlCueComponent` where some subtitle cues were not begin
64
+ displayed in case of overlaps in segmented subtitles.
65
+ * Improve support of discontinuous HLS streams.
66
+
1
67
  # 6.9.0
2
68
 
3
69
  ## New Features
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var oO=function(){this.l=this.f=null;this.a="";this.h=new _.I("clpp.adobe.AdobePlugin")},rO=function(a){a.f=new _.dg;a.f.on(a.l,_.Le,function(){return pO(a)});a.f.on(a.l,_.Ke,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.vd,function(){return qO(a)});a.f.on(a.l,_.pe,function(b){b=b.detail;switch(b.currentState){case _.Xm:a.a.length||qO(a);s.Media.play(a.a,a.l.getPosition());break;case _.Wm:case _.Om:pO(a);break;case _.Qm:case _.Em:case _.Um:a.h.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),pO(a),s.Media.close(a.a),a.a=""}})},qO=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(),_.oa)},pO=function(a){s.Media.stop(a.a,a.l.getPosition())},sO=function(){};_.w(oO,_.$p);oO.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,rO(this)):this.h.warn("Adobe API not available.")};
4
- oO.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};oO.prototype.id=function(){return"adobe"};_.C("clpp.adobe.AdobeAnalyticsPlugin",oO);oO.Id="adobe";sO.prototype.create=function(){return new oO};_.qo(new sO);};
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);};
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 mO=function(){var a=this;this.a=this.l=null;this.m=this.f=this.j=!1;this.o=new _.Ui(function(){a.l.play()["catch"](function(){})});this.g=new _.dg},nO=function(){};_.w(mO,_.$p);_.t=mO.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.hk.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.Jk.bind(this)))};
3
- _.t.onPlayerWillRelease=function(){this.o.stop();this.g.release()};_.t.id=function(){return"airplay"};_.t.hk=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.J(_.$b,{canCast:this.f}))};_.t.Jk=function(){var a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Yb:_.Xb;if(this.m||!this.l.isPaused()||this.l.getState()===_.Xm)this.m?this.l.play()["catch"](function(){}):this.o.aa(.01);this.l.trigger(new _.J(a))};_.t.mb=function(){return this.j};
4
- _.t.te=function(){return this.f};_.t.il=function(){this.f&&(this.m=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.C("clpp.airplay.AirPlayPlugin",mO);mO.prototype.showCastMenu=mO.prototype.il;mO.prototype.canCast=mO.prototype.te;mO.prototype.isCasting=mO.prototype.mb;mO.Id="airplay";nO.prototype.create=function(){return new mO};_.qo(new nO);};
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);};
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 eO=function(a,b){this.l=a;this.f=b;this.a=new _.dg;this.g=!1},fO=function(a){function b(c){var d=GenericPlayerApi.call(this)||this;d.l=c;d.a=_.ki();return d}_.w(b,GenericPlayerApi);b.prototype.getPlayerName=function(){return _.oa};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)},gO=function(){this.j=this.f=this.a=this.g=this.l=null;this.m=new _.dg},hO=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===_.te&&a.g.setUUID(f))},iO=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,_.hd,a.U.bind(a));a.j=fO(a.l);a.a.attachPlayer(a.j)},jO=function(a,b){_.gg(a.m);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},kO=function(){return!window.SmartLib||!window.GenericPlayerApi},lO=function(){};_.t=eO.prototype;_.t.init=function(){var a=this.l,b=this.a;b.on(a,_.pe,this.Eh.bind(this));b.on(a,_.rc,this.Ch.bind(this));b.on(a,"seek",this.Dh.bind(this))};
5
- _.t.Ch=function(a){a=a.detail;typeof a.bandwidth===_.k&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.t.Eh=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Om&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Om:c.notifyStallStart();break;case _.Xm:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.Wm:c.notifyPause()}};_.t.Dh=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.t.release=function(){this.a&&(_.gg(this.a),this.a=null)};_.w(gO,_.$p);_.t=gO.prototype;_.t.onPlayerCreated=function(a){this.l=a};_.t.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(kO())return a.onError(new _.L(1,9,11E3));hO(this,d);iO(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}));jO(c,void 0)}else b.url=e.getURL(),c.f=new eO(c.l,c.j),c.f.init()})}};
6
- _.t.U=function(a){a=a.detail;if(7003===a.code)jO(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.M)switch(a.category){case 3:jO(this,SmartLib.BPDecodingError);break;case 1:jO(this,SmartLib.BPNetworkingError);break;case 6:jO(this,SmartLib.BPAccessRightError);break;default:jO(this,SmartLib.BPUnspecifiedError)}};_.t.onPlayerWillRelease=function(){kO()||jO(this,SmartLib.BPSessionEndsNormally)};_.t.id=function(){return"broadpeak"};_.C("clpp.broadpeak.BroadpeakPlugin",gO);
7
- gO.isSdkMissing=kO;gO.Id="broadpeak";lO.prototype.create=function(){return new gO};_.qo(new lO);};
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);};
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));}