Get a list of Audio Devices
You will need to specify Audio/Video Device ID (Microphone & Camera Device ID) or use the default Microphone Device ID of your Mobility Device to initiate a Stream. EnableX provides API support to get a list of Audio Devices available with your Device running the Client End Point application along with their device IDs.
The getDevices()
method is used to return a List containing all the audio devices connected to your Device. You can build UI Element with the List to choose a Device to use for Stream.
Method: getDevices( successCallback, errorCallback )
Parameters:
@param {CallableFunction} successCallback
@param {CallableFunction} errorCallback
window.EnxRtc.getDevices(function (data) { console.log(JSON.stringify(data.data)); }, function (err) { console.log('JSON.stringify(err)); });
Get the Selected Audio Device
window.EnxRtc.getSelectedDevice()
method is used to get the currently selected or in-use Audio Device for the Stream.
Method: getSelectedDevice( successCallback, errorCallback )
Parameters:
@param {CallableFunction} successCallback
@param {CallableFunction} errorCallback
window.EnxRtc.getSelectedDevice(function (data) { console.log(JSON.stringify(data.data)); }, function (err) { console.log('JSON.stringify(err)); });