FlVideoPlayerController class

The FlVideoPlayerController is used to configure and drive the FlVideoPlayer Player Widgets. It provides methods to control playback, such as pause and play, as well as methods that control the visual appearance of the player, such as enterFullScreen or exitFullScreen.

In addition, you can listen to the FlVideoPlayerController for presentational changes, such as entering and exiting full screen mode. To listen for changes to the playback, such as a change to the seek position of the player, please use the standard information provided by the VideoPlayerController.

Inheritance

Constructors

FlVideoPlayerController({required VideoPlayerController videoPlayerController, bool autoInitialize = false, bool autoPlay = false, Duration? startAt, bool looping = false, bool fullScreenByDefault = false, Widget? placeholder, Widget? overlay, bool showControlsOnInitialize = true, Subtitles? subtitle, SubtitlesBuilder? subtitleBuilder, Widget? controls, bool allowedScreenSleep = true, bool isLive = false, List<SystemUiOverlay>? systemOverlaysOnEnterFullScreen, List<DeviceOrientation>? deviceOrientationsOnEnterFullScreen, List<SystemUiOverlay> systemOverlaysAfterFullScreen = SystemUiOverlay.values, List<DeviceOrientation> deviceOrientationsAfterFullScreen = DeviceOrientation.values, FlVideoPlayerRoutePageBuilder? routePageBuilder})

Properties

allowedScreenSleep bool
Defines if the player will sleep in fullscreen or not
final
autoInitialize bool
Initialize the Video on Startup. This will prep the video for playback.
final
autoPlay bool
Play the video as soon as it's displayed
final
buffered List<DurationRange>
no setter
controls Widget?
Defines customised controls. Check MaterialControls or CupertinoControls for reference.
final
deviceOrientationsAfterFullScreen List<DeviceOrientation>
Defines the set of allowed device orientations after exiting fullscreen
final
deviceOrientationsOnEnterFullScreen List<DeviceOrientation>?
Defines the set of allowed device orientations on entering fullscreen
final
duration Duration
no setter
errorDescription String?
no setter
fullScreenByDefault bool
Defines if the player will start in fullscreen when play is pressed
final
hasError bool
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isBuffering bool
no setter
isFullScreen bool
no setter
isInitialized bool
no setter
isLive bool
Defines if the controls should be for live stream video
final
isLooping bool
no setter
isPlaying bool
no setter
looping bool
Whether or not the video should loop
final
overlay Widget?
A widget which is placed between the video and the controls
final
placeholder Widget?
The placeholder is displayed underneath the Video before it is initialized or played.
final
playbackSpeed double
no setter
position Duration
no setter
routePageBuilder FlVideoPlayerRoutePageBuilder?
Defines a custom RoutePageBuilder for the fullscreen
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showControlsOnInitialize bool
Weather or not to show the controls when initializing the widget.
final
startAt Duration?
Start video at a certain position
final
subtitle Subtitles?
Add a List of Subtitles here in Subtitles.subtitle
getter/setter pair
subtitleBuilder SubtitlesBuilder?
Define here your own Widget on how your n'th subtitle will look like
final
systemOverlaysAfterFullScreen List<SystemUiOverlay>
Defines the system overlays visible after exiting fullscreen
final
systemOverlaysOnEnterFullScreen List<SystemUiOverlay>?
Defines the system overlays visible on entering fullscreen
final
value VideoPlayerValue
no setter
videoPlayerController VideoPlayerController
The controller for the video you want to play
getter/setter pair
volume double
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose([bool disposeVideoPlayer = false]) Future<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
enterFullScreen() → void
exitFullScreen() → void
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>
play() Future<void>
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
seekTo(Duration moment) Future<void>
setLooping(bool looping) Future<void>
setPlaybackSpeed(double speed) Future<void>
setSubtitle(List<Subtitle> newSubtitle) → void
setVolume(double volume) Future<void>
toggleFullScreen() → void
togglePause() Future<void>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

of(BuildContext context) FlVideoPlayerController