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.

video


Summary

HTML Video element allows creator of a HTML document or view of a Web Application to embed a video for display when a user visits the view or opens HTML document in a web browser.

Inherits from HTMLMediaElementHTMLMediaElement

Properties

No properties.

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.

Notes

Remarks

Beginning with Internet Explorer 9, any audio or video content needs the correct mime type set on the server, or the files won't play. Internet Explorer 9 supports MP3 audio, and MP4 audio and video. WebM audio and video files can be supported by installing the WebM components from The WebM project. The following table shows the required settings for your web server to host these files correctly.

Media file to serve Extension setting Mime type setting
Audio mp3 mp3 audio/mpeg
Audio mp4 m4a audio/mp4
Audio WebM webm audio/webm
Video mp4 mp4 video/mp4
Video webm webm video/webm

Standards information

See also

Related pages

  • HTMLVideoElement

Attributions