diff --git a/inst/reveal.js-3.3.0/plugin/multiplex/client.js b/inst/reveal.js-3.3.0/plugin/multiplex/client.js
new file mode 100644
index 0000000..3ffd1e0
--- /dev/null
+++ b/inst/reveal.js-3.3.0/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);
+	});
+}());
diff --git a/inst/reveal.js-3.3.0/plugin/multiplex/index.js b/inst/reveal.js-3.3.0/plugin/multiplex/index.js
new file mode 100644
index 0000000..8195f04
--- /dev/null
+++ b/inst/reveal.js-3.3.0/plugin/multiplex/index.js
@@ -0,0 +1,64 @@
+var http        = require('http');
+var express		= require('express');
+var fs			= require('fs');
+var io			= require('socket.io');
+var crypto		= require('crypto');
+
+var app       	= express();
+var staticDir 	= express.static;
+var server    	= http.createServer(app);
+
+io = io(server);
+
+var opts = {
+	port: process.env.PORT || 1948,
+	baseDir : __dirname + '/../../'
+};
+
+io.on( 'connection', function( socket ) {
+	socket.on('multiplex-statechanged', function(data) {
+		if (typeof data.secret == 'undefined' || data.secret == null || data.secret === '') return;
+		if (createHash(data.secret) === data.socketId) {
+			data.secret = null;
+			socket.broadcast.emit(data.socketId, data);
+		};
+	});
+});
+
+[ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) {
+	app.use('/' + dir, staticDir(opts.baseDir + dir));
+});
+
+app.get("/", function(req, res) {
+	res.writeHead(200, {'Content-Type': 'text/html'});
+
+	var stream = fs.createReadStream(opts.baseDir + '/index.html');
+	stream.on('error', function( error ) {
+		res.write('<style>body{font-family: sans-serif;}</style><h2>reveal.js multiplex server.</h2><a href="/token">Generate token</a>');
+		res.end();
+	});
+	stream.on('readable', function() {
+		stream.pipe(res);
+	});
+});
+
+app.get("/token", function(req,res) {
+	var ts = new Date().getTime();
+	var rand = Math.floor(Math.random()*9999999);
+	var secret = ts.toString() + rand.toString();
+	res.send({secret: secret, socketId: createHash(secret)});
+});
+
+var createHash = function(secret) {
+	var cipher = crypto.createCipher('blowfish', secret);
+	return(cipher.final('hex'));
+};
+
+// Actually listen
+server.listen( opts.port || null );
+
+var brown = '\033[33m',
+	green = '\033[32m',
+	reset = '\033[0m';
+
+console.log( brown + "reveal.js:" + reset + " Multiplex running on port " + green + opts.port + reset );
\ No newline at end of file
diff --git a/inst/reveal.js-3.3.0/plugin/multiplex/master.js b/inst/reveal.js-3.3.0/plugin/multiplex/master.js
new file mode 100644
index 0000000..4becad0
--- /dev/null
+++ b/inst/reveal.js-3.3.0/plugin/multiplex/master.js
@@ -0,0 +1,31 @@
+(function() {
+
+	// Don't emit events from inside of notes windows
+	if ( window.location.search.match( /receiver/gi ) ) { return; }
+
+	var multiplex = Reveal.getConfig().multiplex;
+
+	var socket = io.connect( multiplex.url );
+
+	function post() {
+
+		var messageData = {
+			state: Reveal.getState(),
+			secret: multiplex.secret,
+			socketId: multiplex.id
+		};
+
+		socket.emit( 'multiplex-statechanged', messageData );
+
+	};
+
+	// Monitor events that trigger a change in state
+	Reveal.addEventListener( 'slidechanged', post );
+	Reveal.addEventListener( 'fragmentshown', post );
+	Reveal.addEventListener( 'fragmenthidden', post );
+	Reveal.addEventListener( 'overviewhidden', post );
+	Reveal.addEventListener( 'overviewshown', post );
+	Reveal.addEventListener( 'paused', post );
+	Reveal.addEventListener( 'resumed', post );
+
+}());
\ No newline at end of file
diff --git a/inst/reveal.js-3.3.0/plugin/multiplex/package.json b/inst/reveal.js-3.3.0/plugin/multiplex/package.json
new file mode 100644
index 0000000..368bfd6
--- /dev/null
+++ b/inst/reveal.js-3.3.0/plugin/multiplex/package.json
@@ -0,0 +1,19 @@
+{
+  "name": "reveal-js-multiplex",
+  "version": "1.0.0",
+  "description": "reveal.js multiplex server",
+  "homepage": "http://lab.hakim.se/reveal-js",
+  "scripts": {
+    "start": "node index.js"
+  },
+  "engines": {
+    "node": "~4.1.1"
+  },
+  "dependencies": {
+    "express": "~4.13.3",
+    "grunt-cli": "~0.1.13",
+    "mustache": "~2.2.1",
+    "socket.io": "~1.3.7"
+  },
+  "license": "MIT"
+}
