LINXD-2197: Added comments; Catch errors; Fix package.json start:run script #8
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "LINXD-2197-refactor-improving-mediasoup-web-socket-component"
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?
@ -115,0 +117,4 @@
videoCalls[callId].router.close();
delete videoCalls[callId];
}
} catch (error) {
It could be useful to have a message like Call id ${callId} already closed
@ -130,3 +148,2 @@
socket.on('disconnect', () => {
// do some cleanup
console.log('peer disconnected | socket.id', socket.id)
console.log('peer disconnected | socket.id', socket.id);
We should also call
closeCall
here to clean up on disconnect.@ -162,0 +188,4 @@
console.log(`[createWebRtcTransport] sender ${sender} | callId ${callId}`);
if (sender && !videoCalls[callId].producerTransport) {
videoCalls[callId].producerTransport = await createWebRtcTransportLayer(callId, callback)
} else if (!sender && !videoCalls[callId].consumerTransport) {
It could be useful to see a message when the transport is already present.
Producer transport already present. Ignoring. callId=... assetId=...
@ -193,0 +245,4 @@
console.log(`[transport-recv-connect] socket.id ${socket.id} | callId ${callId}`);
await videoCalls[callId].consumerTransport.connect({ dtlsParameters });
} catch (error) {
console.log(`ERROR | transport-recv-connect | callId ${socketDetails[socket.id]} | ERROR`);
We should also print the
error
object.WIP: LINXD-2197: Added comments; Catch errors; Fix package.json start:run scriptto LINXD-2197: Added comments; Catch errors; Fix package.json start:run script