EzVideoPlayer constructor
const
EzVideoPlayer({
- Key? key,
- required VideoPlayerController controller,
- required String semantics,
- required Color iconColor,
- Decoration controlsBackground = const BoxDecoration(color: Colors.transparent),
- MainAxisAlignment controlsAlignment = MainAxisAlignment.center,
- ButtonVis playVis = ButtonVis.auto,
- ButtonVis volumeVis = ButtonVis.auto,
- bool variableVolume = true,
- ButtonVis replayVis = ButtonVis.auto,
- ButtonVis sliderVis = ButtonVis.auto,
- bool showOnPause = false,
- bool autoPlay = true,
- bool autoLoop = false,
- double startingVolume = 0.0,
- double maxWidth = double.infinity,
- double maxHeight = double.infinity,
Stacks play, mute, and replay buttons on top of an AspectRatio for the controller
Also supports tap-to-pause on the main window via MouseRegion
The visibility of each button can be controlled with ButtonVis
Optionally provide a BoxDecoration background for the controls region
The video will begin muted unless startingVolume
is specified
Optionally provide maxWidth
and maxHeight
to shape the video
Implementation
const EzVideoPlayer({
Key? key,
required this.controller,
required this.semantics,
required this.iconColor,
this.hiddenOpacity = 0.0,
this.controlsBackground = const BoxDecoration(color: Colors.transparent),
this.controlsAlignment = MainAxisAlignment.center,
this.playVis = ButtonVis.auto,
this.volumeVis = ButtonVis.auto,
this.variableVolume = true,
this.replayVis = ButtonVis.auto,
this.sliderVis = ButtonVis.auto,
this.showOnPause = false,
this.autoPlay = true,
this.autoLoop = false,
this.startingVolume = 0.0,
this.maxWidth = double.infinity,
this.maxHeight = double.infinity,
}) : super(key: key);