Commit 92ec51e7 authored by Michael Murtaugh's avatar Michael Murtaugh

use server/url for remote collage play

parent 7b7f5162
......@@ -2,8 +2,9 @@ var io = require('socket.io-client'),
fs = require('fs'),
spawn = require('child_process').spawn,
player = undefined;
var settings = JSON.parse(fs.readFileSync("settings.json", "utf8"));
var socket = io.connect("http://"+settings.ipaddress+":"+settings.port);
var settings = JSON.parse(fs.readFileSync("settings.json", "utf8")),
server_base = "http://"+settings.ipaddress+":"+settings.port,
socket = io.connect(serverbase);
socket.on("connect", function (data) {
console.log("connected to socket server");
......@@ -23,5 +24,5 @@ socket.on("collagegif", function (d) {
player.kill();
player = null;
}
player = spawn('cvlc', ['--no-video-title-show', '--loop', d.src]);
player = spawn('cvlc', ['--no-video-title-show', '--loop', serverbase+"/"+d.src]);
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment