VideoPlayerPlatform class abstract

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
  • Object
  • PlatformInterface
  • VideoPlayerPlatform

Constructors

VideoPlayerPlatform()
Constructs a VideoPlayerPlatform.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildView(int playerId) Widget
Returns a widget displaying the video with a given playerId.
create(DataSource dataSource) Future<int?>
Creates an instance of a video player and returns its playerId.
dispose(int playerId) Future<void>
Clears one video.
getAudioTracks(int playerId) Future<List<AudioTrack>>
Gets the audio tracks as a list of AudioTrack.
getDuration(int playerId) Future<DurationRange>
Gets the video duration as DurationRange.
getPosition(int playerId) Future<Duration>
Gets the video position as Duration from the start.
getTextTracks(int playerId) Future<List<TextTrack>>
Gets the text tracks as a list of TextTrack.
getVideoTracks(int playerId) Future<List<VideoTrack>>
Gets the video tracks as a list of VideoTrack.
init() Future<void>
Initializes the platform interface and disposes all existing players.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause(int playerId) Future<void>
Stops the video playback.
play(int playerId) Future<void>
Starts the video playback.
seekTo(int playerId, Duration position) Future<void>
Sets the video position to a Duration from the start.
setActivate(int playerId) Future<bool>
Set the video activated.
setDeactivate(int playerId) Future<bool>
Set the video deactivated.
setDisplayGeometry(int playerId, int x, int y, int width, int height) Future<void>
Sets the video display geometry.
setLooping(int playerId, 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 playerId, double speed) Future<void>
Sets the playback speed to a speed value indicating the playback rate.
setTrackSelection(int playerId, Track track) Future<bool>
Sets the selected track.
setVolume(int playerId, 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 playerId) 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.
getter/setter pair