GitHub

Source

usePersistentUserChoices

A hook that provides access to user choices stored in local storage, such as selected media devices and their current state (on or off), as well as the user name.

Import

import { usePersistentUserChoices } from "@livekit/components-react";

Properties

options?UsePersistentUserChoicesOptions

Returns

{
userChoices: LocalUserChoices;
saveAudioInputEnabled: (isEnabled: boolean) => void;
saveVideoInputEnabled: (isEnabled: boolean) => void;
saveAudioInputDeviceId: (deviceId: string) => void;
saveVideoInputDeviceId: (deviceId: string) => void;
saveUsername: (username: string) => void;
}