client-sdk-flutter icon indicating copy to clipboard operation
client-sdk-flutter copied to clipboard

room.connect() Dropped Frames

Open lurongshuang opened this issue 10 months ago • 8 comments

Flutter 3.27.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision 17025dd882 (5 months ago) • 2024-12-17 03:23:09 +0900 Engine • revision cb4b5fff73 Tools • Dart 3.6.0 • DevTools 2.40.2

flutter_3.27.4 Dropped Frames flutter_3.29.1 Dropped Frames flutter_3.29.3 Dropped Frames

But Flutter 3.24.5 is fine

lurongshuang avatar May 06 '25 09:05 lurongshuang

livekit_client: ^2.4.6

lurongshuang avatar May 06 '25 10:05 lurongshuang

@cloudwebrtc

lurongshuang avatar May 06 '25 10:05 lurongshuang

hey @lurongshuang , can you describe the steps to reproduce, and how to compare frame drops?

cloudwebrtc avatar May 06 '25 10:05 cloudwebrtc

@lurongshuang,能否描述一下复现的步骤,以及如何比较丢帧情况?

When connecting to a room, the page will have a loading animation, which will cause frame drops. When connecting to a room, jumping to a new page will also cause frame drops.

lurongshuang avatar May 06 '25 11:05 lurongshuang

var gloLocalAudioTrack =
    await LocalAudioTrack.create(AudioCaptureOptions());
var gloLocalVideoTrack = await LocalVideoTrack.createCameraTrack(
    CameraCaptureOptions(
        focusMode: CameraFocusMode.locked,
        exposureMode: CameraExposureMode.locked));
await room.connect(serverUrl, token,

    fastConnectOptions: FastConnectOptions(
        microphone: TrackOption(enabled: true, track: gloLocalAudioTrack),
        camera: TrackOption(enabled: true, track: gloLocalVideoTrack)));

If configuring fastConnectOptions connection, frames will be lost

Alternatively, after the link execution is completed, proceed await localParticipant.setCameraEnabled(true); await localParticipant.setMicrophoneEnabled(true); It's also Dropped Frames

@cloudwebrtc ,

lurongshuang avatar May 13 '25 12:05 lurongshuang

https://github.com/user-attachments/assets/abf7dd5a-4cec-4eb1-929d-ddc8adc885de

Run the official demo, When jumping, there is a noticeable lag

lurongshuang avatar May 13 '25 13:05 lurongshuang

@cloudwebrtc

lurongshuang avatar May 13 '25 13:05 lurongshuang

I'm also seeing the same issue. Frame drops when connecting to a room. It's a bit annoying as we show a loading animation, and it looks bad.

jimmy0251 avatar Jul 04 '25 20:07 jimmy0251