Description
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",