Enables <video> and <audio> tags in all major browsers.
Pull request Compare This branch is 120 commits behind etianen:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



HTML5 video and audio tags make embedding media into documents as easy as embedding an image. All it takes is a single <video> or <audio> tag. Unfortunately, not all browsers natively support these HTML5 tags.

Enabling video and tags in all major browsers

All it takes is three simple steps to enable HTML5 video and audio tags in all major browsers!

  1. Download the and unzip the latest html5media build from the html5media download area.

  2. Upload the contents of the unpacked html5media/ folder to your webserver. Be sure to keep all the bundled files together in the same folder.

  3. Add the following snippet the to <head> of your document:

    <script src="/path/to/your/html5media.min.js"></script>

You can see this code in action on the html5media demo site.

Please read our Getting Started guide for more information.

Using HTML5 video and audio

HTML5 allows you to embed video and audio into your document using the following easy syntax:

<video src="video.mp4" width="320" height="240" controls preload></video>

<audio src="audio.mp3" controls preload></audio>

Find out more about HTML5 on the Dive Into HTML5 video page.

You can ask for help and discuss all aspects of HTML5 media and audio on the html5media discussion group.

Help! My file won't play!

It's probably encoded incorrectly. Videos should always be saved as h.264 (mp4), or Theora (ogv) files. Find out more on our Video Formats page.

Audio files should be saved as mp3, AAC (m4a) or Vorbis (ogg).

What's in the box?

The html5media project consists of a single, minified Javascript file that is used to detect your browser's HTML5 video capabilities. Any video tags that cannot be played are dynamically replaced with a Flash video player.

The bundled Flash video player is provided by Flowplayer under the GPL3 licence. You can find out more about Flowplayer on the Flowplayer website.

More information

The html5media project was developed by Dave Hall. You can get the code from the html5media project site.

Dave Hall is a freelance web developer, based in Cambridge, UK. You can usually find him on the Internet in a number of different places: