From 976536d15ec7859313dcbce33c97fdfd69c00eb1 Mon Sep 17 00:00:00 2001 From: David Banham Date: Sun, 5 Aug 2012 23:48:55 +1000 Subject: [PATCH] Added multiplexing server --- README.md | 12 +++- index.html | 20 ++++++- js/reveal.js | 20 ++++--- package.json | 46 ++++++++------ plugin/multiplex/client.js | 12 ++++ plugin/multiplex/index.js | 62 +++++++++++++++++++ plugin/multiplex/master.js | 32 ++++++++++ plugin/multiplex/notes.html | 109 ++++++++++++++++++++++++++++++++++ plugin/speakernotes/client.js | 2 +- 9 files changed, 285 insertions(+), 30 deletions(-) create mode 100644 plugin/multiplex/client.js create mode 100644 plugin/multiplex/index.js create mode 100644 plugin/multiplex/master.js create mode 100644 plugin/multiplex/notes.html diff --git a/README.md b/README.md index 0e6da25c..8c583340 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,16 @@ By default, the slides will be served at [localhost:1947](http://localhost:1947) You can change the appearance of the speaker notes by editing the file at `plugin/speakernotes/notes.html`. +### Multiplexing + +The multiplex plugin allows your audience to view the slides on their own phone, tablet or laptop. As the master navigates the slides, all clients will update in real time. See a demo at [http://revealjs.jit.su/](http://revealjs.jit.su) + +Configuration is via the multiplex object in index.html. To generate unique secret and token values, visit [revealjs.jit.su/token](revealjs.jit.su/token) + +multiplex.secret should only be configured on those pages you wish to be able to control slide navigatoin for all clients. Multi-master configurations work, but if you don't wish your audience to be able to control your slides, set the secret to null. In this master/slave setup, you should create a publicly accessible page with secret set to null, and a protected page containing your secret. + +You are very welcome to use the server running at reveal.jit.su, however availability and stability are not guaranteed. For anything mission critical I recommend you run your own server. It is simple to deploy to nodejitsu or run on your own environment. + ### Known Issues - The notes page is supposed to show the current slide and the next slide, but when it first starts, it always shows the first slide in both positions. @@ -286,4 +296,4 @@ You can change the appearance of the speaker notes by editing the file at `plugi MIT licensed -Copyright (C) 2012 Hakim El Hattab, http://hakim.se \ No newline at end of file +Copyright (C) 2012 Hakim El Hattab, http://hakim.se diff --git a/index.html b/index.html index c6decbfe..95bcd272 100644 --- a/index.html +++ b/index.html @@ -278,6 +278,15 @@ function linkify( selector ) { + + + + + diff --git a/plugin/speakernotes/client.js b/plugin/speakernotes/client.js index 1aba8b8c..9f681737 100644 --- a/plugin/speakernotes/client.js +++ b/plugin/speakernotes/client.js @@ -2,7 +2,7 @@ // don't emit events from inside the previews themselves if ( window.location.search.match( /receiver/gi ) ) { return; } - var socket = io.connect(window.location.origin); + var socket = io.connect('127.0.0.1:1947'); var socketId = Math.random().toString().slice(2); console.log('View slide notes at ' + window.location.origin + '/notes/' + socketId);