Name
Video — an HTML <video> element
Inherits from
Node, Element, MediaElement
Synopsis
A Video object represents an HTML <video> element. <video> and <audio> elements are very similar
and their common properties and methods are documented in MediaElement. This page documents a handful of
additional properties that are specific to Video objects.
Properties
DOMSettableTokenListaudioThis property specifies audio options for the video. The options are specified as a space-separated list of tokens on the HTML
audioattribute, and the set is mirrored in JavaScript as a DOMSettableTokenList. At the time of this writing, however, the HTML5 standard defines only one legal token (“muted”), and you can treat this property as a string.unsigned longheightThe onscreen height of the
<video>element, in CSS pixels. Mirrors the HTMLheightattribute.stringposterThe URL of an image to be displayed as a “poster frame” before the video begins playing. Mirrors the HTML
posterattribute.readonly unsigned longvideoHeightreadonly unsigned longvideoWidthThese properties return the intrinsic width and height of the video (i.e., the size of its frames) in CSS pixels. These properties will be zero until the
<video>element has loaded the video metadata (whilereadyStateis stillHAVE_NOTHINGand the loadedmetadata event has not been dispatched).unsigned longwidthThe desired onscreen width of the
<video>element, in CSS pixels. Mirrors the HTMLwidthattribute.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access