VideoViewPlayerController class

Controls native video decoding, playback states, and hardware texture mapping.

Inheritance

Constructors

VideoViewPlayerController(String dataSource)
Creates a controller for a given dataSource string URL.
VideoViewPlayerController.asset(String asset)
Named constructor for local Flutter app assets.
VideoViewPlayerController.file(dynamic file)
Named constructor for local filesystem files.
VideoViewPlayerController.networkUrl(Uri url)
Named constructor for network video streams from a url.

Properties

dataSource String
The active video data source URL or path string.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isDisposed bool
Whether this controller instance has been disposed.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textureId int?
Hardware texture ID assigned by the native platform engine.
no setter
value VideoViewValue
The current value stored in this notifier.
getter/setter pairinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() Future<void>
Releases native player instances, event listeners, and hardware texture resources.
override
initialize() Future<void>
Initializes the native video player and binds hardware texture rendering.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
pause() Future<void>
Pauses video playback.
play() Future<void>
Starts or resumes video playback.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
seekTo(Duration position) Future<void>
Seeks playback to the specified position.
setDataSource(String url) Future<void>
Swaps the active video source to url without recreating native player instances.
setLooping(bool looping) Future<void>
Sets whether the video should automatically loop upon completion.
setPlaybackSpeed(double speed) Future<void>
Sets the native player playback speed (e.g. 1.0, 1.5, 2.0).
setVolume(double volume) Future<void>
Sets player audio volume (0.0 - 1.0). Safely buffers before init.
toString() String
A string representation of this object.
inherited

Operators

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