AVVideoPlayer.music constructor

const AVVideoPlayer.music(
  1. AVPlayerController controller, {
  2. Key? key,
  3. String? title,
  4. VoidCallback? onNext,
  5. VoidCallback? onPrevious,
  6. Widget controlsBuilder(
    1. BuildContext context,
    2. AVPlayerController controller
    )?,
  7. 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;