JJ Allaire | efa6ad4 | 2016-01-30 13:12:05 -0500 | [diff] [blame] | 1 | (function() { |
2 | var multiplex = Reveal.getConfig().multiplex; | ||||
3 | var socketId = multiplex.id; | ||||
4 | var socket = io.connect(multiplex.url); | ||||
5 | |||||
6 | socket.on(multiplex.id, function(data) { | ||||
7 | // ignore data from sockets that aren't ours | ||||
8 | if (data.socketId !== socketId) { return; } | ||||
9 | if( window.location.host === 'localhost:1947' ) return; | ||||
10 | |||||
11 | Reveal.setState(data.state); | ||||
12 | }); | ||||
13 | }()); |