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.
- Implementers
Constructors
Properties
Methods
-
buildView(
int? textureId) → Widget - Returns a widget displaying the video with a given textureID.
-
clearCache(
) → Future< void> -
create(
{PipFlutterPlayerBufferingConfiguration? bufferingConfiguration}) → Future< int?> - Creates an instance of a video player and returns its textureId.
-
disablePictureInPicture(
int? textureId) → Future< void> - Disables PiP mode.
-
dispose(
int? textureId) → Future< void> - Clears one video.
-
enablePictureInPicture(
int? textureId, double? top, double? left, double? width, double? height) → Future< void> - Enables PiP mode.
-
getAbsolutePosition(
int? textureId) → Future< DateTime?> - Gets the video position as DateTime.
-
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.
-
isPictureInPictureEnabled(
int? textureId) → Future< bool?> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
int? textureId) → Future< void> - Stops the video playback.
-
play(
int? textureId) → Future< void> - Starts the video playback.
-
preCache(
DataSource dataSource, int preCacheSize) → Future< void> - Pre-caches a video.
-
seekTo(
int? textureId, Duration? position) → Future< void> - Sets the video position to a Duration from the start.
-
setAudioTrack(
int? textureId, String? name, int? index) → Future< void> -
setDataSource(
int? textureId, DataSource dataSource) → Future< void> - Set data source of video.
-
setLooping(
int? textureId, bool looping) → Future< void> - Sets the looping attribute of the video.
-
setMixWithOthers(
int? textureId, bool mixWithOthers) → Future< void> -
setSpeed(
int? textureId, double speed) → Future< void> - Sets the video speed to a range between 0.0 and 2.0
-
setTrackParameters(
int? textureId, int? width, int? height, int? bitrate) → Future< void> - Sets the video track parameters (used to select quality of the video)
-
setVolume(
int? textureId, double volume) → Future< void> - Sets the volume to a range between 0.0 and 1.0.
-
stopPreCache(
String url, String? cacheKey) → Future< void> - Pre-caches a video.
-
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.
getter/setter pair