UVideoPlayer constructor
const
UVideoPlayer({
- Key? key,
- String? url,
- String? base64,
- Uint8List? bytes,
- String? filePath,
- String? assetPath,
- bool autoPlay = false,
- bool looping = false,
- bool muted = false,
- bool showControls = true,
- bool allowFullScreen = true,
- bool allowPlaybackSpeed = true,
- bool autoHideControls = true,
- double? aspectRatio,
- BoxFit fit = BoxFit.contain,
- Color? accentColor,
- Color backgroundColor = Colors.black,
- double borderRadius = 12,
- Widget? placeholder,
Implementation
const UVideoPlayer({
super.key,
this.url,
this.base64,
this.bytes,
this.filePath,
this.assetPath,
this.autoPlay = false,
this.looping = false,
this.muted = false,
this.showControls = true,
this.allowFullScreen = true,
this.allowPlaybackSpeed = true,
this.autoHideControls = true,
this.aspectRatio,
this.fit = BoxFit.contain,
this.accentColor,
this.backgroundColor = Colors.black,
this.borderRadius = 12,
this.placeholder,
}) : assert(
url != null || base64 != null || bytes != null || filePath != null || assetPath != null,
"Provide one video source",
);