> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # ClientPreferences > Public preferences API for configuring SDK behavior. `ClientPreferences` is the central knob panel for every tunable runtime default in the SDK — connection timeouts, ICE behavior, default media constraints, codec preferences, recovery thresholds, persisted device selections, and UX defaults like auto-mute-on-hidden. The single instance is owned by [`SignalWire`](/docs/browser-sdk/v4/reference/signalwire) and reached as [`client.preferences`](/docs/browser-sdk/v4/reference/signalwire#preferences); applications never construct it directly. Each preference is exposed as a paired getter/setter accessor — setting it applies immediately and affects subsequent operations (e.g. setting [`reconnectDelayMax`](/docs/browser-sdk/v4/reference/client-preferences/reconnect-delay-max) changes the next reconnect attempt's back-off). All time-based preferences take seconds, not milliseconds. By default, preferences live only in memory for the current session. Calling [`enableSavePreferences`](/docs/browser-sdk/v4/reference/client-preferences/enable-save-preferences) with a [`Storage`](/docs/browser-sdk/v4/reference/interfaces/storage) loads any persisted values on startup and writes back to storage on every subsequent change — survive page reload and tab restore without re-configuring on each session. ## **Constructors** ### Constructor ```ts new ClientPreferences(): ClientPreferences ``` ## **Accessors** #### [autoMuteVideoOnHidden](/docs/browser-sdk/v4/reference/client-preferences/auto-mute-video-on-hidden) Whether to auto-mute video when the tab becomes hidden. #### [checkConnectionOnVisible](/docs/browser-sdk/v4/reference/client-preferences/check-connection-on-visible) Whether to check peer connection health when the page becomes visible. #### [connectionTimeout](/docs/browser-sdk/v4/reference/client-preferences/connection-timeout) WebSocket connection timeout in seconds. #### [defaultAudioConstraints](/docs/browser-sdk/v4/reference/client-preferences/default-audio-constraints) Default audio track constraints applied when no explicit constraints are provided. #### [defaultVideoConstraints](/docs/browser-sdk/v4/reference/client-preferences/default-video-constraints) Default video track constraints applied when video is enabled without explicit constraints. #### [degradationBitrateThreshold](/docs/browser-sdk/v4/reference/client-preferences/degradation-bitrate-threshold) Bitrate in kbps below which video is automatically disabled. #### [degradationRecoveryThreshold](/docs/browser-sdk/v4/reference/client-preferences/degradation-recovery-threshold) Bitrate in kbps above which video is automatically re-enabled. #### [deviceDebounceTime](/docs/browser-sdk/v4/reference/client-preferences/device-debounce-time) Debounce time for device change events, in seconds. #### [devicePollingInterval](/docs/browser-sdk/v4/reference/client-preferences/device-polling-interval) Polling interval for device enumeration, in seconds. #### [disableUdpIceServers](/docs/browser-sdk/v4/reference/client-preferences/disable-udp-ice-servers) Whether to filter out UDP-based ICE servers. #### [enableAutoDegradation](/docs/browser-sdk/v4/reference/client-preferences/enable-auto-degradation) Whether automatic video degradation on low bandwidth is enabled. #### [enableNetworkChangeDetection](/docs/browser-sdk/v4/reference/client-preferences/enable-network-change-detection) Whether browser network change detection (online/offline) is enabled. #### [enableRelayFallback](/docs/browser-sdk/v4/reference/client-preferences/enable-relay-fallback) Whether relay-only escalation is enabled as a last-resort recovery tier. #### [enableServerHangupInterception](/docs/browser-sdk/v4/reference/client-preferences/enable-server-hangup-interception) Whether server-sent media-timeout hangups are intercepted for recovery. #### [iceCandidateTimeout](/docs/browser-sdk/v4/reference/client-preferences/ice-candidate-timeout) Timeout for individual ICE candidate gathering, in seconds. #### [iceDisconnectedGracePeriod](/docs/browser-sdk/v4/reference/client-preferences/ice-disconnected-grace-period) Grace period before treating ICE 'disconnected' as failure, in seconds. #### [iceGatheringTimeout](/docs/browser-sdk/v4/reference/client-preferences/ice-gathering-timeout) Timeout for the entire ICE gathering phase, in seconds. #### [iceRestartTimeout](/docs/browser-sdk/v4/reference/client-preferences/ice-restart-timeout) Timeout for a single ICE restart attempt in seconds. #### [iceServers](/docs/browser-sdk/v4/reference/client-preferences/ice-servers) Custom ICE servers for TURN/STUN configuration. #### [inputAudioConstraints](/docs/browser-sdk/v4/reference/client-preferences/input-audio-constraints) Default audio input track constraints. #### [inputVideoConstraints](/docs/browser-sdk/v4/reference/client-preferences/input-video-constraints) Default video input track constraints. #### [keyframeBurstWindow](/docs/browser-sdk/v4/reference/client-preferences/keyframe-burst-window) Keyframe burst window duration in milliseconds. #### [keyframeCooldown](/docs/browser-sdk/v4/reference/client-preferences/keyframe-cooldown) Cooldown period in ms after keyframe burst limit is reached. #### [keyframeMaxBurst](/docs/browser-sdk/v4/reference/client-preferences/keyframe-max-burst) Maximum keyframe requests in a burst window. #### [maxRecoveryAttempts](/docs/browser-sdk/v4/reference/client-preferences/max-recovery-attempts) Maximum recovery attempts before giving up. #### [persistDeviceSelection](/docs/browser-sdk/v4/reference/client-preferences/persist-device-selection) Whether device selections are persisted to storage. #### [preferredAudioCodecs](/docs/browser-sdk/v4/reference/client-preferences/preferred-audio-codecs) Preferred audio codecs in priority order. #### [preferredAudioInput](/docs/browser-sdk/v4/reference/client-preferences/preferred-audio-input) Preferred audio input device for new calls. #### [preferredAudioOutput](/docs/browser-sdk/v4/reference/client-preferences/preferred-audio-output) Preferred audio output device for new calls. #### [preferredVideoCodecs](/docs/browser-sdk/v4/reference/client-preferences/preferred-video-codecs) Preferred video codecs in priority order. #### [preferredVideoInput](/docs/browser-sdk/v4/reference/client-preferences/preferred-video-input) Preferred video input device for new calls. #### [receiveAudio](/docs/browser-sdk/v4/reference/client-preferences/receive-audio) Whether to receive remote audio by default. #### [receiveVideo](/docs/browser-sdk/v4/reference/client-preferences/receive-video) Whether to receive remote video by default. #### [reconnectCallsTimeout](/docs/browser-sdk/v4/reference/client-preferences/reconnect-calls-timeout) Timeout for reconnecting to previously attached calls, in seconds. #### [reconnectDelayMax](/docs/browser-sdk/v4/reference/client-preferences/reconnect-delay-max) Maximum reconnection backoff delay in seconds. #### [reconnectDelayMin](/docs/browser-sdk/v4/reference/client-preferences/reconnect-delay-min) Minimum reconnection backoff delay in seconds. #### [recoveryCooldown](/docs/browser-sdk/v4/reference/client-preferences/recovery-cooldown) Cooldown period between recovery attempts in seconds. #### [recoveryDebounceTime](/docs/browser-sdk/v4/reference/client-preferences/recovery-debounce-time) Recovery signal debounce window in seconds. #### [refreshDevicesOnVisible](/docs/browser-sdk/v4/reference/client-preferences/refresh-devices-on-visible) Whether to re-enumerate devices when the page becomes visible. #### [reinviteDebounceTime](/docs/browser-sdk/v4/reference/client-preferences/reinvite-debounce-time) Minimum time in ms between re-INVITE attempts. #### [reinviteMaxAttempts](/docs/browser-sdk/v4/reference/client-preferences/reinvite-max-attempts) Maximum re-INVITE attempts per call. #### [reinviteTimeout](/docs/browser-sdk/v4/reference/client-preferences/reinvite-timeout) Timeout in ms for a single re-INVITE attempt. #### [relayHost](/docs/browser-sdk/v4/reference/client-preferences/relay-host) Custom relay host URL. Empty string uses the default. #### [relayOnly](/docs/browser-sdk/v4/reference/client-preferences/relay-only) Whether to force TURN relay-only ICE candidates. #### [statsBaselineSamples](/docs/browser-sdk/v4/reference/client-preferences/stats-baseline-samples) Number of baseline samples for stats monitoring. #### [statsHistorySize](/docs/browser-sdk/v4/reference/client-preferences/stats-history-size) Number of seconds of metrics history to retain. #### [statsJitterSpikeMultiplier](/docs/browser-sdk/v4/reference/client-preferences/stats-jitter-spike-multiplier) Multiplier for jitter spike detection relative to baseline. #### [statsNoPacketThreshold](/docs/browser-sdk/v4/reference/client-preferences/stats-no-packet-threshold) Duration in ms with no inbound packets before a critical issue is emitted. #### [statsPacketLossThreshold](/docs/browser-sdk/v4/reference/client-preferences/stats-packet-loss-threshold) Packet loss fraction threshold (0-1) for issue detection. #### [statsPollingInterval](/docs/browser-sdk/v4/reference/client-preferences/stats-polling-interval) Stats polling interval in milliseconds. #### [statsRttSpikeMultiplier](/docs/browser-sdk/v4/reference/client-preferences/stats-rtt-spike-multiplier) Multiplier for RTT spike detection relative to baseline. #### [stereoAudio](/docs/browser-sdk/v4/reference/client-preferences/stereo-audio) Whether stereo Opus is enabled globally. #### [syncDevicesToActiveCalls](/docs/browser-sdk/v4/reference/client-preferences/sync-devices-to-active-calls) Whether device changes are auto-applied to active calls. #### [userVariables](/docs/browser-sdk/v4/reference/client-preferences/user-variables) Custom user variables attached to calls. ## **Methods** #### [enableSavePreferences](/docs/browser-sdk/v4/reference/client-preferences/enable-save-preferences) Enables persistence of preferences to storage. Loads any previously saved preferences and syncs future changes. > Public preferences API for configuring SDK behavior. ## Docs - [autoMuteVideoOnHidden](https://signalwire.com/docs/browser-sdk/reference/client-preferences/auto-mute-video-on-hidden.md): Whether to auto-mute video when the tab becomes hidden. - [checkConnectionOnVisible](https://signalwire.com/docs/browser-sdk/reference/client-preferences/check-connection-on-visible.md): Whether to check peer connection health when the page becomes visible. - [connectionTimeout](https://signalwire.com/docs/browser-sdk/reference/client-preferences/connection-timeout.md): WebSocket connection timeout in seconds. - [defaultAudioConstraints](https://signalwire.com/docs/browser-sdk/reference/client-preferences/default-audio-constraints.md): Default audio track constraints applied when no explicit constraints are provided. - [defaultVideoConstraints](https://signalwire.com/docs/browser-sdk/reference/client-preferences/default-video-constraints.md): Default video track constraints applied when video is enabled without explicit constraints. - [degradationBitrateThreshold](https://signalwire.com/docs/browser-sdk/reference/client-preferences/degradation-bitrate-threshold.md): Bitrate in kbps below which video is automatically disabled. - [degradationRecoveryThreshold](https://signalwire.com/docs/browser-sdk/reference/client-preferences/degradation-recovery-threshold.md): Bitrate in kbps above which video is automatically re-enabled. - [deviceDebounceTime](https://signalwire.com/docs/browser-sdk/reference/client-preferences/device-debounce-time.md): Debounce time for device change events, in seconds. - [devicePollingInterval](https://signalwire.com/docs/browser-sdk/reference/client-preferences/device-polling-interval.md): Polling interval for device enumeration, in seconds. - [disableUdpIceServers](https://signalwire.com/docs/browser-sdk/reference/client-preferences/disable-udp-ice-servers.md): Whether to filter out UDP-based ICE servers. - [enableAutoDegradation](https://signalwire.com/docs/browser-sdk/reference/client-preferences/enable-auto-degradation.md): Whether automatic video degradation on low bandwidth is enabled. - [enableNetworkChangeDetection](https://signalwire.com/docs/browser-sdk/reference/client-preferences/enable-network-change-detection.md): Whether browser network change detection (online/offline) is enabled. - [enableRelayFallback](https://signalwire.com/docs/browser-sdk/reference/client-preferences/enable-relay-fallback.md): Whether relay-only escalation is enabled as a last-resort recovery tier. - [enableSavePreferences](https://signalwire.com/docs/browser-sdk/reference/client-preferences/enable-save-preferences.md): Enables persistence of preferences to storage. - [enableServerHangupInterception](https://signalwire.com/docs/browser-sdk/reference/client-preferences/enable-server-hangup-interception.md): Whether server-sent media-timeout hangups are intercepted for recovery. - [iceCandidateTimeout](https://signalwire.com/docs/browser-sdk/reference/client-preferences/ice-candidate-timeout.md): Timeout for individual ICE candidate gathering, in seconds. - [iceDisconnectedGracePeriod](https://signalwire.com/docs/browser-sdk/reference/client-preferences/ice-disconnected-grace-period.md): Grace period before treating ICE 'disconnected' as failure, in seconds. - [iceGatheringTimeout](https://signalwire.com/docs/browser-sdk/reference/client-preferences/ice-gathering-timeout.md): Timeout for the entire ICE gathering phase, in seconds. - [iceRestartTimeout](https://signalwire.com/docs/browser-sdk/reference/client-preferences/ice-restart-timeout.md): Timeout for a single ICE restart attempt in seconds. - [iceServers](https://signalwire.com/docs/browser-sdk/reference/client-preferences/ice-servers.md): Custom ICE servers for TURN/STUN configuration. - [inputAudioConstraints](https://signalwire.com/docs/browser-sdk/reference/client-preferences/input-audio-constraints.md): Default audio input track constraints. - [inputVideoConstraints](https://signalwire.com/docs/browser-sdk/reference/client-preferences/input-video-constraints.md): Default video input track constraints. - [keyframeBurstWindow](https://signalwire.com/docs/browser-sdk/reference/client-preferences/keyframe-burst-window.md): Keyframe burst window duration in milliseconds. - [keyframeCooldown](https://signalwire.com/docs/browser-sdk/reference/client-preferences/keyframe-cooldown.md): Cooldown period in ms after keyframe burst limit is reached. - [keyframeMaxBurst](https://signalwire.com/docs/browser-sdk/reference/client-preferences/keyframe-max-burst.md): Maximum keyframe requests in a burst window. - [maxRecoveryAttempts](https://signalwire.com/docs/browser-sdk/reference/client-preferences/max-recovery-attempts.md): Maximum recovery attempts before giving up. - [persistDeviceSelection](https://signalwire.com/docs/browser-sdk/reference/client-preferences/persist-device-selection.md): Whether device selections are persisted to storage. - [preferredAudioCodecs](https://signalwire.com/docs/browser-sdk/reference/client-preferences/preferred-audio-codecs.md): Preferred audio codecs in priority order. - [preferredAudioInput](https://signalwire.com/docs/browser-sdk/reference/client-preferences/preferred-audio-input.md): Preferred audio input device for new calls. - [preferredAudioOutput](https://signalwire.com/docs/browser-sdk/reference/client-preferences/preferred-audio-output.md): Preferred audio output device for new calls. - [preferredVideoCodecs](https://signalwire.com/docs/browser-sdk/reference/client-preferences/preferred-video-codecs.md): Preferred video codecs in priority order. - [preferredVideoInput](https://signalwire.com/docs/browser-sdk/reference/client-preferences/preferred-video-input.md): Preferred video input device for new calls. - [receiveAudio](https://signalwire.com/docs/browser-sdk/reference/client-preferences/receive-audio.md): Whether to receive remote audio by default. - [receiveVideo](https://signalwire.com/docs/browser-sdk/reference/client-preferences/receive-video.md): Whether to receive remote video by default. - [reconnectCallsTimeout](https://signalwire.com/docs/browser-sdk/reference/client-preferences/reconnect-calls-timeout.md): Timeout for reconnecting to previously attached calls, in seconds. - [reconnectDelayMax](https://signalwire.com/docs/browser-sdk/reference/client-preferences/reconnect-delay-max.md): Maximum reconnection backoff delay in seconds. - [reconnectDelayMin](https://signalwire.com/docs/browser-sdk/reference/client-preferences/reconnect-delay-min.md): Minimum reconnection backoff delay in seconds. - [recoveryCooldown](https://signalwire.com/docs/browser-sdk/reference/client-preferences/recovery-cooldown.md): Cooldown period between recovery attempts in seconds. - [recoveryDebounceTime](https://signalwire.com/docs/browser-sdk/reference/client-preferences/recovery-debounce-time.md): Recovery signal debounce window in seconds. - [refreshDevicesOnVisible](https://signalwire.com/docs/browser-sdk/reference/client-preferences/refresh-devices-on-visible.md): Whether to re-enumerate devices when the page becomes visible. - [reinviteDebounceTime](https://signalwire.com/docs/browser-sdk/reference/client-preferences/reinvite-debounce-time.md): Minimum time in ms between re-INVITE attempts. - [reinviteMaxAttempts](https://signalwire.com/docs/browser-sdk/reference/client-preferences/reinvite-max-attempts.md): Maximum re-INVITE attempts per call. - [reinviteTimeout](https://signalwire.com/docs/browser-sdk/reference/client-preferences/reinvite-timeout.md): Timeout in ms for a single re-INVITE attempt. - [relayHost](https://signalwire.com/docs/browser-sdk/reference/client-preferences/relay-host.md): Custom relay host URL. - [relayOnly](https://signalwire.com/docs/browser-sdk/reference/client-preferences/relay-only.md): Whether to force TURN relay-only ICE candidates. - [statsBaselineSamples](https://signalwire.com/docs/browser-sdk/reference/client-preferences/stats-baseline-samples.md): Number of baseline samples for stats monitoring. - [statsHistorySize](https://signalwire.com/docs/browser-sdk/reference/client-preferences/stats-history-size.md): Number of seconds of metrics history to retain. - [statsJitterSpikeMultiplier](https://signalwire.com/docs/browser-sdk/reference/client-preferences/stats-jitter-spike-multiplier.md): Multiplier for jitter spike detection relative to baseline. - [statsNoPacketThreshold](https://signalwire.com/docs/browser-sdk/reference/client-preferences/stats-no-packet-threshold.md): Duration in ms with no inbound packets before a critical issue is emitted. - [statsPacketLossThreshold](https://signalwire.com/docs/browser-sdk/reference/client-preferences/stats-packet-loss-threshold.md): Packet loss fraction threshold (0-1) for issue detection. - [statsPollingInterval](https://signalwire.com/docs/browser-sdk/reference/client-preferences/stats-polling-interval.md): Stats polling interval in milliseconds. - [statsRttSpikeMultiplier](https://signalwire.com/docs/browser-sdk/reference/client-preferences/stats-rtt-spike-multiplier.md): Multiplier for RTT spike detection relative to baseline. - [stereoAudio](https://signalwire.com/docs/browser-sdk/reference/client-preferences/stereo-audio.md): Whether stereo Opus is enabled globally. - [syncDevicesToActiveCalls](https://signalwire.com/docs/browser-sdk/reference/client-preferences/sync-devices-to-active-calls.md): Whether device changes are auto-applied to active calls. - [userVariables](https://signalwire.com/docs/browser-sdk/reference/client-preferences/user-variables.md): Custom user variables attached to calls.