diff --git a/public/bundle.js b/public/bundle.js index 25c5f77..c880e9d 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -20502,34 +20502,34 @@ let audioParams = { } const streamSuccess = (stream) => { - // 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]'); + console.log('[streamSuccess] device', device); localVideo.srcObject = stream - const track = stream.getVideoTracks()[0] + console.log('stream', stream); + const videoTrack = stream.getVideoTracks()[0] + const audioTrack = stream.getAudioTracks()[0] + videoParams = { - track, + 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 + // const track = stream.getVideoTracks()[0] + // videoParams = { + // track, + // ...videoParams + // } + // goConnect() } const getLocalStream = () => { diff --git a/public/index.js b/public/index.js index c0326ec..38d3dde 100644 --- a/public/index.js +++ b/public/index.js @@ -144,34 +144,34 @@ let audioParams = { } const streamSuccess = (stream) => { - // 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]'); + console.log('[streamSuccess] device', device); localVideo.srcObject = stream - const track = stream.getVideoTracks()[0] + console.log('stream', stream); + const videoTrack = stream.getVideoTracks()[0] + const audioTrack = stream.getAudioTracks()[0] + videoParams = { - track, + 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 + // const track = stream.getVideoTracks()[0] + // videoParams = { + // track, + // ...videoParams + // } + // goConnect() } const getLocalStream = () => {