Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

HTML5 <audio> or <video> player with Flash and Silverlight shims that mimics the HTML5 MediaElement API, enabling a consistent UI in all browsers.

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

GOAL: Make <video> easy. One file. Any browser. Same UI.

MediaElement.js

HTML5 <video> and <audio> shim

MediaElement.js wraps the HTML5 media API around Flash and/or Silverlight objects for browsers that don't support HTML5 or don't support the media codecs you're using.

<script src="mediaelement.js"></script>
<video src="myvideo.mp4" width="320" height="240"></video>
<script>
var v = document.getElementsByTagName("video")[0];
new MediaElement(v, {success: function(media) {
    media.play();
}});
</script>

MediaElementPlayer.js

HTML5 <video> and <audio> player

A complete HTML/CSS audio/video player built on top MediaElement.js and jQuery. Many great HTML5 players have a completely separate Flash UI in fallback mode, but MediaElementPlayer.js uses the same HTML/CSS for all players.

<script src="jquery.js"></script>
<script src="mediaelement.js"></script>
<script src="mediaelementplayer.js"></script>
<link rel="stylesheet" href="mediaelementplayer.css" />

<video id="v1" src="myvideo.mp4" width="320" height="240"></video>

<script>
$('video').mediaelementplayer();
// OR
new MediaElementPlayer('#v1');
</script>

Version History

1.0.4 (2010/11/10)

  • Fixed Flash display when <video> did not match actual dimensions
  • autosizing in Flash and Silverlight
  • added options for defaultVideoWidth, defaultVideoHeight when <video> height and width are not set
  • included minified versions using YUI compressor

1.0.3 (2010/09/24)

  • changes in poster handling
  • fix IE9 startup bug (its 'play' event fires wrongly it seems)
  • fixed Flock, Opera sizing bugs
  • fixed audio ended bug in special cases under Flash
  • added default height/width when they are not specified in attributes

1.0.2 (2010/09/17)

  • minor updates to support IE9 beta1

1.0.1 (2010/09/13)

  • added native fullscreen support for Safari 5 (via webkitEnterFullScreen)

1.0.0 (2010/08/09)

  • initial release
Something went wrong with that request. Please try again.