mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
84945cabc4
commit
ab2d2eaf94
111 changed files with 4302 additions and 3100 deletions
|
@ -16,8 +16,6 @@ class EwmaBandWidthEstimator {
|
|||
this.defaultEstimate_ = 5e5; // 500kbps
|
||||
this.minWeight_ = 0.001;
|
||||
this.minDelayMs_ = 50;
|
||||
this.fast_ = new EWMA(hls.config.abrEwmaFast);
|
||||
this.slow_ = new EWMA(hls.config.abrEwmaSlow);
|
||||
}
|
||||
|
||||
sample(durationMs,numBytes) {
|
||||
|
@ -26,6 +24,14 @@ class EwmaBandWidthEstimator {
|
|||
//console.log('instant bw:'+ Math.round(bandwidth));
|
||||
// we weight sample using loading duration....
|
||||
var weigth = durationMs / 1000;
|
||||
|
||||
// lazy initialization. this allows to take into account config param changes that could happen after Hls instantiation,
|
||||
// but before first fragment loading. this is useful to A/B tests those params
|
||||
if(!this.fast_) {
|
||||
let config = this.hls.config;
|
||||
this.fast_ = new EWMA(config.abrEwmaFast);
|
||||
this.slow_ = new EWMA(config.abrEwmaSlow);
|
||||
}
|
||||
this.fast_.sample(weigth,bandwidth);
|
||||
this.slow_.sample(weigth,bandwidth);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue