From Bright Pattern Documentation
• 5.19
onAudioDeviceChange
Subscribe to any change of the user’s active audio device.
Request
Syntax
on('ON_AUDIO_DEVICE_CHANGE', handler: OnAudioDeviceChangeHandler): void
|
Parameters
Parameter | Parameter Values | Data Type | Optional/Required | Description |
inputDevice | String | Optional | The system name of the input device (i.e., microphone) | |
outputDevice | String | Optional | The system name of the output device (i.e., headset) |
Example Request
function audioDeviceChangeCallback(input?: string, output?: string) {
console.log("New microphone:", input);
console.log("New headset:", output);
}
adApi.on("ON_AUDIO_DEVICE_CHANGE", audioDeviceChangeCallback);
Return Value
(None)