MovaAutoPauseOpts class
Which visibility changes pause a player, and how it resumes. A pure value
used by the MovaAutoPause widget; not part of MovaOpts because it
describes one mount point, while a player may be mounted twice (page and
mini window).
哪些可见性变化会暂停播放器,以及如何恢复。供 MovaAutoPause 组件使用的纯值;
不放进 MovaOpts,因为它描述的是某个挂载点,而一个播放器可能同时挂在两处(页面和
小窗)。
Example / 示例:
MovaAutoPause(api: mova, opts: const MovaAutoPauseOpts(minVisibleFraction: 0.5), child: MovaPlayer(api: mova))
Constructors
- MovaAutoPauseOpts({bool viewport = true, double minVisibleFraction = 0.0, bool tickerMode = true, bool route = true, bool background = true, bool resumeOnShow = true, MovaLiveResume liveResume = MovaLiveResume.reloadEdge, Duration liveResumeGrace = const Duration(seconds: 3), })
-
Creates the options; the defaults pause on every kind of hiding and
resume afterwards.
const
Properties
- background → bool
-
Pause while the app is in the background.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
-
How a playing live stream is handled while hidden; defaults to
MovaHiddenMode.pause.
final
- liveResume → MovaLiveResume
-
How a live source resumes.
final
- liveResumeGrace → Duration
-
Hidden for less than this, a live source simply resumes.
final
- minVisibleFraction → double
-
Pause when the visible fraction is at or below this; 0 means only when
fully off-screen.
final
- resumeOnShow → bool
-
Resume (if it was playing before) once visible again.
final
- route → bool
-
Pause while covered by another route.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tickerMode → bool
-
Pause inside an inactive tab /
Offstage.final - viewport → bool
-
Pause when scrolled out of the viewport.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
watches(
MovaHideReason reason) → bool -
Whether
reasonis switched on in these options.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override