Controlling BTplay
From Chumby Wiki
BTPlay is an external music player that is used by the chumby Control Panel to play audio files and streams asynchronously. It is implemented as a persistent daemon that is controlled by a UNIX pipe, typically from the Flash Lite Player, or through some stub applications.
Several ASnative() calls have been added to the Flash Lite implementation to control this daemon.
PlayAudio
_PlayAudio = ASnative(5,151); _PlayAudio('/mnt/usb/somemusicfile.mp3');
StopAudio
_StopAudio = ASnative(5,134); _StopAudio();
PauseAudio
_PauseAudio = ASnative(5,132); _PauseAudio();
ResumeAudio
_ResumeAudio = ASnative(5,133); _ResumeAudio();
PlayerState
_PlayerState = ASnative(5,131); playerState = _PlayerState();
returns -1 if player daemon not running, 0 if paused, 2 if playing a track
SongAttributes
_SongAttributes = ASnative(5,135); attrs = _SongAttributes();
returns XML of the information about the currently playing track, typically MP3 tags and other metadata