Skip to content

Commit

Permalink
fix: Fix TrackStreamStateUpdatedEvent not emitted.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Oct 22, 2024
1 parent 42ab40c commit d4d27ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/src/core/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,14 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
void _onSignalStreamStateUpdateEvent(
List<lk_rtc.StreamStateInfo> 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];
Expand Down

0 comments on commit d4d27ce

Please sign in to comment.