video<L, V> function
DomElement<L, V>
video<L, V>({
- String? key,
- List<
String> ? classes, - Map<
String, String> ? attributes, - Map<
String, String> ? styles, - String? accesskey,
- String? autocapitalize,
- bool? autoplay,
- String? contenteditable,
- bool? controls,
- String? crossorigin,
- String? dir,
- String? draggable,
- String? height,
- String? id,
- String? itemprop,
- String? lang,
- bool? loop,
- bool? muted,
- bool? playsinline,
- String? poster,
- String? preload,
- String? role,
- String? slot,
- String? spellcheck,
- String? src,
- String? tabindex,
- String? title,
- String? translate,
- String? width,
- Map<
String, DomEventFn< ? events,L, V> > - DomLifecycleEventFn<
L> ? onCreate, - DomLifecycleEventFn<
L> ? onUpdate, - DomLifecycleEventFn<
L> ? onRemove, - Iterable<
DomNode< ? children,L, V> > - DomNode<
L, V> ? child, - String? text,
Embeds a media player which supports video playback into the document. You can also use
Implementation
DomElement<L, V> video<L, V>({
String? key,
List<String>? classes,
Map<String, String>? attributes,
Map<String, String>? styles,
/// Keyboard shortcut to activate or add focus to the element.
String? accesskey,
/// Sets whether input is automatically capitalized when entered by user
String? autocapitalize,
/// The audio or video should play as soon as possible.
bool? autoplay,
/// Indicates whether the element's content is editable.
String? contenteditable,
/// Indicates whether the browser should show playback controls to the user.
bool? controls,
/// How the element handles cross-origin requests
String? crossorigin,
/// Defines the text direction. Allowed values are ltr (Left-To-Right) or
/// rtl (Right-To-Left)
String? dir,
/// Defines whether the element can be dragged.
String? draggable,
/// Specifies the height of elements listed here. For all other elements,
/// use the CSS height property.
///
///
///
/// Note: In some instances, such as
/// <div>, this is a legacy attribute, in
/// which case the CSS height property should
/// be used instead.
String? height,
/// Prevents rendering of given element, while keeping child elements, e.g.
/// script elements, active.
String? hidden,
/// Often used with CSS to style a specific element. The value of this
/// attribute must be unique.
String? id,
///
String? itemprop,
/// Defines the language used in the element.
String? lang,
/// Indicates whether the media should start playing from the start when
/// it's finished.
bool? loop,
/// Indicates whether the audio will be initially silenced on page load.
bool? muted,
/// A Boolean attribute indicating that the video is to be played "inline";
/// that is, within the element's playback area. Note that the absence of this
/// attribute does not imply that the video will always be played in fullscreen.
bool? playsinline,
/// A URL indicating a poster frame to show until the user plays or seeks.
String? poster,
/// Indicates whether the whole resource, parts of it or nothing should be
/// preloaded.
String? preload,
/// Defines an explicit role for an element for use by assistive technologies.
String? role,
/// Assigns a slot in a shadow DOM shadow tree to an element.
String? slot,
/// Indicates whether spell checking is allowed for the element.
String? spellcheck,
/// The URL of the embeddable content.
String? src,
/// Overrides the browser's default tab order and follows the one specified
/// instead.
String? tabindex,
/// Text to be displayed in a tooltip when hovering over the element.
String? title,
/// Specify whether an element's attribute values and the values of its
/// Text node
/// children are to be translated when the page is localized, or whether to
/// leave them unchanged.
String? translate,
/// For the elements listed here, this establishes the element's width.
///
///
/// Note: For all other instances, such as
/// <div>, this is a legacy attribute, in
/// which case the CSS width property should be
/// used instead.
String? width,
Map<String, DomEventFn<L, V>>? events,
DomLifecycleEventFn<L>? onCreate,
DomLifecycleEventFn<L>? onUpdate,
DomLifecycleEventFn<L>? onRemove,
Iterable<DomNode<L, V>>? children,
DomNode<L, V>? child,
String? text,
}) {
return DomElement<L, V>(
'video',
key: key,
classes: classes,
attributes: <String, String>{
if (accesskey != null) 'accesskey': accesskey,
if (autocapitalize != null) 'autocapitalize': autocapitalize,
if (autoplay ?? false) 'autoplay': 'autoplay',
if (contenteditable != null) 'contenteditable': contenteditable,
if (controls ?? false) 'controls': 'controls',
if (crossorigin != null) 'crossorigin': crossorigin,
if (dir != null) 'dir': dir,
if (draggable != null) 'draggable': draggable,
if (height != null) 'height': height,
if (hidden != null) 'hidden': hidden,
if (id != null) 'id': id,
if (itemprop != null) 'itemprop': itemprop,
if (lang != null) 'lang': lang,
if (loop ?? false) 'loop': 'loop',
if (muted ?? false) 'muted': 'muted',
if (playsinline ?? false) 'playsinline': 'playsinline',
if (poster != null) 'poster': poster,
if (preload != null) 'preload': preload,
if (role != null) 'role': role,
if (slot != null) 'slot': slot,
if (spellcheck != null) 'spellcheck': spellcheck,
if (src != null) 'src': src,
if (tabindex != null) 'tabindex': tabindex,
if (title != null) 'title': title,
if (translate != null) 'translate': translate,
if (width != null) 'width': width,
...?attributes,
},
styles: styles,
events: events,
onCreate: onCreate,
onUpdate: onUpdate,
onRemove: onRemove,
children: children,
child: child,
text: text,
);
}