LINXD-2270-p2 #19

Closed
sergiu wants to merge 58 commits from LINXD-2270-p2 into develop
2 changed files with 40 additions and 44 deletions
Showing only changes of commit 0731090b0e - Show all commits

View File

@ -20765,31 +20765,29 @@ const connectRecvTransport = async () => {
}, async ({videoParams, audioParams}) => {
console.log(`[consume] videoParams ${videoParams}`);
console.log(`[consume] audioParams ${audioParams}`);
// if (params.error) {
// console.log('Cannot Consume')
// return
// }
if (!audioParams) {
console.log('Cannot Consume audio')
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
// // which creates a 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
const { track } = consumer
// // destructure and retrieve the video track from the producer
// const { track } = consumer
// let stream = new MediaStream()
// stream.addTrack(track)
// // stream.removeTrack(track)
// remoteVideo.srcObject = stream
// socket.emit('consumer-resume')
// console.log('consumer', consumer);
let stream = new MediaStream()
stream.addTrack(track)
// stream.removeTrack(track)
remoteVideo.srcObject = stream
socket.emit('consumer-resume')
console.log('consumer', consumer);
})
}

View File

@ -407,31 +407,29 @@ const connectRecvTransport = async () => {
}, async ({videoParams, audioParams}) => {
console.log(`[consume] videoParams ${videoParams}`);
console.log(`[consume] audioParams ${audioParams}`);
// if (params.error) {
// console.log('Cannot Consume')
// return
// }
if (!audioParams) {
console.log('Cannot Consume audio')
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
// // which creates a 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
const { track } = consumer
// // destructure and retrieve the video track from the producer
// const { track } = consumer
// let stream = new MediaStream()
// stream.addTrack(track)
// // stream.removeTrack(track)
// remoteVideo.srcObject = stream
// socket.emit('consumer-resume')
// console.log('consumer', consumer);
let stream = new MediaStream()
stream.addTrack(track)
// stream.removeTrack(track)
remoteVideo.srcObject = stream
socket.emit('consumer-resume')
console.log('consumer', consumer);
})
}