Skip to content

Commit

Permalink
changes for firefox only.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Jan 9, 2024
1 parent 50652d3 commit afcd9b7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/src/core/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,14 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
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 {
Expand Down

0 comments on commit afcd9b7

Please sign in to comment.