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 {
1515 minMosQuality ?: number ;
1616}
1717
18+ const MIN_STATS_HISTORY_LENGTH = 5 ;
19+
1820class VideoDecoderIssueDetector extends BaseIssueDetector {
1921 readonly #volatilityThreshold: number ;
2022
@@ -58,7 +60,7 @@ class VideoDecoderIssueDetector extends BaseIssueDetector {
5860 const throtthedStreams = data . video . inbound
5961 . map ( ( incomeVideoStream ) : { ssrc : number , allFps : number [ ] , volatility : number } | undefined => {
6062 // At least 5 elements needed to have enough representation
61- if ( allProcessedStats . length < 5 ) {
63+ if ( allProcessedStats . length < MIN_STATS_HISTORY_LENGTH ) {
6264 return undefined ;
6365 }
6466
@@ -78,7 +80,7 @@ class VideoDecoderIssueDetector extends BaseIssueDetector {
7880 }
7981 }
8082
81- if ( allFps . length === 0 ) {
83+ if ( allFps . length < MIN_STATS_HISTORY_LENGTH ) {
8284 return undefined ;
8385 }
8486
You can’t perform that action at this time.
0 commit comments