@castlabs/prestoplay 6.6.0 → 6.6.1

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 +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 +110 -110
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +406 -406
  8. package/cjs/cl.crypto.js +8 -8
  9. package/cjs/cl.dash.js +71 -71
  10. package/cjs/cl.externs.js +17 -6
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +49 -48
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +22 -22
  16. package/cjs/cl.mse.js +256 -257
  17. package/cjs/cl.muxdata.js +12 -12
  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 -70
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +27 -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 +357 -356
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +66 -66
  38. package/cl.externs.js +17 -6
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +40 -40
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -25
  43. package/cl.ima.js +16 -16
  44. package/cl.mse.js +199 -200
  45. package/cl.muxdata.js +8 -8
  46. package/cl.onboard.js +2 -2
  47. package/cl.persistent.js +9 -9
  48. package/cl.playlist.js +4 -4
  49. package/cl.smooth.js +59 -58
  50. package/cl.thumbnails.js +16 -16
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +12 -12
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +13 -13
  56. package/cl.vtt.js +11 -11
  57. package/cl.youbora.js +15 -15
  58. package/package.json +5 -1
  59. package/typings.d.ts +100 -96
package/cl.youbora.js CHANGED
@@ -1,15 +1,15 @@
1
- import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var kq="clpp.npaw.YouboraPlugin",lq="content.isLive",mq=function(a,b){if(b.namespace()===_.yc)return a.f.info("Youbora does not report when casting."),!1;const c=b.getConfiguration().youbora;if(!_.of(c))return a.f.warn("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.f.warn("accountCode key is missing in Youbora config"),b.onError(new _.H(1,9,9101)),!1;if(_.z(window.youbora))return a.f.warn("Youbora SDK not found."),b.onError(new _.H(1,9,
2
- 9100)),!1;"6.8.49"!==youbora.VERSION&&(a.f.warn("Youbora SDK version is not supported. The supported version is 6.8.49, found "+`version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.H(1,9,9102)));return!0},nq=a=>(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:b=>({code:`${b.code}`,message:b.message,severity:b.severity}),oq=(a,b,c,d)=>{b=nq(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===
3
- a.code?"ad error":_.Yc;b.severity===_.F?(d.fireFatalError(b.code,b.message,b.metadata),c.debug(`Reporting "fatal ${a}" to Youbora`,b.code,b)):(d.fireError(b.code,b.message,b.metadata),c.debug(`Reporting "${a}" to Youbora`,b.code,b));return b};var pq=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.l=c;this.a=new _.vo;this.f=new _.O("clpp.npaw.YouboraAdapter");this.h=this.w=!1;this.registerListeners()}getPlayhead(){return this.getIsLive()?-1:this.l.getPosition()}getDuration(){return this.l.getDuration()}getRendition(){let c,d,e;var f=this.l.getTrackManager();f&&(f=f.fa())&&(c=f.width,d=f.height,e=f.bandwidth);c&&d&&e||(f=this.m(),c=c||f.width,d=d||f.height,e=e||f.streamBandwidth);return youbora.Util.buildRenditionString(c,
4
- d,e)}getIsLive(){return this.l.isLive()}getResource(){const c=this.l.getLoadedSource();return c&&c.url}getBitrate(){return this.m().streamBandwidth}getThroughput(){return this.m().estimatedBandwidth}getPlayrate(){return this.l.getPlaybackRate()}getFramesPerSecond(){var c=this.l.getTrackManager();return c&&(c=c.Fa())?c.frameRate:null}getPlayerName(){return _.pa}getVersion(){return"6.6.0-castlabsadapter-js"}getPlayerVersion(){return _.da}registerListeners(){this.l&&this.a&&(this.f.debug("registering listeners"),
5
- youbora.Util.logAllEvents(this.l),this.a.on(this.l,_.ke,this.J.bind(this)),this.a.on(this.l,_.Yc,this.F.bind(this)),this.a.on(this.l,_.De,this.I.bind(this)),this.a.on(this.l,_.Ce,this.G.bind(this)),this.a.on(this.l,_.Mb,this.B.bind(this)),this.a.on(this.l,_.oc,this.C.bind(this)))}unregisterListeners(){this.f.debug(_.pb);_.Pf(this.a)}dispose(){super.dispose()}m(){return this.l.getStats()||_.Dl()}o(){return!!this.l.getConfiguration().autoplay}J(c){c=c.detail;this.j("state change",c);if(c)switch(c.currentState){case _.Rl:this.o()&&
6
- this.g();break;case _.Tl:this.g();this.A();this.fireResume();this.fireBufferEnd();break;case _.Sl:this.o()&&this.g();this.A();this.fireBufferEnd();this.firePause();break;case _.Ql:this.fireBufferEnd();this.fireStop();break;case _.Il:this.fireBufferEnd();this.w&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.Ll:this.fireBufferBegin();break;default:this.f.debug("Unhandled state",c)}}g(){this.plugin.isInitiated||(this.h=!1,this.fireInit())}A(){var c=this.l.getDrmInfo();c&&
7
- (c=c.keySystem,(c=c.startsWith(_.Ic)?"Widevine":c.startsWith(_.Gc)?"FairPlay":c.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":c.startsWith(_.Md)?"ClearKey":c.startsWith(_.Fc)?"Primetime":c)&&this.plugin.setOptions({"content.drm":c}));this.fireJoin()}F(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=oq(c,this.l,this.f,this))&&c.severity===_.F&&(this.h=!0)}I(){this.j(_.fe);this.l.isEnded()||(this.g(),this.fireSeekBegin())}G(){this.j(_.ee);this.fireSeekEnd()}B(c){this.f.debug("adsTimeline",
8
- c);c=c.adsTimeline;this.w=!!c&&c.fb()}C(c){this.f.debug("Casting",c);this.fireCasted()}j(c,...d){this.f.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var qq=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.l=c;this.j=this.a=null;this.f=new _.vo;this.h=new _.O("clpp.npaw.YouboraAdsAdapter");this.registerListeners()}getDuration(){return this.a&&this.a.getDuration()}getRendition(){let c=null;this.a&&(c=youbora.Util.buildRenditionString(this.a.qb(),this.a.pb(),this.a.eb()));return c}getBitrate(){return this.a&&this.a.eb()}getPlayhead(){const c=this.l.getAdsManager();return c&&c.getPosition()}getResource(){return this.a&&this.a.getMediaUrl()}getTitle(){return this.a&&
9
- this.a.getTitle()}getProvider(){return this.a&&this.a.getAdvertiserName()}getCreativeId(){return this.a&&this.a.getCreativeId()}getPosition(){const c=youbora.Constants.AdPosition;let d=null;if(this.a)switch(this.a.Pa()){case 0:d=c.Preroll;break;case 2:d=c.Postroll;break;case 1:d=c.Midroll}this.h.debug("Ad position",d);return d}getIsSkippable(){return this.a&&-1!==this.a.getSkipTimeOffset()}getAudioEnabled(){const c=this.l.getAdsManager();return c&&0<c.getVolume()}getExpectedBreaks(){return this.j&&
10
- this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.sb()}getGivenAds(){return this.getExpectedAds()}getBreaksTime(){return this.j&&this.j.getCuePoints().map(c=>-1===c?this.l.getDuration():c)}getIsFullscreen(){return this.l.getSurface().isFullscreen()}getIsVisible(){var c=this.l.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);this.h.debug("is container visible",c);return c}getPlayerName(){return _.pa}getVersion(){return"6.6.0-castlabsadsadapter-js"}getPlayerVersion(){return _.da}registerListeners(){this.l&&
11
- this.f&&(this.f.on(this.l,_.Mb,this.M.bind(this)),this.f.on(this.l,_.Ib,this.L.bind(this)),this.f.on(this.l,_.Eb,this.G.bind(this)),this.f.on(this.l,_.Gb,this.J.bind(this)),this.f.on(this.l,_.zb,this.C.bind(this)),this.f.on(this.l,_.Ab,this.m.bind(this,1)),this.f.on(this.l,_.Db,this.m.bind(this,2)),this.f.on(this.l,_.Kb,this.m.bind(this,3)),this.f.on(this.l,_.yb,this.B.bind(this)),this.f.on(this.l,_.Hb,this.K.bind(this)),this.f.on(this.l,_.Yc,this.F.bind(this)),this.f.on(this.l,_.vb,this.o.bind(this)),
12
- this.f.on(this.l,_.wb,this.w.bind(this)),this.f.on(this.l,_.xb,this.A.bind(this)),this.f.on(this.l,_.Fb,this.I.bind(this)))}unregisterListeners(){_.Pf(this.f)}dispose(){super.dispose()}M(c){this.h.debug("ad timeline changed",c);this.j=c.adsTimeline}L(c){this.a=c.ad;this.g("ad start",this.a);this.fireStart();this.fireJoin()}C(){this.g("ad ended");this.fireStop()}G(){this.g("ad pause");this.firePause()}J(){this.g("ad resume");this.fireResume()}A(){this.g("ad buffering started");this.fireBufferBegin()}I(){this.g("ad buffering ended");
13
- this.fireBufferEnd()}m(c){this.g("ad quartile",c);this.fireQuartile(c)}B(){this.g("ad clicked");const c=this.a&&this.a.Eb();this.h.debug("ad click through url: ",c);this.fireClick(c)}K(){this.g("ad skipped");this.fireSkip()}o(c){this.a=c.ad;this.g("ad break start",this.a);this.fireBreakStart()}w(){this.g("ad break stop");this.fireBreakStop();if(this.getPosition()===youbora.Constants.AdPosition.Postroll){const c=this.plugin.getAdapter();c&&c.fireStop()}}F(c){(c=c.detail)&&10003===c.code&&oq(c,this.l,
14
- this.h,this)}g(c,...d){this.h.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var rq=class extends _.jq{constructor(){super();this.a=null;this.f=new _.O(kq);this.l=null}Wd(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(pq(this.l)),this.a.setAdsAdapter(qq(this.l))}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.l=a;mq(this,a)&&(a=a.getConfiguration().youbora,this.Wd(new youbora.Plugin(a)))}onContentWillLoad(a,b){if(mq(this,a)){a=a.getConfiguration();var c=
15
- a.youbora;void 0===c[lq]&&(c[lq]=b.isLive);void 0===c["content.title"]&&(c["content.title"]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.Wd(new youbora.Plugin(c));this.a.setOptions(c)}}onPlayerWillRelease(){}onPlayerWillDestroy(){}id(){return"youbora"}};_.x(kq,rq);rq.prototype.getAdsAdapter=rq.prototype.getAdsAdapter;rq.prototype.getAdapter=rq.prototype.getAdapter;rq.prototype.setYouboraPlugin=rq.prototype.Wd;rq.Id="youbora";_.Tm(new class{create(){return new rq}});};f.call(g, window);
1
+ import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var kq="clpp.npaw.YouboraPlugin",lq="content.isLive",mq=function(a,b){if(b.namespace()===_.Ac)return a.f.info("Youbora does not report when casting."),!1;const c=b.getConfiguration().youbora;if(!_.of(c))return a.f.warn("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.f.warn("accountCode key is missing in Youbora config"),b.onError(new _.G(1,9,9101)),!1;if(_.z(window.youbora))return a.f.warn("Youbora SDK not found."),b.onError(new _.G(1,9,
2
+ 9100)),!1;"6.8.49"!==youbora.VERSION&&(a.f.warn("Youbora SDK version is not supported. The supported version is 6.8.49, found "+`version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.G(1,9,9102)));return!0},nq=a=>(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:b=>({code:`${b.code}`,message:b.message,severity:b.severity}),oq=(a,b,c,d)=>{b=nq(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===
3
+ a.code?"ad error":_.$c;b.severity===_.F?(d.fireFatalError(b.code,b.message,b.metadata),c.debug(`Reporting "fatal ${a}" to Youbora`,b.code,b)):(d.fireError(b.code,b.message,b.metadata),c.debug(`Reporting "${a}" to Youbora`,b.code,b));return b};var pq=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.l=c;this.a=new _.uo;this.f=new _.O("clpp.npaw.YouboraAdapter");this.h=this.w=!1;this.registerListeners()}getPlayhead(){return this.getIsLive()?-1:this.l.getPosition()}getDuration(){return this.l.getDuration()}getRendition(){let c,d,e;var f=this.l.getTrackManager();f&&(f=f.ga())&&(c=f.width,d=f.height,e=f.bandwidth);c&&d&&e||(f=this.m(),c=c||f.width,d=d||f.height,e=e||f.streamBandwidth);return youbora.Util.buildRenditionString(c,
4
+ d,e)}getIsLive(){return this.l.isLive()}getResource(){const c=this.l.getLoadedSource();return c&&c.url}getBitrate(){return this.m().streamBandwidth}getThroughput(){return this.m().estimatedBandwidth}getPlayrate(){return this.l.getPlaybackRate()}getFramesPerSecond(){var c=this.l.getTrackManager();return c&&(c=c.Da())?c.frameRate:null}getPlayerName(){return _.oa}getVersion(){return"6.6.1-castlabsadapter-js"}getPlayerVersion(){return _.da}registerListeners(){this.l&&this.a&&(this.f.debug("registering listeners"),
5
+ youbora.Util.logAllEvents(this.l),this.a.on(this.l,_.ke,this.I.bind(this)),this.a.on(this.l,_.$c,this.F.bind(this)),this.a.on(this.l,_.Ee,this.H.bind(this)),this.a.on(this.l,_.Ce,this.G.bind(this)),this.a.on(this.l,_.Ob,this.B.bind(this)),this.a.on(this.l,_.qc,this.C.bind(this)))}unregisterListeners(){this.f.debug(_.pb);_.Of(this.a)}dispose(){super.dispose()}m(){return this.l.getStats()||_.Cl()}o(){return!!this.l.getConfiguration().autoplay}I(c){c=c.detail;this.j("state change",c);if(c)switch(c.currentState){case _.Ql:this.o()&&
6
+ this.g();break;case _.Sl:this.g();this.A();this.fireResume();this.fireBufferEnd();break;case _.Rl:this.o()&&this.g();this.A();this.fireBufferEnd();this.firePause();break;case _.Pl:this.fireBufferEnd();this.fireStop();break;case _.Hl:this.fireBufferEnd();this.w&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.Kl:this.fireBufferBegin();break;default:this.f.debug("Unhandled state",c)}}g(){this.plugin.isInitiated||(this.h=!1,this.fireInit())}A(){var c=this.l.getDrmInfo();c&&
7
+ (c=c.keySystem,(c=c.startsWith(_.Kc)?"Widevine":c.startsWith(_.Ic)?"FairPlay":c.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":c.startsWith(_.Md)?"ClearKey":c.startsWith(_.Hc)?"Primetime":c)&&this.plugin.setOptions({"content.drm":c}));this.fireJoin()}F(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=oq(c,this.l,this.f,this))&&c.severity===_.F&&(this.h=!0)}H(){this.j(_.fe);this.l.isEnded()||(this.g(),this.fireSeekBegin())}G(){this.j(_.ee);this.fireSeekEnd()}B(c){this.f.debug("adsTimeline",
8
+ c);c=c.adsTimeline;this.w=!!c&&c.eb()}C(c){this.f.debug("Casting",c);this.fireCasted()}j(c,...d){this.f.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var qq=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.l=c;this.j=this.a=null;this.f=new _.uo;this.h=new _.O("clpp.npaw.YouboraAdsAdapter");this.registerListeners();this.m=!1}getDuration(){return this.a&&this.a.getDuration()}getRendition(){let c=null;this.a&&(c=youbora.Util.buildRenditionString(this.a.pb(),this.a.ob(),this.a.cb()));return c}getBitrate(){return this.a&&this.a.cb()}getPlayhead(){const c=this.l.getAdsManager();return c&&c.getPosition()}getResource(){return this.a&&this.a.getMediaUrl()}getTitle(){return this.a&&
9
+ this.a.getTitle()}getProvider(){return this.a&&this.a.getAdvertiserName()}getCreativeId(){return this.a&&this.a.getCreativeId()}getPosition(){const c=youbora.Constants.AdPosition;let d=null;if(this.a)switch(this.a.Oa()){case 0:d=c.Preroll;break;case 2:d=c.Postroll;break;case 1:d=c.Midroll}this.h.debug("Ad position",d);return d}getIsSkippable(){return this.a&&-1!==this.a.getSkipTimeOffset()}getAudioEnabled(){const c=this.l.getAdsManager();return c&&0<c.getVolume()}getExpectedBreaks(){return this.j&&
10
+ this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.rb()}getGivenAds(){return this.getExpectedAds()}getBreaksTime(){return this.j&&this.j.getCuePoints().map(c=>-1===c?this.l.getDuration():c)}getIsFullscreen(){return this.l.getSurface().isFullscreen()}getIsVisible(){var c=this.l.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);this.h.debug("is container visible",c);return c}getPlayerName(){return _.oa}getVersion(){return"6.6.1-castlabsadsadapter-js"}getPlayerVersion(){return _.da}registerListeners(){this.l&&
11
+ this.f&&(this.f.on(this.l,_.Ob,this.N.bind(this)),this.f.on(this.l,_.Kb,this.L.bind(this)),this.f.on(this.l,_.Gb,this.I.bind(this)),this.f.on(this.l,_.Ib,this.J.bind(this)),this.f.on(this.l,_.Bb,this.G.bind(this)),this.f.on(this.l,_.Cb,this.o.bind(this,1)),this.f.on(this.l,_.Fb,this.o.bind(this,2)),this.f.on(this.l,_.Mb,this.o.bind(this,3)),this.f.on(this.l,_.Ab,this.F.bind(this)),this.f.on(this.l,_.Jb,this.K.bind(this)),this.f.on(this.l,_.$c,this.H.bind(this)),this.f.on(this.l,_.wb,this.A.bind(this)),
12
+ this.f.on(this.l,_.xb,this.B.bind(this)),this.f.on(this.l,_.zb,this.C.bind(this)),this.f.on(this.l,_.Hb,this.w.bind(this)))}unregisterListeners(){_.Of(this.f)}dispose(){super.dispose()}N(c){this.h.debug("ad timeline changed",c);this.j=c.adsTimeline}L(c){this.a=c.ad;this.g("ad start",this.a);this.fireStart();this.fireJoin()}G(){this.g("ad ended");this.fireStop()}I(){this.g("ad pause");this.w();this.firePause()}J(){this.g("ad resume");this.w();this.fireResume()}C(){this.m=!0;this.g("ad buffering started");
13
+ this.fireBufferBegin()}w(){this.m&&(this.g("ad buffering ended"),this.m=!1,this.fireBufferEnd())}o(c){this.g("ad quartile",c);this.fireQuartile(c)}F(){this.g("ad clicked");const c=this.a&&this.a.Db();this.h.debug("ad click through url: ",c);this.fireClick(c)}K(){this.g("ad skipped");this.fireSkip()}A(c){this.a=c.ad;this.g("ad break start",this.a);this.fireBreakStart()}B(){this.g("ad break stop");this.fireBreakStop();if(this.getPosition()===youbora.Constants.AdPosition.Postroll){const c=this.plugin.getAdapter();
14
+ c&&c.fireStop()}}H(c){(c=c.detail)&&10003===c.code&&oq(c,this.l,this.h,this)}g(c,...d){this.h.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var rq=class extends _.jq{constructor(){super();this.a=null;this.f=new _.O(kq);this.l=null}Ud(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(pq(this.l)),this.a.setAdsAdapter(qq(this.l))}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.l=a;mq(this,a)&&(a=a.getConfiguration().youbora,this.Ud(new youbora.Plugin(a)))}onContentWillLoad(a,b){if(mq(this,a)){a=a.getConfiguration();var c=
15
+ a.youbora;void 0===c[lq]&&(c[lq]=b.isLive);void 0===c["content.title"]&&(c["content.title"]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.Ud(new youbora.Plugin(c));this.a.setOptions(c)}}onPlayerWillRelease(){}onPlayerWillDestroy(){}id(){return"youbora"}};_.x(kq,rq);rq.prototype.getAdsAdapter=rq.prototype.getAdsAdapter;rq.prototype.getAdapter=rq.prototype.getAdapter;rq.prototype.setYouboraPlugin=rq.prototype.Ud;rq.Id="youbora";_.Sm(new class{create(){return new rq}});};f.call(g, window);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@castlabs/prestoplay",
3
3
  "description": "PRESTOplay Video Player",
4
- "version": "6.6.0",
4
+ "version": "6.6.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/castlabs/prestoplay-web.git"
@@ -23,6 +23,7 @@
23
23
  ],
24
24
  "peerDependencies": {
25
25
  "@broadpeak/smartlib": "4.5.1-328cb1e",
26
+ "@broadpeak/smartlib-all-compatibility": "4.5.1-328cb1e",
26
27
  "@broadpeak/smartlib-analytics": "4.5.1-328cb1e",
27
28
  "mux.js": "^5.14.1",
28
29
  "youboralib": "6.8.49"
@@ -39,6 +40,9 @@
39
40
  },
40
41
  "@broadpeak/smartlib-analytics": {
41
42
  "optional": true
43
+ },
44
+ "@broadpeak/smartlib-all-compatibility": {
45
+ "optional": true
42
46
  }
43
47
  },
44
48
  "keywords": [
package/typings.d.ts CHANGED
@@ -196,7 +196,11 @@ export namespace clpp {
196
196
  bandwidthUpgradeTarget: number;
197
197
  /**
198
198
  * The default bandwidth estimate to use if there is not enough data, in
199
- * bit/sec.
199
+ * bit/sec. This value is used for initial video track selection when there
200
+ * is no bandwidth estimation from previous playbacks. If the player instance
201
+ * is destroyed, any new load() call will use this value. Otherwise
202
+ * bandwidth estimation from current playback is transfered to the next
203
+ * playback.
200
204
  */
201
205
  defaultBandwidthEstimate: number;
202
206
  /**
@@ -206,7 +210,8 @@ export namespace clpp {
206
210
  /**
207
211
  * Restrictions used only for initial ABR selection. This can be used i.e.
208
212
  * in DRM multikey scenarios, to ensure that first selected track will be
209
- * playable on any platform.
213
+ * playable on any platform. Restrictions are applied on every playback
214
+ * attempt if defined.
210
215
  */
211
216
  initialRestrictions?: clpp.Restrictions;
212
217
  /**
@@ -904,6 +909,56 @@ export namespace clpp {
904
909
  widevineUrl: string;
905
910
  }
906
911
 
912
+ /**
913
+ * Parsed MP4 box.
914
+ */
915
+ export type ParsedMp4Box = {
916
+ /**
917
+ * The flags for a full box, null for basic boxes.
918
+ */
919
+ flags: number|null;
920
+ /**
921
+ * If true, the box header had a 64-bit size field. This affects the offsets
922
+ * of other fields.
923
+ */
924
+ has64BitSize: boolean;
925
+ /**
926
+ * The size of this box header.
927
+ */
928
+ headerSize: number;
929
+ /**
930
+ * The parser that parsed this box. The parser can be used to parse child
931
+ * boxes where the configuration of the current parser is needed to parsed
932
+ * other boxes.
933
+ */
934
+ parser: clpp.utils.Mp4Parser;
935
+ /**
936
+ * If true, allows reading partial payloads from some boxes. If the goal is a
937
+ * child box, we can sometimes find it without enough data to find all child
938
+ * boxes. This property allows the partialOkay flag from parse() to be
939
+ * propagated through methods like children().
940
+ */
941
+ partialOkay: boolean;
942
+ /**
943
+ * The reader for this box is only for this box. Reading or not reading to
944
+ * the end will have no affect on the parser reading other sibling boxes.
945
+ */
946
+ reader: clpp.utils.dataview.DataViewReader;
947
+ /**
948
+ * The size of this box (including the header).
949
+ */
950
+ size: number;
951
+ /**
952
+ * The start of this box (before the header) in the original buffer. This
953
+ * start position is the absolute position.
954
+ */
955
+ start: number;
956
+ /**
957
+ * The version for a full box, null for basic boxes.
958
+ */
959
+ version: number|null;
960
+ }
961
+
907
962
  /**
908
963
  * Platform information.
909
964
  */
@@ -2559,7 +2614,7 @@ export namespace clpp {
2559
2614
  */
2560
2615
  RELEASING = "releasing",
2561
2616
  /**
2562
- * Triggered when the player and its components are about to be released
2617
+ * Triggered when the player and its components are released
2563
2618
  */
2564
2619
  RELEASED = "released",
2565
2620
  /**
@@ -2567,7 +2622,7 @@ export namespace clpp {
2567
2622
  */
2568
2623
  DESTROYING = "destroying",
2569
2624
  /**
2570
- * Triggered when the player and its components are about to be destroyed
2625
+ * Triggered when the player and its components are destroyed
2571
2626
  */
2572
2627
  DESTROYED = "destroyed",
2573
2628
  /**
@@ -2817,11 +2872,11 @@ export namespace clpp {
2817
2872
  }
2818
2873
 
2819
2874
  /**
2820
- * Create a new Error
2875
+ * Create a new Error.
2821
2876
  */
2822
2877
  export class Error extends window.Error {
2823
2878
  /**
2824
- * Create a new Error
2879
+ * Create a new Error.
2825
2880
  *
2826
2881
  * @param severity The severity
2827
2882
  * @param category The error category
@@ -2834,26 +2889,27 @@ export namespace clpp {
2834
2889
  */
2835
2890
  constructor(severity: clpp.Error.Severity, category: clpp.Error.Category, code: clpp.Error.Code, opt_data?: Object|string, opt_error?: any);
2836
2891
  /**
2837
- * The error category
2892
+ * The error category.
2838
2893
  */
2839
2894
  category: clpp.Error.Category;
2840
2895
  /**
2841
- * Optional cause. If known, this refers to the original error that caused
2896
+ * Optional cause.
2897
+ * If known, this refers to the original error that caused
2842
2898
  * this error to be thrown.
2843
2899
  */
2844
2900
  cause: any|null;
2845
2901
  /**
2846
- * The error code
2902
+ * The error code.
2847
2903
  */
2848
2904
  code: clpp.Error.Code;
2849
2905
  /**
2850
- * Optional data that was provided when the error was raised. This might be
2851
- * an empty object if no addition data was provided. Otherwise the data
2852
- * provided here is specific to the error.
2906
+ * Optional data that was provided when the error was raised.
2907
+ * This might be an empty object if no addition data was provided.
2908
+ * Otherwise the data provided here is specific to the error.
2853
2909
  */
2854
2910
  data: Object;
2855
2911
  /**
2856
- * The error severity
2912
+ * The error severity.
2857
2913
  */
2858
2914
  severity: clpp.Error.Severity;
2859
2915
  }
@@ -4180,6 +4236,14 @@ export namespace clpp {
4180
4236
  * We do not support playing encrypted transport streams (TS) with MSE.
4181
4237
  */
4182
4238
  HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED = 4041,
4239
+ /**
4240
+ * HLS playlist cannot be parsed because it is not encoded in UTF-8.
4241
+ */
4242
+ HLS_PLAYLIST_NOT_UTF8 = 4042,
4243
+ /**
4244
+ * HLS media playlist does not contain any media segments.
4245
+ */
4246
+ HLS_PLAYLIST_EMPTY = 4043,
4183
4247
  /**
4184
4248
  * The StreamingEngine called onChooseStreams() but the callback receiver
4185
4249
  * did not return the correct number or type of Streams.
@@ -4204,7 +4268,7 @@ export namespace clpp {
4204
4268
  * persistent state).
4205
4269
  * A user prompt was shown and the user denied access.
4206
4270
  * The key system is not available from unsecure contexts. (ie.
4207
- * requires HTTPS) See https://goo.gl/EEhZqT.
4271
+ * requires HTTPS) See https://goo.gl/EEhZqT.
4208
4272
  *
4209
4273
  */
4210
4274
  REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE = 6001,
@@ -4213,7 +4277,7 @@ export namespace clpp {
4213
4277
  * create an instance of the CDM for some unknown reason.
4214
4278
  * The errors cause might contain the original error if there was one thrown
4215
4279
  * by the browser. If there was an error message it will be in
4216
- * the {@code message} property of the data object
4280
+ * the {@code message} property of the data object.
4217
4281
  */
4218
4282
  FAILED_TO_CREATE_CDM = 6002,
4219
4283
  /**
@@ -4244,7 +4308,7 @@ export namespace clpp {
4244
4308
  * The CDM was unable to generate a license request for the init data it was
4245
4309
  * given. The init data may be malformed or in an unsupported format.
4246
4310
  *
4247
- * error.cause contains a reference to the original error
4311
+ * error.cause contains a reference to the original error.
4248
4312
  */
4249
4313
  FAILED_TO_GENERATE_LICENSE_REQUEST = 6006,
4250
4314
  /**
@@ -4272,11 +4336,11 @@ export namespace clpp {
4272
4336
  */
4273
4337
  NO_LICENSE_SERVER_GIVEN = 6012,
4274
4338
  /**
4275
- * A required offline session was removed. The content is not playable.
4339
+ * A required offline session was removed. The content is not playable.
4276
4340
  */
4277
4341
  OFFLINE_SESSION_REMOVED = 6013,
4278
4342
  /**
4279
- * The license has expired. This is triggered when all keys in the key
4343
+ * The license has expired. This is triggered when all keys in the key
4280
4344
  * status map have a status of 'expired'.
4281
4345
  */
4282
4346
  EXPIRED = 6014,
@@ -4963,7 +5027,7 @@ export namespace clpp {
4963
5027
  /**
4964
5028
  * Gets currently set Cast content metadata or `null` if none is set.
4965
5029
  */
4966
- getContentMetadata(): clpp.cast.CastUtils.SenderMetadataObject|null;
5030
+ getContentMetadata(): clpp.cast.utils.SenderMetadataObject|null;
4967
5031
  /**
4968
5032
  * Gets name of currently connected receiver.
4969
5033
  */
@@ -5005,7 +5069,7 @@ export namespace clpp {
5005
5069
  * (See {@link https://developers.google.com/cast/docs/reference/web_sender/chrome.cast.media#.MetadataType})
5006
5070
  * or `null` to clear the metadata.
5007
5071
  */
5008
- setContentMetadata(metadata: clpp.cast.CastUtils.SenderMetadataObject|null): void;
5072
+ setContentMetadata(metadata: clpp.cast.utils.SenderMetadataObject|null): void;
5009
5073
  /**
5010
5074
  * Set the Cast content's release date.
5011
5075
  * Given string must be compliant with ISO 8601 (YYYY-MM-DD).
@@ -5032,7 +5096,7 @@ export namespace clpp {
5032
5096
  * return config;
5033
5097
  * });
5034
5098
  */
5035
- setPlayerConfigInterceptor(interceptor: clpp.cast.CastUtils.PlayerConfigInterceptor|null): void;
5099
+ setPlayerConfigInterceptor(interceptor: clpp.cast.utils.PlayerConfigInterceptor|null): void;
5036
5100
  }
5037
5101
 
5038
5102
  export class CastUtils {
@@ -5050,7 +5114,7 @@ export namespace clpp {
5050
5114
  * Get a Cast metadata object set by user, one of the
5051
5115
  * `cast.framework.messages.*MediaMetadata` objects.
5052
5116
  */
5053
- getContentMetadata(): clpp.cast.CastUtils.ReceiverMetadataObject|null;
5117
+ getContentMetadata(): clpp.cast.utils.ReceiverMetadataObject|null;
5054
5118
  /**
5055
5119
  * Returns singleton instance of cast receiver.
5056
5120
  */
@@ -5140,7 +5204,7 @@ export namespace clpp {
5140
5204
  * return loadRequestData;
5141
5205
  * });
5142
5206
  */
5143
- setLoadRequestDataInterceptor(interceptor: clpp.cast.CastUtils.LoadRequestDataInterceptor|null): void;
5207
+ setLoadRequestDataInterceptor(interceptor: clpp.cast.utils.LoadRequestDataInterceptor|null): void;
5144
5208
  /**
5145
5209
  * Gives a possibility to intercept player configuration during casting to
5146
5210
  * modify it if necessary. Intercepting function takes player config as an
@@ -5156,7 +5220,7 @@ export namespace clpp {
5156
5220
  * return config;
5157
5221
  * });
5158
5222
  */
5159
- setPlayerConfigInterceptor(interceptor: clpp.cast.CastUtils.PlayerConfigInterceptor|null): void;
5223
+ setPlayerConfigInterceptor(interceptor: clpp.cast.utils.PlayerConfigInterceptor|null): void;
5160
5224
  /**
5161
5225
  * Starts receiver application.
5162
5226
  */
@@ -5167,7 +5231,7 @@ export namespace clpp {
5167
5231
  stop(): void;
5168
5232
  }
5169
5233
 
5170
- namespace CastUtils {
5234
+ namespace utils {
5171
5235
  /**
5172
5236
  * Callback function used to modify load request data before play.
5173
5237
  * Intercepting function shall take
@@ -5178,8 +5242,9 @@ export namespace clpp {
5178
5242
  export type LoadRequestDataInterceptor = Function;
5179
5243
 
5180
5244
  /**
5181
- * Callback function used to modify player config before play. It can be used
5182
- * both on sender and receiver side. Intercepting function shall take
5245
+ * Callback function used to modify player config before play.
5246
+ * It can be used both on sender and receiver side. Intercepting
5247
+ * function shall take
5183
5248
  * {@link clpp.PlayerConfiguration} as an argument and return modified
5184
5249
  * {@link clpp.PlayerConfiguration} in synchronous or asynchronous way.
5185
5250
  */
@@ -5193,7 +5258,7 @@ export namespace clpp {
5193
5258
  *
5194
5259
  * {@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.MetadataType}
5195
5260
  *
5196
- * Use {@link clpp.cast.CastUtils.SenderMetadataObject} instead for the Cast
5261
+ * Use {@link clpp.cast.utils.SenderMetadataObject} instead for the Cast
5197
5262
  * Web Sender.
5198
5263
  */
5199
5264
  export type ReceiverMetadataObject = any;
@@ -5205,7 +5270,7 @@ export namespace clpp {
5205
5270
  *
5206
5271
  * {@link https://developers.google.com/cast/docs/reference/web_sender/chrome.cast.media#.MetadataType}
5207
5272
  *
5208
- * Use {@link clpp.cast.CastUtils.ReceiverMetadataObject} instead for the Cast
5273
+ * Use {@link clpp.cast.utils.ReceiverMetadataObject} instead for the Cast
5209
5274
  * Web Receiver.
5210
5275
  */
5211
5276
  export type SenderMetadataObject = any;
@@ -5839,10 +5904,6 @@ export namespace clpp {
5839
5904
  * the log levels of modules and components globally
5840
5905
  */
5841
5906
  constructor(tag?: string);
5842
- /**
5843
- * The logger tag
5844
- */
5845
- tag?: string;
5846
5907
  /**
5847
5908
  * Returns a child logger the will extend this loggers tag.
5848
5909
  *
@@ -6175,7 +6236,7 @@ export namespace clpp {
6175
6236
  * Use `clpp.utils.ab2str` to convert data to text and `clpp.utils.str2ab` to
6176
6237
  * convert data back to ArrayBuffer.
6177
6238
  */
6178
- data: ArrayBuffer|null;
6239
+ data: ArrayBuffer;
6179
6240
  /**
6180
6241
  * Optional. If true, this response was from a cache and should be ignored
6181
6242
  * for bandwidth estimation.
@@ -7010,7 +7071,7 @@ export namespace clpp {
7010
7071
  * A callback that tells the Mp4 parser to treat the body of a box as a series
7011
7072
  * of boxes. The number of boxes is limited by the size of the parent box.
7012
7073
  */
7013
- static children(box: clpp.utils.Mp4Parser.ParsedBox): void;
7074
+ static children(box: clpp.ParsedMp4Box): void;
7014
7075
  /**
7015
7076
  * Declare a box type as a Full Box.
7016
7077
  */
@@ -7019,7 +7080,7 @@ export namespace clpp {
7019
7080
  * Find the header size of the box.
7020
7081
  * Useful for modifying boxes in place or finding the exact offset of a field.
7021
7082
  */
7022
- static headerSize(box: clpp.utils.Mp4Parser.ParsedBox): number;
7083
+ static headerSize(box: clpp.ParsedMp4Box): number;
7023
7084
  /**
7024
7085
  * Parse the given data using the added callbacks.
7025
7086
  *
@@ -7046,9 +7107,10 @@ export namespace clpp {
7046
7107
  * number of children is represented by a 4 byte unsigned integer. Each child
7047
7108
  * is a box.
7048
7109
  */
7049
- static sampleDescription(box: clpp.utils.Mp4Parser.ParsedBox): void;
7110
+ static sampleDescription(box: clpp.ParsedMp4Box): void;
7050
7111
  /**
7051
- * Stop parsing. Useful for extracting information from partial segments and
7112
+ * Stop parsing.
7113
+ * Useful for extracting information from partial segments and
7052
7114
  * avoiding an out-of-bounds error once you find what you are looking for.
7053
7115
  */
7054
7116
  stop(): void;
@@ -7151,63 +7213,6 @@ export namespace clpp {
7151
7213
 
7152
7214
  namespace Mp4Parser {
7153
7215
  export type CallbackType = Function;
7154
-
7155
- export type ParsedBox = {
7156
- /**
7157
- * The flags for a full box, null for basic boxes.
7158
- */
7159
- flags: number|null;
7160
- /**
7161
- * If true, the box header had a 64-bit size field. This affects the offsets
7162
- * of other fields.
7163
- */
7164
- has64BitSize: boolean;
7165
- /**
7166
- * The size of this box header.
7167
- */
7168
- headerSize: number;
7169
- /**
7170
- * The parser that parsed this box. The parser can be used to parse child
7171
- * boxes where the configuration of the current parser is needed to parsed
7172
- * other boxes.
7173
- */
7174
- parser: clpp.utils.Mp4Parser;
7175
- /**
7176
- * If true, allows reading partial payloads from some boxes. If the goal is a
7177
- * child box, we can sometimes find it without enough data to find all child
7178
- * boxes. This property allows the partialOkay flag from parse() to be
7179
- * propagated through methods like children().
7180
- */
7181
- partialOkay: boolean;
7182
- /**
7183
- * The reader for this box is only for this box. Reading or not reading to
7184
- * the end will have no affect on the parser reading other sibling boxes.
7185
- */
7186
- reader: clpp.utils.dataview.DataViewReader;
7187
- /**
7188
- * The size of this box (including the header).
7189
- */
7190
- size: number;
7191
- /**
7192
- * The start of this box (before the header) in the original buffer. This
7193
- * start position is the absolute position.
7194
- */
7195
- start: number;
7196
- /**
7197
- * The version for a full box, null for basic boxes.
7198
- */
7199
- version: number|null;
7200
- }
7201
- }
7202
-
7203
- namespace arrays {
7204
- /**
7205
- * Sort order
7206
- */
7207
- export enum Order {
7208
- ASCENDING = 1,
7209
- DESCENDING = -1,
7210
- }
7211
7216
  }
7212
7217
 
7213
7218
  namespace dataview {
@@ -7306,7 +7311,6 @@ export namespace clpp {
7306
7311
  namespace vimond {
7307
7312
  export class VimondPlugin {
7308
7313
  static Id: string;
7309
- getVimondService(): any|null;
7310
7314
  /**
7311
7315
  * Update the auth token.
7312
7316
  * The auth token may expire during playback.