@castlabs/prestoplay 6.23.1 → 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.
- package/CHANGELOG.md +35 -0
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +7 -7
- package/cjs/cl.cast.js +116 -116
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +607 -591
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +88 -86
- package/cjs/cl.externs.js +105 -54
- package/cjs/cl.freewheel.js +25 -24
- package/cjs/cl.hls.js +77 -71
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +24 -23
- package/cjs/cl.mse.js +352 -342
- package/cjs/cl.muxdata.js +15 -15
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +15 -14
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.sessions.js +16 -16
- package/cjs/cl.simid.js +15 -15
- package/cjs/cl.smooth.js +72 -72
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +72 -72
- package/cjs/cl.ttml.js +29 -29
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +12 -12
- package/cjs/cl.vr.js +19 -19
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.yospace.js +4 -4
- package/cjs/cl.youbora.js +37 -37
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +88 -88
- package/cl.conviva.js +27 -27
- package/cl.core.js +491 -478
- package/cl.crypto.js +9 -9
- package/cl.dash.js +82 -80
- package/cl.externs.js +105 -54
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +79 -74
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +18 -17
- package/cl.mse.js +310 -306
- package/cl.muxdata.js +13 -13
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +10 -10
- package/cl.playlist.js +5 -5
- package/cl.sessions.js +10 -10
- package/cl.simid.js +13 -13
- package/cl.smooth.js +60 -59
- package/cl.thumbnails.js +19 -19
- package/cl.tizen.js +57 -57
- package/cl.ttml.js +22 -22
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +8 -8
- package/cl.vr.js +14 -14
- package/cl.vtt.js +12 -12
- package/cl.yospace.js +3 -3
- package/cl.youbora.js +28 -28
- package/package.json +1 -1
- package/typings.d.ts +54 -25
package/cl.vtt.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var
|
|
2
|
-
a[1].match(/\d+:\d+:\d+/)&&(b+=`${a[0].match(/\w+/)}\n`,++c);if(a[c].match(/\d+:\d+:\d+/)){const d=a[1].match(/(\d+):(\d+):(\d+)(?:,(\d+))?\s*--?>\s*(\d+):(\d+):(\d+)(?:,(\d+))?/);if(d)b+=`${d[1]}:${d[2]}:${d[3]}.${d[4]} --> `,b+=`${d[5]}:${d[6]}:${d[7]}.${d[8]}\n`,++c;else return""}else return"";a[c]&&(b+=`${a[c]}\n\n`);return b},
|
|
3
|
-
c+60*b+3600*(Number(a[1])||0)},
|
|
4
|
-
_.
|
|
5
|
-
b," The region will be ignored."),null)},
|
|
6
|
-
"WEBVTT\n\n";for(const c of a)b+=
|
|
7
|
-
8589934592;a=b.periodStart+e/9E4-a}}else this.a.streaming.relativeTextTimestamp&&null!==b.segmentStart&&(a=b.segmentStart);b=[];for(var f of c)if(/^region/.test(f.toLowerCase())){e=new _.
|
|
8
|
-
Number(h[1]),k.regionAnchorY=Number(h[2]);else if(h=/^viewportanchor:(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))k.viewportAnchorX=Number(h[1]),k.viewportAnchorY=Number(h[2]);else if(/^scroll:up$/.exec(l))k.scroll="up";else{k=!1;break a}k=!0}k||_.C("VTT parser encountered an invalid VTTRegion setting: ",g,
|
|
9
|
-
n.split("\n");h=a;c=b;if(1===l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"===l[0]){c=null;break a}e=null;l[0].includes("--\x3e")||(e=l[0],l.splice(0,1));d=new _.
|
|
10
|
-
new _.
|
|
11
|
-
_.P(
|
|
12
|
-
b.periodStart+a/this.a)):this.g.error("WVTT sample duration unknown, and no default found!")}while(
|
|
1
|
+
import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var Ew=" The setting will be ignored.",Fw="VTT parser encountered an invalid VTT setting: ",Gw="application/x-subrip",Hw="text/srt",Iw='text/vtt; codecs\x3d"vtt"',Jw='text/vtt; codecs\x3d"wvtt"',Kw=function(a){return a.a===a.f.length?null:(a=_.Ti(a,/[^ \t\n]*/gm))?a[0]:null},Lw=function(a){_.Ti(a,/[ \t]+/gm)},Mw=function(a){let b="";for(a=a.split(/\n/);3<a.length;){for(var c=3;c<a.length;++c)a[2]+=`\n${a[c]}`;a.splice(3,a.length-3)}if(3!==a.length)return"";c=0;!a[0].match(/\d+:\d+:\d+/)&&
|
|
2
|
+
a[1].match(/\d+:\d+:\d+/)&&(b+=`${a[0].match(/\w+/)}\n`,++c);if(a[c].match(/\d+:\d+:\d+/)){const d=a[1].match(/(\d+):(\d+):(\d+)(?:,(\d+))?\s*--?>\s*(\d+):(\d+):(\d+)(?:,(\d+))?/);if(d)b+=`${d[1]}:${d[2]}:${d[3]}.${d[4]} --> `,b+=`${d[5]}:${d[6]}:${d[7]}.${d[8]}\n`,++c;else return""}else return"";a[c]&&(b+=`${a[c]}\n\n`);return b},Nw=function(a){a=_.Ti(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;const b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+
|
|
3
|
+
c+60*b+3600*(Number(a[1])||0)},Pw=function(a,b,c){let d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"===b?a.textAlign=_.Vt:a.textAlign=_.au[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"===d[1]?_.Fg:_.Gg;else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b===_.xe||b===_.Zf?_.xe:b===_.Be||b===_.ie?
|
|
4
|
+
_.Be:_.ld);else if(d=/^region:(.*)$/.exec(b)){if(b=Ow(c,d[1]))a.region=b}else{a:{if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.bu[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=_.Xt,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.bu[c[2].toUpperCase()]);else{a=!1;break a}a=!0}return a}return!0},Ow=function(a,b){a=a.filter(c=>c.id===b);return a.length?a[0]:(_.C("VTT parser could not find a region with id: ",
|
|
5
|
+
b," The region will be ignored."),null)},Rw=function(a,b,c){let d,e,f;(new _.Dm).N("payl",_.ym(g=>{d=_.ij(g)})).N("iden",_.ym(g=>{e=_.ij(g)})).N("sttg",_.ym(g=>{f=_.ij(g)})).parse(a);return d?Qw(d,e,f,b,c):null},Qw=function(a,b,c,d,e){a=new _.$t(d,e,a,_.Ng);b&&(a.id=b);if(c)for(b=new _.Ui(c),c=Kw(b);c;)Pw(a,c,[])||_.C(Fw,c,Ew),Lw(b),c=Kw(b);return a},Sw=class{a(a){a=_.ij(a);a=a.replace(/\r+/g,"");a=a.replace(/^\s+|\s+$/g,"");a=a.replace(/<[a-zA-Z\\/][^>]*>/g,"");a=a.split("\n\n");let b="";if(0<a.length){b+=
|
|
6
|
+
"WEBVTT\n\n";for(const c of a)b+=Mw(c)}return _.mj(b)}},Tw=class{create(){return new Sw}probe(a,b){return(a===Hw||a===Gw)&&b===_.hg}};var Uw=class{constructor(a){this.a=a}parseInit(){}parseMedia(a,b){a=_.ij(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new _.I(_.F,2,2E3);a=b.periodStart;if(c[0].includes("X-TIMESTAMP-MAP")){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Nw(new _.Ui(d[1]));if(null==a)throw new _.I(_.F,2,2E3);e=Number(e[1]);for(d=b.segmentStart;95443.7176888889<=d;)d-=95443.7176888889,e+=
|
|
7
|
+
8589934592;a=b.periodStart+e/9E4-a}}else this.a.streaming.relativeTextTimestamp&&null!==b.segmentStart&&(a=b.segmentStart);b=[];for(var f of c)if(/^region/.test(f.toLowerCase())){e=new _.Ui(f.replace(/\n/g," "));d=new _.eu;Kw(e);Lw(e);for(var g=Kw(e);g;){a:{var h;var k=d;var l=g;if(h=/^id:(.*)$/.exec(l))k.id=h[1];else if(h=/^width:(\d{1,2}|100)%$/.exec(l))k.width=Number(h[1]);else if(h=/^lines:(\d+)$/.exec(l))k.height=Number(h[1]),k.heightUnits=2;else if(h=/^regionanchor:(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))k.regionAnchorX=
|
|
8
|
+
Number(h[1]),k.regionAnchorY=Number(h[2]);else if(h=/^viewportanchor:(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))k.viewportAnchorX=Number(h[1]),k.viewportAnchorY=Number(h[2]);else if(/^scroll:up$/.exec(l))k.scroll="up";else{k=!1;break a}k=!0}k||_.C("VTT parser encountered an invalid VTTRegion setting: ",g,Ew);Lw(e);g=Kw(e)}e=d;b.push(e)}f=[];for(var m of c)if(/^style/.test(m.toLowerCase())){e=m.replace(/^style/i,"").replace(/\n/g," ");d=/[^{}]+{[^{}]*}/g;do(g=d.exec(e))&&f.push(g[0]);while(g)}m=[];for(const n of c)if(n.includes("--\x3e")){a:{l=
|
|
9
|
+
n.split("\n");h=a;c=b;if(1===l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"===l[0]){c=null;break a}e=null;l[0].includes("--\x3e")||(e=l[0],l.splice(0,1));d=new _.Ui(l[0]);g=Nw(d);const r=_.Ti(d,/[ \t]+--\x3e[ \t]+/g);k=Nw(d);if(null==g||null==r||null==k)throw new _.I(_.F,2,2001);g+=h;k+=h;l=l.slice(1).join("\n").trim();g=new _.$t(g,k,l,_.Ng);e&&(g.id=e);Lw(d);for(k=Kw(d);k;)Pw(g,k,c)||_.C(Fw,k,Ew),Lw(d),k=Kw(d);null!=e&&(g.id=e);c=g}c&&m.push(c)}return{cues:m,styles:f}}};var Vw=class extends Uw{parseMedia(a,b){return super.parseMedia((new Sw).a(a),b)}};var Ww=class{constructor(){this.a=null;this.g=new _.S("clpp.vtt.mp4")}parseInit(a){let b=!1;(new _.Dm).N(_.Oe,_.wm).N(_.qg,_.wm).N(_.Je,_.wm).ea("mdhd",c=>{0===c.version?(c.reader.skip(4),c.reader.skip(4),this.a=_.P(c.reader),c.reader.skip(4)):(c.reader.skip(8),c.reader.skip(8),this.a=_.P(c.reader),c.reader.skip(8));c.reader.skip(4)}).N(_.Ne,_.wm).N(_.bg,_.wm).ea(_.dg,_.xm).N("wvtt",()=>{b=!0}).parse(a);if(!this.a)throw new _.I(_.F,2,2008);if(!b)throw new _.I(_.F,2,2008);}parseMedia(a,b){if(!this.a)throw this.g.error("No init segment for MP4+VTT!"),
|
|
10
|
+
new _.I(_.F,2,2008);let c=0,d=[],e;const f=[];let g=!1,h=!1,k=!1,l=null;(new _.Dm).N("moof",_.wm).N("traf",_.wm).ea("tfdt",r=>{g=!0;c=0===r.version?_.P(r.reader):_.rm(r.reader)}).ea("tfhd",r=>{var u=r.flags;r=r.reader;r.skip(4);u&1&&r.skip(8);u&2&&r.skip(4);l=u&8?_.P(r):null}).ea("trun",r=>{h=!0;{var u=r.version,v=r.flags;r=r.reader;const y=_.P(r);v&1&&r.skip(4);v&4&&r.skip(4);const A=[];for(let E=0;E<y;E++){const G={duration:null,sampleSize:null,gf:null};v&256&&(G.duration=_.P(r));v&512&&(G.sampleSize=
|
|
11
|
+
_.P(r));v&1024&&r.skip(4);v&2048&&(G.gf=0===u?_.P(r):_.qm(r));A.push(G)}d=A}}).N(_.Ie,_.ym(r=>{k=!0;e=r})).parse(a);if(!k&&!g&&!h)throw new _.I(_.F,2,2008);a=c;var m=new DataView(e.buffer,e.byteOffset,e.byteLength);m=new _.An(m,!1);for(const r of d){const u=r.duration||l,v=r.gf?c+r.gf:a;a=v+(u||0);let y=0;do{const A=_.P(m);y+=A;var n=_.P(m);n=_.vm(n);let E=null;"vttc"===n?8<A&&(E=_.tm(m,A-8)):("vtte"!==n&&this.g.error("Unknown box "+n+"! Skipping!"),m.skip(A-8));u?E&&f.push(Rw(E,b.periodStart+v/this.a,
|
|
12
|
+
b.periodStart+a/this.a)):this.g.error("WVTT sample duration unknown, and no default found!")}while(r.sampleSize&&y<r.sampleSize)}return{cues:f.filter(_.yi),styles:[]}}};_.z("clpp.vtt.VttComponent",class extends _.Kv{constructor(){super();this.j=new Tw}f(){_.Dt(_.hg,Uw);_.Dt(Iw,Uw);_.Dt(Jw,Uw);_.Dt(_.Nc,Ww);_.Dt(Hw,Vw);_.Dt(Gw,Vw);_.rk.push(this.j)}a(){_.Ft(_.hg);_.Ft(Iw);_.Ft(Jw);_.Ft(_.Nc);_.Ft(Hw);_.Ft(Gw);_.tk(this.j)}id(){return"subtitles-vtt"}});};f.call(g, window);
|
package/cl.yospace.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var
|
|
2
|
-
break a;case
|
|
3
|
-
const b=this.a;this.a.shutdown();this.a=null;a.trigger(new _.
|
|
1
|
+
import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var Aw="clpp.yospace.YospacePlugin",Dw=class extends _.Zv{constructor(){super();this.a=null;this.g=new _.S(Aw)}Vf(){return this.a}onContentWillLoad(a,b){const c=this;return _.x(function*(){var d=a.getConfiguration().yospace;if(d.enabled){if(typeof window.YospaceAdManagement!==_.Se)throw new _.I(_.F,9,7003,"Yospace SDK not found.");c.g.info("Yospace enabled.");a:{d=d.streamType||Bw;var e=b.url;c.g.info("Creating Yospace session for stream type",d);switch(d){case Bw:d=YospaceAdManagement.SessionVOD.create(e);
|
|
2
|
+
break a;case Cw:d=YospaceAdManagement.SessionLive.create(e);break a;default:d=YospaceAdManagement.SessionDVRLive.create(e)}}d=yield d;e=d.getSessionState();if(e!==YospaceAdManagement.SessionState.INITIALISED)throw c.g.error("Failed to initialize Yospace session. State:",e,"URL",b.url),new _.I(_.F,9,7003,"Yospace session failed to initialize.");a.trigger(new _.D(_.$g,{detail:d}));b.url=d.getPlaybackUrl();c.g.info("Yospace session initialized. New URL:",b.url);c.a=d}})}onPlayerWillRelease(a){if(this.a){this.g.info("Shutting down Yospace session.");
|
|
3
|
+
const b=this.a;this.a.shutdown();this.a=null;a.trigger(new _.D(_.Zg,{detail:b}))}}id(){return"yospace"}};_.z(Aw,Dw);Dw.prototype.getSession=Dw.prototype.Vf;Dw.Id="yospace";_.Nr(new class{create(){return new Dw}});var Bw=_.Ub,Cw="LIVE";_.z("clpp.yospace.StreamType",{VOD:Bw,LIVE:Cw,DVR:"DVR"});};f.call(g, window);
|
package/cl.youbora.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var
|
|
2
|
-
"ClearKey":a.startsWith(_.
|
|
3
|
-
!1)},
|
|
4
|
-
`version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.
|
|
5
|
-
b.code,b)):(d.fireError(b.code,b.message,b.metadata),c.debug(`Reporting "${a}" to Youbora`,b.code,b));return b};var
|
|
6
|
-
d,e)}getIsLive(){return this.m.isLive()}getResource(){const c=this.m.getLoadedSource();return c&&c.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.m.getPlaybackRate()}getFramesPerSecond(){var c=this.m.getTrackManager();return c&&(c=c.
|
|
7
|
-
youbora.Util.logAllEvents(this.m),this.a.on(this.m,_
|
|
8
|
-
this.f();break;case _.
|
|
9
|
-
this.plugin.setOptions({"content.drm":c});this.fireJoin()}F(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=
|
|
10
|
-
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.
|
|
11
|
-
this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.
|
|
12
|
-
this.f&&(this.f.on(this.m,_.
|
|
13
|
-
this.f.on(this.m,_.
|
|
14
|
-
(this.h(
|
|
15
|
-
...d){this.g.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var
|
|
16
|
-
this.player.getLoadedSource();return b&&b.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.player.getPlaybackRate()}getFramesPerSecond(){var b=this.player.getTrackManager();return b&&(b=b.
|
|
17
|
-
_.
|
|
18
|
-
break;case _.
|
|
19
|
-
b.severity===_.F&&(this.f=!0)}H(){this.player.isEnded()||(this.l(_.
|
|
20
|
-
return b}getTitle(){let b=null;this.a&&(b=this.a.getTitle());return b}getProvider(){let b=null;this.a&&(b=this.a.getAdvertiserName());return b}getCreativeId(){let b=null;this.a&&(b=this.a.getCreativeId());return b}dispose(){this.unregisterListeners();this.j=this.h=this.a=null}getPosition(){const b=this.getNpawReference().Constants.AdPosition;let c=null;if(this.a)switch(this.a.
|
|
21
|
-
-1!==this.a.getSkipTimeOffset()}getAudioEnabled(){const b=this.player.getAdsManager();return b&&0<b.getVolume()}getExpectedBreaks(){return this.h&&this.h.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.
|
|
22
|
-
b=this.getNpawUtils().calculateAdViewability(b);
|
|
23
|
-
_.
|
|
24
|
-
this.a);this.fireStart();this.fireJoin()}I(){this.f("ad ended");this.fireStop({adPlayhead:this.l})}K(){this.f("ad pause");this.A();this.firePause()}L(){this.f("ad resume");this.A();this.fireResume()}G(){this.o=!0;this.f(
|
|
25
|
-
this.fireSkip()}C(b){this.a=b.ad;this.f(
|
|
26
|
-
var c=a.youbora;void 0===c[
|
|
27
|
-
|
|
28
|
-
a.youbora;void 0===c[
|
|
1
|
+
import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var $v="Unhandled state",aw="accountCode key is missing in Youbora config",bw="ad break start",cw="ad buffering ended",dw="ad buffering started",ew="ad click through url: ",fw="ad timeline changed",gw="clpp.npaw.NpawPlugin",hw="clpp.npaw.YouboraPlugin",iw="content.isLive",jw="content.title",kw="is container visible",lw="youbora",mw=function(a){return a.startsWith(_.Jd)?"Widevine":a.startsWith(_.Ed)?"FairPlay":a.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":a.startsWith(_.af)?
|
|
2
|
+
"ClearKey":a.startsWith(_.Dd)?"Primetime":a},nw=function(a){a.a&&(a.g.info("Removing NPAW Plugins",a.a),a.a.removeAdsAdapter(),a.a.removeAdapter())},ow=function(a,b){if(b.namespace()===_.ud)return a.g.info("NPAW does not report when casting."),!1;const c=b.getConfiguration().youbora;return _.rh(c)?c.accountCode?_.B(window.NpawPlugin)||_.B(window.NpawPluginAdapters)?(a.g.warn("NPAW SDK not found."),b.onError(new _.I(1,9,9100)),!1):!0:(a.g.warn(aw),b.onError(new _.I(1,9,9101)),!1):(a.g.warn("NPAW plugin is loaded but not configured. Will do nothing."),
|
|
3
|
+
!1)},pw=function(a,b){if(b.namespace()===_.ud)return a.g.info("Youbora does not report when casting."),!1;const c=b.getConfiguration().youbora;if(!_.rh(c))return a.g.debug("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.g.warn(aw),b.onError(new _.I(1,9,9101)),!1;if(_.B(window.youbora))return a.g.warn("Youbora SDK not found."),b.onError(new _.I(1,9,9100)),!1;"6.8.59"!==youbora.VERSION&&(a.g.warn("Youbora SDK version is not supported. The supported version is 6.8.59, found "+
|
|
4
|
+
`version ${youbora.VERSION}. Some or all features of YouboraPlugin `+"may not work correctly."),b.onError(new _.I(1,9,9102)));return!0},qw=a=>(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:b=>({code:`${b.code}`,message:b.message,severity:b.severity}),rw=(a,b,c,d)=>{b=qw(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===a.code?"ad error":_.q;b.severity===_.F?(d.fireFatalError(b.code,b.message,b.metadata),c.debug(`Reporting "fatal ${a}" to Youbora`,
|
|
5
|
+
b.code,b)):(d.fireError(b.code,b.message,b.metadata),c.debug(`Reporting "${a}" to Youbora`,b.code,b));return b};var sw=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.a=new _.St;this.g=new _.S("clpp.npaw.YouboraAdapter");this.h=this.o=!1;this.registerListeners()}getPlayhead(){return this.getIsLive()?-1:this.m.getPosition()}getDuration(){return this.m.getDuration()}getRendition(){let c,d,e;var f=this.m.getTrackManager();f&&(f=f.oa())&&(c=f.width,d=f.height,e=f.bandwidth);c&&d&&e||(f=this.j(),c=c||f.width,d=d||f.height,e=e||f.streamBandwidth);return youbora.Util.buildRenditionString(c,
|
|
6
|
+
d,e)}getIsLive(){return this.m.isLive()}getResource(){const c=this.m.getLoadedSource();return c&&c.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.m.getPlaybackRate()}getFramesPerSecond(){var c=this.m.getTrackManager();return c&&(c=c.Ia())?c.frameRate:null}getPlayerName(){return _.qa}getVersion(){return"6.25.0-castlabsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&this.a&&(this.g.debug("registering listeners"),
|
|
7
|
+
youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.$f,this.I.bind(this)),this.a.on(this.m,_.q,this.F.bind(this)),this.a.on(this.m,_.Cg,this.H.bind(this)),this.a.on(this.m,_.Bg,this.G.bind(this)),this.a.on(this.m,_.Fc,this.B.bind(this)),this.a.on(this.m,_.fd,this.C.bind(this)))}unregisterListeners(){this.g.debug(_.Pb);_.Th(this.a)}dispose(){super.dispose()}j(){return this.m.getStats()||_.Xo()}w(){return!!this.m.getConfiguration().autoplay}I(c){c=c.detail;this.l("state change",c);if(c)switch(c.currentState){case _.ip:this.w()&&
|
|
8
|
+
this.f();break;case _.kp:this.f();this.A();this.fireResume();this.fireBufferEnd();break;case _.jp:this.w()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.hp:this.fireBufferEnd();this.fireStop();break;case _.$o:this.fireBufferEnd();this.o&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.dp:this.fireBufferBegin();break;default:this.g.debug($v,c)}}f(){this.plugin.isInitiated||(this.h=!1,this.fireInit())}A(){var c=this.m.getDrmInfo();c&&(c=mw(c.keySystem))&&
|
|
9
|
+
this.plugin.setOptions({"content.drm":c});this.fireJoin()}F(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=rw(c,this.m,this.g,this))&&c.severity===_.F&&(this.h=!0)}H(){this.m.isEnded()||(this.l(_.Sf),this.f(),this.fireSeekBegin())}G(){this.l(_.Rf);this.fireSeekEnd()}B(c){this.g.debug("adsTimeline",c);this.o=(c=c.adsTimeline)&&c.Kb()}C(c){this.g.debug("Casting",c);this.fireCasted()}l(c,...d){this.g.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var tw=a=>{class b extends youbora.Adapter{constructor(c){super(c);this.m=c;this.j=this.a=null;this.f=new _.St;this.g=new _.S("clpp.npaw.YouboraAdsAdapter");this.registerListeners();this.l=!1}getDuration(){return this.a&&this.a.getDuration()}getRendition(){let c=null;this.a&&(c=youbora.Util.buildRenditionString(this.a.ib(),this.a.hb(),this.a.Ta()));return c}getBitrate(){return this.a&&this.a.Ta()}getPlayhead(){const c=this.m.getAdsManager();return c&&c.getPosition()}getResource(){return this.a&&this.a.getMediaUrl()}getTitle(){return this.a&&
|
|
10
|
+
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.Ua()){case 0:d=c.Preroll;break;case 2:d=c.Postroll;break;case 1:d=c.Midroll}this.g.debug("Ad position",d);return d}getIsSkippable(){return this.a&&-1!==this.a.getSkipTimeOffset()}getAudioEnabled(){const c=this.m.getAdsManager();return c&&0<c.getVolume()}getExpectedBreaks(){return this.j&&
|
|
11
|
+
this.j.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.jb()}getGivenAds(){return this.getExpectedAds()}getBreaksTime(){return this.j&&this.j.getCuePoints().map(c=>-1===c?this.m.getDuration():c)}getIsFullscreen(){return this.m.getSurface().isFullscreen()}getIsVisible(){var c=this.m.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);this.g.debug(kw,c);return c}getPlayerName(){return _.qa}getVersion(){return"6.25.0-castlabsadsadapter-js"}getPlayerVersion(){return _.ea}registerListeners(){this.m&&
|
|
12
|
+
this.f&&(this.f.on(this.m,_.Fc,this.M.bind(this)),this.f.on(this.m,_.zc,this.L.bind(this)),this.f.on(this.m,_.vc,this.I.bind(this)),this.f.on(this.m,_.xc,this.J.bind(this)),this.f.on(this.m,_.nc,this.G.bind(this)),this.f.on(this.m,_.oc,this.o.bind(this,1)),this.f.on(this.m,_.uc,this.o.bind(this,2)),this.f.on(this.m,_.Dc,this.o.bind(this,3)),this.f.on(this.m,_.mc,this.F.bind(this)),this.f.on(this.m,_.yc,this.K.bind(this)),this.f.on(this.m,_.q,this.H.bind(this)),this.f.on(this.m,_.jc,this.A.bind(this)),
|
|
13
|
+
this.f.on(this.m,_.kc,this.B.bind(this)),this.f.on(this.m,_.lc,this.C.bind(this)),this.f.on(this.m,_.wc,this.w.bind(this)))}unregisterListeners(){_.Th(this.f)}dispose(){super.dispose()}M(c){this.g.debug(fw,c);this.j=c.adsTimeline}L(c){this.a=c.ad;this.h("ad start",this.a);this.fireStart();this.fireJoin()}G(){this.h("ad ended");this.fireStop()}I(){this.h("ad pause");this.w();this.firePause()}J(){this.h("ad resume");this.w();this.fireResume()}C(){this.l=!0;this.h(dw);this.fireBufferBegin()}w(){this.l&&
|
|
14
|
+
(this.h(cw),this.l=!1,this.fireBufferEnd())}o(c){this.h("ad quartile",c);this.fireQuartile(c)}F(){this.h("ad clicked");const c=this.a&&this.a.ub();this.g.debug(ew,c);this.fireClick(c)}K(){this.h("ad skipped");this.fireSkip()}A(c){this.a=c.ad;this.h(bw,this.a);this.fireBreakStart()}B(){this.h("ad break stop");this.fireBreakStop();if(this.getPosition()===youbora.Constants.AdPosition.Postroll){const c=this.plugin.getAdapter();c&&c.fireStop()}}H(c){(c=c.detail)&&10003===c.code&&rw(c,this.m,this.g,this)}h(c,
|
|
15
|
+
...d){this.g.debug(`Reporting "${c}" event to Youbora`,...d)}}return new b(a)};var vw=()=>{class a extends NpawPluginAdapters.video.Shaka{constructor(){super();this.f=this.h=!1;this.a=null}getPlayhead(){return this.getIsLive()?-1:this.player.getPosition()}getDuration(){return this.player.getDuration()}getRendition(){let b=null,c=null,d=null;var e=this.player.getTrackManager();e&&(e=e.oa())&&(b=e.width,c=e.height,d=e.bandwidth);b&&c&&d||(e=this.j(),b=b||e.width,c=c||e.height,d=d||e.streamBandwidth);return this.getNpawUtils().buildRenditionString(b,c,d)}getIsLive(){return this.player.isLive()}getResource(){const b=
|
|
16
|
+
this.player.getLoadedSource();return b&&b.url}getBitrate(){return this.j().streamBandwidth}getThroughput(){return this.j().estimatedBandwidth}getPlayrate(){return this.player.getPlaybackRate()}getFramesPerSecond(){var b=this.player.getTrackManager();return b&&(b=b.Ia())?b.frameRate:null}getPlayerName(){return _.qa}getVersion(){return"castlabs-adapter-6.25.0-js"}getPlayerVersion(){return _.ea}registerListeners(){const b=this.w();this.player&&b&&(b.on(this.player,_.$f,this.I.bind(this)),b.on(this.player,
|
|
17
|
+
_.q,this.F.bind(this)),b.on(this.player,_.Sf,this.H.bind(this)),b.on(this.player,_.Rf,this.G.bind(this)),b.on(this.player,_.Fc,this.B.bind(this)),b.on(this.player,_.fd,this.C.bind(this)))}unregisterListeners(){uw.debug(_.Pb);_.Th(this.w())}dispose(){this.unregisterListeners();this.f=this.h=!1;this.a=null}j(){return this.player.getStats()||_.Xo()}o(){return!!this.player.getConfiguration().autoplay}I(b){b=b.detail;this.l("state change",b);if(b)switch(b.currentState){case _.ip:this.o()&&this.fireStart();
|
|
18
|
+
break;case _.kp:this.fireStart();this.A();this.fireResume();this.fireBufferEnd();break;case _.jp:this.o()&&this.fireStart();this.A();this.fireBufferEnd();this.firePause();break;case _.hp:this.fireBufferEnd();this.fireStop();break;case _.$o:this.fireBufferEnd();this.h&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.dp:this.fireBufferBegin();break;default:uw.debug($v,b)}}A(){this.fireJoin()}F(b){(b=b.detail)&&!this.f&&this.player&&10003!==b.code&&(b=rw(b,this.player,uw,this))&&
|
|
19
|
+
b.severity===_.F&&(this.f=!0)}H(){this.player.isEnded()||(this.l(_.Sf),this.fireSeekBegin())}w(){this.a||(this.a=new _.St);return this.a}G(){this.l(_.Rf);this.fireSeekEnd()}B(b){uw.debug("adsTimeline",b);this.h=(b=b.adsTimeline)&&b.Kb()}C(b){uw.debug("Casting",b);this.fireCasted()}l(b,...c){uw.debug(`Reporting "${b}" event to NPAW`,...c)}}return a},uw=new _.S("clpp.npaw.NpawAdapter");var xw=()=>{class a extends NpawPluginAdapters.ads.Ima{constructor(){super();this.j=this.h=this.l=this.a=null;this.o=!1}getDuration(){return this.a?this.a.getDuration():null}getRendition(){let b=null;this.a&&(b=this.getNpawUtils().buildRenditionString(this.a.ib(),this.a.hb(),this.a.Ta()));return b}getBitrate(){let b=null;this.a&&(b=this.a.Ta());return b}getPlayhead(){let b=null;const c=this.player.getAdsManager();c&&(b=c.getPosition());return b}getResource(){let b=null;this.a&&(b=this.a.getMediaUrl());
|
|
20
|
+
return b}getTitle(){let b=null;this.a&&(b=this.a.getTitle());return b}getProvider(){let b=null;this.a&&(b=this.a.getAdvertiserName());return b}getCreativeId(){let b=null;this.a&&(b=this.a.getCreativeId());return b}dispose(){this.unregisterListeners();this.j=this.h=this.a=null}getPosition(){const b=this.getNpawReference().Constants.AdPosition;let c=null;if(this.a)switch(this.a.Ua()){case 0:c=b.Preroll;break;case 2:c=b.Postroll;break;case 1:c=b.Midroll}ww.debug("Ad position",c);return c}getIsSkippable(){return this.a&&
|
|
21
|
+
-1!==this.a.getSkipTimeOffset()}getAudioEnabled(){const b=this.player.getAdsManager();return b&&0<b.getVolume()}getExpectedBreaks(){return this.h&&this.h.getCuePoints().length}getGivenBreaks(){return this.getExpectedBreaks()}getExpectedAds(){return this.a&&this.a.jb()}getGivenAds(){return this.getExpectedAds()}getBreaksTime(){return this.h&&this.h.getCuePoints().map(b=>-1===b?this.player.getDuration():b)}getIsFullscreen(){return this.player.getSurface().isFullscreen()}getIsVisible(){var b=this.player.getSurface().getContainer();
|
|
22
|
+
b=this.getNpawUtils().calculateAdViewability(b);ww.debug(kw,b);return b}getPlayerName(){return _.qa}getVersion(){return"castlabs-ads-adapter-6.25.0-js"}getPlayerVersion(){return _.ea}B(){this.j||(this.j=new _.St);return this.j}registerListeners(){const b=this.B();this.player&&b&&(b.on(this.player,_.Fc,this.R.bind(this)),b.on(this.player,_.zc,this.O.bind(this)),b.on(this.player,_.vc,this.K.bind(this)),b.on(this.player,_.xc,this.L.bind(this)),b.on(this.player,_.nc,this.I.bind(this)),b.on(this.player,
|
|
23
|
+
_.oc,this.w.bind(this,1)),b.on(this.player,_.uc,this.w.bind(this,2)),b.on(this.player,_.Dc,this.w.bind(this,3)),b.on(this.player,_.mc,this.H.bind(this)),b.on(this.player,_.yc,this.M.bind(this)),b.on(this.player,_.q,this.J.bind(this)),b.on(this.player,_.jc,this.C.bind(this)),b.on(this.player,_.kc,this.F.bind(this)),b.on(this.player,_.lc,this.G.bind(this)),b.on(this.player,_.wc,this.S.bind(this)))}unregisterListeners(){_.Th(this.B())}R(b){ww.debug(fw,b);this.h=b.adsTimeline}O(b){this.a=b.ad;this.f("ad start",
|
|
24
|
+
this.a);this.fireStart();this.fireJoin()}I(){this.f("ad ended");this.fireStop({adPlayhead:this.l})}K(){this.f("ad pause");this.A();this.firePause()}L(){this.f("ad resume");this.A();this.fireResume()}G(){this.o=!0;this.f(dw);this.fireBufferBegin()}S(){this.l=this.getPlayhead();this.A()}A(){this.o&&(this.f(cw),this.o=!1,this.fireBufferEnd())}w(b){this.f("ad quartile",b);this.fireQuartile(b)}H(){this.f("ad clicked");const b=this.a&&this.a.ub();ww.debug(ew,b);this.fireClick(b)}M(){this.f("ad skipped");
|
|
25
|
+
this.fireSkip()}C(b){this.a=b.ad;this.f(bw,this.a);this.fireBreakStart()}F(){this.f("ad break stop");this.fireBreakStop({adPlayhead:this.l});this.getPosition()===this.getNpawReference().Constants.AdPosition.Postroll&&this.fireStop({adPlayhead:this.l})}J(b){(b=b.detail)&&10003===b.code&&rw(b,this.player,ww,this)}f(b,...c){ww.debug(`Reporting "${b}" event to NPAW`,...c)}}return a},ww=new _.S("clpp.npaw.NpawAdsAdapter");var yw=class extends _.Zv{constructor(){super();this.a=null;this.g=new _.S(gw);this.m=null}bf(a){nw(this);if(this.a=a)this.a.registerAdapterFromClass(this.m,vw()),this.a.registerAdsAdapterFromClass(this.m,xw())}uh(){return this.a}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.m=a;ow(this,a)&&(a=a.getConfiguration().youbora,this.bf(new NpawPlugin(a.accountCode)))}onContentWillLoad(a,b){if(ow(this,a)){a=a.getConfiguration();
|
|
26
|
+
var c=a.youbora;void 0===c[iw]&&(c[iw]=b.isLive);void 0===c[jw]&&(c[jw]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.bf(new NpawPlugin(c.accountCode));this.a.setAnalyticsOptions(c)}}onContentLoaded(a){const b={};(a=a.getDrmInfo())&&(a=mw(a.keySystem))&&(b["content.drm"]=a);this.g.info(_.Ue,b);this.a.setAnalyticsOptions(b)}onPlayerWillRelease(){}onPlayerWillDestroy(){nw(this);this.a.destroy()}id(){return lw}};_.z(gw,yw);yw.prototype.getAdsAdapter=yw.prototype.getAdsAdapter;
|
|
27
|
+
yw.prototype.getAdapter=yw.prototype.getAdapter;yw.prototype.getNpawPlugin=yw.prototype.uh;yw.prototype.setNpawPlugin=yw.prototype.bf;yw.Id=lw;new _.S(gw);var zw=class extends _.Zv{constructor(){super();this.a=null;this.g=new _.S(hw);this.m=null}cf(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(sw(this.m)),this.a.setAdsAdapter(tw(this.m))}getAdapter(){return this.a&&this.a.getAdapter()}getAdsAdapter(){return this.a&&this.a.getAdsAdapter()}onPlayerCreated(a){this.m=a;pw(this,a)&&(a=a.getConfiguration().youbora,this.cf(new youbora.Plugin(a)))}onContentWillLoad(a,b){if(pw(this,a)){a=a.getConfiguration();var c=
|
|
28
|
+
a.youbora;void 0===c[iw]&&(c[iw]=b.isLive);void 0===c[jw]&&(c[jw]=b.name);void 0===c.viewerId&&(c.viewerId=a.viewerId);this.a||this.cf(new youbora.Plugin(c));this.a.setOptions(c)}}onPlayerWillRelease(){}onPlayerWillDestroy(){}id(){return lw}};_.z(hw,zw);zw.prototype.getAdsAdapter=zw.prototype.getAdsAdapter;zw.prototype.getAdapter=zw.prototype.getAdapter;zw.prototype.setYouboraPlugin=zw.prototype.cf;zw.Id=lw;_.Nr(new class{create(a){return a.youbora&&a.youbora.v7?new yw:new zw}});};f.call(g, window);
|
package/package.json
CHANGED
package/typings.d.ts
CHANGED
|
@@ -2152,6 +2152,14 @@ export namespace clpp {
|
|
|
2152
2152
|
* Tizen that value defaults value is `0.5`
|
|
2153
2153
|
*/
|
|
2154
2154
|
gapDetectionThreshold: number;
|
|
2155
|
+
/**
|
|
2156
|
+
* Based on media timestamps there may be small gaps of missing frames
|
|
2157
|
+
* typically between two media segments. MSE can tolerate gaps up to a certain
|
|
2158
|
+
* size, this may be platform-specific or specific to the stream.
|
|
2159
|
+
* Gap tolerance expresses in seconds the size of these gaps that are expected
|
|
2160
|
+
* to be tolerated by the MSE.
|
|
2161
|
+
*/
|
|
2162
|
+
gapTolerance?: number;
|
|
2155
2163
|
/**
|
|
2156
2164
|
* Defaults to false.
|
|
2157
2165
|
*
|
|
@@ -4065,6 +4073,31 @@ export namespace clpp {
|
|
|
4065
4073
|
use(component: Function): void;
|
|
4066
4074
|
}
|
|
4067
4075
|
|
|
4076
|
+
export class PlayerFleet {
|
|
4077
|
+
/**
|
|
4078
|
+
* Add a main player to the fleet.
|
|
4079
|
+
*/
|
|
4080
|
+
addMainPlayer(player: clpp.Player): void;
|
|
4081
|
+
/**
|
|
4082
|
+
* Add a secondary player to the fleet.
|
|
4083
|
+
*/
|
|
4084
|
+
addSecondaryPlayer(player: clpp.Player): void;
|
|
4085
|
+
/**
|
|
4086
|
+
* Release all players and remove all listeners.
|
|
4087
|
+
*/
|
|
4088
|
+
clear(): void;
|
|
4089
|
+
/**
|
|
4090
|
+
* Load a config by all players in the fleet.
|
|
4091
|
+
*/
|
|
4092
|
+
load(config: clpp.PlayerConfiguration): void;
|
|
4093
|
+
/**
|
|
4094
|
+
* Set looping behavior.
|
|
4095
|
+
*
|
|
4096
|
+
* @param loop if true the video will play in a loop
|
|
4097
|
+
*/
|
|
4098
|
+
setLoop(loop: boolean): void;
|
|
4099
|
+
}
|
|
4100
|
+
|
|
4068
4101
|
export class Playlist {
|
|
4069
4102
|
/**
|
|
4070
4103
|
* @param player The player instance.
|
|
@@ -4965,7 +4998,8 @@ export namespace clpp {
|
|
|
4965
4998
|
*/
|
|
4966
4999
|
CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM = 4040,
|
|
4967
5000
|
/**
|
|
4968
|
-
* We do not support playing encrypted transport streams
|
|
5001
|
+
* We do not support playing Fairplay-encrypted transport streams
|
|
5002
|
+
* (MPEG-TS) with MSE.
|
|
4969
5003
|
*/
|
|
4970
5004
|
HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED = 4041,
|
|
4971
5005
|
/**
|
|
@@ -5473,6 +5507,10 @@ export namespace clpp {
|
|
|
5473
5507
|
|
|
5474
5508
|
namespace ads {
|
|
5475
5509
|
export interface IAd {
|
|
5510
|
+
/**
|
|
5511
|
+
* Whether the user can seek during the ad or change playback rate.
|
|
5512
|
+
*/
|
|
5513
|
+
canSeek(): boolean;
|
|
5476
5514
|
/**
|
|
5477
5515
|
* The ad manager name.
|
|
5478
5516
|
*/
|
|
@@ -7708,16 +7746,18 @@ export namespace clpp {
|
|
|
7708
7746
|
*
|
|
7709
7747
|
* @example
|
|
7710
7748
|
*
|
|
7711
|
-
*
|
|
7712
|
-
*
|
|
7713
|
-
* });
|
|
7749
|
+
* clpp.install(clpp.dash.DashComponent);
|
|
7750
|
+
*
|
|
7714
7751
|
* const player = new clpp.Player('video', {
|
|
7715
7752
|
* license: '...',
|
|
7716
7753
|
* youbora: {
|
|
7717
7754
|
* accountCode: 'account_code',
|
|
7718
7755
|
* },
|
|
7719
7756
|
* });
|
|
7720
|
-
*
|
|
7757
|
+
*
|
|
7758
|
+
* const plugin = new youbora.Plugin({
|
|
7759
|
+
* // your custom options
|
|
7760
|
+
* });
|
|
7721
7761
|
* player.getPlugin(clpp.npaw.YouboraPlugin.Id).setYouboraPlugin(plugin);
|
|
7722
7762
|
*
|
|
7723
7763
|
* // Now you can start playback.
|
|
@@ -7762,8 +7802,9 @@ export namespace clpp {
|
|
|
7762
7802
|
}
|
|
7763
7803
|
|
|
7764
7804
|
/**
|
|
7765
|
-
* Offline DRM session information.
|
|
7766
|
-
* load a persistent media key
|
|
7805
|
+
* Offline DRM session information.
|
|
7806
|
+
* This information is needed in order to load a persistent media key
|
|
7807
|
+
* session for re-use.
|
|
7767
7808
|
*/
|
|
7768
7809
|
export type SessionInfo = {
|
|
7769
7810
|
/**
|
|
@@ -7810,6 +7851,7 @@ export namespace clpp {
|
|
|
7810
7851
|
* v7.0.0, use {@link clpp.install} instead to install the desired components.
|
|
7811
7852
|
*/
|
|
7812
7853
|
function fetchLicense(source: clpp.Source|string, drmConfig: clpp.DrmConfiguration, ...opt_components: Function[]): Promise<void>;
|
|
7854
|
+
function getSessionStorage(): clpp.persistent.ISessionStorage;
|
|
7813
7855
|
/**
|
|
7814
7856
|
* Remove an offline Media Key Session.
|
|
7815
7857
|
*
|
|
@@ -7818,10 +7860,11 @@ export namespace clpp {
|
|
|
7818
7860
|
*/
|
|
7819
7861
|
function removeLicense(offlineId: string): Promise<void>;
|
|
7820
7862
|
/**
|
|
7821
|
-
* Use this method to provide a session storage implementation.
|
|
7822
|
-
* implementation will be used by the player to save
|
|
7823
|
-
* If no storage implementation is provided,
|
|
7824
|
-
* implementation which is based on
|
|
7863
|
+
* Use this method to provide a session storage implementation.
|
|
7864
|
+
* The storage implementation will be used by the player to save
|
|
7865
|
+
* and load offline session. If no storage implementation is provided,
|
|
7866
|
+
* the default, built-in storage implementation which is based on
|
|
7867
|
+
* the localStorage browser API.
|
|
7825
7868
|
*
|
|
7826
7869
|
* @param storageImpl The storage engine.
|
|
7827
7870
|
*
|
|
@@ -8188,20 +8231,6 @@ export namespace clpp {
|
|
|
8188
8231
|
}
|
|
8189
8232
|
}
|
|
8190
8233
|
|
|
8191
|
-
namespace polyfill {
|
|
8192
|
-
/**
|
|
8193
|
-
* Install all polyfills.
|
|
8194
|
-
*/
|
|
8195
|
-
function installAll(): void;
|
|
8196
|
-
/**
|
|
8197
|
-
* Registers a new polyfill to be installed.
|
|
8198
|
-
*
|
|
8199
|
-
* @param polyfill
|
|
8200
|
-
* @param priority An optional number priority. Higher priorities
|
|
8201
|
-
* will be executed before lower priority ones. Default is 0.
|
|
8202
|
-
*/
|
|
8203
|
-
function register(polyfill: Function, priority?: number): void;}
|
|
8204
|
-
|
|
8205
8234
|
namespace smooth {
|
|
8206
8235
|
export class SmoothComponent {
|
|
8207
8236
|
|