Skip to content

Commit

Permalink
fix bug for sync tracks. (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc authored Feb 8, 2024
1 parent f687928 commit 61d77eb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/src/core/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,10 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
var streamId = idParts[1];
var trackSid = event.track.id;

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;
}
// 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);
Expand Down

0 comments on commit 61d77eb

Please sign in to comment.