DVMediaBackends class abstract final

Where native bindings register the players and capture devices they implement.

Typed rather than routed through DVNativeBridge, because a player is an object with a stream of events, not a call that returns a value. Nothing is registered by default: a target whose bindings registered nothing plays nothing, and says so on the controller's error signal.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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 Properties

cache → DVMediaCache?
no setter
cameraCapabilities → DVCameraCapabilities
no setter
capture → DVMediaCapture
The capture runtime DV.Platform.media records through.
no setter
captureFiles → DVCaptureFiles
Where a camera writes, private to this account.
no setter
capturePermissions → DVCapturePermissions
The runtime permission flow, as a camera asks it.
no setter
environment ↔ DVMediaEnvironment Function()
What every controller a box makes is wired to. Replaceable, for tests and for a generated runtime that declares DRM adapters.
getter/setter pair
frameEncoderCapabilities → DVFrameEncoderCapabilities
no setter
hasPlayer → bool
no setter

Static Methods

createCamera() → DVCameraBackend?
A camera, or null where none is bound.
createFrameEncoder() → DVFrameEncoder?
createPlayer(DVMediaSource source, DVMediaKind kind) → DVMediaPlayerBackend?
A player for source, or null when this target has none bound.
precache(DVMediaSource source, {int? bytes}) → Future<bool>
Fetches source ahead of playback. Returns false where this target can neither cache nor ask anything else to.
registerAudioFocus(DVAudioFocusBackend backend) → void
Binds the platform's audio focus.
registerCamera(DVCameraBackend factory(), {required DVCameraCapabilities capabilities, String? directory}) → void
Binds this target's camera. capabilities is what the device reports without opening it; the factory opens nothing until a box asks.
registerCapture({required DVCaptureCapabilities capabilities, required DVCaptureBackend backend(), required String directory, DVCapturePermissions permissions = const _DVPlatformCapturePermissions()}) → void
Binds capture. directory is where recordings go; it is made private to this account and must not be shared with anything else.
registerFrameEncoder(DVFrameEncoder factory(), {required DVFrameEncoderCapabilities capabilities}) → void
Binds this target's video encoder, which DVWidgetRecorder records and streams through.
registerNowPlaying(DVNowPlayingBackend backend) → void
Binds the lock screen and its transport controls.
registerPlayer(DVMediaPlayerFactory factory, {bool? backgroundAudioDeclared}) → void
Binds this target's player. backgroundAudioDeclared is whether the build declared what the platform needs to keep playing in the background -- UIBackgroundModes: audio, a media-playback foreground service -- as the binding found it in the running application.
registerPrecache(Future<void> precache(String url, int? bytes)) → void
How DV.Platform.media.precache fetches where there is no disk cache: a browser asking its own HTTP cache to fetch.
reset() → void
Unbinds everything. For tests.
resetFrameEncoder() → void
Unbinds the encoder.
unregisterPlayer() → void
useCache(DVMediaCache? cache) → void
The disk cache progressive URLs are read through. A binding on a target with a filesystem sets it at start-up.
useCaptureFiles(DVCaptureFiles files) → void
Where a camera writes on a target with no directory to give: a browser, whose recordings are Blobs in a page-lifetime store.