-
Notifications
You must be signed in to change notification settings - Fork 201
Description
Describe the bug
Android devices joining the meeting later cannot see the video feeds of other participants who are already in the meeting.
Audio works normally.
Functionality is normal on Windows and web.
The only error log is:
SEVERE: [livekit] addSubscribedMediaTrack() throwed Instance of 'TrackSubscriptionExceptionEvent'
My investigation points to \lib\src\core\room.dart:570 in the on EngineTrackAddedEvent where the participant cannot be found:
final participant = _getRemoteParticipantBySid(participantSid);
try {
if (trackSid == null || trackSid.isEmpty) {
throw TrackSubscriptionExceptionEvent(
participant: participant,
reason: TrackSubscribeFailReason.invalidServerResponse,
);
}
if (participant == null) {
throw TrackSubscriptionExceptionEvent(
participant: participant,
sid: trackSid,
reason: TrackSubscribeFailReason.noParticipantFound,
);
}
Going deeper, in \lib\src\core\room.dart:440, execution stops at setCameraEnabled and doesn't continue further. Even with breakpoints, no exception is caught, and it directly jumps to the on EngineTrackAddedEvent mentioned above.
The _getOrCreateRemoteParticipant below isn't executed:
final video = options.camera;
final bool videoEnabled = video.enabled == true || video.track != null;
if (videoEnabled) {
if (video.track != null) {
await _localParticipant!.publishVideoTrack(video.track as LocalVideoTrack,
publishOptions: roomOptions.defaultVideoPublishOptions);
} else {
await _localParticipant!
.setCameraEnabled(true, cameraCaptureOptions: roomOptions.defaultCameraCaptureOptions);
}
}
To Reproduce
- Windows device joins the meeting
- Android device joins the meeting
- Windows can see Android, but Android cannot see Windows
- Windows exits the meeting
- Windows joins the meeting again
- Both parties can see each other
Expected behavior
Android should be able to see the other party at step 3.
Platform information
- Flutter version: 3.35.6
- Plugin version: 2.5.2
- Flutter target OS: android
- Flutter target OS version: 15
- Flutter console log: