@castlabs/prestoplay 6.18.0 → 6.19.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.
- package/CHANGELOG.md +32 -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 +115 -114
- package/cjs/cl.conviva.js +33 -33
- package/cjs/cl.core.js +581 -577
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +77 -75
- package/cjs/cl.externs.js +175 -293
- package/cjs/cl.freewheel.js +23 -24
- package/cjs/cl.hls.js +70 -71
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +28 -29
- package/cjs/cl.ima.js +24 -24
- package/cjs/cl.mse.js +313 -314
- package/cjs/cl.muxdata.js +15 -15
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +14 -14
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.sessions.js +16 -15
- package/cjs/cl.simid.js +15 -15
- package/cjs/cl.smooth.js +71 -72
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +71 -71
- package/cjs/cl.ttml.js +27 -27
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +12 -13
- package/cjs/cl.vr.js +19 -19
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.youbora.js +18 -18
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +90 -89
- package/cl.conviva.js +27 -27
- package/cl.core.js +475 -474
- package/cl.crypto.js +9 -9
- package/cl.dash.js +72 -71
- package/cl.externs.js +172 -294
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +74 -72
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +25 -26
- package/cl.ima.js +17 -17
- package/cl.mse.js +277 -274
- package/cl.muxdata.js +13 -13
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +11 -11
- package/cl.playlist.js +5 -5
- package/cl.sessions.js +10 -10
- package/cl.simid.js +13 -13
- package/cl.smooth.js +59 -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 +9 -8
- package/cl.vr.js +14 -14
- package/cl.vtt.js +12 -12
- package/cl.youbora.js +15 -15
- package/clpp.styles.css +14 -0
- package/package.json +1 -1
- package/typings.d.ts +379 -384
package/cjs/cl.smooth.js
CHANGED
|
@@ -1,76 +1,75 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
b,a.h),a.a+=2}catch(c){_.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
a
|
|
8
|
-
"
|
|
9
|
-
function(a,b){Z.call(this,"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
0
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
c.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
0
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
_.x(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
_.
|
|
71
|
-
_.
|
|
72
|
-
|
|
73
|
-
!0,e.data=h,3E3===h.code&&(e.code=4039)}if(d||!f)return Promise.reject(e);a.data=f;return Promise.resolve(a)};var fR={video:_.Mg,audio:_.hd,text:_.$c},UQ=_.oc,ZQ="LIVE",gR={En:_.rd,Mn:_.pg};_.x(iR,_.Ts);iR.prototype.f=function(){_.St.ism=VQ;_.Qt[_.ad]=VQ};iR.prototype.a=function(){_.oE("ism");_.pE(_.ad)};iR.prototype.id=function(){return _.gg};_.J("clpp.smooth.SmoothComponent",iR);};
|
|
2
|
+
var f=function(window){var DP="Full MP4 box must have flags defined",EP="clpp.smooth.SmoothMP4Processor",FP="codecPrivateData",GP=function(a,b){var c=Math.floor(b/Math.pow(2,32)),d=b-c*Math.pow(2,32);_.V(a,c);_.V(a,d)},HP=function(a,b){try{a.f.setUint8(a.a,b),a.a+=1}catch(c){_.Hm()}},IP=function(a,b){HP(a,b>>16&255);HP(a,b>>8&255);HP(a,b&255)},JP=function(a,b){try{a.f.setUint16(a.a,b,a.h),a.a+=2}catch(c){_.Hm()}},KP=function(a,b){try{a.f.setInt32(a.a,b,a.h),a.a+=4}catch(c){_.Hm()}},LP=function(a,b){try{a.f.setInt16(a.a,
|
|
3
|
+
b,a.h),a.a+=2}catch(c){_.Hm()}},MP=function(a,b){if(void 0!==b){for(var c=new Uint8Array(b),d=Math.min(a.length,b),e=0;e<d;++e)c[e]=a.charCodeAt(e);for(;e<b;e++)c[e]=0;return c}c=new Uint8Array(a.length);for(d=0;d<a.length;++d)c[d]=a.charCodeAt(d);return c},NP=function(a,b,c){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[b],keyIds:c,periodId:null}},OP=function(a,b,c){a=_.Vn(a);
|
|
4
|
+
c&&a.version!==c&&(a=_.EC(a,c));return{initData:_.CC(a),initDataType:_.td,keyId:b,periodId:null}},PP=function(a){this.type=a;this.size=this.start=0;this.parent=null;this.A=!1;this.entries=[];this.f=[]},Z=function(a,b,c){PP.call(this,a);this.version=b;this.flags=c},QP=function(a,b,c){PP.call(this,a);this.h=b;this.offset=c},RP=function(a,b,c,d,e){Z.call(this,a,b,c);this.h=d;this.offset=e},SP=function(a,b,c){PP.call(this,"ftyp");this.j=a;this.Zh=b;this.h=c},TP=function(){PP.call(this,_.Re)},UP=function(){PP.call(this,
|
|
5
|
+
_.qg)},VP=function(a,b,c){Z.call(this,"mvhd",1,0);this.timescale=a;this.duration=b;this.volume=256;this.j=c+1;this.h=[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0]},WP=function(){PP.call(this,"mvex")},XP=function(a){Z.call(this,"trex",0,0);this.h=a},YP=function(a,b,c,d,e){Z.call(this,"tkhd",1,7);this.j=a;this.duration=b;this.timescale=c;this.width=d;this.height=e;this.volume=1;this.h=[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0]},ZP=function(a,
|
|
6
|
+
b){Z.call(this,"mdhd",1,0);this.timescale=a;this.duration=b;this.language=21956},$P=function(a){Z.call(this,"hdlr",0,0);this.h=a},aQ=function(){Z.call(this,"vmhd",0,1);this.h=new Uint8Array([0,0,0,0,0,0])},bQ=function(a){PP.call(this,a);this.A=!0},cQ=function(a){bQ.call(this,a);this.height=this.width=0;this.depth=24},dQ=function(a,b,c,d){bQ.call(this,a);this.channelCount=b;this.sampleSize=c;this.sampleRate=d},eQ=function(a,b){cQ.call(this,"avc1");this.width=a;this.height=b},fQ=function(a,b){eQ.call(this,
|
|
7
|
+
a,b);this.type="encv"},gQ=function(a,b,c){dQ.call(this,"mp4a",a,b,c)},hQ=function(a,b,c){gQ.call(this,a,b,c);this.type="enca"},iQ=function(a,b){PP.call(this,"avcC");this.Xa=a;this.ec=b;this.version=1;this.h=this.Xa[0][1];this.j=this.Xa[0][2];this.level=this.Xa[0][3]},jQ=function(a){Z.call(this,"esds",0,0);this.bc=a},kQ=function(a){a=void 0===a?"":a;Z.call(this,"url ",0,1);this.location=a},lQ=function(){Z.call(this,"dref",0,0)},mQ=function(){PP.call(this,_.fg)},nQ=function(){Z.call(this,_.hg,0,0)},
|
|
8
|
+
oQ=function(){Z.call(this,"stts",0,0)},pQ=function(){Z.call(this,"stsc",0,0)},qQ=function(){Z.call(this,"stco",0,0)},rQ=function(){Z.call(this,"stsz",0,0)},sQ=function(){Z.call(this,"smhd",0,0)},tQ=function(){PP.call(this,"dinf")},uQ=function(){PP.call(this,_.Qe)},vQ=function(){PP.call(this,_.Me)},wQ=function(a,b){Z.call(this,"tfdt",a,0);this.baseMediaDecodeTime=b},xQ=function(){Z.call(this,"mfhd",0,0);this.h=0},yQ=function(a,b){Z.call(this,"trun",a,b);this.o=this.l=this.h=0;this.w=[];this.sampleSize=
|
|
9
|
+
[];this.B=[];this.j=[]},zQ=function(a,b){Z.call(this,"tfhd",a,b);this.h=255;this.o=this.w=this.l=this.B=this.j=0},AQ=function(){PP.call(this,"traf")},BQ=function(){PP.call(this,"moof")},CQ=function(){PP.call(this,_.Le);this.h=new Uint8Array(0)},DQ=function(){Z.call(this,"tenc",0,0);this.h=1;this.j=8;this.o="";this.l=[]},EQ=function(a,b){Z.call(this,"schm",0,0);this.h=a;this.j=b;this.Wb=""},FQ=function(a){PP.call(this,"frma");this.h=a},GQ=function(){Z.call(this,"saio",0,0);this.offset=[0]},HQ=function(a,
|
|
10
|
+
b,c){Z.call(this,"saiz",0,0);this.h=a;this.l=b;this.j=c},IQ=function(a,b){Z.call(this,"senc",a,b);this.j=0;this.l=8;this.h=[]},KQ=function(a){this.a=a;this.f=JQ(this)},JQ=function(a){for(var b=0,c=0;c<a.a.length;c++)b+=a.a[c].a();return new _.Gm(b)},LQ=function(a,b){var c=a.exec(b);return null==c||""===c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)},SQ=function(a,b,c){var d=null;if(MQ.test(a)){a=MQ.exec(a);d=Number(a[1]);var e=Number(a[2]),f=Number(a[3]),
|
|
11
|
+
g=Number(a[4]);g+=(Number(a[5])||0)/c.f;f+=g/c.frameRate;d=f+60*e+3600*d}else NQ.test(a)?d=LQ(NQ,a):OQ.test(a)?d=LQ(OQ,a):PQ.test(a)?(a=PQ.exec(a),d=Number(a[1])/c.frameRate):QQ.test(a)?(a=QQ.exec(a),d=Number(a[1])/c.a):RQ.test(a)&&(d=LQ(RQ,a));d+=b;b=Math.floor(d/3600);c=Math.floor((d-3600*b)/60);a=Math.floor(d-3600*b-60*c);d-=a;10>b&&(b="0"+b);10>c&&(c="0"+c);10>a&&(a="0"+a);0===d?d="000":d=Math.round(1E3*d);return b+":"+c+":"+a+"."+d},TQ=function(a,b,c,d){this.frameRate=Number(a)||30;this.f=Number(b)||
|
|
12
|
+
1;this.a=Number(d);0===this.a&&(this.a=a?this.frameRate*this.f:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=parseInt(a[1],10)/parseInt(a[2],10))},UQ=function(a,b,c){a:{var d=_.w([_.Qd,_.Od]);for(var e=d.next();!e.done;e=d.next())if((e=c.Be(e.value))&&e.keyId){d=e.keyId;break a}_.Eh(EP,"Could not get default Key ID for DRM init data!");d=null}c=new PP("xxxx");a.type===_.r?c=new fQ(a.width,a.height):c=new hQ(a.channelCount,a.sampleSize,a.be);a=new DQ;a.h=1;a.j=8;a.o=d||"00000000000000000000000000000000";
|
|
13
|
+
a=(new PP("schi")).append([a]);b=(new PP(_.$f)).append([new FQ(b),new EQ(_.td,65536),a]);c.append([b]);return c},VQ=function(a,b){var c=b.Ee(),d=new VP(a.timescale,a.duration,a.id),e=(new WP).append([new XP(a.id)]),f=new YP(a.id,a.duration,a.timescale,a.width,a.height),g=new ZP(a.timescale,a.duration),h=new $P(a.type),l=null,m=new lQ;m.entries=[new kQ];var n=new nQ;switch(a.type){case _.r:var p=new iQ(a.Xa,a.ec);c?(l=UQ(a,"avc1",b),l.append([p]),n.entries=[l]):(l=(new eQ(a.width,a.height)).append([p]),
|
|
14
|
+
n.entries=[l]);l=new aQ;break;case _.ad:p=new jQ(a.bc),c?(l=UQ(a,"mp4a",b),l.append([p]),n.entries=[l]):(l=(new gQ(a.channelCount,a.sampleSize,a.be)).append([p]),n.entries=[l]),l=new sQ}n=(new mQ).append([n,new oQ,new pQ,new rQ,new qQ]);m=(new tQ).append([m]);m=(new uQ).append([l,m,n]);g=(new vQ).append([g,h,m]);f=(new UP).append([f,g]);d=(new TP).append([d,f,e]);e=new SP("dash",0,["iso6","mp41","avc1"]);c&&(c=b.Be(_.Od),f=b.Be(_.Qd),c&&d.append([new QP("pssh",c.initData,8)]),f&&d.append([new QP("pssh",
|
|
15
|
+
f.initData,8)]),c||f||_.Eh(EP,"Could not get PSSH init data!"));c=new KQ([e,d]);return _.Wi(c.write())},XQ=function(a,b){var c,d,e,f,g,h;(new _.Sm).M("moof",_.Tm).Y("mfhd",function(m){var n=new xQ;n.h=_.W(m.reader);c=n}).M("traf",_.Tm).Y("tfhd",function(m){var n=m.reader.Ma();if(null===m.flags)throw new _.N(_.O,3,3019,DP);var p=new zQ(m.version||0,m.flags||0);p.h=_.W(m.reader);0<n-m.reader.getPosition()&&m.flags&1&&(p.j=_.Pm(m.reader));0<n-m.reader.getPosition()&&m.flags&2&&(p.B=_.W(m.reader));0<
|
|
16
|
+
n-m.reader.getPosition()&&m.flags&8&&(p.l=_.W(m.reader));0<n-m.reader.getPosition()&&m.flags&16&&(p.w=_.W(m.reader));0<n-m.reader.getPosition()&&m.flags&32&&(p.o=_.W(m.reader));d=p}).Y("trun",function(m){var n=m.reader.Ma();if(null===m.flags)throw new _.N(_.O,3,3019,DP);var p=new yQ(m.version||0,m.flags||0);p.h=_.W(m.reader);0<n-m.reader.getPosition()&&m.flags&1&&(p.l=_.Om(m.reader));0<n-m.reader.getPosition()&&m.flags&4&&(p.o=_.W(m.reader));if(0<n-m.reader.getPosition())for(n=0;n<p.h;n++)m.flags&
|
|
17
|
+
256&&p.w.push(_.W(m.reader)),m.flags&512&&p.sampleSize.push(_.W(m.reader)),m.flags&1024&&p.B.push(_.W(m.reader)),m.flags&2048&&(0===m.version?p.j.push(_.W(m.reader)):p.j.push(_.Om(m.reader)));e=p}).Y("sdtp",function(m){var n=_.Rm(m.reader,m.reader.Ma());f=new RP("sdtp",m.version||0,m.flags||0,n,0)}).M("uuid",function(m){var n=_.Rm(m.reader,16);if(_.kj(n,WQ)){n=_.W(m.reader);m.version=n>>>24;m.flags=n&16777215;n=new IQ(m.version,m.flags);n.j=_.W(m.reader);m.flags&1&&(n.l=_.Mm(m.reader));for(var p=
|
|
18
|
+
0;p<n.j;p++){var q={Kh:_.Rm(m.reader,8),md:0,tg:[]};if(m.flags&2){q.md=_.Nm(m.reader);for(var t=0;t<q.md;t++){var v={Lg:0,Mg:0};v.Lg=_.Nm(m.reader);v.Mg=_.W(m.reader);q.tg.push(v)}}n.h.push(q)}g=n}}).M(_.Le,function(m){var n=new CQ;0<m.reader.Ma()?n.h=_.Rm(m.reader,m.reader.Ma()):(_.Eh(EP,"mdat box is empty!"),n.h=new Uint8Array(0));h=n}).parse(a,!1);if(!h)return null;var l=(new AQ).append([d,e]);f&&l.append([f]);b.Ee()&&g&&l.append([g]);l=(new BQ).append([c,l]);return new KQ([l,h])},YQ=function(a,
|
|
19
|
+
b,c,d){var e=d.Ee(),f=parseInt(c*b,10);b=a.data||new ArrayBuffer(0);var g=XQ(b,d);if(null===g)return a.request.contentType===_.Q?a.data:g;d=g.get(_.Le);if(a.request.contentType===_.Q){e=d.h.buffer;if(c){e=_.S.Ld(e);if((e=(new DOMParser).parseFromString(e,_.ng))&&"tt"===e.documentElement.tagName.toLowerCase())var h=e.documentElement;if(h&&(d=new TQ(h.getAttribute("ttp:frameRate"),h.getAttribute("ttp:subFrameRate"),h.getAttribute("ttp:frameRateMultiplier"),h.getAttribute("ttp:tickRate")),h=h.getElementsByTagName("body")[0]))for(h=
|
|
20
|
+
h.getElementsByTagName("p"),a=0,b=h.length;a<b;a++){f=h[a];g=c;for(var l=["begin",_.me],m=0,n=l.length;m<n;m++){b:{var p=f;var q=l[m],t=new RegExp("\\w+:"+q),v=0;if(p.hasAttribute(q))p=p.getAttribute(q);else{q=p.attributes;for(var z=q.length;v<z;v++){var C=q[v].name;if(C=C.match(t)){p=p.getAttribute(C[0]);break b}}p=null}}f.setAttribute(l[m],SQ(p||"",g,d))}}e=(new XMLSerializer).serializeToString(e);c=_.S.Ya(e).buffer}else c=e;return c}h=new BQ;a=g.get("mfhd");b=new AQ;l=g.get("tfhd");m=new wQ(1,
|
|
21
|
+
f);f=g.get("trun");n=g.get("sdtp");c=g.get("senc");l.h=1;l.flags&=16777214;l.flags|=131072;b.append([l,m,f]);n&&b.append([n]);if(e){g=0;l=[];if(c.flags&2)for(l=[],m=0;m<c.j;m++)l.push(10+6*c.h[m].md);else g=8;b.append([c,new GQ,new HQ(g,l,c.j)])}h.append([a,b]);f.flags|=1;f.l=h.a()+8;d=new KQ([h,d]);h=d.write();e&&(e=d.get("saio"),d=d.f,e.offset[0]=c.start+16,d.seek(e.start),e.write(d),h=d.buffer);return h},ZQ=function(a){var b=a.split("/");return b[b.length-1].toLowerCase().match("manifest(\\(.+\\))?")?
|
|
22
|
+
a:a+"/Manifest"},$Q=function(a,b,c,d){c=b.uh[c];b=b.Ln;a=a.replace("Manifest","");b=b.replace("{bitrate}",String(d.bitrate)).replace("{Bitrate}",String(d.bitrate)).replace("{start time}",String(c.t)).replace("{start_time}",String(c.t));return _.OC([a],[b])[0]},aR=function(a,b){if(a.type!==b.type)return!1;var c=[];a.type===_.r?c=["maxWidth","maxHeight","bitrate",FP,"fourCC"]:a.type===_.ad&&(c=["bitrate",FP,"channels","bitsPerSample","samplingRate","fourCC"]);return _.M.la(a,b,c,["id","segmentIndex"])},
|
|
23
|
+
bR=function(a,b,c){var d=c.ve.split("00000001");a={id:1,type:c.type,duration:a/b,timescale:b,Xa:null,ec:null,width:NaN,height:NaN,bc:null,be:NaN,sampleSize:NaN,channelCount:NaN};switch(c.type){case _.r:a.Xa=[_.ij(d[1])];a.ec=[_.ij(d[2])];a.width=c.maxWidth;a.height=c.maxHeight;break;case _.ad:a.bc=_.ij(c.ve),a.sampleSize=c.ij||16,a.be=c.be,a.channelCount=c.Ng}return a},cR=function(a,b){return a.filter(function(c){return c.type===b})},eR=function(){this.w=this.h=this.f=this.D=null;this.N=1;this.P=
|
|
24
|
+
0;this.l="";this.B=this.a=null;this.g=new _.K("clpp.smooth.SmoothParser");this.J=!1;this.j=this.A=null;this.L=dR;this.H=0;this.C=this.I=Infinity;this.o=[];this.K=this.hn.bind(this);this.G=new Map},fR=function(a,b){var c,d,e;return _.I(function(f){if(1==f.a)return c=_.uj(b),c.timeout=a.f.attemptParameters.timeout,c.maxAttempts=Math.max(a.f.attemptParameters.maxAttempts,b.length),c.baseDelay=a.f.attemptParameters.baseDelay,c.backoffFactor=a.f.attemptParameters.backoffFactor,c.fuzzFactor=a.f.attemptParameters.fuzzFactor,
|
|
25
|
+
c.type=1,d=a.D.networkingEngine.fetch(c),_.y(f,d.U,2);e=f.f;a.l=e.uri;return f["return"](e)})},mR=function(a,b){var c=null;try{var d=new DOMParser;try{var e=_.S.Ld(b);var f=d.parseFromString(e.trim(),_.ng)}catch(vI){throw vI;}if(f&&f.documentElement.tagName===_.ac)var g=f.documentElement;c=g&&0<g.getElementsByTagName("parsererror").length?null:g}catch(vI){}if(!c)throw a.g.error("Unable to parse manifest"),new _.N(_.O,4,4033,a.l);var h=+gR(a,c,"MajorVersion"),l=+gR(a,c,"MinorVersion"),m=+c.getAttribute("TimeScale")||
|
|
26
|
+
1E7,n=+gR(a,c,"Duration"),p="TRUE"===c.getAttribute("IsLive"),q=+c.getAttribute("LookAheadCount"),t=+c.getAttribute("DVRWindowLength")||Infinity,v=_.Hn(c,"Protection")[0];if(!1===/^[2].[0-2]$/.test(""+h+"."+l))throw a.g.error("Smooth Streaming version must be 2.0, 2.1 or 2.2"),new _.N(_.O,4,4036,a.l);p?(hR(a,iR),a.A=typeof a.f.liveRefreshPeriod===_.k?1E3*a.f.liveRefreshPeriod:Math.min(1E3*a.H,1E4),n=Infinity):hR(a,dR);a.a={startTime:0,delay:0,duration:n/m,Df:t/m,Xd:0};if(v){var z=a.f.playreadyVersion,
|
|
27
|
+
C=[],H=_.Hn(v,"ProtectionHeader")[0],E=_.hj(_.Jn(H)||""),B=_.Vn(E).a;C.push(NP(_.Qd,{initData:_.CC(_.On(B)),initDataType:_.td,keyId:B,periodId:null},[B]));C.push(NP(_.Od,OP(E,B,z),[B]));a.o=C}var G=[],P=_.Hn(c,"StreamIndex");if(!P.length)throw a.g.error("No streams found!"),new _.N(_.O,4,4034,a.l);for(var R=0;R<P.length;R++){for(var da,ea=a,Ca=P[R],bb=gR(ea,Ca,"Type"),cb=+Ca.getAttribute("Chunks"),Ta=Ca.getAttribute("Subtype"),Da=Ca.getAttribute("Language")||_.tg,fb=_.Ni(Da),lc=Ca.getAttribute("Name")||
|
|
28
|
+
"",Ag=+Ca.getAttribute(_.xb),Bg=+Ca.getAttribute(_.wb),nn=gR(ea,Ca,"Url"),Xt=+Ca.getAttribute("TimeScale")||null,fd=[],on=_.Hn(Ca,_.Qb),Iu=0;Iu<on.length;Iu++){var xf=void 0,nc=void 0,Ju=void 0,yf=ea,Fd=on[Iu],Ku=bb,YU=+Fd.getAttribute("Index"),ZU=+gR(yf,Fd,"Bitrate"),yI=NaN,zI=NaN,ko=NaN,Lu=NaN,AI=NaN,BI=NaN,CI=NaN,DI=Fd.getAttribute("FourCC");switch(Ku){case _.r:yI=+gR(yf,Fd,_.wb);zI=+gR(yf,Fd,_.xb);break;case _.ad:Lu=+Fd.getAttribute("Channels")||2,ko=+gR(yf,Fd,"SamplingRate"),BI=+gR(yf,Fd,"AudioTag"),
|
|
29
|
+
AI=+gR(yf,Fd,"BitsPerSample"),CI=+gR(yf,Fd,"PacketSize")}var Mu=String(Fd.getAttribute("CodecPrivateData"));if(Ku===_.ad&&!Mu){var EI=Lu,FI={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12},lo=FI[ko];if("AACH"===DI){nc=new Uint8Array(4);var GI=FI[2*ko];nc[0]=40|lo>>1;nc[1]=lo<<7|EI<<3|GI>>1;nc[2]=GI<<7|8;nc[3]=0;xf=new Uint16Array(2);xf[0]=(nc[0]<<8)+nc[1];xf[1]=(nc[2]<<8)+nc[3];Ju=xf[0].toString(16)+xf[1].toString(16)}else nc=new Uint8Array(2),nc[0]=
|
|
30
|
+
16|lo>>1,nc[1]=lo<<7|EI<<3,xf=new Uint16Array(1),xf[0]=(nc[0]<<8)+nc[1],Ju=xf[0].toString(16);Mu=Ju.toUpperCase()}var $U={id:yf.P++,type:Ku,index:YU,bitrate:ZU,ve:Mu,maxHeight:yI,maxWidth:zI,be:ko,Ng:Lu,ao:BI,ij:AI,so:CI,Uk:DI,segmentIndex:null};fd.push($U)}da=fd;for(var Ge=[],HI=_.Hn(Ca,"c"),mk=0;mk<HI.length;mk++){var Nu=HI[mk],de=parseInt(Nu.getAttribute("t"),10),Wh=parseInt(Nu.getAttribute("d"),10),Ou=parseInt(Nu.getAttribute("r"),10),nk=0;if(isNaN(de)&&isNaN(Wh))throw ea.g.error("Either one or both FragmentDuration and FragmentTime field MUST be present in StreamFragmentElement"),
|
|
31
|
+
new _.N(_.O,4,4037,ea.l);0===mk&&isNaN(de)&&(nk=de=0);if(0<mk){var Eg=Ge[Ge.length-1];nk=Eg.n+1;Eg.d||(Eg.d=de-Eg.t);de||(de=Eg.t+Eg.d);Wh||(Wh=de-Eg.t)}Ge.push({n:nk,d:Wh,t:de});if(Ou){Ou--;for(var II=0;II<Ou;II++){var mo=Ge[Ge.length-1];nk=mo.n+1;de=mo.t+mo.d;Wh=mo.d;Ge.push({n:nk,d:Wh,t:de})}}}ea.zd()||Ge.length===cb||ea.g.warn("Number of fragments ("+cb+") differs from number of chunks ("+Ge.length+").");G.push({type:bb,fo:cb,wn:Ta,language:fb,Wd:Da,name:lc,maxWidth:Ag,maxHeight:Bg,Ln:nn,tracks:da,
|
|
32
|
+
uh:Ge,timescale:Xt})}var zf={qo:h,Zh:l,timescale:m,duration:n,isLive:p,po:q,Df:t,Mf:!1,streams:G};if(a.h&&a.w)return jR(a,zf),Promise.resolve();a.G.clear();var Pu=zf.timescale,no=zf.duration,bV=cR(zf.streams,_.ad),cV=cR(zf.streams,_.r),dV=cR(zf.streams,_.Q),JI=[],oo=kR(a,no,Pu,bV),po=kR(a,no,Pu,cV),eV=kR(a,no,Pu,dV);oo.length||(oo=[null]);po.length||(po=[null]);for(var Ru=0;Ru<po.length;Ru++)for(var Su=0;Su<oo.length;Su++)JI.push(lR(a,po[Ru],oo[Su]));var KI={id:"ID",configurationId:void 0,startTime:0,
|
|
33
|
+
endTime:no,variants:JI,textStreams:eV,thumbStreams:[]};var gV=zf.streams,Tu=a.a.startTime,LI=a.a.delay,Uu=a.I,MI=Math.min(a.a.duration||Infinity,Uu),Vu=a.zd(),hV=a.a.Df,iV=a.a.Xd,NI=a.H,OI=isFinite(a.C)?a.C:0;if(Vu)MI=Infinity,Tu=Date.now()/1E3-iV,a.a.startTime=Tu,LI=3*NI;else for(var jV=isFinite(Uu)?Uu:a.a.duration,PI=_.w(gV),Wu=PI.next();!Wu.done;Wu=PI.next())for(var QI=_.w(Wu.value.tracks),Xu=QI.next();!Xu.done;Xu=QI.next()){var RI=Xu.value;RI.segmentIndex.offset(-OI);_.aE(RI.segmentIndex,jV)}var SI=
|
|
34
|
+
a.f.timeline||{};SI.type=void 0;a.B=new _.dD(SI,Tu,LI,!Vu,!0);a.B.f=MI;_.lD(a.B,NI);a.B.A=hV;Vu||a.B.offset(-OI);a.D.filterAllPeriods([KI]);a.h={presentationTimeline:a.B,periods:[KI],minBufferTime:0,cues:[]};Promise.resolve();a.J||(a.D.networkingEngine.Qc(a.K),a.J=!0);a.w=zf;return Promise.resolve()},jR=function(a,b){for(var c=0;c<a.w.streams.length;c++)for(var d=b.streams[c],e={},f=_.w(a.w.streams[c].tracks),g=f.next();!g.done;e={$b:e.$b},g=f.next())if(e.$b=g.value,g=d.tracks.find(function(l){return function(m){return m.type===
|
|
35
|
+
l.$b.type&&m.bitrate===l.$b.bitrate}}(e))){aR(e.$b,g)||a.g.warn("The current stream is updated with a stream that seems to have different base properties!");var h=nR(a,a.w.timescale,d,g);g=e.$b.segmentIndex;g.sa(h);(h=a.a.Df)&&_.ZD(g,_.YD(g)-h).forEach(function(l){l.Va().forEach(function(m){a.G["delete"](m)})})}else a.g.warn("Cannot find satisfying update for "+e.$b.type+" track with bitrate "+(e.$b.bitrate+". Skipping update."))},kR=function(a,b,c,d){for(var e=[],f={Kc:0};f.Kc<d.length;f={Kc:f.Kc},
|
|
36
|
+
f.Kc++){var g=d[f.Kc].tracks.map(function(h){return function(l){var m=d[h.Kc],n=nR(a,c,m,l);n=new _.XD(n);var p=null;m.type!==_.Q&&(p=oR(a,b,c,m,l));l.segmentIndex=n;var q=_.AJ++,t=Promise.resolve.bind(Promise),v=n.Wc.bind(n),z=n.get.bind(n),C=n.sd.bind(n),H=n.getDuration.bind(n),E=pR[m.type],B="";switch(m.type){case _.r:B=l.ve;var G=/00000001[0-9]7/.exec(B);B="avc1."+(G&&G[0]?B.substr(B.indexOf(G[0])+10,6):"42c00c");a.g.debug("VIDEO CODECS: ",B);break;case _.ad:B=l.ve,G=2,"AACH"===l.Uk?G=5:B&&(G=
|
|
37
|
+
(parseInt(B.substr(0,2),16)&248)>>3),B="mp4a.40."+G,a.g.debug("AUDIO CODECS: ",B)}G=m.type===_.Q?qR[m.wn]:void 0;return{id:q,originalId:null,uo:null,createSegmentIndex:t,findSegmentPosition:v,getSegmentReference:z,adjustSegmentDurations:C,getDuration:H,segmentIndex:n,segmentLookupStrategy:_.kC,initSegmentReference:p,mimeType:E,codecs:B,frameRate:void 0,bandwidth:l.bitrate,width:l.maxWidth||void 0,height:l.maxHeight||void 0,kind:G,encrypted:a.Nf(),keyId:null,language:m.language,originalLanguage:m.Wd,
|
|
38
|
+
label:m.name,type:m.type,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:l.Ng||null,spatialAudio:!1,closedCaptions:null}}}(f));e=e.concat(g)}return e},nR=function(a,b,c,d){var e=0,f=[],g=c.timescale||b;c.uh.forEach(function(h,l){var m=h.d/g;if(0===l){var n=h.t/g;a.C=Math.min(a.C,n)}else n=f[l-1].endTime;var p=n+m,q=$Q(a.l,c,l,d);a.H=Math.max(a.H,m);f.push(new _.Li(l,n,p,function(){return[q]},0,null,0,null,!0,g));a.G.set(q,n);e+=m});if(c.type===_.r||c.type===_.ad)b=f[f.length-
|
|
39
|
+
1],a.I=Math.min(a.I,e),0===a.a.Xd?a.a.Xd=b.endTime:a.a.Xd=Math.min(a.a.Xd,b.endTime);return f},oR=function(a,b,c,d,e){b=bR(b,d.timescale||c,e);c={isLive:a.zd.bind(a),Ee:a.Nf.bind(a),bl:function(){return 1},Be:a.xh.bind(a)};d=new Uint8Array(0);try{d=VQ(b,c)}catch(g){throw a.g.error("Failed to generate initialization segment."),new _.N(_.O,3,4035,g);}var f="data:text/plain;base64,"+_.gj(d);return new _.QC(function(){return[f]},0,null,null,!0)},lR=function(a,b,c){var d=(c?c.bandwidth:0)+(b?b.bandwidth:
|
|
40
|
+
0),e=c?c.language:_.tg;return c||b?{id:a.N++,language:e,primary:!1,audio:c,video:b,bandwidth:d,drmInfos:a.o,allowedByApplication:!0,allowedByKeySystem:!0}:null},gR=function(a,b,c){if(b=b.getAttribute(c))return b;a.g.error("required attribute not provided: "+c);throw new _.N(_.O,4,4038,a.l,c);},rR=function(a,b){null!=a.A&&null!=b&&(a.j=window.setTimeout(a.Ub.bind(a),b))},hR=function(a,b){var c=b===dR;a.h&&a.h.presentationTimeline&&_.gD(a.h.presentationTimeline,c);c&&null!=a.j&&(window.clearTimeout(a.j),
|
|
41
|
+
a.j=null,a.A=null);a.L=b},sR=function(){};PP.prototype.append=function(a){a=void 0===a?[]:a;for(var b=0;b<a.length;b++)this.f.push(a[b]),a[b].parent=this;return this};PP.prototype.get=function(a){if(this.type===a)return this;for(var b=0;b<this.f.length;b++){if(this.f[b].type===a)return this.f[b];var c=this.f[b].get(a);if(c)return c}return null};PP.prototype.a=function(){var a=Math.pow(2,32)-1;var b=4+this.type.length;"uuid"===this.type&&(b+=16);if(0<this.f.length)for(var c=0;c<this.f.length;c++)b+=this.f[c].a();this.size>a&&(b+=8);return b};
|
|
42
|
+
PP.prototype.write=function(a){var b=Math.pow(2,32)-1;this.start=a.getPosition();this.size=this.a();this.size>b?_.V(a,1):_.V(a,this.size);_.Im(a,MP(this.type));this.size>b&&GP(a,this.size);"uuid"===this.type&&_.Im(a,null);if(0<this.f.length&&!this.A)for(b=0;b<this.f.length;b++)this.f[b].write(a),this.f[b].a(),a.getPosition()};_.x(Z,PP);Z.prototype.a=function(){return 4+PP.prototype.a.call(this)};Z.prototype.write=function(a){PP.prototype.write.call(this,a);HP(a,this.version);IP(a,this.flags)};
|
|
43
|
+
_.x(QP,PP);QP.prototype.a=function(){return this.h.byteLength+PP.prototype.a.call(this)-this.offset};QP.prototype.write=function(a){PP.prototype.write.call(this,a);_.Im(a,this.h,this.offset);a.getPosition()};_.x(RP,Z);RP.prototype.a=function(){return this.h.byteLength+Z.prototype.a.call(this)-this.offset};RP.prototype.write=function(a){Z.prototype.write.call(this,a);_.Im(a,this.h,this.offset);a.getPosition()};_.x(SP,PP);
|
|
44
|
+
SP.prototype.a=function(){var a=this.j.length;a=a+4+this.h.join("").length;return a+PP.prototype.a.call(this)};SP.prototype.write=function(a){PP.prototype.write.call(this,a);_.Im(a,MP(this.j));_.V(a,this.Zh);_.Im(a,MP(this.h.join("")));a.getPosition()};_.x(TP,PP);_.x(UP,PP);_.x(VP,Z);VP.prototype.a=function(){var a=0;a=1===this.version?a+28:a+16;a=a+44+this.h.length;return a+=Z.prototype.a.call(this)};
|
|
45
|
+
VP.prototype.write=function(a){Z.prototype.write.call(this,a);1===this.version?(GP(a,0),GP(a,0),_.V(a,this.timescale),GP(a,this.duration*this.timescale)):(_.V(a,0),_.V(a,0),_.V(a,this.timescale),_.V(a,this.duration*this.timescale));_.V(a,65536);JP(a,this.volume);JP(a,0);_.V(a,0);_.V(a,0);for(var b=0;b<this.h.length;b++)HP(a,this.h[b]);_.V(a,0);_.V(a,0);_.V(a,0);_.V(a,0);_.V(a,0);_.V(a,0);_.V(a,this.j);a.getPosition()};_.x(WP,PP);_.x(XP,Z);XP.prototype.a=function(){return 20+Z.prototype.a.call(this)};
|
|
46
|
+
XP.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,this.h);_.V(a,1);_.V(a,0);_.V(a,0);_.V(a,0);a.getPosition()};_.x(YP,Z);YP.prototype.a=function(){var a=0;a=1===this.version?a+32:a+20;a=a+24+this.h.length;return a+Z.prototype.a.call(this)};
|
|
47
|
+
YP.prototype.write=function(a){Z.prototype.write.call(this,a);1===this.version?(GP(a,0),GP(a,0),_.V(a,this.j),_.V(a,0),GP(a,this.duration*this.timescale)):(_.V(a,0),_.V(a,0),_.V(a,this.j),_.V(a,0),_.V(a,this.duration*this.timescale));_.V(a,0);_.V(a,0);JP(a,0);JP(a,0);JP(a,this.volume);JP(a,0);for(var b=0;b<this.h.length;b++)HP(a,this.h[b]);JP(a,this.width);JP(a,0);JP(a,this.height);JP(a,0);a.getPosition()};_.x(ZP,Z);ZP.prototype.a=function(){var a=0;a=1===this.version?a+28:a+16;return a+4+Z.prototype.a.call(this)};
|
|
48
|
+
ZP.prototype.write=function(a){Z.prototype.write.call(this,a);1===this.version?(GP(a,0),GP(a,0),_.V(a,this.timescale),GP(a,this.duration*this.timescale)):(_.V(a,0),_.V(a,0),_.V(a,this.timescale),_.V(a,this.duration*this.timescale));JP(a,this.language);JP(a,0);a.getPosition()};_.x($P,Z);$P.prototype.a=function(){return 33+Z.prototype.a.call(this)};
|
|
49
|
+
$P.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,0);this.h===_.r?_.Im(a,MP("vide")):_.Im(a,MP("soun"));_.V(a,0);_.V(a,0);_.V(a,0);this.h===_.r?_.Im(a,MP("VideoHandler\x00")):_.Im(a,MP("SoundHandler\x00"));a.getPosition()};_.x(aQ,Z);aQ.prototype.a=function(){return 2+this.h.byteLength+Z.prototype.a.call(this)};aQ.prototype.write=function(a){Z.prototype.write.call(this,a);JP(a,0);_.Im(a,this.h);a.getPosition()};_.x(bQ,PP);bQ.prototype.a=function(){return 8+PP.prototype.a.call(this)};
|
|
50
|
+
bQ.prototype.write=function(a){PP.prototype.write.call(this,a);_.V(a,0);JP(a,0);JP(a,1)};_.x(cQ,bQ);cQ.prototype.a=function(){return 70+bQ.prototype.a.call(this)};cQ.prototype.write=function(a){bQ.prototype.write.call(this,a);JP(a,0);JP(a,0);_.V(a,0);_.V(a,0);_.V(a,0);JP(a,this.width);JP(a,this.height);_.V(a,4718592);_.V(a,4718592);_.V(a,0);JP(a,1);HP(a,10);_.Im(a,MP("AVC Coding",31));JP(a,this.depth);LP(a,-1)};_.x(dQ,bQ);dQ.prototype.a=function(){return 20+bQ.prototype.a.call(this)};
|
|
51
|
+
dQ.prototype.write=function(a){bQ.prototype.write.call(this,a);_.V(a,0);_.V(a,0);JP(a,this.channelCount);JP(a,this.sampleSize);LP(a,0);JP(a,0);JP(a,this.sampleRate);JP(a,0)};_.x(eQ,cQ);eQ.prototype.write=function(a){cQ.prototype.write.call(this,a);for(var b=0;b<this.f.length;b++)this.f[b].write(a);a.getPosition()};_.x(fQ,eQ);_.x(gQ,dQ);gQ.prototype.write=function(a){dQ.prototype.write.call(this,a);for(var b=0;b<this.f.length;b++)this.f[b].write(a);a.getPosition()};_.x(hQ,gQ);_.x(iQ,PP);
|
|
52
|
+
iQ.prototype.a=function(){for(var a=7,b=0;b<this.Xa.length;b++)a+=2,a+=this.Xa[b].byteLength;for(b=0;b<this.Xa.length;b++)a+=2,a+=this.ec[b].byteLength;return a+PP.prototype.a.call(this)};
|
|
53
|
+
iQ.prototype.write=function(a){PP.prototype.write.call(this,a);HP(a,this.version);HP(a,this.h);HP(a,this.j);HP(a,this.level);HP(a,255);HP(a,224|this.Xa.length);for(var b=0;b<this.Xa.length;b++)JP(a,this.Xa[b].length),_.Im(a,this.Xa[b]);HP(a,this.ec.length);for(b=0;b<this.ec.length;b++)JP(a,this.ec[b].length),_.Im(a,this.ec[b]);a.getPosition()};_.x(jQ,Z);jQ.prototype.a=function(){return 22+(this.bc.byteLength+3)+Z.prototype.a.call(this)};
|
|
54
|
+
jQ.prototype.write=function(a){Z.prototype.write.call(this,a);HP(a,3);HP(a,23+this.bc.byteLength);JP(a,1);HP(a,0);HP(a,4);HP(a,15+this.bc.byteLength);HP(a,64);HP(a,21);IP(a,0);_.V(a,0);_.V(a,0);HP(a,5);HP(a,this.bc.byteLength);_.Im(a,this.bc);_.Im(a,new Uint8Array([6,1,2]));a.getPosition()};_.x(kQ,Z);kQ.prototype.a=function(){return this.location.length+Z.prototype.a.call(this)};kQ.prototype.write=function(a){Z.prototype.write.call(this,a);0<this.location.length&&_.Im(a,MP(this.location));a.getPosition()};
|
|
55
|
+
_.x(lQ,Z);lQ.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Z.prototype.a.call(this)};lQ.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.x(mQ,PP);_.x(nQ,Z);nQ.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Z.prototype.a.call(this)};
|
|
56
|
+
nQ.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.x(oQ,Z);oQ.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Z.prototype.a.call(this)};oQ.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.x(pQ,Z);
|
|
57
|
+
pQ.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Z.prototype.a.call(this)};pQ.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.x(qQ,Z);qQ.prototype.a=function(){for(var a=4,b=0;b<this.entries.length;b++)a+=this.entries[b].a();return a+Z.prototype.a.call(this)};
|
|
58
|
+
qQ.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,this.entries.length);for(var b=0;b<this.entries.length;b++)this.entries[b].write(a);a.getPosition()};_.x(rQ,Z);rQ.prototype.a=function(){return 8+Z.prototype.a.call(this)};rQ.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,0);_.V(a,0);a.getPosition()};_.x(sQ,Z);sQ.prototype.a=function(){return 4+Z.prototype.a.call(this)};sQ.prototype.write=function(a){Z.prototype.write.call(this,a);LP(a,0);JP(a,0);a.getPosition()};
|
|
59
|
+
_.x(tQ,PP);_.x(uQ,PP);_.x(vQ,PP);_.x(wQ,Z);wQ.prototype.a=function(){var a=0;a=1===this.version?a+8:a+4;return a+Z.prototype.a.call(this)};wQ.prototype.write=function(a){Z.prototype.write.call(this,a);1===this.version?GP(a,this.baseMediaDecodeTime):_.V(a,this.baseMediaDecodeTime);a.getPosition()};_.x(xQ,Z);xQ.prototype.a=function(){return 4+Z.prototype.a.call(this)};xQ.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,this.h);a.getPosition()};_.x(yQ,Z);
|
|
60
|
+
yQ.prototype.a=function(){var a=4;this.flags&tR&&(a+=4);this.flags&uR&&(a+=4);for(var b=0;b<this.h;b++)this.flags&vR&&(a+=4),this.flags&wR&&(a+=4),this.flags&xR&&(a+=4),this.flags&yR&&(a+=4);return a+Z.prototype.a.call(this)};
|
|
61
|
+
yQ.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,this.h);this.flags&tR&&(a.getPosition(),KP(a,this.l));this.flags&uR&&_.V(a,this.o);for(var b=0;b<this.h;b++)this.flags&vR&&_.V(a,this.w[b]),this.flags&wR&&_.V(a,this.sampleSize[b]),this.flags&xR&&_.V(a,this.B[b]),this.flags&yR&&(0===this.version?_.V(a,this.j[b]):KP(a,this.j[b]));a.getPosition()};var tR=1,uR=4,vR=256,wR=512,xR=1024,yR=2048;_.x(zQ,Z);
|
|
62
|
+
zQ.prototype.a=function(){var a=4;this.flags&zR&&(a+=8);this.flags&AR&&(a+=4);this.flags&BR&&(a+=4);this.flags&CR&&(a+=4);this.flags&DR&&(a+=4);return a+Z.prototype.a.call(this)};zQ.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,this.h);this.flags&zR&&GP(a,this.j);this.flags&AR&&_.V(a,this.B);this.flags&BR&&_.V(a,this.l);this.flags&CR&&_.V(a,this.w);this.flags&DR&&_.V(a,this.o);a.getPosition()};var zR=1,AR=2,BR=8,CR=16,DR=32;_.x(AQ,PP);_.x(BQ,PP);_.x(CQ,PP);
|
|
63
|
+
CQ.prototype.a=function(){return this.h.byteLength+PP.prototype.a.call(this)};CQ.prototype.write=function(a){PP.prototype.write.call(this,a);0<this.h.byteLength&&_.Im(a,this.h)};_.x(DQ,Z);DQ.prototype.a=function(){var a=20;1===this.h&&0===this.j&&(a=a+1+this.l.length);return a+Z.prototype.a.call(this)};
|
|
64
|
+
DQ.prototype.write=function(a){Z.prototype.write.call(this,a);HP(a,0);0===this.version?HP(a,0):HP(a,0);HP(a,this.h);HP(a,this.j);_.Im(a,_.ij(this.o));if(1===this.h&&0===this.j){HP(a,0);for(var b=0;b<this.l.length;b++)HP(a,this.l[b])}a.getPosition()};_.x(EQ,Z);EQ.prototype.a=function(){var a=8;this.flags&1&&(a+=MP(this.Wb).byteLength);return a+Z.prototype.a.call(this)};EQ.prototype.write=function(a){Z.prototype.write.call(this,a);_.Im(a,MP(this.h));_.V(a,this.j);this.flags&1&&_.Im(a,MP(this.Wb));a.getPosition()};
|
|
65
|
+
_.x(FQ,PP);FQ.prototype.a=function(){return MP(this.h).byteLength+PP.prototype.a.call(this)};FQ.prototype.write=function(a){PP.prototype.write.call(this,a);_.Im(a,MP(this.h));a.getPosition()};_.x(GQ,Z);GQ.prototype.a=function(){var a=0;this.flags&1&&(a+=8);a+=4;for(var b=0;1>b;b++)a=0===this.version?a+4:a+8;return a+Z.prototype.a.call(this)};
|
|
66
|
+
GQ.prototype.write=function(a){Z.prototype.write.call(this,a);this.flags&1&&(_.V(a,0),_.V(a,0));_.V(a,1);for(var b=0;1>b;b++)0===this.version?_.V(a,this.offset[b]):GP(a,this.offset[b]);a.getPosition()};_.x(HQ,Z);HQ.prototype.a=function(){var a=0;this.flags&1&&(a+=8);a+=5;0===this.h&&(a+=this.l.length);return a+Z.prototype.a.call(this)};
|
|
67
|
+
HQ.prototype.write=function(a){Z.prototype.write.call(this,a);this.flags&1&&(_.V(a,0),_.V(a,0));HP(a,this.h);_.V(a,this.j);if(0===this.h)for(var b=0;b<this.j;b++)HP(a,this.l[b]);a.getPosition()};_.x(IQ,Z);IQ.prototype.a=function(){var a=4;this.flags&1&&(a+=1);for(var b=0;b<this.j;b++)if(a+=this.h[b].Kh.byteLength,this.flags&2){a+=2;for(var c=0;c<this.h[b].md;c++)a+=2,a+=4}return a+Z.prototype.a.call(this)};
|
|
68
|
+
IQ.prototype.write=function(a){Z.prototype.write.call(this,a);_.V(a,this.j);this.flags&1&&HP(a,this.l);for(var b=0;b<this.j;b++)if(_.Im(a,this.h[b].Kh),this.flags&2){JP(a,this.h[b].md);for(var c=0;c<this.h[b].md;c++)JP(a,this.h[b].tg[c].Lg),_.V(a,this.h[b].tg[c].Mg)}a.getPosition()};KQ.prototype.get=function(a){for(var b=0;b<this.a.length;b++){var c=this.a[b].get(a);if(c)return c}return null};KQ.prototype.write=function(){this.f=JQ(this);for(var a=0;a<this.a.length;a++)this.a[a].write(this.f);return this.f.buffer};var MQ=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,NQ=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,OQ=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,PQ=/^(\d*\.?\d*)f$/,QQ=/^(\d*\.?\d*)t$/,RQ=/^(?:(\d*\.?\d*)h)?(?:(\d*\.?\d*)m)?(?:(\d*\.?\d*)s)?(?:(\d*\.?\d*)ms)?$/;var WQ=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);_.u=eR.prototype;_.u.configure=function(a){this.f=a};_.u.start=function(a,b){var c=this;this.D=b;var d=_.bh(new Set([a,ZQ(a)])).concat();return fR(this,d).then(function(e){return mR(c,e.data).then(function(){rR(c,c.A);return c.h})})};_.u.requestStop=function(){};_.u.stop=function(){this.D&&this.D.networkingEngine.ae(this.K);this.A=this.w=this.h=this.f=this.D=null;this.j&&(clearTimeout(this.j),this.j=null);this.J=!1;this.I=this.C=Infinity;return Promise.resolve()};
|
|
69
|
+
_.u.update=function(){var a=this;if(this.zd())return fR(this,[this.l]).then(function(b){return mR(a,b.data).then(function(){return a.h})})["catch"](function(b){if(a.D)a.D.onError(b)})};_.u.setCurrentVariant=function(){};_.u.Ub=function(){var a=this;this.g.debug(_.cC);this.D&&(this.j=null,this.update().then(function(){rR(a,a.A)})["catch"](function(b){a.D&&(a.D.onError(b),1===b.severity&&rR(a,100))}))};_.u.zd=function(){return this.L===iR};_.u.Nf=function(){return 0<this.o.length};
|
|
70
|
+
_.u.xh=function(a){var b=null;if(this.o.length)for(var c=0;c<this.o.length;c++)if(this.o[c].keySystem===a){b=this.o[c].initData[0];break}return b};
|
|
71
|
+
_.u.hn=function(a){if(2!==a.request.type||a.uri.startsWith("data:"))return Promise.resolve(a);var b=a.request.timescale||this.w.timescale,c={isLive:this.zd.bind(this),Ee:this.Nf.bind(this),bl:function(){return 1},Be:this.xh.bind(this)},d=!1,e=new _.N(_.O,3,4035,null),f=null;try{var g=this.G.get(a.request.uris[a.request.uriIndex])||a.request.startTime||0;g!==a.request.startTime&&this.g.debug("Using base media decode time "+g+" instead of segment reference time "+a.request.startTime);f=YQ(a,b,g,c)}catch(h){d=
|
|
72
|
+
!0,e.data=h,3E3===h.code&&(e.code=4039)}if(d||!f)return Promise.reject(e);a.data=f;return Promise.resolve(a)};var pR={video:_.Ig,audio:_.ed,text:_.Yc},dR=_.kc,iR="LIVE",qR={Nn:_.pd,Un:_.jg};_.x(sR,_.Lt);sR.prototype.f=function(){_.Tq.ism=eR;_.Rq[_.Zc]=eR};sR.prototype.a=function(){_.bE("ism");_.cE(_.Zc)};sR.prototype.id=function(){return _.ag};_.J("clpp.smooth.SmoothComponent",sR);};
|
|
74
73
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
75
74
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
76
75
|
else{_=this.clpp._;(f.call(g,this));}
|
package/cjs/cl.thumbnails.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
e,c,d)})},
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
b.thumbStreams.length})},
|
|
7
|
-
|
|
8
|
-
this.height*(this.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Jy.prototype.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_.
|
|
26
|
-
_.
|
|
27
|
-
|
|
2
|
+
var f=function(window){var sy="No thumbnail found for position: ",ty="Position is out of range: ",uy="Thumbnail URL is mandatory",vy="Wrong gridSize format",wy="clpp.thumbnails",xy=function(){this.log=new _.K(wy);this.player=null;this.a=[];this.w=!1},zy=function(a,b){b.reduce(function(c,d){var e=d,f=!1;typeof d===_.Ve&&(e=d.step,f=d.preloadWhileBuffering);return c.then(function(){return yy(a,0,e,!!f)})},Promise.resolve())},yy=function(a,b,c,d){if(a.w||b>=a.a.length)return Promise.resolve();var e=b+c;return Ay(a,d).then(function(){return a.a[b].load()}).then(function(){return yy(a,
|
|
3
|
+
e,c,d)})},Ay=function(a,b){return new Promise(function(c){if(b||a.player.getState()!==_.tp)c();else a.player.one(_.ld,function(){c()})})},By=function(a,b,c,d,e,f,g,h,l,m,n,p){d=void 0===d?0:d;e=void 0===e?0:e;f=void 0===f?0:f;g=void 0===g?0:g;h=void 0===h?1:h;l=void 0===l?1:l;m=void 0===m?0:m;n=void 0===n?0:n;p=void 0===p?new Image:p;this.time=b;this.src=a;this.duration=c;this.x=d;this.y=e;this.width=f;this.height=g;this.pa=p;this.zk=h;this.kn=l;this.ql=m;this.rl=n;this.Of=null},Cy=function(){xy.apply(this,
|
|
4
|
+
arguments)},Dy=function(a,b){var c=a.horizontalTiles||b.horizontalTiles||1,d=a.verticalTiles||b.verticalTiles||1,e=c*d;return{Sd:c,Bg:d,Jh:e,durationPerTile:a.durationPerTile||b.durationPerTile||(a.endTime-a.startTime)/e}},Ey=function(a,b){this.time=a;this.duration=0;this.offset=b;this.length=0;this.gd=new _.Cj},Fy=function(){this.g=new _.K(wy);this.f=new ArrayBuffer(0);this.a=[];this.h=new _.Cj},Gy=function(a){var b=a.f.byteLength;a.a.forEach(function(c){c.offset+c.length<b&&c.gd.resolve()})},Iy=
|
|
5
|
+
function(a,b){return Hy(a,b).then(function(c){return new By(c,b.time,b.duration)})},Hy=function(a,b){return b.load().then(function(){var c=_.Wi(a.f,b.offset,b.length);return"data:image/jpeg;base64,"+_.fj(c)})},Jy=function(){xy.call(this);this.f=null;this.o=this.h=1;this.j=0},Ky=function(){xy.call(this);this.f=null},Ly=function(a){a=a.split(/\.|:/).map(parseFloat);var b=0,c,d={3:.001,2:1,1:60,0:3600};for(c=a.length-1;0<=c;c--)b+=a[c]*d[c];return b},My=function(){this.g=new _.K(wy);this.a=this.m=null},
|
|
6
|
+
Ny=function(a){return a.some(function(b){return 0<b.thumbStreams.length})},Sy=function(a){return a?a===Oy||a===Py?new Jy:a===Qy?new Ky:a===Ry?new Fy:null:null},Ty=function(a){if(!a)return null;a=new _.bk(a);return a.path.match(/.*\.vtt$/i)?Qy:a.path.match(/.*\.bif$/i)?Ry:a.path.match(/.*\.(png|jpg|jpeg)$/i)?Oy:null},Uy=function(){};xy.prototype.init=function(a,b){var c=this;this.player=a;a.one(_.Mf,function(){c.w=!0});a.isLive()||this.l().then(function(){b&&b.preload&&zy(c,b.preload)})};By.prototype.raw=function(){return this.pa.cloneNode(!1)};
|
|
7
|
+
By.prototype.element=function(a,b){var c=this.width,d=this.height,e=this.width/this.height;void 0!==a&&void 0===b&&(b=0);null!==a&&void 0!==a&&(c=a);null!==b&&void 0!==b&&(d=b);c||(c=Math.ceil(d*e));d||(d=Math.ceil(c/e));e=document.createElement(_.Xd);e.style.width=c+_.Jf;e.style.height=d+_.Jf;e.style.backgroundColor="#000";e.style.backgroundRepeat="no-repeat";e.style.backgroundImage='url("'+this.src+'")';e.style.backgroundSize=Math.ceil(c/this.width*(this.pa.naturalWidth||this.pa.width))+"px "+Math.ceil(d/
|
|
8
|
+
this.height*(this.pa.naturalHeight||this.pa.height))+_.Jf;var f=this.y/this.height;e.style.backgroundPositionX="-"+this.x/this.width*c+_.Jf;e.style.backgroundPositionY="-"+f*d+_.Jf;return e};
|
|
9
|
+
By.prototype.load=function(){var a=this;this.Of||(this.Of=new Promise(function(b,c){function d(){a.width||(a.width=(a.pa.naturalWidth||a.pa.width)/a.zk);a.height||(a.height=(a.pa.naturalHeight||a.pa.height)/a.kn);a.x||(a.x=a.width*a.ql);a.y||(a.y=a.height*a.rl)}if(a.pa.src&&a.pa.complete)d(),b(a);else{var e=null,f=function(){d();a.pa.removeEventListener(_.Fe,f);a.pa.removeEventListener(_.oe,e);b(a)};e=function(g){a.pa.removeEventListener(_.Fe,f);a.pa.removeEventListener(_.oe,e);c(new _.N(1,9,2014,
|
|
10
|
+
"Failed to load thumbnail.",g))};a.pa.addEventListener(_.Fe,f);a.pa.addEventListener(_.oe,e);a.pa.src=a.src}}));return this.Of};_.J("clpp.thumbnails.Thumbnail",By);By.prototype.load=By.prototype.load;By.prototype.element=By.prototype.element;By.prototype.raw=By.prototype.raw;_.x(Cy,xy);
|
|
11
|
+
Cy.prototype.get=function(a){function b(){return new _.N(1,9,2014,sy+a)}var c=this,d,e,f,g,h,l,m,n,p,q,t,v,z;return _.I(function(C){if(1==C.a){if(0>a)throw c.log.error("Position must be greater than 0 but is "+a),new _.N(1,9,2014,ty+a);d=c.player.getPeriods();for(var H=null,E=_.w(d),B=E.next();!B.done;B=E.next())B=B.value,B.startTime<=a&&(H=B);e=H;if(!e)throw c.log.error("Could not find period for specified position",a),b();f=e.thumbStreams.sort(c.f)[0];if(!f)throw c.log.error("Could not find thumb stream for specified position",a),
|
|
12
|
+
b();g=f.findSegmentPosition(a-e.startTime);if(null===g||void 0===g)throw c.log.error("Could not find segment index for specified position",a),b();h=f.getSegmentReference(g);if(!h)return C.F(2);l=Dy(h,f);m=Math.floor((a-h.startTime)/l.durationPerTile);0<c.a.length?(p=f.findSegmentPosition(0),null!==p&&(n=c.a[(g-p)*l.Jh+m])):(q=h.Va())&&0<q.length&&(v=t=0,z=h.startTime,1<l.Jh&&(t=m%l.Sd,v=Math.floor(m/l.Sd),z+=m*l.durationPerTile),n=new By(q[0],z,l.durationPerTile,void 0,void 0,void 0,void 0,l.Sd,l.Bg,
|
|
13
|
+
t,v));return n?_.y(C,n.load(),4):C.F(2)}if(2!=C.a)return C["return"](n);c.log.error("segment reference for specified segment index does not exist",g);throw b();})};Cy.prototype.f=function(a,b){return void 0!==a.bandwidth&&void 0!==b.bandwidth?a.bandwidth-b.bandwidth:0};
|
|
14
|
+
Cy.prototype.l=function(){if(0<this.a.length)return Promise.resolve();var a=this.player.getPeriods();a=_.w(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value.thumbStreams.sort(this.f)[0])for(var c=b.findSegmentPosition(0),d=void 0;null!==c&&!_.M.R(d=b.getSegmentReference(c++));)for(var e=Dy(d,b),f=d.Va()[0],g=new Image,h=d.startTime,l=0;l<e.Bg;++l)for(var m=0;m<e.Sd;++m)this.a.push(new By(f,h,e.durationPerTile,void 0,void 0,void 0,void 0,e.Sd,e.Bg,m,l,g)),h+=e.durationPerTile;return Promise.resolve()};Ey.prototype.load=function(){return this.gd};
|
|
15
|
+
Fy.prototype.init=function(a,b){var c=this;if(!b||!b.url)throw new _.N(1,9,7100,uy);var d=b.url,e=_.uj(d);e.type=_.tj;a.getNetworkEngine().fetch(e).U.then(function(f){f=f.data;var g=_.Wi(c.f);f=_.Wi(f);for(var h=g.byteLength+f.byteLength,l=new ArrayBuffer(h),m=new DataView(l),n=0,p=0,q=g.byteLength;p<q;p++)m.setUint8(n,g[p]),n+=1;g=0;for(p=f.byteLength;g<p;g++)m.setUint8(n,f[g]),n+=1;c.f=l;c.g.info("Appended "+f.byteLength+" bytes.Total data now "+(h+" bytes."));l=c.f;f=_.Wi(l);n=String.fromCharCode.apply(null,
|
|
16
|
+
Vy);g=Array.prototype.slice.call(f,0,8);f=64;h=0;m=!1;if(n===String.fromCharCode.apply(null,g))for(l=new DataView(l,16,20),l=l.getUint32(0,!0),0===l&&(l=1E3);!m;){h+=1;g=l;n=new DataView(c.f,f);m=n.getUint32(0,!0);g=m*g/1E3;n=n.getUint32(4,!0);n=new Ey(g,n);if(g=c.a.length)g=c.a[g-1],g.length=n.offset-g.offset,g.duration=n.time-g.time;c.a.push(n);f+=8;(m=4294967295===m)&&c.h.resolve();if(1E5<h)throw Error("There was a problem during reading BIF entries");}else throw Error("The file is not a valid BIF format");
|
|
17
|
+
Gy(c)})["catch"](function(f){c.g.error("[BIF] Error while loading thumbnails '\n + 'URL: "+d,f);a.onError(new _.N(1,9,2013,"Error while loading and parsing BIF thumbnails.",f))})};Fy.prototype.get=function(a){var b=this,c,d;return _.I(function(e){switch(e.a){case 1:if(0>a)throw new _.N(1,9,2014,ty+a);return _.y(e,b.h,2);case 2:c=b.a.find(function(f){return a>=f.time&&a<f.time+f.duration});if(!c)throw new _.N(1,9,2014,sy+a);return _.y(e,Iy(b,c),3);case 3:return d=e.f,_.y(e,d.load(),4);case 4:return e["return"](d)}})};
|
|
18
|
+
Fy.prototype.wc=function(){return 0<this.a.length};var Vy=[137,66,73,70,13,10,26,10];_.x(Jy,xy);
|
|
19
|
+
Jy.prototype.init=function(a,b){if(!b||!b.url)throw new _.N(1,9,7100,uy);if("GRID"===b.mode&&!b.gridSize)throw new _.N(1,9,7100,"Grid size is mandatory for GRID mode");if(!b.duration)throw new _.N(1,9,7100,"Duration is mandatory");this.f=b;this.j=this.f.duration;if(this.f.gridSize)try{var c=this.f.gridSize.split(/x/).map(function(d){return parseInt(d,10)}).filter(function(d){return 0<d});if(2===c.length)this.h=c[0],this.o=c[1];else throw new _.N(1,9,7100,vy);}catch(d){throw this.log.error("Error during parsing gridSize",d),
|
|
20
|
+
new _.N(1,9,7100,vy);}xy.prototype.init.call(this,a,b)};Jy.prototype.get=function(a){var b=this,c,d,e,f;return _.I(function(g){if(1==g.a){c=b.player.getDuration();if(0>a||a>c)throw new _.N(1,9,2014,ty+a);d=b.f.duration;e=Math.floor(a/d);f=b.a[e];if(!f)throw new _.N(1,9,2014,"No thumbnail found for position "+a+" at index "+e);return _.y(g,f.load(),2)}return g["return"](f)})};
|
|
21
|
+
Jy.prototype.l=function(){if(0<this.a.length)return Promise.resolve();var a=this.player.getDuration(),b=this.h*this.o;a=Math.ceil(Math.ceil(a/this.j)/b);for(var c=this.f.templateKey||"$index$",d=0;d<a;d++)for(var e=this.f.url.replace(c,String(d+1)),f=new Image,g=0;g<b;g++)this.a.push(new By(e,this.j*(d*b+g),this.j,0,0,0,0,this.h,this.o,g%this.h,Math.floor(g/this.h),f));return Promise.resolve()};_.x(Ky,xy);
|
|
22
|
+
Ky.prototype.init=function(a,b){var c=this;if(!b||!b.url)throw new _.N(1,9,7100,uy);var d=b.url,e=_.uj(d);e.type=_.tj;this.f=a.getNetworkEngine().fetch(e).U.then(function(f){f=f.data;if(!f)throw Error("No data in the response");f=_.S.aa(f).split(/\n/);for(var g=0;g<f.length;g++){var h=f[g],l=h.split(" --\x3e ");if(2===l.length){h=f[++g];var m=h.indexOf("\x3d"),n=0>m?[]:h.substr(m+1).split(/,/).map(parseFloat);m=n[0];var p=n[1],q=n[2];n=n[3];var t=h.indexOf("#");h=0>t?h:h.substr(0,t);h.match(/^http|^\/\//)||(h=
|
|
23
|
+
d.substr(0,d.lastIndexOf("/"))+"/"+h);t=Ly(l[0]);l=Ly(l[1])-t;c.a.push(new By(h,t,l,m,p,q,n,0,0))}}})["catch"](function(f){c.log.error("[VTT] Error while loading thumbnails URL: "+d,f);a.onError(new _.N(1,9,2013,"Error while loading VTT thumbnails.",f))});xy.prototype.init.call(this,a,b)};
|
|
24
|
+
Ky.prototype.get=function(a){var b=this,c;return _.I(function(d){if(1==d.a){if(0>a)throw new _.N(1,9,2014,ty+a);return _.y(d,b.f,2)}if(3!=d.a){c=b.a.find(function(e){return a>=e.time&&a<e.time+e.duration});if(!c)throw new _.N(1,9,2014,sy+a);return _.y(d,c.load(),3)}return d["return"](c)})};Ky.prototype.l=function(){return this.f};_.u=My.prototype;_.u.onPlayerCreated=function(a){this.m=a};_.u.onPlayerWillDestroy=function(){this.m=null};_.u.onPlayerWillRelease=function(){this.a=null};
|
|
25
|
+
_.u.onContentWillLoad=function(a){var b=this,c=a.getConfiguration().thumbnails;if(c)if(!1===c.enabled)this.g.info("Thumbnails disabled.");else{var d=c.mode||null;d||(d=Ty(c.url||null));(this.a=Sy(d))?(this.g.info("Loading thumbs configuration",c),this.m.one(_.Ie,function(){b.g.info("Initialize thumbnails provider");try{b.a.init(a,c)}catch(e){b.m.onError(e)}})):this.g.warn("Unknown thumbnail mode",d)}else this.a=null};
|
|
26
|
+
_.u.onContentLoaded=function(a,b){for(var c=1;c<arguments.length;++c);if(!this.a&&(c=(c=a.getConfiguration())&&c.thumbnails,!c||void 0===c.enabled||c.enabled)){var d=a.getPeriods();if(Ny(d)){this.a=new Cy;try{this.a.init(a,c)}catch(e){this.m.onError(e)}}}};_.u.get=function(a){return this.a?this.a.get(a):Promise.reject(new _.N(1,9,2014,"Thumbnail format is not supported"))};_.u.id=function(){return"thumbnails"};_.J("clpp.thumbnails.ThumbnailsPlugin",My);My.prototype.get=My.prototype.get;My.Id="thumbnails";
|
|
27
|
+
Uy.prototype.create=function(){return new My};_.lt(new Uy);var Oy="SINGLE",Py="GRID",Qy="WEBVTT",Ry="BIF";};
|
|
28
28
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
29
29
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
30
30
|
else{_=this.clpp._;(f.call(g,this));}
|