client.js 348 B

123456789101112
  1. (function() {
  2. var socketId = multiplex.id;
  3. var socket = io.connect(multiplex.url);
  4. socket.on(multiplex.id, function(data) {
  5. // ignore data from sockets that aren't ours
  6. if (data.socketId !== socketId) { return; }
  7. if( window.location.host === 'localhost:1947' ) return;
  8. Reveal.navigateTo(data.indexh, data.indexv, 'remote');
  9. });
  10. }());