From fcbc28c801da59b741a5048b1dab9f9144ecaee2 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Wed, 23 Nov 2022 16:26:28 +0200 Subject: [PATCH] Update server --- public/bundle.js | 42 +++++++++++++++++++++++++----------------- public/index.js | 42 +++++++++++++++++++++++++----------------- 2 files changed, 50 insertions(+), 34 deletions(-) diff --git a/public/bundle.js b/public/bundle.js index 1dc9d39..c9b610c 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -20502,25 +20502,33 @@ let audioParams = { } const streamSuccess = (stream) => { - console.log('[streamSuccess] device', device); + // console.log('[streamSuccess] device', device); + // localVideo.srcObject = stream + // console.log('stream', stream); + // const videoTrack = stream.getVideoTracks()[0] + // const audioTrack = stream.getAudioTracks()[0] + + // videoParams = { + // track: videoTrack, + // // codec : device.rtpCapabilities.codecs.find((codec) => codec.mimeType.toLowerCase() === 'video/vp9'), + // // codec : 'video/vp9', + // ...videoParams + // } + + // audioParams = { + // track: audioTrack, + // ...audioParams + // } + + // console.log('[streamSuccess] videoParams', videoParams, ' | audioParams', audioParams); + // goConnect() + console.log('[streamSuccess]'); localVideo.srcObject = stream - console.log('stream', stream); - const videoTrack = stream.getVideoTracks()[0] - const audioTrack = stream.getAudioTracks()[0] - - videoParams = { - track: videoTrack, - // codec : device.rtpCapabilities.codecs.find((codec) => codec.mimeType.toLowerCase() === 'video/vp9'), - // codec : 'video/vp9', - ...videoParams + const track = stream.getVideoTracks()[0] + params = { + track, + ...params } - - audioParams = { - track: audioTrack, - ...audioParams - } - - console.log('[streamSuccess] videoParams', videoParams, ' | audioParams', audioParams); goConnect() } diff --git a/public/index.js b/public/index.js index 3b62b7f..9fd0206 100644 --- a/public/index.js +++ b/public/index.js @@ -144,25 +144,33 @@ let audioParams = { } const streamSuccess = (stream) => { - console.log('[streamSuccess] device', device); + // console.log('[streamSuccess] device', device); + // localVideo.srcObject = stream + // console.log('stream', stream); + // const videoTrack = stream.getVideoTracks()[0] + // const audioTrack = stream.getAudioTracks()[0] + + // videoParams = { + // track: videoTrack, + // // codec : device.rtpCapabilities.codecs.find((codec) => codec.mimeType.toLowerCase() === 'video/vp9'), + // // codec : 'video/vp9', + // ...videoParams + // } + + // audioParams = { + // track: audioTrack, + // ...audioParams + // } + + // console.log('[streamSuccess] videoParams', videoParams, ' | audioParams', audioParams); + // goConnect() + console.log('[streamSuccess]'); localVideo.srcObject = stream - console.log('stream', stream); - const videoTrack = stream.getVideoTracks()[0] - const audioTrack = stream.getAudioTracks()[0] - - videoParams = { - track: videoTrack, - // codec : device.rtpCapabilities.codecs.find((codec) => codec.mimeType.toLowerCase() === 'video/vp9'), - // codec : 'video/vp9', - ...videoParams + const track = stream.getVideoTracks()[0] + params = { + track, + ...params } - - audioParams = { - track: audioTrack, - ...audioParams - } - - console.log('[streamSuccess] videoParams', videoParams, ' | audioParams', audioParams); goConnect() }