summaryrefslogtreecommitdiffstats
path: root/presentations/2016-11-30-Profitbricks/plugin/multiplex/client.js
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-11-24 02:01:54 +0100
committerHolger Levsen <holger@layer-acht.org>2016-11-24 02:01:54 +0100
commite9fa05b0a068fde0197ea01f2ff31e2513b7965f (patch)
treebcea53e8c377b330fb5cda1e1cc47e15c147e1d3 /presentations/2016-11-30-Profitbricks/plugin/multiplex/client.js
parent33db20cf1eacb112a71657056e02b984649690d5 (diff)
downloadjenkins.debian.net-e9fa05b0a068fde0197ea01f2ff31e2513b7965f.tar.xz
copied from git.debian.org/git/reproducible/presentations.git / 2016-11-13-MiniDebConfCambridge there, Copyright & thanks to Chris Lamb
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'presentations/2016-11-30-Profitbricks/plugin/multiplex/client.js')
-rw-r--r--presentations/2016-11-30-Profitbricks/plugin/multiplex/client.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/presentations/2016-11-30-Profitbricks/plugin/multiplex/client.js b/presentations/2016-11-30-Profitbricks/plugin/multiplex/client.js
new file mode 100644
index 00000000..3ffd1e03
--- /dev/null
+++ b/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);
+ });
+}());