diff --git a/lib/src/core/room.dart b/lib/src/core/room.dart index 04e64cf3d..699d878e8 100644 --- a/lib/src/core/room.dart +++ b/lib/src/core/room.dart @@ -442,9 +442,14 @@ class Room extends DisposableChangeNotifier with EventsEmittable { final participantSid = idParts[0]; var streamId = idParts[1]; var trackSid = event.track.id; - // firefox will get streamId (pID|trackId) instead of (pID|streamId) as it doesn't support sync tracks by stream - // and generates its own track id instead of infer from sdp track id. - if (streamId.isNotEmpty && streamId.startsWith('TR')) trackSid = streamId; + + if (kIsWeb && lkBrowser() == BrowserType.firefox) { + // firefox will get streamId (pID|trackId) instead of (pID|streamId) as it doesn't support sync tracks by stream + // and generates its own track id instead of infer from sdp track id. + if (streamId.isNotEmpty && streamId.startsWith('TR')) { + trackSid = streamId; + } + } final participant = _getRemoteParticipantBySid(participantSid); try {