AudioDeviceInfo class

Represents information about an audio input or output device.

  • This class extends DeviceInfo.
  • It provides metadata about audio devices such as microphones and speakers.
  • Instances of this class are returned by VideoSDK.getAudioDevices().

Depending on the value of kind, an AudioDeviceInfo instance may represent:

  • An audio input device (audioinput), such as a microphone.
  • An audio output device (audiooutput), such as a speaker.

Example

List<AudioDeviceInfo> mics = [];
List<AudioDeviceInfo> speakers = [];

final List<AudioDeviceInfo>? audioDevices =
    await VideoSDK.getAudioDevices();

if (audioDevices != null) {
  for (final device in audioDevices) {
    if (device.kind == 'audioinput') {
      mics.add(device);
    } else if (device.kind == 'audiooutput') {
      speakers.add(device);
    }
  }

  print('Microphones: ${mics.length}');
  print('Speakers: ${speakers.length}');
}
Inheritance

Properties

deviceId → String
Returns a String that is an identifier for the represented device that is persisted across sessions. It is un-guessable by other applications and unique to the origin of the calling application. It is reset when the user clears cookies (for Private Browsing, a different identifier is used that is not persisted across sessions).
finalinherited
groupId → String?
Returns a String that is a group identifier. Two devices have the same group identifier if they belong to the same physical device — for example a monitor with both a built-in camera and a microphone.
finalinherited
kind → String?
Returns an enumerated value that is either 'videoinput', 'audioinput' or 'audiooutput'.
finalinherited
label → String
Returns a String that is a label describing this device (for example "External USB Webcam").
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited