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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user