NativeVideoPlayerController class

Mixed in types

Constructors

NativeVideoPlayerController(int viewId)
NOTE: For internal use only. See NativeVideoPlayerView.onViewReady instead.

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
onError ValueNotifier<String?>
Emitted when a playback error occurs or when it's not possible to load the video source
final
onPlaybackEnded ChangeNotifier
Emitted when the video has finished playing.
final
onPlaybackPositionChanged ValueNotifier<int>
You can get the playback position also with playbackInfo
final
onPlaybackReady ChangeNotifier
Emitted when the video loaded successfully and it's ready to play. At this point, videoInfo and playbackInfo are available.
final
onPlaybackSpeedChanged ValueNotifier<double>
You can get the playback speed also with playbackInfo
final
onPlaybackStatusChanged ValueNotifier<PlaybackStatus>
You can get the playback status also with playbackInfo
final
onVolumeChanged ValueNotifier<double>
You can get the playback volume also with playbackInfo
final
playbackInfo PlaybackInfo?
The playback info about the video being played.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
videoInfo VideoInfo?
The video info about the current video source.
no setter
videoSource VideoSource?
The video source that is currently loaded.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
isPlaying() Future<bool>
Returns true if the video is playing, or false if it's stopped or paused.
loadVideoSource(VideoSource videoSource) Future<void>
Loads a new video source.
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 the playback of the video. Use play to resume the playback from the paused position.
play() Future<void>
Starts/resumes the playback of the video.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
seekBackward(int seconds) Future<void>
Seeks the video backward by the given number of seconds.
seekForward(int seconds) Future<void>
Seeks the video forward by the given number of seconds.
seekTo(int seconds) Future<void>
Moves the playback position to the given position in seconds.
setPlaybackSpeed(double speed) Future<void>
Sets the playback speed. The default value is 1.
setVolume(double volume) Future<void>
Sets the volume of the player.
stop() Future<void>
Stops the playback of the video. The playback position is reset to 0. Use play to start the playback from the beginning.
toString() String
A string representation of this object.
inherited

Operators

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