summaryrefslogtreecommitdiff
path: root/cardiff2015/slides/plugin/multiplex/client.js
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-06-21 11:21:55 +0200
committervarac <varacanero@zeromail.org>2016-06-21 11:21:55 +0200
commit13fb30c8fc72e45a2dfb170322deff4b9ffd82bc (patch)
tree8510c80b4d2efe6fd126bdc1c0930683cabf19f1 /cardiff2015/slides/plugin/multiplex/client.js
parent2ec9781e16e0df256fdb9c47ff099bbf58c1a40d (diff)
added cardiff2015 slides
Diffstat (limited to 'cardiff2015/slides/plugin/multiplex/client.js')
-rw-r--r--cardiff2015/slides/plugin/multiplex/client.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/cardiff2015/slides/plugin/multiplex/client.js b/cardiff2015/slides/plugin/multiplex/client.js
new file mode 100644
index 0000000..e6179f6
--- /dev/null
+++ b/cardiff2015/slides/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.slide(data.indexh, data.indexv, data.indexf, 'remote');
+ });
+}());