|
@@ -42,6 +42,13 @@ var startBitrate = 800;
|
42
|
42
|
* video started.
|
43
|
43
|
*/
|
44
|
44
|
function getTarget(simulcast, resolution, millisSinceStart) {
|
|
45
|
+ // Completely ignore the bitrate in the first 5 seconds, as the first
|
|
46
|
+ // event seems to fire very early and the value is suspicious and causes
|
|
47
|
+ // false positives.
|
|
48
|
+ if (millisSinceStart < 5000) {
|
|
49
|
+ return 1;
|
|
50
|
+ }
|
|
51
|
+
|
45
|
52
|
let target = 0;
|
46
|
53
|
let height = Math.min(resolution.height, resolution.width);
|
47
|
54
|
|
|
@@ -76,9 +83,9 @@ function getTarget(simulcast, resolution, millisSinceStart) {
|
76
|
83
|
}
|
77
|
84
|
}
|
78
|
85
|
|
79
|
|
- // Allow for an additional 3 seconds for ramp up -- delay any initial drop
|
80
|
|
- // of connection quality by 3 seconds.
|
81
|
|
- return Math.min(target, rampUp(Math.max(0, millisSinceStart - 3000)));
|
|
86
|
+ // Allow for an additional 1 second for ramp up -- delay any initial drop
|
|
87
|
+ // of connection quality by 1 second.
|
|
88
|
+ return Math.min(target, rampUp(Math.max(0, millisSinceStart - 1000)));
|
82
|
89
|
}
|
83
|
90
|
|
84
|
91
|
/**
|