Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

186
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda