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

255
Vistas
WebRTC : Remote peer stream is not getting render

I am facing difficulty in running the remote stream. I am getting stream Object Ontrack Event but the video not getting played. (auto run is true) this is happening with a few peers, not with all the peers.

peer.iceConnectionState state changed to 'disconnected' and will never come back to the connected state.

what could be the solution for this situation.

  peer.ontrack = e => {
    console.log('video is receiveing')
    e.track.onunmute = () => {
      console.log('track unmuted');
      addVideoElement(userId, e.streams[0])
    }
  }

function addVideoElement(userId, stream) {
  const existingVideoElement = document.getElementById(userId)
  console.log('existingVideoElement ',existingVideoElement)
  if(existingVideoElement) {
    existingVideoElement.srcObject = stream
    return
  }
  
  console.log('new element for user', userId)
  const videoCointainer = document.getElementById('videoListContainer')
  const videoElement = document.createElement('video')
  videoElement.setAttribute('id',userId)
  videoElement.srcObject = stream
  videoElement.muted = 0
  videoElement.autoplay = true
  if(iOS) {
    videoElement.playsInline = true
  }
  if (userId === socket.id) {
    videoElement.volume = 0
  }
  videoCointainer.appendChild(videoElement)
  shouldMute(false)
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Just because you get a stream object this does not mean the peerconnection got established which is a prerequisite for receiving data to display. If the first ice connection state you hit is "disconnected" that means the connection failed. Adding a TURN server increases the chance of success.

about 4 years ago · Juan Pablo Isaza Denunciar
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