From f51b7370f030c5cd1235fa7a23514a7e1ccef2dd Mon Sep 17 00:00:00 2001 From: xnum Date: Mon, 23 Nov 2015 20:38:26 +0800 Subject: Add Slide Mode using reveal.js and some part of reveal-md --- public/plugin/multiplex/client.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 public/plugin/multiplex/client.js (limited to 'public/plugin/multiplex/client.js') diff --git a/public/plugin/multiplex/client.js b/public/plugin/multiplex/client.js new file mode 100644 index 00000000..e6179f6d --- /dev/null +++ b/public/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'); + }); +}()); -- cgit v1.2.3