NAME

Apache::iTunes - control iTunes from mod_perl

SYNOPSIS

<Location /iTunes>
	SetHandler perl-script
	PerlHandler Apache::iTunes
	PerlModule Mac::iTunes
	PerlInitHandler Apache::StatINC
	PerlSetEnv APACHE_ITUNES_HTML /web/iTunes.html
	PerlSetEnv APACHE_ITUNES_URL http://10.0.1.2:8080/iTunes/
	PerlSetEnv APACHE_ITUNES 1
</Location>

DESCRIPTION

THIS IS ALPHA SOFTWARE.

I am still developing Mac::iTunes, and this module depends mostly on that. This handler does most of the stuff I need it to do, so further development depends on what people ask for or contribute. :)

URLs

After the base URL to the iTunes handler, you can add commands in the path info. Only the first command matters.

/play, /pause, /stop, /next, /previous

Does just what it says, just like the iTunes controller.

/back_track

Restarts the current track

/volume/<number 0-100>

Sets the volume to a value between 0 and 100. Numbers below 0 are taken as 0, and those above 100 are taken as 100.

/playlist/<playlist>

Changes the playlist view to <playlist> if it exists.

/track/<number>/<playlist>

CURRENTLY BROKEN!

Plays track number <number> in <playlist>.

Template Variables

This module uses Text::Template because I expect people to hack it for their own templating system (please send back modifications!).

$base

The base URL (from APACHE_ITUNES_URL environment variable)

$current

The current track name

$playlist

The current playlist

@playlists

A list of the playlists

@tracks

A list of tracks in the current playlist (in $playlist)

$version

The version of Apache::iTunes

Environment variables

APACHE_ITUNES_URL

The URL to the mod_perl handler so it can reference itself.

APACHE_ITUNES_HTML

The location of the template file.

TO DO

* even though this is mod_perl, Mac::iTunes is still pretty slow. when i get to the optimization stage, Mac::iTunes will get faster and so will this.

SOURCE AVAILABILITY

This source is part of a SourceForge project which always has the latest sources in CVS, as well as all of the previous releases.

http://sourceforge.net/projects/brian-d-foy/

If, for some reason, I disappear from the world, one of the other members of the project can shepherd this module appropriately.

AUTHOR

brian d foy, <bdfoy@cpan.org>

COPYRIGHT

Copyright 2002 -2006 brian d foy, All rights reserved