BackgroundProcessorService class
Singleton service that manages persistent background processing.
This service lives in the main app state and continues processing frames even after the BackgroundModal is closed.
Usage:
- Call
start()when video is enabled - Set
backgroundto apply a virtual background - Listen to
onFrameReadyto get processed frames - Call
stop()when video is disabled
Constructors
- BackgroundProcessorService()
-
factory
Properties
- currentBackground → VirtualBackground?
-
no setter
- currentFrame → Image?
-
no setter
- hasBackground → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
no setter
- isProcessing → bool
-
no setter
- onError ↔ void Function(String error)?
-
getter/setter pair
- onFrameReady ↔ void Function(Image frame)?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → Future< void> - Dispose all resources
-
initialize(
) → Future< void> - Initialize the background processor service
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setBackground(
VirtualBackground? background) → void - Set the virtual background to apply
-
start(
MediaStream stream) → Future< void> - Start processing frames from the given stream
-
stop(
) → Future< void> - Stop all processing
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited