ChewieAudioController constructor
ChewieAudioController({
- required VideoPlayerController videoPlayerController,
- OptionsTranslation? optionsTranslation,
- bool autoInitialize = false,
- bool autoPlay = false,
- bool draggableProgressBar = true,
- Duration? startAt,
- bool looping = false,
- ChewieProgressColors? cupertinoProgressColors,
- ChewieProgressColors? materialProgressColors,
- bool showControlsOnInitialize = true,
- bool showOptions = true,
- Future<
void> optionsBuilder(- BuildContext context,
- List<
OptionItem> chewieOptions
- List<
OptionItem> additionalOptions(- BuildContext context
- bool showControls = true,
- TransformationController? transformationController,
- bool zoomAndPan = false,
- double maxScale = 2.5,
- Subtitles? subtitle,
- Widget subtitleBuilder(
- BuildContext context,
- dynamic subtitle
- Widget? customControls,
- Widget errorBuilder(
- BuildContext context,
- String errorMessage
- bool isLive = false,
- bool allowMuting = true,
- bool allowPlaybackSpeedChanging = true,
- List<
double> playbackSpeeds = const [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2], - Duration? progressIndicatorDelay,
- 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();
}