0.2.1 • Published 6 years ago

search-fasp-receivers v0.2.1

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

search-fasp-receivers

Search for Friendly Audio Streaming Protocol receivers in the local network.

Note: search-fasp-receivers works only in Node, because it needs access to mDNS to find the receivers.

npm version ISC-licensed chat with me on Gitter support me on Patreon

Installing

npm install search-fasp-receivers

Usage

const search = require('search-fasp-receivers')

const version = '2' // FASP version
const timeout = 5 * 1000

search.byName('alice-fasp-receiver', version, timeout, (err, service) => {
	if (err) console.error(err)
	else console.log('found', service.host, service.port)
})

If you know the ID of a receiver, it is safer to search using this instead of the name:

search.byId('86af5e4a3c62635d', version, timeout, (err, service) => {
	// …
})

API

search.byId(id, version, [timeout], cb)
search.byName(name, version, [timeout], cb)

A version version of null means any version.

Contributing

If you have a question or have difficulties using search-fasp-receivers, 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.