Skip to content

Commit 568ba32

Browse files
authored
fix: Fix TrackStreamStateUpdatedEvent not emitted. (#612)
1 parent 42ab40c commit 568ba32

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/src/core/room.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,14 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
769769
void _onSignalStreamStateUpdateEvent(
770770
List<lk_rtc.StreamStateInfo> updates) async {
771771
for (final update in updates) {
772+
var identity = _sidToIdentity[update.participantSid];
773+
if (identity == null) {
774+
logger
775+
.warning('participant not found for sid ${update.participantSid}');
776+
continue;
777+
}
772778
// try to find RemoteParticipant
773-
final participant = remoteParticipants[update.participantSid];
779+
final participant = remoteParticipants[identity];
774780
if (participant == null) continue;
775781
// try to find RemoteTrackPublication
776782
final trackPublication = participant.trackPublications[update.trackSid];

0 commit comments

Comments
 (0)