Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/src/mediadevices.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ abstract class MediaDevices {
/// change included in the event object; to get the updated list of devices,
/// you'll have to use enumerateDevices().
Function(dynamic event)? ondevicechange;

/// Prompts the user to select a specific audio output device.
Future<MediaDeviceInfo> selectAudioOutput([AudioOutputOptions? options]);
}

/// This describe the media input and output devices, such as microphones,
Expand Down Expand Up @@ -152,3 +155,13 @@ class MediaDeviceInfo {
/// (for example "External USB Webcam").
final String label;
}

/// An object that configures what device(s) may be offered in the user prompt.
class AudioOutputOptions {
AudioOutputOptions({
this.deviceId = "",
});

/// A string representing the id of the (only) device to display in the prompt (with default value: "").
final String deviceId;
}