diff options
author | Holger Levsen <holger@layer-acht.org> | 2017-08-04 09:44:48 -0400 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-08-04 09:44:48 -0400 |
commit | be428000a5dd8081113323131cbc5af837a15e05 (patch) | |
tree | a7f80a75307a74eae8bf5e90a7418b1e64e3b08a /userContent/presentations/2017-08-07-DebConf17/plugin/multiplex/client.js | |
parent | 7db8bb39699f6aff6d4e4e2c3a1c0c0712719b5b (diff) | |
download | jenkins.debian.net-be428000a5dd8081113323131cbc5af837a15e05.tar.xz |
copied from ../2016-11-30-Profitbricks without any changes yet
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'userContent/presentations/2017-08-07-DebConf17/plugin/multiplex/client.js')
-rw-r--r-- | userContent/presentations/2017-08-07-DebConf17/plugin/multiplex/client.js | 13 |
1 files changed, 13 insertions, 0 deletions
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); + }); +}()); |