client.js 396 B

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