XVideoPlayerValue class

Immutable snapshot of an XVideoPlayerController's state.

Constructors

XVideoPlayerValue({bool isInitialized = false, bool isPlaying = false, bool isBuffering = false, bool isLooping = false, int rotationQuarterTurns = 0, Duration position = Duration.zero, Duration duration = Duration.zero, Size size = Size.zero, double volume = 1.0, double playbackSpeed = 1.0, List<XDurationRange> buffered = const [], String? errorDescription})
Binds a full state snapshot; every field defaults to its pre-initialize value.
const

Properties

aspectRatio → double
Aspect ratio with a graceful fall-through to 1:1 before the first frame is decoded. Compose / gallery wrap the player in AspectRatio and would otherwise divide by zero.
no setter
buffered → List<XDurationRange>
One range per contiguous buffered span. Empty before init; on local-file playback this is typically a single [0..duration] range that appears once the first frame is decoded.
final
duration → Duration
Total duration of the media. Duration.zero until isInitialized.
final
errorDescription → String?
The last playback error's message, or null while healthy.
final
hasError → bool
Whether errorDescription is set.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isBuffering → bool
Whether playback is stalled waiting on data.
final
isInitialized → bool
Whether the native player has reported its metadata.
final
isLooping → bool
Whether the track restarts on reaching its end.
final
isPlaying → bool
Whether the playhead is advancing.
final
playbackSpeed → double
Playback rate, where 1 is real time.
final
position → Duration
Last known playhead position. Reported by the native side on a fixed cadence (~10 Hz) — read this through a ValueListenableBuilder / addListener for live scrubbing.
final
rotationQuarterTurns → int
Quarter-turns of clockwise rotation XVideoPlayerView applies to the underlying Texture. Populated from the native side at initialize-time — Android and Windows always 0 (the codec + GLES blit, and the Media Engine, rotate the frame natively), Apple non-zero when the asset's preferredTransform rotates the stored pixel buffer.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → Size
Display-oriented dimensions of the video frame, after the track's rotation. Size.zero until the native side reports metadata.
final
volume → double
Playback gain, from 0 to 1.
final

Methods

copyWith({bool? isInitialized, bool? isPlaying, bool? isBuffering, bool? isLooping, int? rotationQuarterTurns, Duration? position, Duration? duration, Size? size, double? volume, double? playbackSpeed, List<XDurationRange>? buffered, Object? errorDescription = _unset}) → XVideoPlayerValue
This snapshot with the given fields replaced.
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

Constants

uninitialized → const XVideoPlayerValue
State of a player that has not been initialized.