自动采集麦克风音量大小
This commit is contained in:
parent
14e90cab7e
commit
60f2311570
|
|
@ -730,9 +730,8 @@ const AudioComponents = () => {
|
||||||
ecordingVolume: e,
|
ecordingVolume: e,
|
||||||
})
|
})
|
||||||
}} disabled={!audioDeviceManager.ecordingItem} />
|
}} disabled={!audioDeviceManager.ecordingItem} />
|
||||||
{/* || audioDeviceManager.autoEcordingVolume */}
|
|
||||||
</div>
|
</div>
|
||||||
{/* <div style={{ marginBottom: '10px' }}>
|
<div style={{ marginBottom: '10px' }}>
|
||||||
<Checkbox onChange={async (e) => {
|
<Checkbox onChange={async (e) => {
|
||||||
setting.autoEcordingVolume = e.target.checked;
|
setting.autoEcordingVolume = e.target.checked;
|
||||||
storage.setItem('setting', JSON.stringify(setting))
|
storage.setItem('setting', JSON.stringify(setting))
|
||||||
|
|
@ -741,7 +740,7 @@ const AudioComponents = () => {
|
||||||
autoEcordingVolume: e.target.checked
|
autoEcordingVolume: e.target.checked
|
||||||
})
|
})
|
||||||
}} checked={audioDeviceManager.autoEcordingVolume}>自动调整麦克风音量</Checkbox>
|
}} checked={audioDeviceManager.autoEcordingVolume}>自动调整麦克风音量</Checkbox>
|
||||||
</div> */}
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<Checkbox checked={audioDeviceManager.isAINoiseReduction} onChange={(e) => {
|
<Checkbox checked={audioDeviceManager.isAINoiseReduction} onChange={(e) => {
|
||||||
|
|
|
||||||
|
|
@ -1403,6 +1403,11 @@ const Meeting: React.FC = () => {
|
||||||
const percentage = (item.volume / 255) * 100
|
const percentage = (item.volume / 255) * 100
|
||||||
if (domMe) {
|
if (domMe) {
|
||||||
domMe.style.height = `${percentage}%`
|
domMe.style.height = `${percentage}%`
|
||||||
|
if (item.volume > 180) {
|
||||||
|
agora.adjustRecordingSignalVolume(60)
|
||||||
|
} else {
|
||||||
|
agora.adjustRecordingSignalVolume(100)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
window.electron.windowHandleMessage({
|
window.electron.windowHandleMessage({
|
||||||
key: 'shareScreenWindow',
|
key: 'shareScreenWindow',
|
||||||
|
|
|
||||||
|
|
@ -591,4 +591,13 @@ export const agora = {
|
||||||
greenCapacity: 1
|
greenCapacity: 1
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 调节音频采集信号音量。
|
||||||
|
adjustRecordingSignalVolume: async (number: number) => {
|
||||||
|
const setting = await JSON.parse(storage.getItem('setting') as string)
|
||||||
|
if (setting.autoEcordingVolume) {
|
||||||
|
await rtcEngine.adjustRecordingSignalVolume(number)
|
||||||
|
} else {
|
||||||
|
await rtcEngine.adjustRecordingSignalVolume(100)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue