James Clarke & Notes

Bookmarklet to enable AirPlay on all web videos

Apple, in iOS 4.3, introduced the ability to stream embedded web videos over AirPlay. Mac OS Rumors has a good overview of the feature. The main limitation is that websites must explicitly opt-in to enable AirPlay. Luckily, Ben Ward and Mathias Bynens posted a really nice bookmarklet to enable AirPlay for all videos on iOS devices.

The bookmarklet works by modifying video and embed elements to contain the attributes x-webkit-airplay="allow" and airplay=allow. These attributes inform the iOS movie player to enable AirPlay (MPMoviePlayerController‘s allowsAirPlay attribute is set to true). This should allow any embedded web video to play over AirPlay. However, it turns out modifying the attributes after loading the page does not cause the movie player to enable AirPlay.

Experimenting and modifying the bookmarklet I found how to enable AirPlay for all videos. AirPlay is enabled If we load a new page with the modified video and embed elements from the original. My assumption is movie player initializes the video elements when the page loads rather than inspecting the element on tapping (or clicking) thus AirPlay is disabled. The new bookmarklet is below and has been tested on HTML5Video, Akamai iPhone Showcase, and Veetle.

This link contains the bookmarklet. Copy the link and place it in a new bookmark in Mobile Safari. When you visit a web page with embedded video, load the bookmark and a new window will open with the same content but AirPlay will be enabled.

Or in human readable form:

javascript:[].slice.call(
  document.querySelectorAll('embed,video'),0).map(
    function(e) {
      e.setAttribute('x-webkit-airplay','allow');
      e.setAttribute('airplay','allow')
    });
var w = window.open('about:blank');
var d = w.document;
d.open();
d.write(document.documentElement.innerHTML);
d.close();

There is probably a nicer way to do this but I am not that familiar with DOM in JavaScript. Get in touch if you know of a cleaner method.

Information sources worth visiting

I rarely read, listen, or watch any daily news sources because they are extremely low on content and value. (Nick Davies in Flat Earth News provides an excellent analysis of why and how newspapers have become full of recycled PR instead of journalism).

I tend to concentrate on the long form intellectual essays from the literary magazines. The three I focus on are the London Review of Books, New York Review of Books and The New Yorker. Others I skim less often are Harper’s and Boston Review. If I must follow current news (which is infrequent) I will skim the Guardian, New York Times and Financial Times for stories. All of these publications have numerous blogs which I haven’t found useful (too many posts).

Instapaper is great for managing your reading list and I usually store articles of note on delicious (and mirrored on pinboard).

Podcasts

Podcasts quickly get out of hand and there doesn’t seem to be anything good for managing them (iTunes is awful but at least it syncs to my iPhone). But still, I subscribe to the following:

Radio 4 has a ton of podcasts worth a listen.

Camera Buying Guide (Late 2010)

Buying a camera is difficult. There are many models, features and brands. Here are some of my recommendations and information sources that will hopefully making the purchasing decision easier.

Mike Johnston over at The Online Photographer has some very good advice on buying cameras. I usually recommend checking the cameras online and then heading to BestBuy or somewhere to get a real feel for them. Questions to bear in mind when reviewing a camera in person:

The key point to remember is that you will only get good pictures if you have your camera with you at the right time. In my opinion this should be one of the key deciding factors when selecting a camera.

The Cameras

These are the cameras I would recommend. It covers a range of consumer camera types but stops short of digital SRLs (DSLRs). All of these cameras will take great pictures and their differentiating factors are typically size, expandability and speed.

Other choices

You’ll notice that all the above cameras come with a “3x” optical zoom. This tends to give you the best optics in this price range. Also the above cameras are the ones that “serious” photographers tend to buy.

If you want something with much more reach look at the Fujifilm Finepix S200EXR (14x optical zoom). I don’t know much about this but it is recommended at Steve’s Digicams.

On the much cheaper end I would recommend Canon Powershot SD940IS (or SD1300IS).

Finally a book that always get recommended is Bryan Peterson’s Understanding Exposure. It is a great resource for teaching the basics of exposure and how to use your camera to get the creative images you want.

Clover Food Lab Coffee

Clover Food Lab demonstrating their coffee brewing technique:

We have a pretty specific approach to making our coffee. A lot has gone into developing our technique. It is a balance of practical concerns (e.g., speed, consistency), and, but I know that each manager has a slightly different technique. We’re not talking huge differences here, but I was pretty sure there were slight variations.

Clover use filter-cone-style brewing and want to achieve a constant flow out of the cone rather than dripping.

Capsul

Keys, Capsul Wallets, iPhones, Headphones

Capsul wallets have changed our lives.

19 October

I’m really enjoying the feel of this photograph at the moment!

Middlesex Fells





October
10Twitter activism
September
29Doing the right thing
5Envisaging peak *
August
28WORDS
16Raleigh Denim
8Visual Acoustics
April
18Apollo 11 Saturn V launch
...