File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ interface VideoDecoderIssueDetectorParams extends BaseIssueDetectorParams {
15
15
minMosQuality ?: number ;
16
16
}
17
17
18
+ const MIN_STATS_HISTORY_LENGTH = 5 ;
19
+
18
20
class VideoDecoderIssueDetector extends BaseIssueDetector {
19
21
readonly #volatilityThreshold: number ;
20
22
@@ -58,7 +60,7 @@ class VideoDecoderIssueDetector extends BaseIssueDetector {
58
60
const throtthedStreams = data . video . inbound
59
61
. map ( ( incomeVideoStream ) : { ssrc : number , allFps : number [ ] , volatility : number } | undefined => {
60
62
// At least 5 elements needed to have enough representation
61
- if ( allProcessedStats . length < 5 ) {
63
+ if ( allProcessedStats . length < MIN_STATS_HISTORY_LENGTH ) {
62
64
return undefined ;
63
65
}
64
66
@@ -78,7 +80,7 @@ class VideoDecoderIssueDetector extends BaseIssueDetector {
78
80
}
79
81
}
80
82
81
- if ( allFps . length === 0 ) {
83
+ if ( allFps . length < MIN_STATS_HISTORY_LENGTH ) {
82
84
return undefined ;
83
85
}
84
86
You can’t perform that action at this time.
0 commit comments