diff --git a/app.js b/app.js index 1f3a1a0..391a23e 100644 --- a/app.js +++ b/app.js @@ -185,6 +185,10 @@ peers.on('connection', async socket => { try { console.log('consume', rtpCapabilities, callId); // check if the router can consume the specified producer + console.log('[consume] canConsume', router[callId].canConsume({ + producerId: producer.id, + rtpCapabilities + })); if (router[callId].canConsume({ producerId: producer.id, rtpCapabilities @@ -218,9 +222,11 @@ peers.on('connection', async socket => { kind: consumer.kind, rtpParameters: consumer.rtpParameters, } - + console.log('[consume] params', params); // send the parameters to the client callback({ params }) + } else { + console.log("Can't consume"); } } catch (error) { console.log(error.message)