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