View on GitHub

Jrmc-ws-server

node.js

Download this project as a .zip file Download this project as a tar.gz file

JRMC WS Server and Remote Client

jrmc-ws-server is a webserver including a websocket API that exposes the JRiver Media Center WS API for web clients.

It comes with a javascript client side library that offers the following features:

Finally, this javascript library is used in a JQuery Mobile based web client.

Install the server

Everything is built on top of node.js :

$ npm update

Configure the server

Edit the configuration.json and update the configuration:

{
    "wsPort": 1337,
    "webPort": 8080,
    "webHost": "localhost",
    "jrmcHost": "localhost",
    "jrmcPort": 52199,
    "jrmcAuthenticate": "user:password",
    "logger":{
        "info": "std:logger",
        "trace": "std:logger"}
}

wsPort is the websocket port that will be used. webPort is the port that will be used to deploy the Remote Client webapp webHost is the ip or DNS name of the machine where this installation is running on, it's used by the web client to retrieve this instance. jrmcHost is the ip or DNS name of the machine where JRMC is running on, it's recommended that keep the server on the same machine that the one hosting JRMC. jrmcPort is the port of the JRMC MCWS services jrmAuthenticate is the information that allows this server to connect to JRMC if authentication is activated.

Run the server

 $ npm start

Exposed clients API

Connecting the websocket server from a client is as easy as writing the following code:

var jrmc = new JRMC.Client("client", 'ws://host:port/');

jrmc.play()

jrmc.pause()

jrmc.stop()

jrmc.next()

jrmc.previous()