HTML5 Game - Commonly Used Video Attributes

Introduction

The following table lists the commonly Used Video Attributes and How They Can Be Accessed.

Attribute
HTML
Value
Description
autoplay


autoplay


true, false


Sets that the video
will start playing as soon
as it is ready.
controls
controls
true, false
Sets that video controls should be displayed.
duration


N/A


Floating point
number

Sets the length of
the video recording in
seconds.
ended

N/A

true,
false
Sets whether the
playback has completed.
id


"name"


N/A


Sets a name used
to reference the video
element.
loop


loop


true,
false

Sets that the video
will continually restart
when it finishes.
muted


muted


true,
false

Sets whether the
sound of the video should
be off (muted.)
paused

N/A

true,
false
Sets whether the
video should be temporarily stopped.
preload



auto,
metadata,
none

auto,
metadata,
none

Sets how the video
should be loaded when
the web page containing
it loads.
src

"URL"

"URL"

Sets the location of
the video file using a character string.
volume

N/A

Floating point
number
Sets the level of sound
between 0 and 1 (for example, .5).

Related Topic