LH-276: Add close-producer event handler; Update client #30

Merged
sergiu merged 9 commits from LH-276-close-producer into develop 2023-02-23 09:46:42 +00:00
Showing only changes of commit abb1533c9b - Show all commits

5
app.js
View File

@ -386,7 +386,6 @@ peers.on('connection', async (socket) => {
- The consumer does consumerTransport.consume(params)
*/
socket.on('consume', async ({ rtpCapabilities }, callback) => {
try {
const callId = socketDetails[socket.id];
const socketId = socket.id;
let audioParams, videoParams;
@ -394,10 +393,6 @@ peers.on('connection', async (socket) => {
console.log(`[consume] socket ${socketId} | callId: ${callId}`);
if (typeof rtpCapabilities === 'string') rtpCapabilities = JSON.parse(rtpCapabilities);
} catch (error) {
console.error(`[consume] | ERROR | callId: ${callId} | error: ${error.message}`);
callback({ params: { error } });
}
try {
videoParams = await consumeVideo({ callId, socketId, rtpCapabilities });