This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

HTMLVideoElement

Summary

The HTML <video> element is used to embed video content in an HTML or XHTML document.

Inherits from HTMLMediaElementHTMLMediaElement

Properties

initialTime
Earliest point in seconds where the playback can (should) start playing
poster
Valid URL to an image ressource that will be displayed until the first frame of the video is available or will be displayed if no valid video ressource is available at all.

videoHeight
:

videoWidth
:

Methods

No methods.

Events

No events.

Inherited from HTMLMediaElement

Properties

audioTracks
:

autobuffer
:

autoplay
:

buffered
:

controls
Controls attribute used within a Audio element or Video element displays the default media controls defined by the web browser being used to open HTML document or view of a Web Application.

currentSrc
:

currentTime
:

defaultPlaybackRate
:

duration
:

ended
:

error
:

loop
:

muted
:

networkState
:

paused
:

playbackRate
:

played
:

preload
:

seekable
:

seeking
:

src
:

textTracks
:

volume
:

Methods

canPlayType
:

load
:

pause
:

play
Loads and starts playback of a media resource.

Events

canplay
Fires whenever enough data is available to determine whether a media is playable.
canplaythrough
Fires when enough data is available to determine whether a media is playable at a normal rate without interruptions.
progress
Fires to indicate progress while downloading media data.

Examples

A simple example of showing a video

<p>This is big buck bunny video.</p>
<video width="350" height="240" controls>
<source src="http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.ogg" type="video/ogg">
</video>

View live example

Usage

 Currently, there are 3 supported video formats for the <video> element: MP4, WebM, and Ogg