@observertc/client-monitor-js
Version:
ObserveRTC Client Integration Javascript Library
56 lines (55 loc) • 1.78 kB
TypeScript
import { Detector } from "./Detector";
import { InboundTrackMonitor } from "../monitors/InboundTrackMonitor";
export type FreezedVideoTrackIssuePayload = {
trackId?: string;
durationInMs?: number;
};
export type KeyframeStormIssuePayload = {
peerConnectionId: string;
trackId: string;
pliRate: number;
firRate?: number;
keyFrameRate?: number;
windowInMs: number;
durationInMs?: number;
};
export type VideoRecoveryFailedIssuePayload = {
peerConnectionId: string;
trackId: string;
pliCountSinceStalled: number;
stalledForInMs: number;
freezeCount?: number;
durationInMs?: number;
};
export declare class FreezedVideoTrackDetector implements Detector {
readonly trackMonitor: InboundTrackMonitor;
static readonly ISSUE_TYPE = "freezed-video-track";
static readonly KEYFRAME_STORM_ISSUE_TYPE = "keyframe-storm";
static readonly RECOVERY_FAILED_ISSUE_TYPE = "video-recovery-failed";
readonly name = "freezed-video-track-detector";
disabled: boolean;
private static readonly MAX_WINDOW_ENTRIES;
private readonly issueKey;
private readonly _stormIssueKey;
private readonly _recoveryIssueKey;
private _lastFreezeCount;
private _startedFreezeAt?;
private readonly _window;
private _sumPlis;
private _sumFirs;
private _sumKeyFrames;
private _stormOn;
private _stormStartedAt?;
private _recoveryFailedOn;
private _recoveryFailedStartedAt?;
private _stalledSince?;
private _pliCountSinceStalled;
constructor(trackMonitor: InboundTrackMonitor);
private get peerConnection();
update(): void;
private _checkFreeze;
private _updateWindow;
private _checkKeyframeStorm;
private _checkRecoveryFailed;
private _resolve;
}