lafin / wplayer

Simple node.js audio player local files(mp3) or audio stream. Support m3u.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wPlayer

Dependency Status devDependency Status


Simple node.js audio player local files or audio stream.

Features

  • 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)

Installation

$ npm install
$ ./node_modules/bower/bin/bower install

Run

$ npm start

Open http://localhost:3000

Config

$ 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 * * *']
};

Deploy example

Rasberry Pi

For easy installation, use pac

systemd

$ 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

About

Simple node.js audio player local files(mp3) or audio stream. Support m3u.


Languages

Language:JavaScript 80.0%Language:HTML 13.9%Language:CSS 6.1%