停止录制停止继续使用麦克风
This commit is contained in:
parent
16ae51d86c
commit
d5c7a9be13
|
|
@ -1053,6 +1053,7 @@ const Meeting: React.FC = () => {
|
||||||
// 录制所有音频输入设备
|
// 录制所有音频输入设备
|
||||||
audioInputDevices.forEach(async device => {
|
audioInputDevices.forEach(async device => {
|
||||||
const micStream = await navigator.mediaDevices.getUserMedia({ audio: { deviceId: { exact: device.deviceId } } });
|
const micStream = await navigator.mediaDevices.getUserMedia({ audio: { deviceId: { exact: device.deviceId } } });
|
||||||
|
setMediaStream(micStream);
|
||||||
const micSoundSource = audioCtx.createMediaStreamSource(micStream);
|
const micSoundSource = audioCtx.createMediaStreamSource(micStream);
|
||||||
micSoundSource.connect(systemSoundDestination);
|
micSoundSource.connect(systemSoundDestination);
|
||||||
})
|
})
|
||||||
|
|
@ -1063,7 +1064,6 @@ const Meeting: React.FC = () => {
|
||||||
mimeType: 'video/webm;codecs=vp9,opus',
|
mimeType: 'video/webm;codecs=vp9,opus',
|
||||||
videoBitsPerSecond: 1.5e6,
|
videoBitsPerSecond: 1.5e6,
|
||||||
});
|
});
|
||||||
setMediaStream(combinedSource);
|
|
||||||
setRecorder(mediaRecorder);
|
setRecorder(mediaRecorder);
|
||||||
});
|
});
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue