Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maciek134/node-mpg123
Written entirely in JS mpg123 (http://www.mpg123.de/) wrapper for Node.js.
https://github.com/maciek134/node-mpg123
Last synced: 7 days ago
JSON representation
Written entirely in JS mpg123 (http://www.mpg123.de/) wrapper for Node.js.
- Host: GitHub
- URL: https://github.com/maciek134/node-mpg123
- Owner: maciek134
- License: mit
- Created: 2012-10-16T21:05:16.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-10-16T22:48:34.000Z (about 12 years ago)
- Last Synced: 2024-09-23T19:07:12.624Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 125 KB
- Stars: 8
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
node-mpg123
===========Written entirely in JS mpg123 (http://www.mpg123.de/) wrapper for Node.js.
Installation
-----------
### Debian/Ubuntu ###
````
sudo apt-get install mpg123
npm install node-mpg123
````Example Usage
------------````javascript
var Sound = require('node-mpg123');// fire and forget:
new Sound('/path/to/the/file/filename.mp3').play();// with ability to pause/resume:
var music = new Sound('/path/to/the/file/filename.mp3');
music.play();setTimeout(function () {
music.pause(); // pause the music after five seconds
}, 5000);setTimeout(function () {
music.resume(); // and resume it two seconds after pausing
}, 7000);// you can also listen for various callbacks:
music.on('complete' function () {
console.log('Done with playback!');
});
````It's simple as that.
Documentation
------------
In progress.