Don't add audio track if webrtc player is muted (#25767)

This commit is contained in:
Paul Bottein
2025-10-14 12:21:59 +02:00
committed by GitHub
parent 2a5d4ac578
commit 938128d1c3
2 changed files with 11 additions and 4 deletions

View File

@@ -321,6 +321,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;