ChewieAudioController constructor

ChewieAudioController({
  1. required VideoPlayerController videoPlayerController,
  2. OptionsTranslation? optionsTranslation,
  3. bool autoInitialize = false,
  4. bool autoPlay = false,
  5. bool draggableProgressBar = true,
  6. Duration? startAt,
  7. bool looping = false,
  8. ChewieProgressColors? cupertinoProgressColors,
  9. ChewieProgressColors? materialProgressColors,
  10. bool showControlsOnInitialize = true,
  11. bool showOptions = true,
  12. Future<void> optionsBuilder(
    1. BuildContext context,
    2. List<OptionItem> chewieOptions
    )?,
  13. List<OptionItem> additionalOptions(
    1. BuildContext context
    )?,
  14. bool showControls = true,
  15. TransformationController? transformationController,
  16. bool zoomAndPan = false,
  17. double maxScale = 2.5,
  18. Subtitles? subtitle,
  19. Widget subtitleBuilder(
    1. BuildContext context,
    2. dynamic subtitle
    )?,
  20. Widget? customControls,
  21. Widget errorBuilder(
    1. BuildContext context,
    2. String errorMessage
    )?,
  22. bool isLive = false,
  23. bool allowMuting = true,
  24. bool allowPlaybackSpeedChanging = true,
  25. List<double> playbackSpeeds = const [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
  26. Duration? progressIndicatorDelay,
  27. EdgeInsets controlsSafeAreaMinimum = EdgeInsets.zero,
})

Implementation

ChewieAudioController({
  required this.videoPlayerController,
  this.optionsTranslation,
  this.autoInitialize = false,
  this.autoPlay = false,
  this.draggableProgressBar = true,
  this.startAt,
  this.looping = false,
  this.cupertinoProgressColors,
  this.materialProgressColors,
  this.showControlsOnInitialize = true,
  this.showOptions = true,
  this.optionsBuilder,
  this.additionalOptions,
  this.showControls = true,
  this.transformationController,
  this.zoomAndPan = false,
  this.maxScale = 2.5,
  this.subtitle,
  this.subtitleBuilder,
  this.customControls,
  this.errorBuilder,
  this.isLive = false,
  this.allowMuting = true,
  this.allowPlaybackSpeedChanging = true,
  this.playbackSpeeds = const [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
  this.progressIndicatorDelay,
  this.controlsSafeAreaMinimum = EdgeInsets.zero,
}) : assert(
        playbackSpeeds.every((speed) => speed > 0),
        'The playbackSpeeds values must all be greater than 0',
      ) {
  _initialize();
}