tapTunes
Control iTunes Remotely Through the Web

Here's a neat way to control iTunes through the Internet. At home I'm usually using two computers; one small "couch laptop" and one desktop computer with my whole music library and a couple of decent loudspeakers. I found myself having to step up from the couch every time i had to either pause current track, adjust volume or skip songs. From my own laziness came the need for a simpler way to do this. I know there's other roads to remote iTunes control (see Signal), but I wanted to make this myself as a personal learning project while making the app exactly like I envisioned it.

Markup, styles, JavaScript, PHP scripts and graphics are all done by myself and I'm releasing it all here under a GNU General Public License.

Features

Weak points

Technology

PHP and COM

On Windows PCs (sorry, Mac) iTunes is available through a COM interface. If you have a correctly setup system, you can control iTunes through simple PHP code like:

<?php
    
    
// Instantiate a new COM client to iTunes
    
$iTunes = new COM('iTunes.Application');
    
    
// Skip to next track
    
$iTunes->NextTrack();
    
    
// Increase volume
    
$iTunes->SoundVolume += 10;
    
    
// Start/pause playing
    
$iTunes->PlayPause();
    
    
// Get current song title
    
$trackName $iTunes->CurrentTrack->Name;
    
    
// Get name of currenttly showing playlist
    
$playlistName $iTunes->BrowserWindow->SelectedPlaylist()->Name;
    
    
// Give current playing track three stars
    
$iTunes->CurrentTrack->Rating 60;

?>

Quote from the PHP COM Documentation:

COM is an acronym for Component Object Model; it is an object orientated layer (and associated services) on top of DCE RPC (an open standard) and defines a common calling convention that enables code written in any language to call and interoperate with code written in any other language (provided those languages are COM aware).

I'm sure one can do similar stuff with AppleScript/shell commands on a Mac, so if you want to try, modify control.php, info.php and playlist.php and make your very own interface. :)

AJAX/JavaScript

AJAX functionality is implemented with the lightweight JavaScript framework mootools. I'm positive there's other frameworks at least as good, but mootools was coincidentally the one I know best.

Graphics

The graphics are made in Adobe Photoshop, ligtly inspired by another music player GUI. ;)

tapTunes © 2007-2008