LINXD-2209-black-screen-when-2-video-calls-are-answered-simultaneously #3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "LINXD-2209-black-screen-when-2-video-calls-are-answered-simultaneously"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
LINXD-2209-black-screen-when-2-video-calls-are-answered-simultaneouslyto WIP: LINXD-2209-black-screen-when-2-video-calls-are-answered-simultaneouslyWIP: LINXD-2209-black-screen-when-2-video-calls-are-answered-simultaneouslyto LINXD-2209-black-screen-when-2-video-calls-are-answered-simultaneouslyI think we can use it the way it is and refactor afterwards. Please see comments.
Considering that all the event handlers for a connection are scoped inside the
peers.on('connection', async socket => {
, I think that we can have all variables declared and used in here without conflict, without the need forvideoCalls
andsocketDetails
hashes.This is not possible as the router need to be shared between producer and consumer.
@ -101,3 +110,2 @@
socket.emit('connection-success', {
socketId: socket.id,
existsProducer: producer ? true : false,
socketId: socket.id
not important: we don't need socket.id on clients
@ -141,2 +138,3 @@
videoCalls[callId].producerTransport = await createWebRtcTransportLayer(callId, callback)
else
consumerTransport = await createWebRtcTransportLayer(callId, callback)
videoCalls[callId].consumerTransport = await createWebRtcTransportLayer(callId, callback)
For refactor: why do we need to differentiate between producerTransport and consumerTransport? Why don't we have a
transport
variable (it is only one transport for each client regardless if they are producer or consumer)?We need producer and consumer transports for each call.
@ -211,0 +214,4 @@
videoCalls[callId].router.close()
videoCalls[callId].producer.close()
videoCalls[callId].consumer.close()
delete videoCalls[callId].router
Function to clearVideoCall and socket.