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

85
Visualizações
webRTC - Video conferece multiple rooms

I'm using Pion SFU-WS, basically a golang based webRTC application Pion- SFU.

Although things work like a charm, I'm clueless about how to run multiple conferences (like we know from Microsoft Teams or Zoom). Here is an example of what I'm trying to do:

Room 1: https://localhost:7676/?room-id=12345

Participants of room 1 = A, B, C, D

Room 2: https://localhost:7676/?room-id=67890

Participants of room 2 = E, F, G, H

I can imagine that a static session-id must be passed to

peerConnection, err := webrtc.NewPeerConnection(webrtc.Configuration{})

However, all my efforts/approaches have failed.

Any help would be immensely appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

After some debugging, I have come up with the following "solution". Though I can now isolate peers to a particular room, I'm not sure if this is the correct way of handling multiple rooms with webRTC.

Hence, I'm not accepting the answer yet. In particular, I'm hoping that one of the Pion experts would comment on the performance issues with this approach.

The idea is to bind the list of peer connections to a specific room id:

// make list of peer connections globally accessable
// example: peerconnections[1234][..]peerConnectionState{peerConnection, c}
var peerConnections map[string][]peerConnectionState

// Create new PeerConnection
// peerConnection, err := webrtc.NewPeerConnection(webrtc.Configuration{})
peerConnection, err := webrtc.NewPeerConnection(peerConnectionConfig)


// the list of connections
// initialize connections list
if peerConnections == nil {
    peerConnections = make(map[string][]peerConnectionState, 0)
}

// push peer connection to the list of peer connections of a specific room
if peerConnections[roomId] == nil {
    peerConnections[roomId] = []peerConnectionState{peerConnectionState{peerConnection, c}}
}else{
    peerConnections[roomId] = append(peerConnections[roomId], peerConnectionState{peerConnection, c})
}
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