Update server
This commit is contained in:
parent
46d3499e3d
commit
a3b083fe24
10
app.js
10
app.js
@ -377,11 +377,11 @@ peers.on('connection', async socket => {
|
||||
})
|
||||
|
||||
if (canConsumeVideo && !canConsumeAudio) {
|
||||
const videoParams = consumeVideo()
|
||||
const videoParams = consumeVideo(callId)
|
||||
callback({ videoParams, audioParams: null });
|
||||
} if (canConsumeVideo && canConsumeAudio) {
|
||||
const videoParams = consumeVideo()
|
||||
const audioParams = consumeAudio()
|
||||
const videoParams = consumeVideo(callId)
|
||||
const audioParams = consumeAudio(callId)
|
||||
callback({ videoParams, audioParams });
|
||||
} else {
|
||||
console.log(`[canConsume] Can't consume | callId ${callId}`);
|
||||
@ -409,7 +409,7 @@ peers.on('connection', async socket => {
|
||||
});
|
||||
});
|
||||
|
||||
const consumeVideo = async () => {
|
||||
const consumeVideo = async (callId) => {
|
||||
videoCalls[callId].consumerVideo = await videoCalls[callId].consumerTransport.consume({
|
||||
producerId: videoCalls[callId].producerVideo.id,
|
||||
rtpCapabilities,
|
||||
@ -438,7 +438,7 @@ const consumeVideo = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const consumeAudio = async () => {
|
||||
const consumeAudio = async (callId) => {
|
||||
videoCalls[callId].consumerAudio = await videoCalls[callId].consumerTransport.consume({
|
||||
producerId: videoCalls[callId].producerAudio.id,
|
||||
rtpCapabilities,
|
||||
|
Loading…
Reference in New Issue
Block a user