From 2c375c01ea5d580cd708f3c9ffb35176873e66df Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Mon, 19 Dec 2022 11:21:02 +0200 Subject: [PATCH] Update --- public/bundle.js | 37 +++++++++++++++++++------------------ public/index.js | 37 +++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/public/bundle.js b/public/bundle.js index dd777ae..8d5cf8a 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -20762,32 +20762,33 @@ const connectRecvTransport = async () => { await socket.emit('consume', { rtpCapabilities: device.rtpCapabilities, callId - }, async ({ params }) => { + }, async (data) => { + console.log(`[consume] data ${data}`); // if (params.error) { // console.log('Cannot Consume') // return // } - console.log(`[connectRecvTransport] consume params ${params}`); + // console.log(`[connectRecvTransport] consume params ${params}`); - // 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 - }) + // // 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); }) } diff --git a/public/index.js b/public/index.js index 3c26a29..acf316f 100644 --- a/public/index.js +++ b/public/index.js @@ -404,32 +404,33 @@ const connectRecvTransport = async () => { await socket.emit('consume', { rtpCapabilities: device.rtpCapabilities, callId - }, async ({ params }) => { + }, async (data) => { + console.log(`[consume] data ${data}`); // if (params.error) { // console.log('Cannot Consume') // return // } - console.log(`[connectRecvTransport] consume params ${params}`); + // console.log(`[connectRecvTransport] consume params ${params}`); - // 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 - }) + // // 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); }) }