Adds keyboard shortcuts for calling

This commit is contained in:
Josh Perez 2022-05-10 14:14:08 -04:00 committed by GitHub
parent 1b052ad16b
commit fa7b7fcd08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 311 additions and 90 deletions

View file

@ -39,6 +39,10 @@ import { missingCaseError } from '../util/missingCaseError';
import * as KeyboardLayout from '../services/keyboardLayout';
import { useActivateSpeakerViewOnPresenting } from '../hooks/useActivateSpeakerViewOnPresenting';
import { CallingAudioIndicator } from './CallingAudioIndicator';
import {
useActiveCallShortcuts,
useKeyboardShortcuts,
} from '../hooks/useKeyboardShortcuts';
export type PropsType = {
activeCall: ActiveCallType;
@ -140,6 +144,9 @@ export const CallScreen: React.FC<PropsType> = ({
toggleSpeakerView
);
const activeCallShortcuts = useActiveCallShortcuts(hangUpActiveCall);
useKeyboardShortcuts(activeCallShortcuts);
const toggleAudio = useCallback(() => {
setLocalAudio({
enabled: !hasLocalAudio,