more logic for recording
This commit is contained in:
@@ -267,10 +267,12 @@ export function TerminalProvider({ children }: { children?: React.ReactNode }) {
|
||||
}, [setIsUserSpeaking, userAudioStream, handleAskForMicrophonePermissions]);
|
||||
|
||||
const handleStopBroadcast = useCallback(() => {
|
||||
setIsUserSpeaking(false);
|
||||
if (isUserSpeaking) {
|
||||
setIsUserSpeaking(false);
|
||||
|
||||
enqueueSnackbar('stopped...', { variant: 'info' });
|
||||
}, [setIsUserSpeaking]);
|
||||
enqueueSnackbar('stopped...', { variant: 'info' });
|
||||
}
|
||||
}, [setIsUserSpeaking, isUserSpeaking]);
|
||||
|
||||
useKeyPressEvent('`', handleBroadcast, handleStopBroadcast);
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ app
|
||||
});
|
||||
|
||||
ipcMain.on(Channels.ASK_MICROPHONE_PERMISSIONS, async () => {
|
||||
console.log('asking for user microphone');
|
||||
systemPreferences.askForMediaAccess('microphone');
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user