Jump to content
  • 0

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


Alper
 Share

Question

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

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

 

 

image.thumb.png.981077d493447c0dab5d916c34df6abd.png

 

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

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...