-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add packetLoss stats to transport #648
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm run format:worker
can be used to apply correct formatting to worker code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing cosmetic changes
This is merged, however one request more, please. Could you add an example of this new stat in mediasoup-website project in https://mediasoup.org/documentation/v3/mediasoup/rtc-statistics/#WebRtcTransport-Statistics? |
One common requirement is to monitor the quality of the user's connections to notify the user and the rest of participants when their connections are not good enough so that they can understand any audio/video issue they can experience during conversations.
This is typically based on packetLoss and/or roundTripTime.
With existing APIs those stats are available per consumer and producer so the application could request all/some of them and aggregate the stats but that can be more efficient and simpler if some of those stats are exposed at transport level.
This PR adds packetLoss as a stat at transport level. The application can retrieve this metric every X seconds and notify the user when its uplink or downlink is bad and also notify rest of participants about it.
The implementation is based on transportCc feedback messages (comparing expected and received values and averaging last 24 of those measurements) so these new stats are only available when transportCC is enabled.