https://github.com/fabioricali/streamtitle
Retrieve song title from shoutcast and icecast server
https://github.com/fabioricali/streamtitle
icecast shoutcast song-title title
Last synced: 7 days ago
JSON representation
Retrieve song title from shoutcast and icecast server
- Host: GitHub
- URL: https://github.com/fabioricali/streamtitle
- Owner: fabioricali
- Created: 2017-06-05T06:08:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-01T11:08:31.000Z (over 6 years ago)
- Last Synced: 2025-04-14T16:47:30.936Z (12 days ago)
- Topics: icecast, shoutcast, song-title, title
- Language: JavaScript
- Size: 37.1 KB
- Stars: 9
- Watchers: 2
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# StreamTitle
Simple library to retrieve song title from SHOUTcast v1 or v2 and Icecast server.[](https://travis-ci.org/fabioricali/StreamTitle) [](https://coveralls.io/github/fabioricali/StreamTitle?branch=master)
## Installation
```javascript
npm install stream-title --save
```## Example
### SHOUTcast v1
```javascript
var streamTitle = require('stream-title');streamTitle({
url: 'http://shoutcastserver:port',
type: 'shoutcast'
}).then(function (title) {
console.log(title);
}).catch(function (err) {
console.log(err);
});
```### SHOUTcast v2
```javascript
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);
});
```### Icecast v2.4.x
```javascript
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);
});
```### Options
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## License
StreamTitle is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)## Author
[Fabio Ricali](http://rica.li)