diff options
author | Holger Levsen <holger@layer-acht.org> | 2016-11-30 21:24:36 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-11-30 21:24:36 +0100 |
commit | fa33733fc6e8050631e6e09202ca92047c98697d (patch) | |
tree | 96143574df7e31d259328144114aaf3243136649 /userContent/presentations/2016-11-30-Profitbricks/plugin/multiplex/client.js | |
parent | f794313de062993754e7274ccd5061ab0109bb3b (diff) | |
download | jenkins.debian.net-fa33733fc6e8050631e6e09202ca92047c98697d.tar.xz |
presenation: move to userContent/ so it becomes visible
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'userContent/presentations/2016-11-30-Profitbricks/plugin/multiplex/client.js')
-rw-r--r-- | userContent/presentations/2016-11-30-Profitbricks/plugin/multiplex/client.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/userContent/presentations/2016-11-30-Profitbricks/plugin/multiplex/client.js b/userContent/presentations/2016-11-30-Profitbricks/plugin/multiplex/client.js new file mode 100644 index 00000000..3ffd1e03 --- /dev/null +++ b/userContent/presentations/2016-11-30-Profitbricks/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); + }); +}()); |