增加输入音量设置
This commit is contained in:
parent
5a20b9603e
commit
28d8b9d4dc
|
|
@ -1,4 +1,6 @@
|
|||
.equipmentManagement {
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
>div:nth-child(1) {
|
||||
>div {
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import styles from '@/components/EquipmentManagement/index.module.scss'
|
||||
import { onInvoke } from '@/utils/package/signalr';
|
||||
import { Button, Modal, Select, message } from 'antd';
|
||||
import { Button, Modal, Select, Slider, message } from 'antd';
|
||||
import { useState, useImperativeHandle, forwardRef } from "react";
|
||||
const EquipmentManagement = forwardRef((_props: any, ref: any) => {
|
||||
useImperativeHandle(ref, () => ({
|
||||
|
|
@ -58,6 +58,16 @@ const EquipmentManagement = forwardRef((_props: any, ref: any) => {
|
|||
})
|
||||
}} />;
|
||||
</div>
|
||||
<div>
|
||||
<span>输入音量</span>
|
||||
<Slider value={deviceInfo.ecordingVolume} style={{ flexGrow: 1 }} max={255}
|
||||
onChange={async (e) => {
|
||||
setDeviceInfo({
|
||||
...deviceInfo,
|
||||
ecordingVolume: e
|
||||
})
|
||||
}} disabled={!deviceInfo.ecordingDeviceId} />
|
||||
</div>
|
||||
<div>
|
||||
<span>扬声器</span>
|
||||
<Select
|
||||
|
|
|
|||
|
|
@ -482,21 +482,22 @@ const Meeting: React.FC = () => {
|
|||
label: row.deviceName
|
||||
}
|
||||
}),
|
||||
videoDeviceId: setting.videoDeviceId,
|
||||
videoDeviceId: res[0].list.find((row: any) => row.deviceId === setting.videoDeviceId) ? setting.videoDeviceId : res[0].list.length ? res[0].list[0].deviceId : null,
|
||||
ecordingList: res[1].ecordingList.map((row: any) => {
|
||||
return {
|
||||
value: row.deviceId,
|
||||
label: row.deviceName
|
||||
}
|
||||
}),
|
||||
ecordingDeviceId: setting.ecordingDeviceId,
|
||||
ecordingDeviceId: res[1].ecordingList.find((row: any) => row.deviceId === setting.ecordingDeviceId) ? setting.ecordingDeviceId : res[1].ecordingList.length ? res[1].ecordingList[0].deviceId : null,
|
||||
playBackList: res[1].playBackList.map((row: any) => {
|
||||
return {
|
||||
value: row.deviceId,
|
||||
label: row.deviceName
|
||||
}
|
||||
}),
|
||||
playBackDeviceId: setting.playBackDeviceId,
|
||||
playBackDeviceId: res[1].ecordingList.find((row: any) => row.deviceId === setting.playBackDeviceId) ? setting.playBackDeviceId : res[1].playBackList.length ? res[1].playBackList[0].deviceId : null,
|
||||
ecordingVolume: res[1].ecordingVolume
|
||||
}
|
||||
onInvoke('sendDrivers', {
|
||||
uid: item.callerUid,
|
||||
|
|
@ -508,12 +509,14 @@ const Meeting: React.FC = () => {
|
|||
case 'SaveDriver':
|
||||
if (item.driver) {
|
||||
const data = JSON.parse(item.driver);
|
||||
await agora.setVideoDeviceManager(data.videoDeviceId)
|
||||
await agora.setRecordingDevice(data.ecordingDeviceId)
|
||||
await agora.setPlaybackDevice(data.playBackDeviceId)
|
||||
setting.videoDeviceId = data.videoDeviceId;
|
||||
setting.ecordingDeviceId = data.ecordingDeviceId;
|
||||
setting.playBackDeviceId = data.playBackDeviceId;
|
||||
if (data.videoDeviceId) await agora.setVideoDeviceManager(data.videoDeviceId);
|
||||
if (data.ecordingDeviceId) await agora.setRecordingDevice(data.ecordingDeviceId)
|
||||
if (data.playBackDeviceId) await agora.setPlaybackDevice(data.playBackDeviceId)
|
||||
if (data.ecordingVolume) await agora.setRecordingDeviceVolume(data.ecordingVolume)
|
||||
setting.videoDeviceId = data.videoDeviceId || null;
|
||||
setting.ecordingDeviceId = data.ecordingDeviceId || null;
|
||||
setting.playBackDeviceId = data.playBackDeviceId || null;
|
||||
setting.ecordingVolume = data.ecordingVolume || null;
|
||||
storage.setItem('setting', JSON.stringify(setting))
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue