Add the kind of producer on new-producer event
This commit is contained in:
parent
50e95b93a4
commit
6b822142d0
3
app.js
3
app.js
@ -260,7 +260,6 @@ peers.on('connection', async (socket) => {
|
||||
isInitiator(callId, socket.id)
|
||||
? await videoCalls[callId].initiatorProducerTransport.connect({ dtlsParameters })
|
||||
: await videoCalls[callId].receiverProducerTransport.connect({ dtlsParameters });
|
||||
|
||||
} catch (error) {
|
||||
console.log(`ERROR | transport-connect | callId ${socketDetails[socket.id]} | ${error.message}`);
|
||||
}
|
||||
@ -370,8 +369,8 @@ peers.on('connection', async (socket) => {
|
||||
const socketToEmit = isInitiator(callId, socket.id)
|
||||
? videoCalls[callId].receiverSocket
|
||||
: videoCalls[callId].initiatorSocket;
|
||||
socketToEmit.emit('new-producer', { callId });
|
||||
|
||||
socketToEmit.emit('new-producer', { callId, kind });
|
||||
} catch (error) {
|
||||
console.log(`ERROR | transport-produce | callId ${socketDetails[socket.id]} | ${error.message}`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user