录制优化
This commit is contained in:
parent
eee009ab9f
commit
70f15b2666
|
|
@ -624,10 +624,14 @@ const Meeting: React.FC = () => {
|
||||||
}
|
}
|
||||||
} as any
|
} as any
|
||||||
}).then(async (steam) => {
|
}).then(async (steam) => {
|
||||||
const audioTracks = await navigator.mediaDevices
|
try {
|
||||||
.getUserMedia({ audio: true, video: false })
|
const audioTracks = await navigator.mediaDevices
|
||||||
.then(audioStream => audioStream.getAudioTracks()[0]);
|
.getUserMedia({ audio: true, video: false })
|
||||||
steam.addTrack(audioTracks);
|
.then(audioStream => audioStream.getAudioTracks()[0]);
|
||||||
|
steam.addTrack(audioTracks);
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
setMediaStream(steam)
|
setMediaStream(steam)
|
||||||
setRecorder(new MediaRecorder(steam))
|
setRecorder(new MediaRecorder(steam))
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue