[Update] Config Page: Set volume, that check mic/speaker volume, to 0 when config page is closed.

This commit is contained in:
Sakamoto Shiina
2024-09-13 23:41:41 +09:00
parent 8198263b02
commit b6b67e9bd1

View File

@@ -28,9 +28,13 @@ export const useVolume = () => {
updateMicVolume(payload); updateMicVolume(payload);
}, },
currentMicThresholdCheckStatus: currentMicThresholdCheckStatus, currentMicThresholdCheckStatus: currentMicThresholdCheckStatus,
updateMicThresholdCheckStatus: (payload) => updateMicThresholdCheckStatus(payload), updateMicThresholdCheckStatus: (payload) => {
updateMicThresholdCheckStatus(payload);
if (payload === false) updateMicVolume("0");
},
volumeCheckStart_Speaker: () => { volumeCheckStart_Speaker: () => {
updateSpeakerVolume("0");
updateSpeakerThresholdCheckStatus(asyncPending); updateSpeakerThresholdCheckStatus(asyncPending);
asyncStdoutToPython("/controller/callback_enable_check_speaker_threshold"); asyncStdoutToPython("/controller/callback_enable_check_speaker_threshold");
}, },
@@ -42,7 +46,10 @@ export const useVolume = () => {
updateSpeakerVolume(payload); updateSpeakerVolume(payload);
}, },
currentSpeakerThresholdCheckStatus: currentSpeakerThresholdCheckStatus, currentSpeakerThresholdCheckStatus: currentSpeakerThresholdCheckStatus,
updateSpeakerThresholdCheckStatus: (payload) => updateSpeakerThresholdCheckStatus(payload), updateSpeakerThresholdCheckStatus: (payload) => {
updateSpeakerThresholdCheckStatus(payload);
if (payload === false) updateSpeakerVolume("0");
}
}; };
}; };