How the Remote Control Works

It's just an iPad

The remote control software isn't an app downloaded from Apple's App Store. It's a web page on the server PC, viewed using the Safari app on the iPad.

We have the jukebox page permanently open in Safari. We open further pages when needed for browsing the web. If the jukebox page is accidentally used for web browsing, any music playing will continue as if nothing had happened, and there's a bookmark to get the jukebox page back again when required.

Technical details

If you're not interested in the technical details of how the remote control page works, skip straight to the next page now.

The jukebox page (ipad_jukebox.html) uses HTML, CSS, and JavaScript. There are about 2000 lines of my own code, plus the jQuery library for DOM manipulation etc, and the iScroll 4 library to provide one-finger sub-page scrolling.

The CSS makes use of CSS3 styling, including animation. There is limited cross-browser compatibility for CSS3 at the time of writing, which is one reason why the app doesn't work well on Internet Explorer etc.

The JavaScript uses Ajax technology to load information pages from the server when required.

The JavaScript maintains synchronisation with the server using the Long Polling style of pseudo-push technology, in conjunction with Ajax. When a player-related event occurs on the server (track change, etc), the server initiates a sync immediately. Otherwise a sync occurs every couple of minutes, to forestall browser time-outs.