Simple node.js audio player local files or audio stream.
- play mp3
- play audio stream (radio)
- support m3u playlist
- control play, stop, next, prev
- scheduler cron style (use module later)
- show metadata (current track)
- ui support mobile browser (tested Iphone 4)
$ npm install
$ ./node_modules/bower/bin/bower install
$ npm start
$ vim config/config.js
// only for stream radio, recommendation set 0, if set 1 may have problems when playing
this.useMetaData = 0;
// if you want disable scheduler simple commenting this blog
// cron syntax with seconds (http://bunkat.github.io/later/parsers.html#cron)
this.schedule = {
play: ['0 30 8 * * 1-5', '0 20 19 * * 1-5'],
stop: ['0 30 9 * * 1-5', '0 45 2 * * *']
};
For easy installation, use pac
$ vim /etc/systemd/system/wplayer.service
[Service]
ExecStart=/usr/bin/node --expose-gc /home/user/wplayer/app.js
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=wplayer
User=user
Group=users
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target
$ systemctl enable wplayer
$ systemctl start wplayer