airplayerjs

Use this bookmarklet to enable streaming (some) video content to your Apple TV.

Usage (Requires iOS 4.3)

Tap the following link, add it as a bookmark and tap "Done".

Enable AirPlay

Now, go back in to your bookmarks, tap "Edit", select the "Enable Airplay" bookmark and remove the following text from the url:

http://andrewgleave.github.com/airplayerjs/?

You should be left with a url which starts with javascript. Tap "Done" and return to Safari. The bookmarklet is now ready to use.

Run the bookmarklet before tapping on a video. If the script runs successfully, you should see the video content flash momentarily as its element is replaced.

If it worked, you will see the AirPlay icon in the controls and you should be able to send the video to your Apple TV.

Demo

You can try it out on Dive into HTML5 video.

Mileage May Vary: This is just a DOM hack and doesn't always work. If it fails to play, dismissing the video and then tapping on it again (without running the script for a second time) will sometimes get it running.

Disclaimer

I take no responsibility whatsoever for your usage of this script.

@andrewgleave