diff --git a/packages/react/src/hooks/usePersistentDeviceSettings.ts b/packages/react/src/hooks/usePersistentDeviceSettings.ts index c82489453..3d4796cc6 100644 --- a/packages/react/src/hooks/usePersistentDeviceSettings.ts +++ b/packages/react/src/hooks/usePersistentDeviceSettings.ts @@ -8,9 +8,9 @@ import * as React from 'react'; */ interface UsePersistentDeviceSettingsOptions { /** - * The fallback value to use if no stored value is found. + * The default value to use if reading from local storage returns no results or fails. */ - fallbackValues?: DeviceSettings; + defaults?: DeviceSettings; /** * Whether to prevent saving the device settings to local storage. * @defaultValue false @@ -26,7 +26,7 @@ interface UsePersistentDeviceSettingsOptions { */ export function usePersistentDeviceSettings(options: UsePersistentDeviceSettingsOptions = {}) { const [deviceSettings, setSettings] = React.useState( - getDeviceSettings(options.fallbackValues), + getDeviceSettings(options.defaults), ); const saveAudioInputEnabled = React.useCallback((isEnabled: boolean) => { diff --git a/packages/react/src/prefabs/PreJoin.tsx b/packages/react/src/prefabs/PreJoin.tsx index ec977e445..0a7ff5a3b 100644 --- a/packages/react/src/prefabs/PreJoin.tsx +++ b/packages/react/src/prefabs/PreJoin.tsx @@ -245,7 +245,7 @@ export function PreJoin({ saveVideoInputDeviceId, saveVideoInputEnabled, } = usePersistentDeviceSettings({ - fallbackValues: { + defaults: { audioInputDeviceId: DEFAULT_USER_CHOICES.audioDeviceId, videoInputDeviceId: DEFAULT_USER_CHOICES.videoDeviceId, audioInputEnabled: DEFAULT_USER_CHOICES.audioEnabled,