Usage
Command-line options
- -a dialstring: listen at this dial string (overrides IXP_ADDRESS environment variable)
- -p command: use command to play files (default: m9play)
Environment
IXP_ADDRESS can be used to specify the address that m9u listens on. It should be a dial string, eg unix!/foo/bar for a unix socket or tcp!127.1!2358 for a tcp socket. The default address matches p9p's convention - unix!/tmp/ns.$USER.$DISPLAY/m9u.
Filesystem
/ctl
Accepts commands:
- play: start playback
- stop: stop playback
- skip n: immediately skips n songs in the playlist (n can be negative)
TODO:
- play should accept a filename to immediately play something
- /ctl should be readable and give the current playlist index
- accept multiple commands in a single write() (on seperate lines)
/list
When read, reveals the playlist. When appended to, adds song(s) to the playlist. When written to, overwrites the playlist.
/queue
When read, reveals the queue. When written to or appended, adds song(s) to the queue.
/event
When read, reveals important events as they happen (one per line). Possible events are:
- Play filename: playback of a song starts
- Stop filename: playback stops, filename is the current playlist item
TODO:
- Probably add some sort of event to indicate the playlist/queue has changed
- Allow clients to write to /event and broadcast the custom events to listeners