refactor: Split live.ts into multiple files (#1644)

This commit is contained in:
Dermot Duffy
2024-10-13 20:00:38 -07:00
committed by GitHub
parent 653bb8b7b5
commit f473cae6b5
18 changed files with 1151 additions and 1079 deletions
+36
View File
@@ -0,0 +1,36 @@
export class VideoRTC extends HTMLElement {
DISCONNECT_TIMEOUT: number;
RECONNECT_TIMEOUT: number;
CODECS: string[];
mode: string;
background: boolean;
visibilityThreshold: number;
visibilityCheck: boolean;
pcConfig: RTCConfiguration;
wsState: number;
pcState: number;
video: HTMLVideoElement | null;
ws: WebSocket | null;
wsURL: string;
pc: RTCPeerConnection | null;
connectTS: number;
mseCodecs: string;
src: string | URL;
oninit(): void;
send(value: unknown): void;
onpcvideo(ev: Event): void;
onconnect(): void;
ondisconnect(): void;
onclose(): void;
onopen(): void;
onwebrtc(): void;
onmessage: Record<string, (msg: { type: string; value: string }) => void>;
// Custom methods/members.
controls: boolean;
containingPlayer: FrigateCardMediaPlayer | null;
microphoneStream: MediaStream | null;
reconnect();
}