A simple and open protocol for streaming audio in local networks.
Sort of like AirPlay and DLNA, but
- code & spec are openly available
- no DRM
- un-overengineered:
XMLJSON,reverse HTTPWebSockets - flexible: any client can control playback & play new media
If you want to try it out, head over to Getting started.
A FASP receiver is a WebSocket server. Any number of clients can connect to it and send the following commands, encoded as JSON:
["play", "http://example.org/some-url"]["queue", "http://example.org/some-url"]["next"]["previous"]["remove", 2]["stop"]["resume"]["pause"]["seek", 123, false, false](relative, in seconds)["seek", 123, true, false](absolute, in seconds)["seek", 123, true, true](absolute, in percent)["seek", 123, false, true](relative, in percent)["set-volume", 70]["get-props"]
The receiver may send the following commands to the client, encoded as JSON:
["prop", {"filename": …, "title": …, "album": …, "artist": …, "length": …, "progress": …, "volume": …, "playing": …}]["prop", "filename", "some-file.ogg"]["prop", "path", "path/to/some-file.ogg"]["prop", "duration", 219.5]["prop", "percent-pos", 2,477]["prop", "time-pos", 54.5]["prop", "pause", false]["prop", "volume", 70]["prop", "metadata", {title, album, artist, album_artist, track, disc}]["prop", "artwork", "https://example.org/path/to/artwork.jpg"]["prop", "queue", ["some-file.ogg", "another-file.mp3"]]
A receiver announces itself via mDNS, with the following properties:
- service type:
_fasp._tcp. name: a url-safe, ASCII stringid: a random hex ID, 16 charactersversion: the version of the protocol,2currently- hostname
- port
fasp-server-cli– A proof-of-concept receiver based onmpv.fasp-client-cli– A proof-of-concept command line client.fasp-web-client– A proof-of-concept client web app.
fasp-client– A JS lib to connect to a receiver and send commands. It can also serve local files on demand, for the receiver to fetch.fasp-client-cliandfasp-web-clientuse it.search-fasp-receivers– Search for receivers in the local network.fasp-receiver– A JS lib to create & announce a receiver. You have to implement the audio playing.fasp-server– A JS lib to run a receiver, including audio playing.fasp-server-cliuses it.