Video constructor
Video({
- MediaElementController? controller,
- String? src,
- Object? width,
- Object? height,
- String? poster,
- bool controls = true,
- bool autoplay = false,
- bool muted = false,
- bool loop = false,
- bool playsInline = true,
- MediaPreload preload = MediaPreload.metadata,
- String? crossOrigin,
- String? className,
- Object? fallback,
- Map<
String, Object?> props = const {}, - Map<
String, Object?> style = const {}, - DartStyle? dartStyle,
Creates a video element for URL/file-based video playback.
Use MediaPreview when the source is a live browser MediaStream from
MediaDevicesController.
Implementation
Video({
MediaElementController? controller,
String? src,
Object? width,
Object? height,
String? poster,
bool controls = true,
bool autoplay = false,
bool muted = false,
bool loop = false,
bool playsInline = true,
MediaPreload preload = MediaPreload.metadata,
String? crossOrigin,
String? className,
Object? fallback,
Map<String, Object?> props = const {},
Map<String, Object?> style = const {},
DartStyle? dartStyle,
}) : super(
'video',
props: _mediaProps(
props: props,
controller: controller,
src: src,
width: width,
height: height,
poster: poster,
controls: controls,
autoplay: autoplay,
muted: muted,
loop: loop,
playsInline: playsInline,
preload: preload,
crossOrigin: crossOrigin,
className: className,
defaultStyle: const {
'display': 'block',
'max-width': '100%',
'background': '#000',
},
dartStyle: dartStyle,
style: style,
),
children: normalizeChildren(fallback, const []),
);