bugfix:audio input remains.

This commit is contained in:
wataru 2023-04-20 17:38:27 +09:00
parent e073eed95c
commit 3de900fbdf
3 changed files with 7 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@ -31,7 +31,7 @@ export const AppStateProvider = ({ children }: Props) => {
useEffect(() => {
if (clientState.clientState.initialized) {
initializedRef.current = true
console.log("Updating Client Setting.................................", clientState.clientState.clientSetting.clientSetting)
clientState.clientState.clientSetting.updateClientSetting({
...clientState.clientState.clientSetting.clientSetting, speakers: [
{

View File

@ -22,12 +22,6 @@ export const AudioInputRow = (_props: AudioInputRowProps) => {
}
}, [guiState.inputAudioDeviceInfo, appState.clientSetting.clientSetting.audioInput])
useEffect(() => {
if (guiState.audioInputForGUI == "file") {
} else {
appState.clientSetting.updateClientSetting({ ...appState.clientSetting.clientSetting, audioInput: guiState.audioInputForGUI })
}
}, [guiState.audioInputForGUI, appState.clientSetting.updateClientSetting])
const audioInputRow = useMemo(() => {
return (
@ -36,6 +30,9 @@ export const AudioInputRow = (_props: AudioInputRowProps) => {
<div className="body-select-container">
<select className="body-select" value={guiState.audioInputForGUI} onChange={(e) => {
guiState.setAudioInputForGUI(e.target.value)
if (guiState.audioInputForGUI != "file") {
appState.clientSetting.updateClientSetting({ ...appState.clientSetting.clientSetting, audioInput: e.target.value })
}
}}>
{
guiState.inputAudioDeviceInfo.map(x => {
@ -46,7 +43,7 @@ export const AudioInputRow = (_props: AudioInputRowProps) => {
</div>
</div>
)
}, [guiState.inputAudioDeviceInfo, guiState.audioInputForGUI])
}, [guiState.inputAudioDeviceInfo, guiState.audioInputForGUI, appState.clientSetting.clientSetting, appState.clientSetting.updateClientSetting])