Constructor
-
new AudioInterface(inputInterface, outputInterface)
-
AudioInterface class provides functionality for managing the audio device that is used by the user.
It allows to access to either the audio input interface (microphone) or the audio output interface (headphones).Parameters:
Name Type Description inputInterface
AvayaClientServices.Base.AudioInputInterface outputInterface
AvayaClientServices.Base.AudioOutputInterface
Methods
-
getAvailableDevices() → {Array.<AvayaClientServices.Base.VideoDevice>|Array.<AvayaClientServices.Base.AudioDevice>}
-
- Inherited From:
Returns:
{ Array.<AvayaClientServices.Base.VideoDevice> | Array.<AvayaClientServices.Base.AudioDevice> }
-
getInputInterface() → {AvayaClientServices.Base.AudioInputInterface}
-
Returns the input interface for the audio device which is used by the user.
Returns:
-
getLocalMediaStream(callId) → {MediaStream}
-
Returns the local MediaStream associated with the callId.
Parameters:
Name Type Description callId
string ID of the call.
Returns:
{ MediaStream }
-
getMediaAccessCapability() → {AvayaClientServices.Base.Capability}
-
The function returns capability to perform media access.
- Inherited From:
Returns:
-
getOutputInterface() → {AvayaClientServices.Base.AudioOutputInterface}
-
Returns the output interface for the audio device which is used by the user.
Returns:
-
getRemoteMediaStream(callId) → {MediaStream}
-
Returns the remote MediaStream associated with the callId.
Parameters:
Name Type Description callId
string ID of the call.
Returns:
{ MediaStream }
-
getSelectDeviceCapability() → {AvayaClientServices.Base.Capability}
-
The function returns capability to select device.
Returns:
-
getSelectedDevice() → {AvayaClientServices.Base.VideoDevice}
-
The function gets the selected capture device for video.
- Inherited From:
Returns:
-
hasAvailableDevices() → {boolean}
-
Returns a boolean indicating if devices of this type exists. This method
will work prior to the user granting access to the mic/camera media stream.- Inherited From:
Returns:
{ boolean }
-
setSelectedDevice(device)
-
The function sets the capture device for video. This will not affect any active video sessions.
Parameters:
Name Type Description device
AvayaClientServices.Base.VideoDevice | AvayaClientServices.Base.AudioDevice - Inherited From:
-
start() → {AvayaClientServices.Base.Promise.<(undefined|undefined)>}
-
Starts audio interface.
Returns:
{ AvayaClientServices.Base.Promise.<(undefined|undefined)> }
-
stop() → {AvayaClientServices.Base.Promise.<(undefined|undefined)>}
-
Stop audio interface.
Returns:
{ AvayaClientServices.Base.Promise.<(undefined|undefined)> }
Managing callbacks
-
addOnDevicesAddedCallback(callback) → {void}
-
Add callback on specific event
Parameters:
Name Type Description callback
AvayaClientServices.Base.MediaInterface#onDevicesAddedCallback Function to be called
Returns:
{ void }
-
addOnDevicesRemovedCallback(callback) → {void}
-
Add callback on specific event
Parameters:
Name Type Description callback
AvayaClientServices.Base.MediaInterface#onDevicesRemovedCallback Function to be called
Returns:
{ void }
-
addOnDevicesUnavailableCallback(callback) → {void}
-
Add callback on specific event
Parameters:
Name Type Description callback
AvayaClientServices.Base.MediaInterface#onDevicesUnavailableCallback Function to be called
Returns:
{ void }
-
addOnSelectedDeviceChangedCallback(callback) → {void}
-
Add callback on specific event
Parameters:
Name Type Description callback
AvayaClientServices.Base.MediaInterface#onSelectedDeviceChanged Function to be called
Returns:
{ void }
-
addOnSelectedDeviceRemovedCallback(callback) → {void}
-
Add callback on specific event
Parameters:
Name Type Description callback
AvayaClientServices.Base.MediaInterface#onSelectedDeviceRemovedCallback Function to be called
Returns:
{ void }
-
cleanUpOnDevicesAddedCallbacks() → {void}
-
Removes all previously added callbacks
Returns:
{ void }
-
cleanUpOnDevicesRemovedCallbacks() → {void}
-
Removes all previously added callbacks
Returns:
{ void }
-
cleanUpOnDevicesUnavailableCallbacks() → {void}
-
Removes all previously added callbacks
Returns:
{ void }
-
cleanUpOnDevicesUpdatedCallbacks() → {void}
-
Removes all previously added callbacks
Returns:
{ void }
-
cleanUpOnSelectedDeviceChangedCallbacks() → {void}
-
Removes all previously added callbacks
Returns:
{ void }
-
cleanUpOnSelectedDeviceRemovedCallbacks() → {void}
-
Removes all previously added callbacks
Returns:
{ void }
-
removeOnDevicesAddedCallback(callback) → {void}
-
Remove previously added callback
Parameters:
Name Type Description callback
AvayaClientServices.Base.MediaInterface#onDevicesAddedCallback Function to be removed
Returns:
{ void }
-
removeOnDevicesRemovedCallback(callback) → {void}
-
Remove previously added callback
Parameters:
Name Type Description callback
AvayaClientServices.Base.MediaInterface#onDevicesRemovedCallback Function to be removed
Returns:
{ void }
-
removeOnDevicesUnavailableCallback(callback) → {void}
-
Remove previously added callback
Parameters:
Name Type Description callback
AvayaClientServices.Base.MediaInterface#onDevicesUnavailableCallback Function to be removed
Returns:
{ void }
-
removeOnDevicesUpdatedCallback(callback) → {void}
-
Remove previously added callback
Parameters:
Name Type Description callback
AvayaClientServices.Base.MediaInterface#addOnDevicesUpdatedCallback Function to be removed
Returns:
{ void }
-
removeOnSelectedDeviceChangedCallback(callback) → {void}
-
Remove previously added callback
Parameters:
Name Type Description callback
AvayaClientServices.Base.MediaInterface#onSelectedDeviceChanged Function to be removed
Returns:
{ void }
-
removeOnSelectedDeviceRemovedCallback(callback) → {void}
-
Remove previously added callback
Parameters:
Name Type Description callback
AvayaClientServices.Base.MediaInterface#onSelectedDeviceRemovedCallback Function to be removed
Returns:
{ void }
Type Definitions
-
addOnDevicesUpdatedCallback(mediaInterface, devices) → {void}
-
Called to report that audio or video devices label were updated
Parameters:
Name Type Description mediaInterface
AvayaClientServices.Base.MediaInterface devices
Array.<AvayaClientServices.Base.VideoDevice> | Array.<AvayaClientServices.Base.AudioDevice> Returns:
{ void }
-
onDevicesAddedCallback(mediaInterface, devices) → {void}
-
Called to report that audio or video devices were added
Parameters:
Name Type Description mediaInterface
AvayaClientServices.Base.MediaInterface devices
Array.<AvayaClientServices.Base.VideoDevice> | Array.<AvayaClientServices.Base.AudioDevice> - Inherited From:
Returns:
{ void }
-
onDevicesRemovedCallback(mediaInterface, devices) → {void}
-
Called to report that audio or video devices were removed
Parameters:
Name Type Description mediaInterface
AvayaClientServices.Base.MediaInterface devices
Array.<AvayaClientServices.Base.VideoDevice> | Array.<AvayaClientServices.Base.AudioDevice> - Inherited From:
Returns:
{ void }
-
onDevicesUnavailableCallback(mediaInterface) → {void}
-
Called to report that no device is available
Parameters:
Name Type Description mediaInterface
AvayaClientServices.Base.MediaInterface Returns:
{ void }
-
onSelectedDeviceChanged(mediaInterface, device) → {void}
-
Called to report that device was changed
Parameters:
Name Type Description mediaInterface
AvayaClientServices.Base.MediaInterface device
AvayaClientServices.Base.AudioDevice | AvayaClientServices.Base.VideoDevice - Inherited From:
Returns:
{ void }
-
onSelectedDeviceRemovedCallback(mediaInterface, device) → {void}
-
Called to report that selected device was removed
Parameters:
Name Type Description mediaInterface
AvayaClientServices.Base.MediaInterface device
AvayaClientServices.Base.VideoDevice | AvayaClientServices.Base.AudioDevice Returns:
{ void }