A server for the Friendly Audio Streaming Protocol.
Use fasp-server-cli
if you want to run a server from the command line.
Because fasp-server
is based on the wonderful mpv
, it can play audio from many sources.
Install mpv
. Refer to their installation page for further details.
# macOS
brew install mpv
# Ubuntu or similar
sudo add-apt-repository ppa:mc3man/mpv-tests
sudo apt update
sudo apt install mpv
On many Linux systems, you also need the dns_sd.h
headers for mDNS.
# Ubuntu or similar
sudo apt install libavahi-compat-libdnssd-dev
Then, install fasp-server
.
npm install fasp-server
const createServer = require('fasp-server')
const server = createServer((err, info) => {
if (err) {
console.error(err)
process.exitCode = 1
} else {
console.info('port', info.port)
}
})
Control the server programmatically using fasp-client
, or from the command line using fasp-client-cli
.
If you have a question or have difficulties using fasp-server
, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.