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

192
Views
Llamadas grupales con peerjs

Estoy tratando de hacer un chat de voz usando algunos canales de voz en particular. Sin embargo, tengo problemas para que más de dos usuarios interactúen a la vez.

Por lo que entiendo cuando crea una llamada parece que de alguna manera interrumpe la anterior.

Intenté seguir Multi Party - Video Conference con peerJS

y convertirlo para que sea compatible con mi

¿Alguien sabría la solución?

 // when the user connect to the channel socket.on('user-connected', (data) => { if(document.querySelector(`#channel-user-${data.user_id}`) !== null) return; const connectedUsers = document.querySelectorAll(`#channel-image-${data.channel_id}`)[0]; if (data.user_id === user_id && connectedUsers !== undefined) { for (let i = 0; i < connectedUsers.children.length; i++) { // get all the users inside the channel const element = connectedUsers.children[i]; const otherUser = element.id.split('-')[element.id.split('-').length - 1] //this is the peer id // call it const call = peer.call(otherUser, localStream); call.on('stream', stream => { remoteStream = stream; const audio = document.createElement('audio'); audio.srcObject = stream; audio.play(); }) } }
 //when receiving a call answer and play it peer.on('call', call => { console.log('Received call by', call.peer); call.answer(localStream); call.on('stream', stream => { remoteStream = stream; const audio = document.createElement('audio'); audio.srcObject = stream; audio.play(); }) });
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!