diff --git a/src/frontend/src/features/rooms/livekit/components/controls/Device/ToggleDevice.tsx b/src/frontend/src/features/rooms/livekit/components/controls/Device/ToggleDevice.tsx index 0c4b96c1..c71c887d 100644 --- a/src/frontend/src/features/rooms/livekit/components/controls/Device/ToggleDevice.tsx +++ b/src/frontend/src/features/rooms/livekit/components/controls/Device/ToggleDevice.tsx @@ -30,7 +30,7 @@ export type ToggleDeviceProps = { toggle: ( forceState?: boolean, captureOptions?: CaptureOptionsBySource - ) => Promise | void + ) => Promise context?: 'room' | 'join' kind: 'audioinput' | 'videoinput' toggleButtonProps?: Partial diff --git a/src/frontend/src/features/rooms/livekit/components/controls/Device/VideoDeviceControl.tsx b/src/frontend/src/features/rooms/livekit/components/controls/Device/VideoDeviceControl.tsx index 5c026ac4..e34d5186 100644 --- a/src/frontend/src/features/rooms/livekit/components/controls/Device/VideoDeviceControl.tsx +++ b/src/frontend/src/features/rooms/livekit/components/controls/Device/VideoDeviceControl.tsx @@ -67,7 +67,7 @@ export const VideoDeviceControl = ({ const kind = 'videoinput' const cannotUseDevice = useCannotUseDevice(kind) - const toggle = () => { + const toggleWithProcessor = async () => { /** * We need to make sure that we apply the in-memory processor when re-enabling the camera. * Before, we had the following bug: @@ -89,7 +89,7 @@ export const VideoDeviceControl = ({ captureOptions: VideoCaptureOptions ) => Promise - toggle(!trackProps.enabled, { + await toggle(!trackProps.enabled, { processor: processor, } as VideoCaptureOptions) } @@ -106,7 +106,7 @@ export const VideoDeviceControl = ({