Jump to content
  • 0

How could we get a notified by JS SDK about the latency increased ?



1 answer to this question

Recommended Posts

  • 1

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") {


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") {					
	" 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. 




  • Like 2
Link to comment
Share on other sites


  • Create New...