93 Contributors: 4 Friday, February 24, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial:
Roadmap: roadmap

Media Elements


widthSets the element's width in pixels.
heightSets the element's height in pixels.
<source>Defines resources of the audio or video files
trackDefines the text track for media elements
controlsDisplays controls
autoplayAutomatically start playing the media
loopPlays the media in a repeated cycle
mutedPlays the media without sound
posterAssigns an image to display until a video is loaded


Support in browsers

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support3.03.5 (1.9.1)9.010.503.1
<audio>: PCM in WAVE(Yes)3.5 (1.9.1)No support10.503.1
<audio>: Vorbis in WebM(Yes)4.0 (2.0)No support10.603.1
<audio>: Streaming Vorbis/Opus in WebM via MSE?36.0???
<audio>: Vorbis in Ogg(Yes)3.5 (1.9.1)No support10.50No support
<audio>: MP3(Yes)(Yes)9.0(Yes)3.1
<audio>: MP3 in MP4????(Yes)
<audio>: AAC in MP4(Yes)(Yes)9.0(Yes)3.1
<audio>: Opus in Ogg27.015.0 (15.0)???
<video>: VP8 and Vorbis in WebM6.04.0 (2.0)9.010.603.1
<video>: VP9 and Opus in WebM29.028.0 (28.0)?(Yes)?
<video>: Streaming WebM via MSE?42.0 (42.0)???
<video>: Theora and Vorbis in Ogg(Yes)3.5 (1.9.1)No support10.50No support
<video>: H.264 and MP3 in MP4(Yes)(Yes)9.0(Yes)(Yes)
<video>: H.264 and AAC in MP4(Yes)(Yes)9.0(Yes)3.1
any other formatNo supportNo supportNo supportNo support3.1

Related Examples