VideoPlayerPlatform class Null safety

The interface that implementations of video_player must implement.

Platform implementations should extend this class rather than implement it as video_player does not consider newly added methods to be breaking changes. Extending this class (using extends) ensures that the subclass will get the default implementation, while platform implementations that implements this interface will be broken by newly added VideoPlayerPlatform methods.

Inheritance
Implementers

Constructors

VideoPlayerPlatform()
Constructs a VideoPlayerPlatform.

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

buildView(int textureId) Widget
Returns a widget displaying the video with a given textureID.
create(DataSource dataSource) Future<int?>
Creates an instance of a video player and returns its textureId.
dispose(int textureId) Future<void>
Clears one video.
getPosition(int textureId) Future<Duration>
Gets the video position as Duration from the start.
init() Future<void>
Initializes the platform interface and disposes all existing players. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
pause(int textureId) Future<void>
Stops the video playback.
play(int textureId) Future<void>
Starts the video playback.
seekTo(int textureId, Duration position) Future<void>
Sets the video position to a Duration from the start.
setLooping(int textureId, bool looping) Future<void>
Sets the looping attribute of the video.
setMixWithOthers(bool mixWithOthers) Future<void>
Sets the audio mode to mix with other sources
setPlaybackSpeed(int textureId, double speed) Future<void>
Sets the playback speed to a speed value indicating the playback rate.
setVolume(int textureId, double volume) Future<void>
Sets the volume to a range between 0.0 and 1.0.
toString() String
A string representation of this object. [...]
inherited
videoEventsFor(int textureId) Stream<VideoEvent>
Returns a Stream of VideoEventTypes.

Operators

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

Static Properties

instance VideoPlayerPlatform
The default instance of VideoPlayerPlatform to use. [...]
read / write