-
Notifications
You must be signed in to change notification settings - Fork 2
AudioDevice
Lejla Solak edited this page Jun 7, 2023
·
2 revisions
Getter for the audioDeviceType
field.
none
-
AudioDeviceType
- An enum value representing the audio device type.
@Override
public void onActiveAudioDeviceChanged(@NonNull ActiveAudioDeviceChangedEvent activeAudioDeviceChangedEvent) {
AudioDeviceType audioDeviceType = activeAudioDeviceChangedEvent.getActiveAudioDevice().getAudioDeviceType();
Log.d("WebRTC", "Active audio device type is: " + audioDeviceType);
}
Getter for the name
field.
none
-
String
- A human-readable name describing the audio device. If device has no name (such as speaker and earpiece), default name for that audio device type is used.
@Override
public void onActiveAudioDeviceChanged(@NonNull ActiveAudioDeviceChangedEvent activeAudioDeviceChangedEvent) {
String name = activeAudioDeviceChangedEvent.getActiveAudioDevice().getName();
Log.d("WebRTC", "Name of active audio device is " + name);
}
Getter for the priorityLevel
field.
none
-
int
- The priority level of the audio device. The value ranges from 1 to 4, where 1 represents the lowest priority and 4 represents the highest priority level.
@Override
public void onActiveAudioDeviceChanged(@NonNull ActiveAudioDeviceChangedEvent activeAudioDeviceChangedEvent) {
int priorityLevel = activeAudioDeviceChangedEvent.getActiveAudioDevice().getPriorityLevel();
Log.d("WebRTC", "Active audio device has prioriy level " + priorityLevel);
}