Skip to content

Commit a9c4919

Browse files
authored
Merge pull request #8 from flutter-webrtc/dl/selectaudio
Add selectAudioOutput method to MediaDevices
2 parents 58a1e42 + 7a1fc0d commit a9c4919

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: lib/src/mediadevices.dart

+13
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ abstract class MediaDevices {
120120
/// change included in the event object; to get the updated list of devices,
121121
/// you'll have to use enumerateDevices().
122122
Function(dynamic event)? ondevicechange;
123+
124+
/// Prompts the user to select a specific audio output device.
125+
Future<MediaDeviceInfo> selectAudioOutput([AudioOutputOptions? options]);
123126
}
124127

125128
/// This describe the media input and output devices, such as microphones,
@@ -152,3 +155,13 @@ class MediaDeviceInfo {
152155
/// (for example "External USB Webcam").
153156
final String label;
154157
}
158+
159+
/// An object that configures what device(s) may be offered in the user prompt.
160+
class AudioOutputOptions {
161+
AudioOutputOptions({
162+
this.deviceId = "",
163+
});
164+
165+
/// A string representing the id of the (only) device to display in the prompt (with default value: "").
166+
final String deviceId;
167+
}

0 commit comments

Comments
 (0)