Add new-producer event; Update client to consume when receives new-producer event #24
@ -20449,10 +20449,14 @@ setTimeout(() => {
|
||||
console.log(`[MEDIA] ${config.mediasoupAddress} | connected: ${socket.connected} | existsProducer: ${existsProducer}`)
|
||||
if (!IS_PRODUCER && existsProducer && consumer === undefined) {
|
||||
goConnect()
|
||||
// document.getElementById('btnRecvSendTransport').click();
|
||||
}
|
||||
if (IS_PRODUCER && urlParams.get('testing') === 'true') { getLocalStream() }
|
||||
})
|
||||
|
||||
socket.on('new-producer', ({ callId }) => {
|
||||
console.log(`🟢 new-producer | callId: ${callId} | Ready to consume`);
|
||||
consume()
|
||||
})
|
||||
}
|
||||
|
||||
if (IS_PRODUCER === true) {
|
||||
|
Loading…
Reference in New Issue
Block a user