This commit is contained in:
parent
fbf40ccf41
commit
4232afef8a
|
|
@ -314,13 +314,17 @@ const VideoComponents = () => {
|
||||||
placeholder={videoDeviceManager.list.length ? '请选择设备' : '未检测到摄像头'}
|
placeholder={videoDeviceManager.list.length ? '请选择设备' : '未检测到摄像头'}
|
||||||
options={videoDeviceManager.list} style={{ flexGrow: 1, marginRight: '10px' }}
|
options={videoDeviceManager.list} style={{ flexGrow: 1, marginRight: '10px' }}
|
||||||
value={videoDeviceManager.item} onChange={async (e) => {
|
value={videoDeviceManager.item} onChange={async (e) => {
|
||||||
setting.videoDeviceId = e;
|
|
||||||
storage.setItem('setting', JSON.stringify(setting))
|
|
||||||
setVideoDeviceManager({
|
setVideoDeviceManager({
|
||||||
...videoDeviceManager,
|
...videoDeviceManager,
|
||||||
item: e
|
item: e
|
||||||
})
|
})
|
||||||
agora.setVideoDeviceManager(e)
|
agora.setVideoDeviceManager(e)
|
||||||
|
if (!setting.videoDeviceId) {
|
||||||
|
const userInfo = JSON.parse(storage.getItem('user') as string)
|
||||||
|
await agora.startPreview('videoPreview', Number(userInfo.screenShareId))
|
||||||
|
}
|
||||||
|
setting.videoDeviceId = e;
|
||||||
|
storage.setItem('setting', JSON.stringify(setting))
|
||||||
}} />
|
}} />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -347,7 +351,7 @@ const VideoComponents = () => {
|
||||||
sourceIndex: ''
|
sourceIndex: ''
|
||||||
})
|
})
|
||||||
}}>
|
}}>
|
||||||
<input type="color" name="" id="color-select" onBlur={(e) => {
|
<input type="color" name="" id="color-select" onChange={(e) => {
|
||||||
let hexInt = parseInt('0x' + e.target.value.split('#')[1], 16)
|
let hexInt = parseInt('0x' + e.target.value.split('#')[1], 16)
|
||||||
setting.virtualBackground.color = hexInt
|
setting.virtualBackground.color = hexInt
|
||||||
storage.setItem('setting', JSON.stringify(setting))
|
storage.setItem('setting', JSON.stringify(setting))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue