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