LINXD-2270-p2 #19
@ -20762,32 +20762,33 @@ const connectRecvTransport = async () => {
|
|||||||
await socket.emit('consume', {
|
await socket.emit('consume', {
|
||||||
rtpCapabilities: device.rtpCapabilities,
|
rtpCapabilities: device.rtpCapabilities,
|
||||||
callId
|
callId
|
||||||
}, async ({ params }) => {
|
}, async (data) => {
|
||||||
|
console.log(`[consume] data ${data}`);
|
||||||
// if (params.error) {
|
// if (params.error) {
|
||||||
// console.log('Cannot Consume')
|
// console.log('Cannot Consume')
|
||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
|
|
||||||
console.log(`[connectRecvTransport] consume params ${params}`);
|
// console.log(`[connectRecvTransport] consume params ${params}`);
|
||||||
|
|
||||||
// Then consume with the local consumer transport
|
// // Then consume with the local consumer transport
|
||||||
// which creates a consumer
|
// // which creates a consumer
|
||||||
consumer = await consumerTransport.consume({
|
// consumer = await consumerTransport.consume({
|
||||||
id: params.id,
|
// id: params.id,
|
||||||
producerId: params.producerId,
|
// producerId: params.producerId,
|
||||||
kind: params.kind,
|
// kind: params.kind,
|
||||||
rtpParameters: params.rtpParameters
|
// rtpParameters: params.rtpParameters
|
||||||
})
|
// })
|
||||||
|
|
||||||
// destructure and retrieve the video track from the producer
|
// // destructure and retrieve the video track from the producer
|
||||||
const { track } = consumer
|
// const { track } = consumer
|
||||||
|
|
||||||
let stream = new MediaStream()
|
// let stream = new MediaStream()
|
||||||
stream.addTrack(track)
|
// stream.addTrack(track)
|
||||||
// stream.removeTrack(track)
|
// // stream.removeTrack(track)
|
||||||
remoteVideo.srcObject = stream
|
// remoteVideo.srcObject = stream
|
||||||
socket.emit('consumer-resume')
|
// socket.emit('consumer-resume')
|
||||||
console.log('consumer', consumer);
|
// console.log('consumer', consumer);
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -404,32 +404,33 @@ const connectRecvTransport = async () => {
|
|||||||
await socket.emit('consume', {
|
await socket.emit('consume', {
|
||||||
rtpCapabilities: device.rtpCapabilities,
|
rtpCapabilities: device.rtpCapabilities,
|
||||||
callId
|
callId
|
||||||
}, async ({ params }) => {
|
}, async (data) => {
|
||||||
|
console.log(`[consume] data ${data}`);
|
||||||
// if (params.error) {
|
// if (params.error) {
|
||||||
// console.log('Cannot Consume')
|
// console.log('Cannot Consume')
|
||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
|
|
||||||
console.log(`[connectRecvTransport] consume params ${params}`);
|
// console.log(`[connectRecvTransport] consume params ${params}`);
|
||||||
|
|
||||||
// Then consume with the local consumer transport
|
// // Then consume with the local consumer transport
|
||||||
// which creates a consumer
|
// // which creates a consumer
|
||||||
consumer = await consumerTransport.consume({
|
// consumer = await consumerTransport.consume({
|
||||||
id: params.id,
|
// id: params.id,
|
||||||
producerId: params.producerId,
|
// producerId: params.producerId,
|
||||||
kind: params.kind,
|
// kind: params.kind,
|
||||||
rtpParameters: params.rtpParameters
|
// rtpParameters: params.rtpParameters
|
||||||
})
|
// })
|
||||||
|
|
||||||
// destructure and retrieve the video track from the producer
|
// // destructure and retrieve the video track from the producer
|
||||||
const { track } = consumer
|
// const { track } = consumer
|
||||||
|
|
||||||
let stream = new MediaStream()
|
// let stream = new MediaStream()
|
||||||
stream.addTrack(track)
|
// stream.addTrack(track)
|
||||||
// stream.removeTrack(track)
|
// // stream.removeTrack(track)
|
||||||
remoteVideo.srcObject = stream
|
// remoteVideo.srcObject = stream
|
||||||
socket.emit('consumer-resume')
|
// socket.emit('consumer-resume')
|
||||||
console.log('consumer', consumer);
|
// console.log('consumer', consumer);
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user