From Bright Pattern Documentation
(Created page with "<translate> =onAudioDeviceChange= Subscribe to any change of the user’s active audio device. ==Request== ''Syntax'' {| class="wikitable" |on('ON_AUDIO_DEVICE_CHANGE', han...") |
(Updated via BpDeleteTranslateTags script) |
||
Line 1: | Line 1: | ||
− | + | ||
=onAudioDeviceChange= | =onAudioDeviceChange= | ||
Line 50: | Line 50: | ||
(None) | (None) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 04:01, 29 May 2024
• 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)