From 1148532a9b90b53a6373f3b49fe5568c51259d0b Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Thu, 24 Nov 2022 17:01:26 +0200 Subject: [PATCH] Update server --- public/bundle.js | 25 +++++++++++++------------ public/index.js | 25 +++++++++++++------------ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/public/bundle.js b/public/bundle.js index c1e17dd..e9f0f4c 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -20688,6 +20688,19 @@ const connectSendTransport = async () => { // https://mediasoup.org/documentation/v3/mediasoup-client/api/#transport-produce // this action will trigger the 'connect' and 'produce' events above + console.log('videoParams', videoParams); + producerVideo = await producerTransport.produce(videoParams) + console.log('producerVideo', producerVideo); + producerVideo.on('trackended', () => { + console.log('track ended') + // close video track + }) + + producerVideo.on('transportclose', () => { + console.log('transport ended') + // close video track + }) + console.log('audioParams', audioParams); producerAudio = await producerTransport.produce(audioParams) @@ -20704,18 +20717,6 @@ const connectSendTransport = async () => { }) - console.log('videoParams', videoParams); - producerVideo = await producerTransport.produce(videoParams) - console.log('producerVideo', producerVideo); - producerVideo.on('trackended', () => { - console.log('track ended') - // close video track - }) - - producerVideo.on('transportclose', () => { - console.log('transport ended') - // close video track - }) diff --git a/public/index.js b/public/index.js index dd984bc..36b6440 100644 --- a/public/index.js +++ b/public/index.js @@ -330,6 +330,19 @@ const connectSendTransport = async () => { // https://mediasoup.org/documentation/v3/mediasoup-client/api/#transport-produce // this action will trigger the 'connect' and 'produce' events above + console.log('videoParams', videoParams); + producerVideo = await producerTransport.produce(videoParams) + console.log('producerVideo', producerVideo); + producerVideo.on('trackended', () => { + console.log('track ended') + // close video track + }) + + producerVideo.on('transportclose', () => { + console.log('transport ended') + // close video track + }) + console.log('audioParams', audioParams); producerAudio = await producerTransport.produce(audioParams) @@ -346,18 +359,6 @@ const connectSendTransport = async () => { }) - console.log('videoParams', videoParams); - producerVideo = await producerTransport.produce(videoParams) - console.log('producerVideo', producerVideo); - producerVideo.on('trackended', () => { - console.log('track ended') - // close video track - }) - - producerVideo.on('transportclose', () => { - console.log('transport ended') - // close video track - })