MovaSessionTally class

Accumulates one session's watch-time/stall/position tallies.

watchedMs only accrues while actually playing and not stalled — the numerator half of the rebuffer-rate formula.

累计一次会话的观看时长/卡顿/位置数据。

watchedMs 只在真正播放且未卡顿期间累加——卡顿率公式的分子部分。

Constructors

MovaSessionTally()

Properties

completionPercent → double?
Completion percentage: maxPositionMs / durationMs * 100, or null when the duration is unknown (live, or never reported).
no setter
durationMs → int
The media's duration in milliseconds, or 0 when unknown (live/unset).
no setter
hashCode → int
The hash code for this object.
no setterinherited
maxPositionMs → int
Furthest playback position reached, in milliseconds.
no setter
rebufferRate → double
The rebuffer rate: stallMs / (watchedMs + stallMs), 0 when the denominator is 0 — mirrors 腾讯云"平均卡顿率" / Mux Rebuffer Percentage.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stallCount → int
Total number of finished stalls.
no setter
stallMs → int
Total stalled time in milliseconds.
no setter
watchedMs → int
Total watched time in milliseconds (playing and not stalled).
no setter

Methods

addStall() → void
Counts one finished stall (from IMovaStallPolicy.onStall). Only bumps the count: the stalled time itself is already accumulated by tick while setStalled is on, so adding the duration again would double-count it.
commitStall() → void
Accepts the stall in progress: its time becomes part of stallMs for good.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordPosition(Duration position) → void
Records the latest known playback position.
rejectStall() → void
Rejects the stall in progress (jitter below the policy threshold): its time goes back to watched time when playing, so stallMs and stallCount agree.
setDuration(Duration duration) → void
Records the media's duration, once known.
setPlaying(bool playing) → void
Records the playing/paused flag; call before advancing the clock via tick so the interval just elapsed is attributed correctly.
setStalled(bool stalled) → void
Records the real stalled flag (from IMovaStatsProbe.stalling or the degraded buffering signal).
tick(DateTime at) → void
Advances the internal clock to at, attributing the elapsed interval since the previous tick to watched/stalled time per the flags set via setPlaying/setStalled.
toString() → String
A string representation of this object.
inherited

Operators

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