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

265
Views
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 answers
Answer question

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 Report
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!