Emitted when an audio device is connected to or disconnected from the system (e.g. a headset is plugged in or unplugged).
The payload contains the refreshed device list and the current device selection.
user.subscribe(UserEventType.AUDIO_DEVICES_CHANGED, (event) => { const { available, selected } = event.payload; console.log("Available mics:", available.inputDevices.map(d => d.label)); console.log("Active mic:", selected.inputDevice?.label ?? "none");}); Copy
user.subscribe(UserEventType.AUDIO_DEVICES_CHANGED, (event) => { const { available, selected } = event.payload; console.log("Available mics:", available.inputDevices.map(d => d.label)); console.log("Active mic:", selected.inputDevice?.label ?? "none");});
The type of the user event.
The updated device list and current selection after the change.
The timestamp when the event occurred.
Emitted when an audio device is connected to or disconnected from the system (e.g. a headset is plugged in or unplugged).
The payload contains the refreshed device list and the current device selection.
Example
See