Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

254
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda