AVVideoPlayer.music constructor
const
AVVideoPlayer.music(
- AVPlayerController controller, {
- Key? key,
- String? title,
- VoidCallback? onNext,
- VoidCallback? onPrevious,
- Widget controlsBuilder(
- BuildContext context,
- AVPlayerController controller
- AVControlsConfig? controlsConfig,
Music player preset — simple controls, no video gestures.
Shows play/pause, skip, speed, and loop. Disables PIP and fullscreen since the video surface is typically used for album art or visualizer.
AVVideoPlayer.music(controller, title: 'Song Name')
Implementation
const AVVideoPlayer.music(
this.controller, {
super.key,
this.title,
this.onNext,
this.onPrevious,
this.controlsBuilder,
AVControlsConfig? controlsConfig,
}) : showControls = true,
controlsConfig = controlsConfig ??
const AVControlsConfig(
showSkipButtons: true,
showPipButton: false,
showSpeedButton: true,
showFullscreenButton: false,
showLoopButton: true,
),
gestureConfig = null,
onFullscreen = null;