diff --git a/lib/src/core/room.dart b/lib/src/core/room.dart index ca57bbe8..987f8bfb 100644 --- a/lib/src/core/room.dart +++ b/lib/src/core/room.dart @@ -769,8 +769,14 @@ class Room extends DisposableChangeNotifier with EventsEmittable { void _onSignalStreamStateUpdateEvent( List updates) async { for (final update in updates) { + var identity = _sidToIdentity[update.participantSid]; + if (identity == null) { + logger + .warning('participant not found for sid ${update.participantSid}'); + continue; + } // try to find RemoteParticipant - final participant = remoteParticipants[update.participantSid]; + final participant = remoteParticipants[identity]; if (participant == null) continue; // try to find RemoteTrackPublication final trackPublication = participant.trackPublications[update.trackSid];