LINXD-2197: Added comments; Catch errors; Fix package.json start:run script #8

Merged
sergiu merged 4 commits from LINXD-2197-refactor-improving-mediasoup-web-socket-component into master 2022-09-27 10:00:25 +00:00
Member
No description provided.
sergiu added 1 commit 2022-09-25 17:25:37 +00:00
sergiu requested review from cristi 2022-09-25 17:25:46 +00:00
sergiu added 2 commits 2022-09-27 06:21:31 +00:00
cristi requested changes 2022-09-27 08:00:04 +00:00
app.js Outdated
@ -115,0 +117,4 @@
videoCalls[callId].router.close();
delete videoCalls[callId];
}
} catch (error) {
Owner

It could be useful to have a message like Call id ${callId} already closed

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);
Owner

We should also call closeCall here to clean up on disconnect.

We should also call `closeCall` here to clean up on disconnect.
app.js Outdated
@ -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) {
Owner

It could be useful to see a message when the transport is already present.

Producer transport already present. Ignoring. callId=... assetId=...

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`);
Owner

We should also print the error object.

We should also print the `error` object.
sergiu added 1 commit 2022-09-27 09:43:24 +00:00
cristi approved these changes 2022-09-27 09:47:46 +00:00
sergiu changed title from WIP: LINXD-2197: Added comments; Catch errors; Fix package.json start:run script to LINXD-2197: Added comments; Catch errors; Fix package.json start:run script 2022-09-27 10:00:18 +00:00
sergiu merged commit de1458bbde into master 2022-09-27 10:00:25 +00:00
sergiu deleted branch LINXD-2197-refactor-improving-mediasoup-web-socket-component 2022-09-27 10:00:25 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Safemobile/mediasoup#8
No description provided.