Class

HTMLVideoElement

A class representing the HTML video element that plays a video in a webpage. Use the HTMLAudioElement class for the HTML audio element.

Topics

Getting and Setting Properties

width

The width of the video element in CSS pixels.

height

The height of the video element in CSS pixels.

poster

The URI address of an image file that is shown when no video data is available.

Getting State

videoWidth

The native width of the video in CSS pixels. (read-only)

videoHeight

The native height of the video in CSS pixels. (read-only)

Displaying Video Fullscreen

webkitDisplayingFullscreen

A Boolean value indicating whether the video is displaying in fullscreen mode.

webkitEnterFullscreen

Enters fullscreen mode.

webkitExitFullscreen

Exits fullscreen mode.

webkitSupportsFullscreen

A Boolean value indicating whether the video can be played in fullscreen mode.

Relationships

Inherits From