Need to have installed:
- Debian v8.0-v9.0
- Wget
- VLC v2.2.7
- Nodejs v8+
- NPM v5+
apt-get install wget vlc nodejs npm -y
local webclient to listen to audio, either from local filesystem or through say a youtube url pasted in the textbox.
Clone repo then cd into it..
npm install
nano app.js
const port = 1337
nano player/vlc.js
// use a different port than app.js!
const vlcPort = 7331
const vlcPasswd = "secret"
node app.js
Visit http://[local ip]:[port] using the port defined in app.js
To add local directory to app
nano tree.js
Enter path
// absolute path preferred
const local = "/your/path/to/local/directory"
Execute
node tree.js
pro-tip: If it's a big directory you might want to grab a coffee
enjoy!
** Recommended to put everything under one directory, for example a "dummy" linux home directory "/home/media/"
public/scripts/traverse.js
- This contain the logic that traverses the JS object that shadows the filesystem.
- includes functions to create HTML elements and place them in a container.
- responsible for requesting the file to be played at the server.
- keep search history in local storage of your browser.
public/scripts/client.js
- This contains code to control vlc from the client and get the xml data
player/vlc.js
- This file spawns a child process to launch vlc on server on a different process
player/vlc_config.js
- It's command [args]
player/commands.js
- This file translates client string types to their equivalent shell commands
tree.js
- This file takes a starting directory and creates a JSON object representing it's hierarchy recursively, consisting of nested object-arrays.