OmxplayerVideoPlayer class

A video player platform that uses omxplayer and platform views to display videos. This has platform-side dependencies that are not included in this package.

Inheritance
  • Object
  • PlatformInterface
  • VideoPlayerPlatform
  • OmxplayerVideoPlayer

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 textureId) Widget
Omxplayer can only have one view, which is a difference to most other video player implementations.
override
create(DataSource dataSource) Future<int?>
Creates an instance of a video player and returns its textureId.
override
dispose(int textureId) Future<void>
Clears one video.
override
getPosition(int textureId) Future<Duration>
Gets the video position as Duration from the start.
override
init() Future<void>
Initializes the platform interface and disposes all existing players.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause(int textureId) Future<void>
Stops the video playback.
override
play(int textureId) Future<void>
Starts the video playback.
override
seekTo(int textureId, Duration position) Future<void>
Sets the video position to a Duration from the start.
override
setLooping(int textureId, bool looping) Future<void>
Sets the looping attribute of the video.
override
setMixWithOthers(bool mixWithOthers) Future<void>
Sets the audio mode to mix with other sources
inherited
setPlaybackSpeed(int textureId, double speed) Future<void>
TODO(ardera): Implement setPlaybackSpeed
override
setVolume(int textureId, double volume) Future<void>
Sets the volume to a range between 0.0 and 1.0.
override
toString() String
A string representation of this object.
inherited
videoEventsFor(int textureId) Stream<VideoEvent>
Returns a Stream of VideoEventTypes.
override

Operators

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

Static Methods

isPlatformSidePresent() bool
useAsImplementation({bool strictViewBehaviour = false}) → void
Sets up OmxplayerViewPlayer as the VideoPlayerPlatform.instance, i.e. the backend to be used for video playback. When strictViewBehaviour is true, all views of a player instance will be given GlobalObjectKeyss to ensure that at most a single video view for a player instance is mounted in the widget tree at a time. When strictViewBehaviour is false, will try to work around that issue and only actually build the platform view for the last-recently registered element.