MediaElement.js is a jQuery-based package for allowing us to:
- Use the HTML5 elements <video> and <audio> and have them work cross-browser (including mobile WebKit)
- Deliver a consistent UI for controls
- Using only a single format
I’ll be using it in the redesign of this site. I was all prepared to just say I’m using HTML5 video and if your browser doesn’t support that then just download directly and use VLC or something. But then I realized I’d have to re-encode to at least include OGG and that really didn’t appeal to me with 90 videos. Plus then I was messing with trying to make the video fluid width and that wasn’t going well (another story) so I scrapped it. Now that we have this, it’s a done deal! Firefox/Opera/IE<8 will fall back to a Silverlight player and WebKit browsers (and ultimately IE 9) will use native HTML5. One issue I've heard is that even when visiting a site using this with Chrome/Safari (natively supporting HTML5 with H.264), you can be prompted to install or update Silverlight, which kinda sucks. Apparently I have the lastest version installed so could not confirm this.
I think encoding the videos on WebM would be future proof, as most browsers (with the exception of probably Safari) will support WebM in the near future. It would be far better than providing H264 only video. Of course, what I’d do is to encode only future videos and provide a Flash (not Silverlight, as it is incredibly limited and doesn’t work in, for example, Linux) fallback to other browsers.
From the page, I think there is a Flash fallback for who has no Silverlight plugin, and I hope you include such Flash fallback in case it is optional.
Jose,
Yes there are both Silverlight and Flash fallbacks, so MediaElement can find something that works just about any browser/os/plugin combo. Once Flash supports WebM then you could use WebM for all desktops, but H.264 is still the best bet today and it works on iPhone and Android. It’s up to you if you want to provide multiple video formats or just one.
Chris,
I’d love to help debug the Silverlight install problem. I haven’t seen that, but if you can help me test that scenario, I’d love to fix it.
I’ll let you know if I come across a scenario I can replicate. Thanks John.