DVMedia class

Constructors

DVMedia()
const

Properties

cameraCapabilities → DVCameraCapabilities
What this target's camera can do, as its binding reports it, without opening it.
no setter
canPick → bool
Whether this target has a picker for photos and files.
no setter
captureCapabilities → DVCaptureCapabilities
What this target can record, as its capture binding reports it. Nothing on a target with no binding registered.
no setter
hashCode → int
The hash code for this object.
no setterinherited
recordingCapabilities → DVFrameEncoderCapabilities
What this target can record and stream with DVWidgetRecorder.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cameras() → Future<List<DVCameraDevice>>
The cameras and screens this target can open now, for a picker: pass one's id to DVBox.camera(device: ...). Empty where none is bound.
clearCache() → Future<void>
Empties the media disk cache.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pick({String type = 'image', bool multiple = false}) → Future<List<Map<String, Object?>>>
pickFiles({List<String> types = const <String>[], bool multiple = false}) → Future<List<DVFile>>
Asks the person for files. types narrows the picker: kinds (image, video, audio), media types (application/pdf) or extensions (.csv). Cancelling answers an empty list. Like pickImage it gives DVFiles, read with readCapture, and throws DVPickUnsupported where there is no picker.
pickImage() → Future<DVFile?>
Asks the person for an existing photo with the device's own picker. Null when they cancel.
precache(DVMediaSource source, {int? bytes}) → Future<bool>
Fetches source before anything plays it: the first bytes, or all of it, into the disk cache -- or, in a browser, into the browser's cache. False where this target can do neither, or the source is not a progressive URL.
readCapture(DVFile file) → Future<Uint8List>
The contents of a photo or recording a camera or recordAudio/ recordVideo produced. On a device that is the private file at DVFile.path; in a browser the path is a key into the page's capture store, which no file API can open, so this is the way to the bytes on every target -- to decode a frame (a QR code, a document) or upload it.
recordAudio({DVAudioFormat format = DVAudioFormat.aac, Duration? maxDuration}) → DVCaptureSession
Records audio. Await the session for the DVFile; hold it to stop early.
recordVideo({DVVideoQuality quality = DVVideoQuality.hd720, Duration? maxDuration}) → DVCaptureSession
Records video. See recordAudio.
toString() → String
A string representation of this object.
inherited

Operators

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