diff --git a/src/components/VideoProvider/useScreenShareToggle/useScreenShareToggle.tsx b/src/components/VideoProvider/useScreenShareToggle/useScreenShareToggle.tsx index 9a3b3b66d..a66e91437 100644 --- a/src/components/VideoProvider/useScreenShareToggle/useScreenShareToggle.tsx +++ b/src/components/VideoProvider/useScreenShareToggle/useScreenShareToggle.tsx @@ -59,7 +59,7 @@ export default function useScreenShareToggle(room: Room | null, onError: ErrorCa if (room) { !isSharing ? shareScreen() : stopScreenShareRef.current(); } - }, [isSharing, shareScreen, stopScreenShareRef, room]); + }, [isSharing, shareScreen, room]); return [isSharing, toggleScreenShare] as const; } diff --git a/src/state/useActiveSinkId/useActiveSinkId.ts b/src/state/useActiveSinkId/useActiveSinkId.ts index 873dce457..f96eec29c 100644 --- a/src/state/useActiveSinkId/useActiveSinkId.ts +++ b/src/state/useActiveSinkId/useActiveSinkId.ts @@ -6,13 +6,10 @@ export default function useActiveSinkId() { const { audioOutputDevices } = useDevices(); const [activeSinkId, _setActiveSinkId] = useState('default'); - const setActiveSinkId = useCallback( - (sinkId: string) => { - window.localStorage.setItem(SELECTED_AUDIO_OUTPUT_KEY, sinkId); - _setActiveSinkId(sinkId); - }, - [_setActiveSinkId] - ); + const setActiveSinkId = useCallback((sinkId: string) => { + window.localStorage.setItem(SELECTED_AUDIO_OUTPUT_KEY, sinkId); + _setActiveSinkId(sinkId); + }, []); useEffect(() => { const selectedSinkId = window.localStorage.getItem(SELECTED_AUDIO_OUTPUT_KEY);