Simple NodeJS Icecast/SHOUTcast stream recorder
$ npm install troold/interstice
NOTE: Interstice will work only with Node.js 9.4 or newer.
const Interstice = require('interstice')
const interstice = new Interstice({ output: './my-recordings' })
interstice.on('song:complete', song => {
console.log(`Successfully saved ${song.title}`)
})
interstice.start('http://www.example.com')
Type: Object
Type: string
Output path to place recordings into.
Type: Object
HTTP agent used for connecting, same as the agent
option for http.request
Type: number
Milliseconds until connection timeout (0 will disable).
Start recording from the given Icecast/SHOUTcast stream url. Returns instance for chain calling.
Type: string
Stops current recording.
Register to the connection
event, fired once a connection to the stream is established.
Register to the song:start
event, fired once a song recording is started.
Register to the song:complete
event, fired once a song recording is completed.
Register to the stop
event, fired once the recording successfully stopped.
Register to the error
event, fired when an error occurs.
Exposed for instanceof
checks.
The error thrown when interstice is unable to connect to the stream url.
The error thrown when no data is received for the time specified with the timeout option.
The error thrown when a song can not be deleted from the recording folder.