diff --git a/packages/react/src/hooks/useLiveKitRoom.ts b/packages/react/src/hooks/useLiveKitRoom.ts index 752e0ccd0..680ea4f83 100644 --- a/packages/react/src/hooks/useLiveKitRoom.ts +++ b/packages/react/src/hooks/useLiveKitRoom.ts @@ -112,7 +112,17 @@ export function useLiveKitRoom( .off(RoomEvent.Disconnected, handleDisconnected) .off(RoomEvent.Connected, handleConnected); }; - }, [room, audio, video, screen, onError, onEncryptionError, onMediaDeviceFailure]); + }, [ + room, + audio, + video, + screen, + onError, + onEncryptionError, + onMediaDeviceFailure, + onConnected, + onDisconnected, + ]); React.useEffect(() => { if (!room) return;