more logic for recording

This commit is contained in:
talksik
2022-05-29 08:50:25 -05:00
parent 4f7d8c92c1
commit 3624b6022d
2 changed files with 6 additions and 3 deletions
+5 -3
View File
@@ -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);
+1
View File
@@ -66,6 +66,7 @@ app
});
ipcMain.on(Channels.ASK_MICROPHONE_PERMISSIONS, async () => {
console.log('asking for user microphone');
systemPreferences.askForMediaAccess('microphone');
});
})