defaultDeviceWithMediaType static method
Returns the default device used to capture data of a given media type.
mediaType
: A media type identifier. See MediaType.
When you use this method to request a camera (using the MediaType.video
media type), the returned device is always of the
CaptureDeviceType.builtInWideAngleCamera device type. To request other
device types, use the CaptureDevice.defaultDeviceWithDeviceType
method instead.
Implementation
static Future<CaptureDevice?> defaultDeviceWithMediaType(
String mediaType,
) async {
return await _channel.$defaultDeviceWithMediaType(mediaType)
as CaptureDevice?;
}