I’m building a lightbox and have reached adding support for flash and videos. I’ve never had any demands or need for video, so honestly don’t know where to begin. I do know I have to be able to serve different video formats for different browsers, but don’t know how to approach this. I’m also hoping to have this work in “non-modern” browsers. The tutorials and questions I’ve found are very vague any typically result in “try using this plugin”. Perhaps someone could help by explaining how i would go about loading a video that would be browser compatible, and possibly the video formats i should be supporting? Or a link 🙂 thanks!
I’m building a lightbox and have reached adding support for flash and videos. I’ve
Share
I just did the same thing. I used a combination of Fancybox and Video for Everybody.
Basically, the idea behind Video for Everybody is that you use the HTML5
videotag with an embedded flash video player for browsers that do not support HTML5 video. For the embedded flash player, I used JWPlayer.And then you just make something like
<a href="#videoPlayer" class="video_link">Play Video</a>and point Fancybox at the link. Voila, you’ve got a video in an Fancybox (which is about the same thing as Lightbox).For cross-browser compatibility, you should offer the file in MP4 (using H.264 codec) and WebM or Ogg. Older browsers that do not support HTML5 videos will use the flash player fallback with the MP4 file anyways.
One thing to keep in mind with your MP4 file is that often the moov atom is placed at the end of the file, so the file cannot start playing until it has fully downloaded. Use a tool like qt-faststart to move it to the beginning of the file, allowing it to start playing before fully downloaded.
Example: