For Your Reading Pleasure: EasyCaptions

Introducing EasyCaptions: A simple system for adding captions and an interactive transcript to online videos. EasyCaptions uses progressive enhancement to provide the best possible experience for all visitors, regardless of their browser’s JavaScript, HTML5 or Flash support.

HTML5 Video, minus Ogg

Mozilla, the makers of Firefox, refuse to support the MP4/H.264 standard because it isn’t open-source and free from licensing constraints. Without Ogg, Firefox’s HTML5 video is rendered useless and requires a Flash-based fallback system. However, Firefox’s handling of the video element breaks the fallback mechanism. A scripted solution is required.

Here’s a simple script that will detect whether HTML 5 video is supported in the browser, and if it is, will check to see if this is Firefox. If yes, it deletes the specified video element but leaves the Flash fallback in its place.

Lazy loading excanvas.js

I started by developing an HTML example page that used the canvas element and had the excanvas.js file hard-coded. Everything worked as planned. I then took out the hard-coded excanvas.js file and replaced it with a JavaScript-based lazy loader. Guess what? It didn’t work. A simple modification to the excanvas.js file fixed the problem.

Custom modal windows using canvas and MooTools

I’ve built a simple modal window class named Modal using MooTools. This class combines a dynamic canvas drawing API (my Rectangle class) with dynamic DOM element generation to create on-demand modal windows using no external images. My goal was to make this about as easy to use as a normal JavaScript alert, prompt or confirm window.