Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
How to check the latency of video stream(MediaStreamTrack) in webrtc peerconnection?

I'm trying to build a simple webrtc video chat application. I went through the webrtc API's overview and documentation. I used the sample chat application code example given here

and the github url is https://github.com/webrtc/FirebaseRTC/tree/solution. But now, I want to add additional features in this, like displaying latency of the video chat. What are the ways to do that. I tried to log the latency property of MediaTrackConstraints but it gave me undefined.

    peerConnection.addEventListener('track', event => {
    console.log('Got remote track:', event.streams[0]);
    event.streams[0].getTracks().forEach(track => {
      console.log('Add a track to the remoteStream:', track);
      remoteStream.addTrack(track);
      console.log('Track settings are:', track.getConstraints().latency);<------- here, it logs undefined
    });
  });

Is this the right way to get latency or there is another way to do it. Is there a timestamp based method? And in documentation it says that the latency property is only available for audio stream, so what do I do for video stream. I am a beginner in this. Any help is appreciated, Thanks.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!