Skip to content

Packet loss stats not connected #244

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

Open
pmukherj opened this issue May 22, 2025 · 0 comments
Open

Packet loss stats not connected #244

pmukherj opened this issue May 22, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@pmukherj
Copy link

pmukherj commented May 22, 2025

Describe the bug

When using getReceiverStats, while a call is active and connected packetsReceived and packetsLoss is always zero, bytesReceived is a growing number, as expected.

To Reproduce

This code, pulls the track source on the remote participant and watches for packet loss, I set the Network Link Conditioner to be a high packet loss network but the report from the sdk is always zero. I suspect that there is a connection missing into the underlying webrtc numbers perhaps?

const remoteParticipant = Array.from( room?.remoteParticipants.values() ?? [], )[0] as RemoteParticipant | undefined;

if (!remoteParticipant) return;
const audioTrack = remoteParticipant.getTrackPublication(Track.Source.Microphone,)?.track as RemoteAudioTrack;

if (!audioTrack) return;

intervalId = setInterval(() => {
  audioTrack.getReceiverStats()
    .then((receiverStats: AudioReceiverStats | undefined) => {
       if (receiverStats) {
          console.log(receiverStats.bytesReceived) // growing number, as expected
          console.log(receiverStats.packetsReceived) // always zero
          console.log(receiverStats.packetsLost) //always zero
       }
     }
  });
}, 500);

Expected behavior

I expect there to be some non-zero packet loss numbers, especially if I setup the NetworkLinkConditioner to mimic a high packet loss numbers, but its all zeros for the duration of the call, even on a "Very Bad Network"

Device Info:

  • Device: iPhone 14
  • OS: iOS 16.7.11

Dependencies Info (please reference your package-lock.json or yarn.lock file, not just your package.json):

"resolved": "https://registry.npmjs.org/@livekit/protocol/-/protocol-1.33.0.tgz",
"node_modules/@livekit/react-native": {
"resolved": "https://registry.npmjs.org/@livekit/react-native/-/react-native-2.6.2.tgz",
"@livekit/components-react": "^2.8.1",
"@livekit/react-native-webrtc": "^125.0.8",
"livekit-client": "^2.9.0",

@pmukherj pmukherj added the bug Something isn't working label May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants