From Bright Pattern Documentation
Jump to: navigation, search
This page contains changes which are not marked for translation.
• 5.19

onAudioDeviceChange

Subscribe to any change of the user’s active audio device.

Request

Syntax

on('ON_AUDIO_DEVICE_CHANGE', handler: OnAudioDeviceChangeHandler): void


type OnAudioDeviceChangeHandler = (inputDevice?: string, outputDevice?: string) => SyncAsyncResult

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)



< Previous | Next >