VideoPlayerValue constructor

VideoPlayerValue({
  1. required Duration duration,
  2. Size size = Size.zero,
  3. Duration position = Duration.zero,
  4. Caption caption = Caption.none,
  5. List<DurationRange> buffered = const <DurationRange>[],
  6. bool isInitialized = false,
  7. bool isPlaying = false,
  8. bool isLooping = false,
  9. bool isBuffering = false,
  10. double volume = 1.0,
  11. double playbackSpeed = 1.0,
  12. String? errorDescription,
  13. int mediaFormat = MediaFormat.STANDARD,
})

Constructs a video with the given values. Only duration is required. The rest will initialize with default values when unset.

Implementation

VideoPlayerValue({
  required this.duration,
  this.size = Size.zero,
  this.position = Duration.zero,
  this.caption = Caption.none,
  this.buffered = const <DurationRange>[],
  this.isInitialized = false,
  this.isPlaying = false,
  this.isLooping = false,
  this.isBuffering = false,
  this.volume = 1.0,
  this.playbackSpeed = 1.0,
  this.errorDescription,
  this.mediaFormat = MediaFormat.STANDARD,
});