fix: Increase reliability of media auto actions (e.g. play) (#1934)

Refactors media player handling entirely to make the code more
consistent and less boilerplate. Add testing for media player actions.

- Closes #1921
- Closes #1916
This commit is contained in:
Dermot Duffy
2025-03-03 20:59:01 -08:00
committed by GitHub
parent d4650eae8a
commit 3b77b11196
58 changed files with 1972 additions and 1165 deletions
+3 -2
View File
@@ -1,3 +1,5 @@
import { MediaPlayerController } from '../../../../types';
export class VideoRTC extends HTMLElement {
DISCONNECT_TIMEOUT: number;
RECONNECT_TIMEOUT: number;
@@ -29,9 +31,8 @@ export class VideoRTC extends HTMLElement {
onmessage: Record<string, (msg: { type: string; value: string }) => void>;
// Custom methods/members.
containingPlayer: AdvancedCameraCardMediaPlayer | null;
mediaPlayerController: MediaPlayerController | null;
microphoneStream: MediaStream | null;
reconnect();
setControls(controls: boolean): void;
}