Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] AudioSenderStats with null parameters (round trip time, jitter, packets lost). #550

Open
hmirza1 opened this issue Jul 10, 2024 · 0 comments

Comments

@hmirza1
Copy link

hmirza1 commented Jul 10, 2024

Describe the bug
As per the title, the AudioSenderStats class has define parameters that are null. I am particularly interested in round trip time, jitter and packets lost. Meanwhile the timestamp() and bytesSent() methods seem to be working fine.

To Reproduce
Assuming a room variable is defined and room is connected. Devlog is my shorthand function for developer.log.

final audioTrack = room.localParticipant!.audioTrackPublications
            .firstWhere((track) => track.kind == TrackType.AUDIO)
            .track;

final stats = await audioTrack!.getSenderStats();
devLog(stats?.timestamp, 'TIME');
devLog(stats?.roundTripTime, 'RTT');
devLog(stats?.bytesSent, 'Bytes Sent');
devLog(stats?.jitter, 'JITTER');
devLog(stats?.packetsLost, 'PL');

I have placed the above code inside a periodic timer:

_pingTimer = Timer.periodic(const Duration(seconds: 5), (_) async {
        [ABOVE CODE HERE]
});

One of the print statements is as follows:

[TIME] 1720569791305377.0
[RTT] null
[Bytes Sent] 6189
[JITTER] null
[PL] null

Expected behavior
It was expected that the round trip time, jitter and packets lost fields would be populated with values. I need these values to essentially quantify the quality of connection.

[TIME] 1720569791305377.0
[RTT] **non-null value**
[Bytes Sent] 6189
[JITTER] **non-null value**
[PL] **non-null value**

Platform information
iOS simulator iPhone 14 Pro iOS 16.4
iOS simulator iPhone 15 Pro Max iOS 17.4 and iOS 17.5
Real device iPhone 15 Pro Max iOS 17.1.1

  • Flutter version:
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.22.1, on macOS 14.5 23F79 darwin-arm64, locale en-GB)
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    [✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 2022.3)
    [✓] VS Code (version 1.89.1)
    [✓] Connected device (6 available)
    [✓] Network resources

• No issues found!

  • Plugin version:
    livekit_client: ^2.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant