From cadf3bf6495443a60f1aecd43964fd877c8e6a5a Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Fri, 16 Jun 2023 22:00:38 +0530 Subject: [PATCH] Simulate muted audio track publish on migration. (#1799) Till now only video was using simulated publish when migrating on mute. But, with `pauseUpstream() + replaceTrack(null)`, it is possible that client does not send any data when muted. I do not think there is a problem to do this (even when cleint is actually using mute which sends silence frames). --- pkg/rtc/participant.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index 3d0c573d1..112e660c6 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -569,7 +569,7 @@ func (p *ParticipantImpl) handleMigrateMutedTrack() { } ti := pti.trackInfos[0] - if ti.Muted && ti.Type == livekit.TrackType_VIDEO { + if ti.Muted { mt := p.addMigrateMutedTrack(cid, ti) if mt != nil { addedTracks = append(addedTracks, mt)