From be428000a5dd8081113323131cbc5af837a15e05 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 4 Aug 2017 09:44:48 -0400 Subject: copied from ../2016-11-30-Profitbricks without any changes yet Signed-off-by: Holger Levsen --- .../2017-08-07-DebConf17/plugin/multiplex/client.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 userContent/presentations/2017-08-07-DebConf17/plugin/multiplex/client.js (limited to 'userContent/presentations/2017-08-07-DebConf17/plugin/multiplex/client.js') diff --git a/userContent/presentations/2017-08-07-DebConf17/plugin/multiplex/client.js b/userContent/presentations/2017-08-07-DebConf17/plugin/multiplex/client.js new file mode 100644 index 00000000..3ffd1e03 --- /dev/null +++ b/userContent/presentations/2017-08-07-DebConf17/plugin/multiplex/client.js @@ -0,0 +1,13 @@ +(function() { + var multiplex = Reveal.getConfig().multiplex; + var socketId = multiplex.id; + var socket = io.connect(multiplex.url); + + socket.on(multiplex.id, function(data) { + // ignore data from sockets that aren't ours + if (data.socketId !== socketId) { return; } + if( window.location.host === 'localhost:1947' ) return; + + Reveal.setState(data.state); + }); +}()); -- cgit v1.2.3-70-g09d2