VdoPlayerController class

Controls a native video player and notifies any listeners of the player state changes.

The VdoPlayerView widget is used to display the video and it provides an instance of this class to control the video in the onPlayerCreated callback.

Inheritance
Mixed in types

Properties

appLifecycleCurrentState AppLifecycleState?
getter/setter pair
channel MethodChannel?
getter/setter pair
funStartPositionTimer Function?
no setter
funStopPositionTimer Function?
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
isEnded bool
no setter
isLoading bool
no setter
isPlaying bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value VdoPlayerValue
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
didChangeAccessibilityFeatures() → void
Called when the system changes the set of currently active accessibility features.
inherited
didChangeAppLifecycleState(AppLifecycleState state) → void
Called when the system puts the app in the background or returns the app to the foreground.
override
didChangeLocales(List<Locale>? locales) → void
Called when the system tells the app that the user's locale has changed. For example, if the user changes the system language settings.
inherited
didChangeMetrics() → void
Called when the application's dimensions change. For example, when a phone is rotated.
inherited
didChangePlatformBrightness() → void
Called when the platform brightness changes.
inherited
didChangeTextScaleFactor() → void
Called when the platform's text scale factor changes.
inherited
didHaveMemoryPressure() → void
Called when the system is running low on memory.
inherited
didPopRoute() Future<bool>
Called when the system tells the app to pop the current route, such as after a system back button press or back gesture.
inherited
didPushRoute(String route) Future<bool>
Called when the host tells the application to push a new route onto the navigator.
inherited
didPushRouteInformation(RouteInformation routeInformation) Future<bool>
Called when the host tells the application to push a new RouteInformation and a restoration state onto the router.
inherited
didRequestAppExit() Future<AppExitResponse>
Called when a request is received from the system to exit the application.
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
getBufferedPosition() Future<Duration>
Returns an estimate of the position up to which data is buffered.
getDuration() Future<Duration>
Returns the total duration of the video.
getPlaybackProperty(String propertyName) Future<Object?>
Returns values of additional properties specific to current playback session. Returned values need to be cast to their expected types before use.
getPosition() Future<Duration>
Returns the current playback position.
init() → void
isDisposed() bool
load(EmbedInfo embedInfo) Future<void>
Load a new video with specified options to the player as identified by the embedInfo argument.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
override
pause() Future<void>
Pause video playback.
play() Future<void>
Start or resume playing the video.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
seek(Duration target) Future<void>
Seek to the specified target position.
setAdaptive() Future<void>
setBackPressCalled() Future<void>
setMute(bool mute) Future<void>
Mutes or unmutes the player based on the values passed
setPlaybackSpeed(double speed) Future<void>
Set the video playback speed.
setSubtitleLanguage(String? language) Future<void>
Set subtitle language. Pass null to disable subtitles.
setVideoTrack(VideoTrack videoTrack) Future<void>
setVolume(double volume) Future<void>
Sets the volume of the audio/video. Must be a number between 0.0 and 1.0
stop() Future<void>
Unload the currently loaded video from the player.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods