@hippovideo/video-sdk 0.0.0-experimental-de85e921ac8c-20240814 → 0.0.0-experimental-377ad7c02ed0-20240814

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.
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Determine if an object is a Buffer
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*!
9
+ * The buffer module from node.js, for the browser.
10
+ *
11
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
12
+ * @license MIT
13
+ */
14
+
15
+ /*! codem-isoboxer v0.3.6 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
16
+
17
+ /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
18
+
19
+ /*! v2.9.2-2904f94, 2019-10-09T14:32:09Z */
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkHVRecorder=self.webpackChunkHVRecorder||[]).push([[881],{24580:(e,t,n)=>{let r;function o(){let e,t=dashjs.FactoryMaker,n=t.getClassFactoryByName("SwitchRequest"),r=t.getSingletonFactoryByName("MetricsModel"),a=t.getSingletonFactoryByName("DashMetrics"),s=t.getSingletonFactoryByName("DashManifestModel"),i=t.getSingletonFactoryByName("StreamController"),l=this.context;function c(e){return e.trace.reduce(((e,t)=>e+t.b[0]),0)}return e={getMaxIndex:function(e){let t,g,u,f,d,m,h,R,y,p=e.getMediaInfo().type,T=r(l).getInstance(),_=a(l).getInstance(),I=s(l).getInstance(),M=T.getReadOnlyMetricsFor(p),N=i(l).getInstance(),F=e.getAbrController().getQualityFor(p,N.getActiveStreamInfo()),C=_.getHttpRequests(M),S="true"===function(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}("log"),w=null,b=null,E=[],D=n.NO_CHANGE,k=n.PRIORITY.DEFAULT,q=0;if(d=!1,m=1.5,!M)return n(l).create();for(y=C.length-1;y>=0&&null===w;)b=C[y],b._tfinish&&b.trequest&&b.tresponse&&b.trace&&b.trace.length>0&&(w=C[y]),y--;if(null===w)return n(l).create();if("MediaSegment"!==w.type)return n(l).create();if(g=(w._tfinish.getTime()-w.trequest.getTime())/1e3,t=(w._tfinish.getTime()-w.tresponse.getTime())/1e3,g<=0)return n(l).create();for(q=c(w),S&&(console.log("REQUESTED SEGMENT ["+p+"]: ",w.url.split("/").slice(-2)[0]),console.log("LATENCY: "+Number(w.tresponse.getTime()-w.trequest.getTime())+"ms"),console.log("[CustomRules]["+p+"][DownloadRatioRule] DL: "+Number(t.toFixed(3))+"s, Total: "+Number(g.toFixed(3))+"s, Length: "+q)),R=1;y>=0&&R<3;)b=C[y],"MediaSegment"!==b.type&&b._tfinish&&b.trequest&&b.tresponse&&b.trace&&b.trace.length>0&&(g+=(b._tfinish.getTime()-b.trequest.getTime())/1e3,t+=(b._tfinish.getTime()-b.tresponse.getTime())/1e3,q+=c(b),R+=1),y--;if(q*=8,u=q/t,S&&console.log("[CustomRules]["+p+"][DownloadRatioRule] BW = "+Math.round(u/1e3)+" kb/s"),isNaN(u))return n(l).create();for(R=e.getMediaInfo().representationCount,h=e.getRepresentationInfo(),f=I.getBandwidth(h),y=0;y<R;y+=1)E.push(e.getMediaInfo().bitrateList[y].bandwidth);if(u<=f){for(y=F-1;y>0&&!(E[y]<=u);y-=1);return D=y,k=n.PRIORITY.WEAK,n(l).create(D,{name:o.__dashjs_factory_name},k)}for(y=R-1;y>F&&!(u>1.5*E[y]);y-=1);return D=y,k=n.PRIORITY.STRONG,n(l).create(D,{name:o.__dashjs_factory_name},k)}},e}n.r(t),n.d(t,{default:()=>a}),n(76821),o.__dashjs_factory_name="DownloadRatioRule",r=dashjs.FactoryMaker.getClassFactory(o);const a=r}}]);