-
The
video
element embeds a media player which supports video playback into the document -
You can use
video
for audio content as well, but theaudio
element may provide a more appropriate user experience autoplay
-
controls
-
If this attribute is present, the browser will offer controls
to allow
the user to
control video playback, including
volume
,seeking
, andpause/resume
playback -
<video src="myvideo" controls></video>
-
If this attribute is present, the browser will offer controls
to allow
the user to
control video playback, including
-
controlslist
-
When specified,
controlslist
helps the browser select what controls to show for the video element whenever the browser shows its own set of controls (that is, when the controls attribute is specified) -
The allowed values are
nodownload
nofullscreen
noremoteplayback
-
<video controls src="myvideo" controlslist="nofullscreen nodownload noremoteplayback" > </video>
-
When specified,
-
disablepictureinpicture
Use thedisablepictureinpicture
attribute if you want to disable the Picture-In-Picture mode (and the control) -
disableremoteplayback
-
height
- The height of the video's display area, in CSS pixels
- Absolute values only; no percentages
-
loop
- A Boolean attribute
- If specified, the browser will automatically seek back to the start upon reaching the end of the video
-
<video controls loop></video>
muted
- A Boolean attribute that indicates the default audio mute setting contained in the video
- If set, the audio will be initially silenced
-
Its default value is
false
, meaning the audio will be played when the video is played -
<video controls muted></video>
playsinline
-
poster
- 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
-
<video controls poster="/images/myimg.gif"></video>
-
preload
- This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience
- an enumerated type is a data type consisting of a limited set of named values.
-
It may have one of the following values:
-
none
: indicates that the video should not be preloaded -
metadata
: indicates that only video metadata (e.g. length) is fetched -
auto
: indicates that the whole video file can be downloaded, even if the user is not expected to use it -
empty string
: A synonym of theauto
value
-
-
src
- 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
-
width
- The width of the video's display area, in CSS pixels
- Absolute values only; no percentages