这是indexloc提供的服务,不要输入任何密码
Skip to content

[bug][android] Cannot see video feeds of previous participants #895

@AoEiuV020

Description

@AoEiuV020

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

  1. Windows device joins the meeting
  2. Android device joins the meeting
  3. Windows can see Android, but Android cannot see Windows
  4. Windows exits the meeting
  5. Windows joins the meeting again
  6. 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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions