Allow camera engines to signal events to the card.

This commit is contained in:
Dermot Duffy
2024-03-03 15:40:20 -08:00
parent 305a2db573
commit 88bea0ae7d
61 changed files with 7480 additions and 4213 deletions
+3 -3
View File
@@ -71,7 +71,7 @@ export class FrigateCardGo2RTC extends LitElement implements FrigateCardMediaPla
}
public isMuted(): boolean {
return this._player?.video.muted ?? true;
return this._player?.video?.muted ?? true;
}
public async seek(seconds: number): Promise<void> {
@@ -87,11 +87,11 @@ export class FrigateCardGo2RTC extends LitElement implements FrigateCardMediaPla
}
public isPaused(): boolean {
return this._player?.video.paused ?? true;
return this._player?.video?.paused ?? true;
}
public async getScreenshotURL(): Promise<string | null> {
return this._player ? screenshotMedia(this._player.video) : null;
return this._player?.video ? screenshotMedia(this._player.video) : null;
}
disconnectedCallback(): void {