Skip to content

Commit

Permalink
added window locations to clients
Browse files Browse the repository at this point in the history
  • Loading branch information
fredeerock committed Apr 4, 2016
1 parent 3217d9b commit aa12f2d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 5 additions & 1 deletion app/m/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ <h1 onclick="causeSound.triggerCauseway();"><span class="mainTitle">Causeway</sp


<script>
// var socket = io.connect('http://emdm.io/', { path: '/sio/socket.io' });
// var socket = io.connect(window.location.origin, {path: '/sio/socket.io'});
var socket = io.connect(window.location.origin);
console.log("window.location.origin:", window.location.origin);

// var socket = io.connect('http://emdm.io/sio');
var socket = io.connect('http://emdm.io/', { path: '/sio/socket.io' });
//var socket = io.connect('127.0.0.1:8001/');
var myColor = getRandomColor();
var myLocation = [0.5, 0.5]; // Default centered
Expand Down
7 changes: 6 additions & 1 deletion app/m/theater.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ <h2>http://emdm.io/m</h2>
<div id="causeway-text"></div>

<script>
var socket = io.connect('http://emdm.io/', { path: '/sio/socket.io' });
// var socket = io.connect('http://emdm.io/', { path: '/sio/socket.io' });
// var socket = io.connect(window.location.origin , {transports:['websocket']} );
// var socket = io.connect(window.location.origin, {path: '/sio/socket.io'}, {transports:['websocket']} );
var socket = io.connect(window.location.origin);
console.log("window.location.origin:", window.location.origin);

// var socket = io.connect('http://emdm.io/sio');
//var socket = io.connect('127.0.0.1:8001/');
socket.emit('addme', {name: "theater"});
Expand Down
6 changes: 3 additions & 3 deletions installation.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ var app = express();
app.use(express.static(__dirname + '/app/m')); // COMMENTED THIS OUT SO APP.JS SERVES CONTENT

// FIXME: probably don't need this
app.get('/', function (req, res) {
res.send('hello');
});
// app.get('/', function (req, res) {
// res.send('hello');
// });

// OSC Setup for sending (and receiving) OSC (to Max)
var osc = require('node-osc');
Expand Down

0 comments on commit aa12f2d

Please sign in to comment.