public interface AudioDeviceHandler extends com.avaya.clientservices.media.AudioDeviceListener, AudioDeviceChangeNotifier
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<com.avaya.clientservices.media.AudioDevice> |
getAvailableAudioDevices()
Get the available audio devices.
|
com.avaya.clientservices.media.AudioDevice |
pickAudioDeviceForCallStart(HandsetType handset)
Choose the audio device to use at the beginning of a new VoIP call.
|
void |
setRJ9HeadsetDefaultAudioDevice(boolean enabled)
Set the flag controlling if the RJ9 jack is the default audio device used
for new calls.
|
void |
setUserRequestedDevice(com.avaya.clientservices.media.AudioDevice device)
Set the currently active audio device to the specified device.
|
onAudioDeviceChanged, onAudioDeviceError, onAudioDeviceListChangedaddAudioDeviceChangeListener, removeAudioDeviceChangeListener@NonNull java.util.Collection<com.avaya.clientservices.media.AudioDevice> getAvailableAudioDevices()
The advantage of using this over calling AudioInterface.getDevices()
is that this version will filter out any handset devices that aren't
off-hook.
void setUserRequestedDevice(@NonNull
com.avaya.clientservices.media.AudioDevice device)
Use this to implement device selection inside your application's logic and user interface, for cases where the user changes the active audio device without a physical action like plugging/unplugging a device or a handset going on or off hook.
device - The audio device to use.@NonNull
com.avaya.clientservices.media.AudioDevice pickAudioDeviceForCallStart(@Nullable
HandsetType handset)
handset - If non-null, the device that went off-hook to
originate this call.void setRJ9HeadsetDefaultAudioDevice(boolean enabled)
This is needed because the Vantage hardware is unable to detect when a headset is actually plugged into the RJ9 jack on the back, so the media engine always reports it as available.
The default is false, which means to use the speakerphone as the
default audio device.
enabled - Set true to use the headset plugged into the RJ9
jack as the default audio device, false to use
the speakerphone as the default audio device.pickAudioDeviceForCallStart(HandsetType)