diff --git a/src/components/Buttons/ToggleVideoButton/ToggleVideoButton.test.tsx b/src/components/Buttons/ToggleVideoButton/ToggleVideoButton.test.tsx index 67605f6dc..b12452d49 100644 --- a/src/components/Buttons/ToggleVideoButton/ToggleVideoButton.test.tsx +++ b/src/components/Buttons/ToggleVideoButton/ToggleVideoButton.test.tsx @@ -55,9 +55,9 @@ describe('the ToggleVideoButton component', () => { const wrapper = shallow(); Date.now = () => 100000; wrapper.simulate('click'); // Should register - Date.now = () => 100100; + Date.now = () => 100500; wrapper.simulate('click'); // Should be ignored - Date.now = () => 100300; + Date.now = () => 100501; wrapper.simulate('click'); // Should register expect(mockFn).toHaveBeenCalledTimes(2); }); diff --git a/src/components/Buttons/ToggleVideoButton/ToggleVideoButton.tsx b/src/components/Buttons/ToggleVideoButton/ToggleVideoButton.tsx index ba5d2f03f..bfca21aad 100644 --- a/src/components/Buttons/ToggleVideoButton/ToggleVideoButton.tsx +++ b/src/components/Buttons/ToggleVideoButton/ToggleVideoButton.tsx @@ -13,7 +13,7 @@ export default function ToggleVideoButton(props: { disabled?: boolean; className const hasVideoDevices = useHasVideoInputDevices(); const toggleVideo = useCallback(() => { - if (Date.now() - lastClickTimeRef.current > 200) { + if (Date.now() - lastClickTimeRef.current > 500) { lastClickTimeRef.current = Date.now(); toggleVideoEnabled(); }