Aug
12

Cross browser HTML5 Video & Audio Player

By Vinod  //  All, HTML  //  1 Comment

HTML5 <video> and <audio> with H.264, FLV, WMV, or MP3 on any browser.

The Problem

  • <video> doesn’t work in old browsers
  • Browsers support different video codecs
  • Browsers have inconsistent player UI
  • H.264 doesn’t work in Firefox & Opera
    Note: MediaElement.js also supports Ogg and WebM (even FLV and WMV) if you want to use multiple <source> elements

The Solution: MediaElement.js

You use the <video> tag with one H.264 file (you can also include Ogg or WebM, but you don’t need to). If the browser doesn’t support it, then MediaElement.js replaces <video> with either Silverlight or Flash and returns a wrapper object that matches the HTML5 Media Element API. This lets you code to MediaElement.js as if it were a native <video>

1 Comment to “Cross browser HTML5 Video & Audio Player”

Leave a comment