LH-265-enable-audio-in-mediasoup #16
6
app.js
6
app.js
@ -378,14 +378,16 @@ peers.on('connection', async socket => {
|
||||
console.log('[consume] canConsumeAudio', canConsumeAudio);
|
||||
|
||||
if (canConsumeVideo && !canConsumeAudio) {
|
||||
console.log('1');
|
||||
const videoParams = consumeVideo(callId, rtpCapabilities)
|
||||
callback({ videoParams, audioParams: null });
|
||||
} if (canConsumeVideo && canConsumeAudio) {
|
||||
} else if (canConsumeVideo && canConsumeAudio) {
|
||||
console.log('2');
|
||||
const videoParams = consumeVideo(callId, rtpCapabilities)
|
||||
const audioParams = consumeAudio(callId, rtpCapabilities)
|
||||
callback({ videoParams, audioParams });
|
||||
} else {
|
||||
console.log(`[canConsume] Can't consume | callId ${callId}`);
|
||||
console.log(`[consume] Can't consume | callId ${callId}`);
|
||||
callback(null);
|
||||
}
|
||||
} catch (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user