Get a List of Audio Devices

You will need to specify an audio device (Microphone) or use the default microphone of your Client platform to initiate a stream. EnableX provides API support to get a list of audio devices (Microphone) available with your Client platform running the Client End Point application along with their Device names.

The Enx.getDevices() method is used to return a list containing all the microphones available with your client platform. You can build UI Element with the List to choose a Microphone.

Class: Enx

Method: getDevices(Callback)

Callback: Returns one or more of the following enumerated values: SPEAKER_PHONE,  WIRED_HEADSET,  EARPIECE,  BLUETOOTH,  NONE

Enx.getDevices(devices=> {
     // devices= Comma separated Device Names
}); 

Get Selected Audio Device by User

Enx.getSelectedDevice() method is used to get the selected or used Audio Device for the Stream.

Method: getSelectedDevice(Callback)

 Enx.getSelectedDevice(device => {
     // device = Current Device Name
});