Alper Posted November 18, 2022 Share Posted November 18, 2022 Hi One of our user wants to get notified if the latency values are increased in WebRTC to take some actions accordingly on their viewers side. Can you help? Alper Link to comment Share on other sites More sharing options...
1 mekya Posted November 18, 2022 Share Posted November 18, 2022 Thank you for the question. I think looking at the RTT(Round Trip Time) likely gives you the result. Sample publishing page shows the RTT in seconds. Check the screenshot below In order to get this value, you just need to call the `enableStats` after you receive the `publish_started` callback as in the sample publisher page. ... else if (info == "publish_started") { webRTCAdaptor.enableStats(obj.streamId); } ... After that, you'll receive `updated_stats` callback and you can get the video and audio Round Trip Time as follows. ... else if (info == "updated_stats") { console.log( " video RTT: " + obj.videoRoundTripTime + " audio RTT: " + obj.audioRoundTripTime ); } ... In a good scenario, RTT time should be less than 50ms, the lower the better. Additionally, jitter and packet lost are the other parameters that specify the quality of the video. I hope this response answers your question well. Please let me know if you have any other questions or I can do anything for you. Regards, Oguz 2 Link to comment Share on other sites More sharing options...
Question
Alper
Hi
One of our user wants to get notified if the latency values are increased in WebRTC to take some actions accordingly on their viewers side. Can you help?
Alper
Link to comment
Share on other sites
Top Posters For This Question
1
1
Popular Days
Nov 18
2
Top Posters For This Question
Alper 1 post
mekya 1 post
Popular Days
Nov 18 2022
2 posts
Popular Posts
mekya
Thank you for the question. I think looking at the RTT(Round Trip Time) likely gives you the result. Sample publishing page shows the RTT in seconds. Check the screenshot below
Posted Images
1 answer to this question
Recommended Posts