PlaybackAnalytics class

Derives playback quality-of-experience events (startup time, stalls, watched duration, quality switches, completion) from a controller's existing event streams — no extra platform traffic.

Composable by design: create one per controller you want to measure and dispose it with the controller.

final analytics = PlaybackAnalytics(controller);
analytics.events.listen(sendToMetrics);

Constructors

PlaybackAnalytics(NativeVideoPlayerController controller, {Duration heartbeatInterval = const Duration(seconds: 30)})

Properties

controller → NativeVideoPlayerController
final
events → Stream<PlaybackAnalyticsEvent>
QoE events; broadcast, safe to listen multiple times.
no setter
hashCode → int
The hash code for this object.
no setterinherited
heartbeatInterval → Duration
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stallCount → int
Stalls observed so far (buffering after playback started).
no setter
watchedDuration → Duration
Total time actually spent playing.
no setter

Methods

dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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