SwapEvent class

Emitted when a player instance swaps its media source to a new index.

Tracks whether the swap was a warm start (reusing a previously prepared decoder) and how long the swap operation took.

Inheritance

Constructors

SwapEvent({required int entryId, required int fromIndex, required int toIndex, required int durationMs, required bool isWarmStart})
Creates a swap event.

Properties

durationMs int
How long the swap operation took in milliseconds.
final
entryId int
The pool entry (player slot) that performed the swap.
final
fromIndex int
The feed index the player was previously assigned to.
final
hashCode int
The hash code for this object.
no setterinherited
isWarmStart bool
Whether the swap reused a warm decoder pipeline (true) or required a cold start (false).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp int
The wall-clock time this event was created, in milliseconds since epoch.
finalinherited
toIndex int
The feed index the player is now assigned to.
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

Operators

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