video class final

The <video> HTML element embeds a media player which supports video playback into the document. You can use <video> for audio content as well, but the <audio> element may provide a more appropriate user experience.

Inheritance

Constructors

video(List<Component> children, {bool autoplay = false, bool controls = false, CrossOrigin? crossOrigin, bool loop = false, bool muted = false, String? poster, Preload? preload, String? src, int? width, int? height, String? id, String? classes, Styles? styles, Map<String, String>? attributes, Map<String, EventCallback>? events, Key? key})
The <video> HTML element embeds a media player which supports video playback into the document. You can use <video> for audio content as well, but the <audio> element may provide a more appropriate user experience.
const

Properties

attributes Map<String, String>?
Additional attributes to apply to the HTML element.
final
autoplay bool
Indicates if the video automatically begins to play back as soon as it can do so without stopping to finish loading the data.
final
children List<Component>
The children of this component.
final
classes String?
The CSS classes to apply to the HTML element, separated by whitespace.
final
controls bool
If this attribute is present, the browser will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback.
final
crossOrigin CrossOrigin?
Indicates whether to use CORS to fetch the related video.
final
events Map<String, EventCallback>?
Event listeners to attach to the HTML element.
final
hashCode int
The hash code for this object.
no setterinherited
height int?
The height of the video's display area, in CSS pixels.
final
id String?
The id of the HTML element. Must be unique within the document.
final
key Key?
Controls how one component replaces another component in the tree.
finalinherited
loop bool
If specified, the browser will automatically seek back to the start upon reaching the end of the video.
final
muted bool
Indicates the default setting of the audio contained in the video. If set, the audio will be initially silenced. Its default value is false, meaning that the audio will be played when the video is played.
final
poster String?
A URL for an image to be shown while the video is downloading. If this attribute isn't specified, nothing is displayed until the first frame is available, then the first frame is shown as the poster frame.
final
preload Preload?
Provides a hint to the browser about what the author thinks will lead to the best user experience with regards to what content is loaded before the video is played.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
src String?
The URL of the video to embed. This is optional; you may instead use the <source> element within the video block to specify the video to embed.
final
styles Styles?
The inline styles to apply to the HTML element.
final
width int?
The width of the video's display area, in CSS pixels.
final

Methods

build(BuildContext context) Component
Describes the part of the user interface represented by this component.
override
createElement() Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRebuild(covariant Component newComponent) bool
Implement this method to determine whether a rebuild can be skipped.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited