Simple library to retrieve song title from SHOUTcast v1 or v2 and Icecast server.
npm install stream-title --save
var streamTitle = require('stream-title');
streamTitle({
url: 'http://shoutcastserver:port',
type: 'shoutcast'
}).then(function (title) {
console.log(title);
}).catch(function (err) {
console.log(err);
});
var streamTitle = require('stream-title');
streamTitle({
url: 'http://shoutcastserver:port',
type: 'shoutcast2',
sid: 1
}).then(function (title) {
console.log(title);
}).catch(function (err) {
console.log(err);
});
var streamTitle = require('stream-title');
streamTitle({
url: 'http://icecastserver:port',
type: 'icecast',
mount: 'mymount'
}).then(function (title) {
console.log(title);
}).catch(function (err) {
console.log(err);
});
Name | Type | Description |
---|---|---|
type | string | required, server type that can be "shoutcast", "shoutcast2" or "icecast" |
url | string | required, server url |
sid | integer | required for shoutcast2, stream id |
mount | string | required for incecast, mount name |
timeout | integer | request timeout in ms, default: 1500 |
StreamTitle is open-sourced software licensed under the MIT license