ClientPreferences
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 and reached
as
client.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
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
with a 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.