VideoPlayerValue class
The duration, current position, buffering state, error state and settings of a VideoPlayerController.
- Annotations
Constructors
-
VideoPlayerValue({required DurationRange duration, Size size = Size.zero, Duration position = Duration.zero, Caption caption = Caption.none, Duration captionOffset = Duration.zero, List<
Track> tracks = const <Track>[], int buffered = 0, bool isInitialized = false, bool isPlaying = false, bool isLooping = false, bool isBuffering = false, double volume = 1.0, double playbackSpeed = 1.0, String? errorDescription, bool isCompleted = false, AdInfoFromDash? adInfo, String? manifestInfo}) -
Constructs a video with the given values. Only
durationis required. The rest will initialize with default values when unset.const - VideoPlayerValue.erroneous(String errorDescription)
-
Returns an instance with the given
errorDescription. - VideoPlayerValue.uninitialized()
- Returns an instance for a video that hasn't been loaded.
Properties
- adInfo → AdInfoFromDash?
-
Provides information about advertisements embedded within a DASH video stream.
final
- aspectRatio → double
-
Returns
size.width/size.height.no setter - buffered → int
-
The currently buffered size.
final
- caption → Caption
-
The Caption that should be displayed based on the current position.
final
- captionOffset → Duration
-
The Duration that should be used to offset the current position to get the correct Caption.
final
- duration → DurationRange
-
The total duration of the video.
final
- errorDescription → String?
-
A description of the error if present.
final
- hasAdInfo → bool
-
Indicates whether or not the video has ADInfo.
no setter
- hasError → bool
-
Indicates whether or not the video is in an error state. If this is true
errorDescription should have information about the problem.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasManifestUpdated → bool
-
Indicates whether the video has updated its manifest.
no setter
- isBuffering → bool
-
True if the video is currently buffering.
final
- isCompleted → bool
-
True if video has finished playing to end.
final
- isInitialized → bool
-
Indicates whether or not the video has been loaded and is ready to play.
final
- isLooping → bool
-
True if the video is looping.
final
- isPlaying → bool
-
True if the video is playing. False if it's paused.
final
- manifestInfo → String?
-
Provides information about manifest when the DASH streaming manifest is
updated (e.g., when new video segments become available, bitrate changes
occur, or the stream configuration is modified), this property will be
populated with the updated manifest information.
final
- playbackSpeed → double
-
The current speed of the playback.
final
- position → Duration
-
The current playback position.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → Size
-
The size of the currently loaded video.
final
-
tracks
→ List<
Track> -
The current playback tracks.
final
- volume → double
-
The current volume of the playback.
final
Methods
-
copyWith(
{DurationRange? duration, Size? size, Duration? position, Caption? caption, Duration? captionOffset, List< Track> ? tracks, int? buffered, bool? isInitialized, bool? isPlaying, bool? isLooping, bool? isBuffering, double? volume, double? playbackSpeed, String? errorDescription = _defaultErrorDescription, bool? isCompleted, AdInfoFromDash? adInfo, String? manifestInfo}) → VideoPlayerValue -
Returns a new instance that has the same values as this current instance,
except for any overrides passed in as arguments to
copyWidth. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override