Ryanne, Jay and I have been trying to come up with a good way to embed ogg video with the new video tag and have it still work in browsers that don’t support that yet. We want to show people how to set that up at the Open Video Conference. We came up with a method similar to this but hadn’t finalized it yet. Anyway, Kroc Camen’s Video for Everybody code is better.
There were a few things about the Video for Everybody code that I didn’t like so I edited it so that it validates as HTML5 and in the interest of simplification I took out the fallbacks for “QuickTime Installed but no Flash installed” and “No QuickTime and no Flash installed.” Also, the QuickTime object fallback is simplified because it assumes playback only on the iPhone.
So check it out the test page with a self hosted Flash player fallback
one with a YouTube fallback.
If you are using FireFox 3.5 beta you will get an ogg video, If you have Safari 3 or 4 you will get an mp4 and if you have FF 3, IE6, IE7 or IE8 you will get the Flash player (actually playing the same mp4 that Safari is playing).
The one big stumbling block to this whole thing at the moment is that poster image attribute is not supported yet and (because of that?) the video will load whether you play it or not. My understanding is that it’s supposed to be resolved in Firefox 3.5 before release (who knows what Apple’s plans are with Safari).