Add new-producer event; Update client to consume when receives new-producer event #24

Merged
sergiu merged 4 commits from LAPI-675-generate-new-producer-in-mediasoup-and-client into develop 2023-01-16 15:40:06 +00:00
Showing only changes of commit 0f4342777a - Show all commits

View File

@ -20449,10 +20449,14 @@ setTimeout(() => {
console.log(`[MEDIA] ${config.mediasoupAddress} | connected: ${socket.connected} | existsProducer: ${existsProducer}`) console.log(`[MEDIA] ${config.mediasoupAddress} | connected: ${socket.connected} | existsProducer: ${existsProducer}`)
if (!IS_PRODUCER && existsProducer && consumer === undefined) { if (!IS_PRODUCER && existsProducer && consumer === undefined) {
goConnect() goConnect()
// document.getElementById('btnRecvSendTransport').click();
} }
if (IS_PRODUCER && urlParams.get('testing') === 'true') { getLocalStream() } 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) { if (IS_PRODUCER === true) {