VideoPlayerOptions constructor

VideoPlayerOptions({
  1. bool mixWithOthers = false,
  2. bool allowBackgroundPlayback = false,
  3. bool preventsDisplaySleepDuringVideoPlayback = true,
  4. VideoPlayerWebOptions? webOptions,
  5. int? backBufferDurationMs,
})

Set additional optional player settings

Implementation

// TODO(stuartmorgan): Temporarily suppress warnings about not using const
// in all of the other video player packages, fix this, and then update
// the other packages to use const.
// ignore: prefer_const_constructors_in_immutables
VideoPlayerOptions({
  this.mixWithOthers = false,
  this.allowBackgroundPlayback = false,
  this.preventsDisplaySleepDuringVideoPlayback = true,
  this.webOptions,
  this.backBufferDurationMs,
}) : assert(
       backBufferDurationMs == null || backBufferDurationMs >= 0,
       'backBufferDurationMs must be zero or greater',
     );