diff --git a/src/components/ha-camera-stream.ts b/src/components/ha-camera-stream.ts index 9869def6ec..a5d82ec3a2 100644 --- a/src/components/ha-camera-stream.ts +++ b/src/components/ha-camera-stream.ts @@ -220,9 +220,10 @@ export class HaCameraStream extends LitElement { if ( hlsStreams.hasVideo && hlsStreams.hasAudio && - !webRtcStreams.hasAudio + !webRtcStreams.hasAudio && + !this.muted ) { - // webRTC stream is missing audio, use HLS + // webRTC stream is missing audio and video is not muted, use HLS return [{ type: STREAM_TYPE_HLS, visible: true }]; } if (webRtcStreams.hasVideo) { diff --git a/src/components/ha-web-rtc-player.ts b/src/components/ha-web-rtc-player.ts index 7d9528f38a..93018abe82 100644 --- a/src/components/ha-web-rtc-player.ts +++ b/src/components/ha-web-rtc-player.ts @@ -308,6 +308,10 @@ class HaWebRtcPlayer extends LitElement { if (!this._remoteStream) { return; } + // If the track is audio and the player is muted, we do not add it to the stream. + if (event.track.kind === "audio" && this.muted) { + return; + } this._remoteStream.addTrack(event.track); if (!this.hasUpdated) { await this.updateComplete;