Skip to content

Commit 61d77eb

Browse files
authored
fix bug for sync tracks. (#466)
1 parent f687928 commit 61d77eb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/src/core/room.dart

+4-6
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,10 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
439439
var streamId = idParts[1];
440440
var trackSid = event.track.id;
441441

442-
if (kIsWeb && lkBrowser() == BrowserType.firefox) {
443-
// firefox will get streamId (pID|trackId) instead of (pID|streamId) as it doesn't support sync tracks by stream
444-
// and generates its own track id instead of infer from sdp track id.
445-
if (streamId.isNotEmpty && streamId.startsWith('TR')) {
446-
trackSid = streamId;
447-
}
442+
// firefox will get streamId (pID|trackId) instead of (pID|streamId) as it doesn't support sync tracks by stream
443+
// and generates its own track id instead of infer from sdp track id.
444+
if (streamId.isNotEmpty && streamId.startsWith('TR')) {
445+
trackSid = streamId;
448446
}
449447

450448
final participant = _getRemoteParticipantBySid(participantSid);

0 commit comments

Comments
 (0)