From 2e236a193e85e8ddd65b8a7e2458495fa31b11b4 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Wed, 9 Apr 2025 12:12:56 +0530 Subject: [PATCH] Revert participant state ACTIVE change. (#3598) Had made the change to align `participant active` to after the ICE connection is done and that log could list all candidates. But, with one shot signalling, the state change has to be early to wait on (auto) subscriptions of track of other participant. So, state has to be changed early. --- pkg/rtc/participant.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index 3af11474b..2f3193b03 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -903,7 +903,11 @@ func (p *ParticipantImpl) HandleOffer(offer webrtc.SessionDescription) error { } offer = p.setCodecPreferencesForPublisher(offer) - return p.TransportManager.HandleOffer(offer, shouldPend) + err := p.TransportManager.HandleOffer(offer, shouldPend) + if p.params.UseOneShotSignallingMode { + p.updateState(livekit.ParticipantInfo_ACTIVE) + } + return err } func (p *ParticipantImpl) onPublisherAnswer(answer webrtc.SessionDescription) error {