MediaElementController class
Controls a Flint Video, Audio, or MediaPreview element.
The server-safe implementation is intentionally a no-op. In browser builds Flint binds the controller to the rendered media element so app code can call play, pause, seekTo, setVolume, and related methods.
Constructors
- MediaElementController()
- Creates a media element controller.
Properties
- currentTime → Duration
-
Current playback position.
no setter
- duration → Duration?
-
Media duration, when known.
no setter
- ended → bool
-
Whether playback has reached the end of the media.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAttached → bool
-
Whether this controller is currently attached to a browser media element.
no setter
- isPaused → bool
-
Whether playback is currently paused.
no setter
- isPlaying → bool
-
Whether playback is currently active.
no setter
- muted → bool
-
Whether the media element is muted.
no setter
- playbackRate → double
-
Current playback rate where
1.0is normal speed.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- volume → double
-
Current volume from
0.0to1.0.no setter
Methods
-
detach(
) → void - Detaches this controller from its media element.
-
mute(
) → void - Mutes the media element.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → void - Pauses playback.
-
play(
) → Future< void> - Starts playback.
-
seekTo(
Duration position) → void -
Seeks playback to
position. -
setPlaybackRate(
double value) → void -
Sets playback rate where
1.0is normal speed. -
setVolume(
double value) → void -
Sets volume from
0.0to1.0. -
stop(
) → void - Pauses playback and seeks back to the beginning.
-
toggleMuted(
) → void - Toggles muted state.
-
toString(
) → String -
A string representation of this object.
inherited
-
unmute(
) → void - Unmutes the media element.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited