yangjie #28
|
|
@ -200,7 +200,7 @@ const App: React.FC = () => {
|
|||
}, [state])
|
||||
useEffect(() => {
|
||||
if (location.href.indexOf('/login') !== -1) {
|
||||
window.electron.onStop()
|
||||
window.electron.onStop()
|
||||
}
|
||||
}, [navigate])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,51 @@ const StupWizard = forwardRef((_props: any, ref: any) => {
|
|||
res[index].active = true;
|
||||
return res
|
||||
})
|
||||
const setting = JSON.parse(storage.getItem('setting') as string)
|
||||
const obj: any = {
|
||||
videoDeviceId: '', //摄像头id
|
||||
ecordingDeviceId: "", //输入设备id
|
||||
playBackDeviceId: "", //输出设备id
|
||||
ecordingVolume: '', //输入音量
|
||||
playBackVolume: '', //输出音量
|
||||
autoEcordingVolume: true, //是否自动调整麦克风音量
|
||||
recordingFilesPath: path.resolve(__dirname, '../../Downloads') + '\\', //本地录制保存路径
|
||||
shareFilesPath: path.resolve(__dirname, '../../Downloads/') + '\\', //共享文件保存路径
|
||||
isShareSavePath: true, //是否下载钱询问每个文件保存的位置
|
||||
closeSetting: 'hide', //关闭按钮设置
|
||||
isAINoiseReduction: true, //是否开启ai降噪
|
||||
aINoiseReduction: 1, // 降噪模式
|
||||
isRecordingTips: true, //是否开启录制提示
|
||||
beautyEffect: { //美颜效果
|
||||
isBeautyEffect: false, //是否打开美颜
|
||||
lighteningContrastLevel: 1, //对比度
|
||||
lighteningLevel: 0, //美白程度
|
||||
smoothnessLevel: 0, //磨皮程度
|
||||
rednessLevel: 0, //红润度
|
||||
sharpnessLevel: 0, //锐化程度
|
||||
},
|
||||
colorEnhancement: { //色彩增强
|
||||
isColorEnhancement: false, //是否打开色彩增强
|
||||
strengthLevel: 0.5, //色彩增强程度
|
||||
skinProtectLevel: 1, //肤色保护程度
|
||||
},
|
||||
darkLightEnhancement: { //暗光增强
|
||||
isDarkLightEnhancement: false, //是否打开暗光增强
|
||||
level: 0, //暗光增强等级
|
||||
mode: 0, //暗光增强模式
|
||||
},
|
||||
virtualBackground: { //虚拟背景
|
||||
isVirtualBackground: false, //是否打开虚拟背景
|
||||
color: '0xFFFFFF', // 纯色
|
||||
sourceIndex: '', // 背景图下标
|
||||
},
|
||||
}
|
||||
for (const key in obj) {
|
||||
if (setting[key] === undefined) {
|
||||
setting[key] = obj[key]
|
||||
}
|
||||
}
|
||||
storage.setItem('setting', JSON.stringify(setting))
|
||||
setIsStupWizard(true)
|
||||
}
|
||||
}))
|
||||
|
|
@ -183,46 +228,10 @@ const VideoComponents = () => {
|
|||
});
|
||||
const setting = JSON.parse(storage.getItem('setting') as string)
|
||||
useEffect(() => {
|
||||
if (setting.beautyEffect) {
|
||||
setBeautyEffect(setting.beautyEffect)
|
||||
} else {
|
||||
setting.beautyEffect = {
|
||||
isBeautyEffect: false, //是否打开美颜
|
||||
lighteningContrastLevel: 1, //对比度
|
||||
lighteningLevel: 0, //美白程度
|
||||
smoothnessLevel: 0, //磨皮程度
|
||||
rednessLevel: 0, //红润度
|
||||
sharpnessLevel: 0, //锐化程度
|
||||
}
|
||||
}
|
||||
if (setting.colorEnhancement) {
|
||||
setColorEnhancement(setting.colorEnhancement)
|
||||
} else {
|
||||
setting.colorEnhancement = {
|
||||
isColorEnhancement: false, //是否打开色彩增强
|
||||
strengthLevel: 0.5, //色彩增强程度
|
||||
skinProtectLevel: 1, //肤色保护程度
|
||||
}
|
||||
}
|
||||
if (setting.darkLightEnhancement) {
|
||||
setDarkLightEnhancement(setting.darkLightEnhancement)
|
||||
} else {
|
||||
setting.darkLightEnhancement = {
|
||||
isDarkLightEnhancement: false, //是否打开暗光增强
|
||||
level: 0, //暗光增强等级
|
||||
mode: 0, //暗光增强模式
|
||||
}
|
||||
}
|
||||
if (setting.virtualBackground) {
|
||||
setVirtualBackground(setting.virtualBackground)
|
||||
} else {
|
||||
setting.virtualBackground = {
|
||||
isVirtualBackground: false, //是否打开虚拟背景
|
||||
color: '0xFFFFFF', // 纯色
|
||||
sourceIndex: '', // 背景图下标
|
||||
}
|
||||
}
|
||||
storage.setItem('setting', JSON.stringify(setting))
|
||||
setBeautyEffect(setting.beautyEffect)
|
||||
setColorEnhancement(setting.colorEnhancement)
|
||||
setDarkLightEnhancement(setting.darkLightEnhancement)
|
||||
setVirtualBackground(setting.virtualBackground)
|
||||
getVideoDeviceList()
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue