@castlabs/prestoplay 6.2.6 → 6.2.8

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 (59) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +1 -1
  3. package/cjs/cl.adobe.js +3 -3
  4. package/cjs/cl.airplay.js +3 -3
  5. package/cjs/cl.broadpeak.js +6 -6
  6. package/cjs/cl.cast.js +103 -103
  7. package/cjs/cl.conviva.js +32 -32
  8. package/cjs/cl.core.js +377 -376
  9. package/cjs/cl.crypto.js +9 -9
  10. package/cjs/cl.dash.js +69 -68
  11. package/cjs/cl.externs.js +64 -33
  12. package/cjs/cl.freewheel.js +23 -23
  13. package/cjs/cl.hls.js +44 -43
  14. package/cjs/cl.hlssmpte.js +6 -6
  15. package/cjs/cl.htmlcue.js +30 -30
  16. package/cjs/cl.ima.js +21 -21
  17. package/cjs/cl.mse.js +251 -248
  18. package/cjs/cl.muxdata.js +11 -11
  19. package/cjs/cl.onboard.js +3 -3
  20. package/cjs/cl.persistent.js +13 -13
  21. package/cjs/cl.playlist.js +5 -5
  22. package/cjs/cl.smooth.js +69 -69
  23. package/cjs/cl.thumbnails.js +22 -22
  24. package/cjs/cl.tizen.js +69 -69
  25. package/cjs/cl.ttml.js +26 -26
  26. package/cjs/cl.verimatrix.js +5 -5
  27. package/cjs/cl.vimond.js +13 -13
  28. package/cjs/cl.vr.js +24 -0
  29. package/cjs/cl.vtt.js +14 -14
  30. package/cjs/cl.youbora.js +16 -16
  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 +82 -82
  35. package/cl.conviva.js +27 -27
  36. package/cl.core.js +333 -329
  37. package/cl.crypto.js +8 -8
  38. package/cl.dash.js +64 -62
  39. package/cl.externs.js +60 -33
  40. package/cl.freewheel.js +19 -19
  41. package/cl.hls.js +37 -36
  42. package/cl.hlssmpte.js +5 -5
  43. package/cl.htmlcue.js +24 -24
  44. package/cl.ima.js +16 -16
  45. package/cl.mse.js +223 -220
  46. package/cl.muxdata.js +9 -9
  47. package/cl.onboard.js +4 -4
  48. package/cl.persistent.js +9 -9
  49. package/cl.playlist.js +4 -4
  50. package/cl.smooth.js +57 -57
  51. package/cl.thumbnails.js +17 -17
  52. package/cl.tizen.js +57 -57
  53. package/cl.ttml.js +21 -21
  54. package/cl.verimatrix.js +4 -4
  55. package/cl.vimond.js +8 -8
  56. package/cl.vr.js +14 -0
  57. package/cl.vtt.js +12 -12
  58. package/cl.youbora.js +14 -14
  59. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,46 @@
1
+ # 6.2.8
2
+
3
+ ## Changes
4
+
5
+ * Fix clock sync fallback in DASH.
6
+ * This fixes an issue where one failing `UTCTiming` tag
7
+ cancelled the whole time sync. Now all `UTCTiming` tags are tried one-by-one until one
8
+ succeeds, or if all fail, only then the time sync is cancelled.
9
+ * Warn whenever a clock sync fails. Warn when no UTCTiming elements are found.
10
+ Warn when a direct time scheme (`urn:mpeg:dash:utc:direct:2014`) provides an invalid value.
11
+ * Fix `clpp.thumbnails.ThumbnailsPlugin.get()` method, which now returns the correct
12
+ thumbnail at a specific position for BIF thumbnails.
13
+ * Change parsing process for dynamic DASH and always perform clock
14
+ synchronization before playback. This fixes issues related to wrong system time.
15
+ E.g. `player.getPresentationStartTime()` is now calculated correctly, even
16
+ when system time is wrong.
17
+ * Fix the issue where `player.play()` does not trigger a `clpp.events.AUTOPLAY_NOT_ALLOWED`
18
+ event when Safari blocks the play request due to the 'Stop Media with Sound' auto-play policy.
19
+ * Fix `clpp.thumbnails.Thumbnail.element()` method, which now works as expected
20
+ even if the URL of the thumbnail image contains round bracket characters.
21
+ * Fix `clpp.thumbnails.ThumbnailsPlugin.get()` method, which now returns the correct
22
+ thumbnail at a specific position for WebVTT thumbnails.
23
+ * Fix issue with multiple (unnecessary) license requests triggered.
24
+ * Fix the license request/response modifiers for Chromecast Receiver:
25
+ * The `licenseRequest` modifier now correctly indicates the `POST` method instead of falsely reporting `GET` for the `request` object.
26
+ * The `licenseResponse` modifier is now properly awaited when defined as async.
27
+ * Please refer to DRM section in manual for limitations of using request/response modifiers in Chromecast Receiver.
28
+ * Improve error logging for `MP4_SIDX_WRONG_BOX_TYPE` code. Now there is an URL, byte-range, size, and a 1kB sample of the erroneous SIDX box provided within the `clpp.Error` optional data.
29
+ * Handle FairPlay license loading with EME implementation more consistently and avoid
30
+ redundant license requests.
31
+
32
+ # 6.2.7
33
+
34
+ ## Changes
35
+
36
+ * Add `PlayerConfiguration.streaming.relativeTextTimestamp` config, which when
37
+ set to true will force text cue times to be offset by the containing media
38
+ segment start time.
39
+ * Add VR plugin for 360-degree video playback. See http://demo.castlabs.com/#/docs?q=clpp.vr.VrPlugin
40
+ for more information.
41
+ * Fix appending `merchant` name to the DRMtoday Onboard Fairplay certificate URI.
42
+ * Fixed an issue with very rapid loads where the engine will not be released properly
43
+
1
44
  # 6.2.6
2
45
 
3
46
  With this version we started to publish PRESTOplay to NPM. You can now simply integrate the
package/README.md CHANGED
@@ -20,7 +20,7 @@ Once installed, you can follow the [getting started guide](https://demo.castlabs
20
20
  example, but here is how it would look like:
21
21
 
22
22
  ```javascript
23
- import {clpp} from "@castlabs/pretoplay"
23
+ import {clpp} from "@castlabs/prestoplay"
24
24
  import "@castlabs/prestoplay/cl.mse"
25
25
  import "@castlabs/prestoplay/cl.dash"
26
26
 
package/cjs/cl.adobe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var LK=function(){this.l=this.f=null;this.a="";this.g=new _.C("clpp.adobe.AdobePlugin")},OK=function(a){a.f=new _.Vf;a.f.on(a.l,_.Ce,function(){return MK(a)});a.f.on(a.l,_.Be,function(){s.Media.play(a.a,a.l.getPosition())});a.f.on(a.l,_.jd,function(){return NK(a)});a.f.on(a.l,_.he,function(b){b=b.detail;switch(b.currentState){case _.Ml:a.a.length||NK(a);s.Media.play(a.a,a.l.getPosition());break;case _.Ll:case _.Dl:MK(a);break;case _.Fl:case _.yl:case _.Jl:a.g.info("Close session for "+a.a+" in player state "+
3
- (b.currentState+".")),MK(a),s.Media.close(a.a),a.a=""}})},NK=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)},MK=function(a){s.Media.stop(a.a,a.l.getPosition())},PK=function(){};_.u(LK,_.So);LK.prototype.onPlayerCreated=function(a){window.s&&s.Media?(this.l=a,OK(this)):this.g.warn("Adobe API not available.")};
4
- LK.prototype.onPlayerWillDestroy=function(){this.f&&(this.f.release(),this.f=null);this.l=null;this.a=""};LK.prototype.id=function(){return"adobe"};_.A("clpp.adobe.AdobeAnalyticsPlugin",LK);LK.Id="adobe";PK.prototype.create=function(){return new LK};_.fn(new PK);};
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);};
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 JK=function(){var a=this;this.a=this.l=null;this.j=this.f=this.h=!1;this.m=new _.lh(function(){a.l.play()["catch"](function(){})});this.g=new _.Vf},KK=function(){};_.u(JK,_.So);_.h=JK.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.Hi.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.gj.bind(this)))};
3
- _.h.onPlayerWillRelease=function(){this.m.stop();this.g.release()};_.h.id=function(){return"airplay"};_.h.Hi=function(a){switch(a.availability){case "available":this.f=!0;break;case "not-available":this.f=!1}this.l.trigger(new _.D(_.Ob,{canCast:this.f}))};_.h.gj=function(){var a=(this.h=this.a.webkitCurrentPlaybackTargetIsWireless)?_.Nb:_.Mb;if(this.j||!this.l.isPaused()||this.l.getState()===_.Ml)this.j?this.l.play()["catch"](function(){}):this.m.Z(.01);this.l.trigger(new _.D(a))};_.h.bb=function(){return this.h};
4
- _.h.Wd=function(){return this.f};_.h.xj=function(){this.f&&(this.j=!this.l.isPaused(),this.a.webkitShowPlaybackTargetPicker())};_.A("clpp.airplay.AirPlayPlugin",JK);JK.prototype.showCastMenu=JK.prototype.xj;JK.prototype.canCast=JK.prototype.Wd;JK.prototype.isCasting=JK.prototype.bb;JK.Id="airplay";KK.prototype.create=function(){return new JK};_.fn(new KK);};
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);};
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 BK=function(a,b){this.l=a;this.f=b;this.a=new _.Vf;this.g=!1},CK=function(a){var b=GenericPlayerApi.call(this)||this;b.l=a;b.a=_.gi();return b},DK=function(){this.h=this.f=this.a=this.g=this.l=null;this.j=new _.Vf},EK=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===_.le&&a.g.setUUID(f))},FK=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,_.Wc,a.S.bind(a));a.h=new CK(a.l);a.a.attachPlayer(a.h)},GK=function(a,b){_.Yf(a.j);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},HK=function(){return!window.SmartLib||!window.GenericPlayerApi},IK=function(){};_.h=BK.prototype;_.h.init=function(){var a=this.l,b=this.a;b.on(a,_.he,this.Jg.bind(this));b.on(a,_.gc,this.Hg.bind(this));b.on(a,"seek",this.Ig.bind(this))};
4
- _.h.Hg=function(a){a=a.detail;typeof a.bandwidth===_.zd&&this.f.notifyLayerSwitch(a.bandwidth/1E3)};_.h.Jg=function(a){var b=this.l,c=this.f;a=a.detail;var d=a.currentState;a.previousState===_.Dl&&c.notifyStallEnd(!b.isPaused());switch(d){case _.Dl:c.notifyStallStart();break;case _.Ml:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.Ll:c.notifyPause()}};_.h.Ig=function(){var a=1E3*this.l.getPosition();this.f.notifySeek(a)};_.h.release=function(){this.a&&(_.Yf(this.a),this.a=null)};_.u(CK,GenericPlayerApi);_.h=CK.prototype;_.h.getPlayerName=function(){return _.oa};_.h.getVersion=function(){return _.da};_.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(DK,_.So);_.h=DK.prototype;_.h.onPlayerCreated=function(a){this.l=a};_.h.onContentWillLoad=function(a,b){var c=this,d=a.getConfiguration().broadpeak;if(d){if(HK())return a.onError(new _.J(1,9,11E3));EK(this,d);FK(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}));GK(c,void 0)}else b.url=e.getURL(),c.f=new BK(c.l,c.h),c.f.init()})}};
6
- _.h.S=function(a){a=a.detail;if(7003===a.code)GK(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.K)switch(a.category){case 3:GK(this,SmartLib.BPDecodingError);break;case 1:GK(this,SmartLib.BPNetworkingError);break;case 6:GK(this,SmartLib.BPAccessRightError);break;default:GK(this,SmartLib.BPUnspecifiedError)}};_.h.onPlayerWillRelease=function(){HK()||GK(this,SmartLib.BPSessionEndsNormally)};_.h.id=function(){return"broadpeak"};_.A("clpp.broadpeak.BroadpeakPlugin",DK);
7
- DK.isSdkMissing=HK;DK.Id="broadpeak";IK.prototype.create=function(){return new DK};_.fn(new IK);};
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);};
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));}