Add auto unmute support.

This commit is contained in:
Dermot Duffy
2022-02-01 20:40:34 -08:00
parent f46a15d76e
commit 632569b1ef
10 changed files with 260 additions and 70 deletions
+14 -1
View File
@@ -56,6 +56,20 @@ customElements.whenDefined('ha-camera-stream').then(() => {
this._playerRef.value?.pause();
}
/**
* Mute the video.
*/
public mute(): void {
this.muted = true;
}
/**
* Unmute the video.
*/
public unmute(): void {
this.muted = false;
}
/**
* Master render method.
* @returns A rendered template.
@@ -82,7 +96,6 @@ customElements.whenDefined('ha-camera-stream').then(() => {
? html`
<frigate-card-ha-hls-player
${ref(this._playerRef)}
autoplay
playsinline
.allowExoPlayer=${this.allowExoPlayer}
.muted=${this.muted}