CaptureDeviceDiscoverySession class

A query for finding and monitoring available capture devices.

Use this class to find all available capture devices matching a specific device type (such as microphone or wide-angle camera), supported media types for capture (such as audio, video, or both), and position (front- or back-facing).

After creating a device discovery session, you can inspect its devices list to choose a device for capture.

Annotations
  • @Reference('av_foundation/av_foundation/CaptureDeviceDiscoverySession')

Constructors

CaptureDeviceDiscoverySession({required List<CaptureDevice> devices, required List<Set<CaptureDevice>> supportedMultiCamDeviceSets})
Construct a CaptureDeviceDiscoverySession.

Properties

devices List<CaptureDevice>
A list of currently available devices matching the session’s criteria.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportedMultiCamDeviceSets List<Set<CaptureDevice>>
A list of lists of capture devices that you can use simultaneously in a multi-camera session.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

discoverySessionWithDeviceTypes({required List<String> deviceTypes, String? mediaType, required int position}) Future<CaptureDeviceDiscoverySession>
Creates a discovery session for finding devices with the specified criteria.