Giter Club home page Giter Club logo

roon-extension-ws-player's Introduction

Websocket Roon Player


This is a websocket implementation of roon player

Prerequisite

This is running on Node.js and socket.io. Below are the steps to install it.

  • On Windows, install from the above link.
  • On Mac OS, you can use homebrew to install Node.js.
  • On Linux, you can use your distribution's package manager, but make sure it installs a recent Node.js. Otherwise just install from the above link.

Make sure you are running node 5.x or higher.

node -v

For example:

$ node -v
v5.10.1

Installing roon-extension-ws-player

  1. Download the repository.
  1. Install
  • Copy the downloaded zip to the desired folder

  • unzip

  • open terminal/command line and change directory to the folder

    cd [PATH]
    
  • Install Dependencies

    If you have not installed socket.io, install it using the following command

    npm install socket.io
    

    then install the repository

    npm install
    
  • (Optional) To remove the running log Comment console.log lines at

    • node_modules/node-roon-api/lib.js
    • node_modules/node-roon-api/moo.js ( REQUEST)
    • node_modules/node-roon-api/moomsj.js (CONTINUE and COMPLETE)
  1. Running
node .
  1. Enable the extension In Roon, go to Settings -> Extensions and click on the "enable" button next to the roon-extension-http-api extension details.

Running in Browser

Open a browser and go to the following link:

http://localhost:3002/

Port can be changed by changing the PORT variable in apps.js. IP should be changed to where the repository is located

Websocket calls

TO create your own client, the following are the available WS calls

The server (apps.js) emits zone whenever there is a change

io.emit("zones", zones);

For the image, the client sends the image_key to the server

socket.emit('getImage', image_key);

Then the server returns the image

io.emit('image', { image: true, buffer: body.toString('base64') });

The server also listen to client's operational calls:

Change Volume

  var vol = new Object();
  vol.volume = volume;
  vol.outputId = outputId;

  socket.emit('changeVolume', JSON.stringify(vol));

Back Button

  socket.emit('goPrev', zone_id);

Next Button

  socket.emit('goNext', zone_id);

Pause/Play Button

  socket.emit('goPlayPause', zone_id);

roon-extension-ws-player's People

Contributors

crieke avatar st0g1e avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.