From 5b07be4d7bd7a5289f2c4ff903bd4816da6742e7 Mon Sep 17 00:00:00 2001 From: davidliu Date: Tue, 2 Aug 2022 02:46:08 +0900 Subject: [PATCH] Add ondevicechange property to MediaDevices --- lib/src/mediadevices.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/mediadevices.dart b/lib/src/mediadevices.dart index 2087940..855677b 100644 --- a/lib/src/mediadevices.dart +++ b/lib/src/mediadevices.dart @@ -114,6 +114,12 @@ abstract class MediaDevices { MediaTrackSupportedConstraints getSupportedConstraints() { throw UnimplementedError(); } + + /// A function you provide which accepts as input a Event object describing + /// the devicechange event that occurred. There is no information about the + /// change included in the event object; to get the updated list of devices, + /// you'll have to use enumerateDevices(). + Function(dynamic event)? ondevicechange; } /// This describe the media input and output devices, such as microphones,