Update
This commit is contained in:
parent
782683c3e2
commit
0731090b0e
@ -20765,31 +20765,29 @@ const connectRecvTransport = async () => {
|
|||||||
}, async ({videoParams, audioParams}) => {
|
}, async ({videoParams, audioParams}) => {
|
||||||
console.log(`[consume] videoParams ${videoParams}`);
|
console.log(`[consume] videoParams ${videoParams}`);
|
||||||
console.log(`[consume] audioParams ${audioParams}`);
|
console.log(`[consume] audioParams ${audioParams}`);
|
||||||
// if (params.error) {
|
if (!audioParams) {
|
||||||
// console.log('Cannot Consume')
|
console.log('Cannot Consume audio')
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
|
|
||||||
// console.log(`[connectRecvTransport] consume params ${params}`);
|
// Then consume with the local consumer transport
|
||||||
|
// which creates a consumer
|
||||||
|
consumer = await consumerTransport.consume({
|
||||||
|
id: audioParams.id,
|
||||||
|
producerId: audioParams.producerId,
|
||||||
|
kind: audioParams.kind,
|
||||||
|
rtpParameters: audioParams.rtpParameters
|
||||||
|
})
|
||||||
|
|
||||||
// // Then consume with the local consumer transport
|
// destructure and retrieve the video track from the producer
|
||||||
// // which creates a consumer
|
const { track } = consumer
|
||||||
// consumer = await consumerTransport.consume({
|
|
||||||
// id: params.id,
|
|
||||||
// producerId: params.producerId,
|
|
||||||
// kind: params.kind,
|
|
||||||
// rtpParameters: params.rtpParameters
|
|
||||||
// })
|
|
||||||
|
|
||||||
// // destructure and retrieve the video track from the producer
|
let stream = new MediaStream()
|
||||||
// const { track } = consumer
|
stream.addTrack(track)
|
||||||
|
// stream.removeTrack(track)
|
||||||
// let stream = new MediaStream()
|
remoteVideo.srcObject = stream
|
||||||
// stream.addTrack(track)
|
socket.emit('consumer-resume')
|
||||||
// // stream.removeTrack(track)
|
console.log('consumer', consumer);
|
||||||
// remoteVideo.srcObject = stream
|
|
||||||
// socket.emit('consumer-resume')
|
|
||||||
// console.log('consumer', consumer);
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -407,31 +407,29 @@ const connectRecvTransport = async () => {
|
|||||||
}, async ({videoParams, audioParams}) => {
|
}, async ({videoParams, audioParams}) => {
|
||||||
console.log(`[consume] videoParams ${videoParams}`);
|
console.log(`[consume] videoParams ${videoParams}`);
|
||||||
console.log(`[consume] audioParams ${audioParams}`);
|
console.log(`[consume] audioParams ${audioParams}`);
|
||||||
// if (params.error) {
|
if (!audioParams) {
|
||||||
// console.log('Cannot Consume')
|
console.log('Cannot Consume audio')
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
|
|
||||||
// console.log(`[connectRecvTransport] consume params ${params}`);
|
// Then consume with the local consumer transport
|
||||||
|
// which creates a consumer
|
||||||
|
consumer = await consumerTransport.consume({
|
||||||
|
id: audioParams.id,
|
||||||
|
producerId: audioParams.producerId,
|
||||||
|
kind: audioParams.kind,
|
||||||
|
rtpParameters: audioParams.rtpParameters
|
||||||
|
})
|
||||||
|
|
||||||
// // Then consume with the local consumer transport
|
// destructure and retrieve the video track from the producer
|
||||||
// // which creates a consumer
|
const { track } = consumer
|
||||||
// consumer = await consumerTransport.consume({
|
|
||||||
// id: params.id,
|
|
||||||
// producerId: params.producerId,
|
|
||||||
// kind: params.kind,
|
|
||||||
// rtpParameters: params.rtpParameters
|
|
||||||
// })
|
|
||||||
|
|
||||||
// // destructure and retrieve the video track from the producer
|
let stream = new MediaStream()
|
||||||
// const { track } = consumer
|
stream.addTrack(track)
|
||||||
|
// stream.removeTrack(track)
|
||||||
// let stream = new MediaStream()
|
remoteVideo.srcObject = stream
|
||||||
// stream.addTrack(track)
|
socket.emit('consumer-resume')
|
||||||
// // stream.removeTrack(track)
|
console.log('consumer', consumer);
|
||||||
// remoteVideo.srcObject = stream
|
|
||||||
// socket.emit('consumer-resume')
|
|
||||||
// console.log('consumer', consumer);
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user