PlayerObserver mixin

Use with Video or Audio widget to get player notifications such as onPlay, onPause etc. See example on how to use.

Constructors

PlayerObserver()

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

listenForAudioPlayerEvents() → Future<void>
listenForVideoPlayerEvents(int viewId) → Future<void>
onComplete() → void
Override this method to get notifications when media has finished playing.
onError(String error) → void
onPause() → void
Override this method to get notifications when media is paused.
onPlay() → void
Override this method to get notifications when media is played.
onSeek(int position, double offset) → void
Override this method to get notifications when a seek operation has finished. This will occur when user finishes scrubbing media. position is position in seconds before seek started. offset is seconds after seek processed.
onTime(int position) → void
Override this method to get update when playhead moves. This method fires every second with position as seconds.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited