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

Add packetLoss stats to transport #648

Merged
merged 5 commits into from
Sep 13, 2021
Merged

Conversation

ggarber
Copy link
Contributor

@ggarber ggarber commented Aug 30, 2021

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.

Copy link
Collaborator

@nazar-pc nazar-pc left a 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

worker/src/RTC/TransportCongestionControlClient.cpp Outdated Show resolved Hide resolved
worker/src/RTC/TransportCongestionControlServer.cpp Outdated Show resolved Hide resolved
worker/src/RTC/TransportCongestionControlClient.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@nazar-pc nazar-pc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Member

@ibc ibc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doing cosmetic changes

worker/src/RTC/TransportCongestionControlServer.cpp Outdated Show resolved Hide resolved
@ibc ibc merged commit d4392bd into versatica:v3 Sep 13, 2021
@ibc
Copy link
Member

ibc commented Sep 13, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants