From cc869cb6296c0fa6c13b3978d35cf5007765c7a3 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 8 Mar 2013 19:16:29 -0500 Subject: [PATCH] update multiplex setup instructions (#98) --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++------------- index.html | 12 +----------- 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index f9acc25..8b363ab 100644 --- a/README.md +++ b/README.md @@ -344,17 +344,6 @@ Reveal.toggleOverview(); ### Fullscreen mode Just press »F« on your keyboard to show your presentation in fullscreen mode. Press the »ESC« key to exit fullscreen mode. -## 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 ## PDF Export @@ -392,8 +381,16 @@ By default notes are written using standard HTML, see below, but you can add a ` In some cases it can be desirable to run notes on a separate device from the one you're presenting on. The Node.js-based notes plugin lets you do this using the same note definitions as its client side counterpart. Include the requried scripts by adding the following dependencies: ```javascript -{ src: '/socket.io/socket.io.js', async: true }, -{ src: 'plugin/notes-server/client.js', async: true } +Reveal.initialize({ + + ... + + dependencies: [ + { src: 'socket.io/socket.io.js', async: true }, + { src: 'plugin/notes-server/client.js', async: true } + ] + +}); ``` Then: @@ -403,6 +400,38 @@ Then: 3. Run ```node plugin/notes-server``` +## 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 ```Reveal.initialize```. To generate unique secret and token values, visit [revealjs.jit.su/token](revealjs.jit.su/token). Below is an example configuration with the multiplex plugin enabled: + +``` +Reveal.initialize({ + + ... + + // Generate a unique id and secret at revealjs.jit.su/token + multiplex: { + id: '', + secret: '', + url: 'revealjs.jit.su:80' + }, + + dependencies: [ + { src: 'socket.io/socket.io.js', async: true, condition: function() { return !!document.body.classList; } }, + { src: 'plugin/multiplex/client.js', async: true, condition: function() { return !!document.body.classList; } }, + { src: 'plugin/multiplex/master.js', async: true, condition: function() { return !!document.body.classList; } }, + ] + +}); +``` + +```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. + + ## Theming The framework comes with a few different themes included: diff --git a/index.html b/index.html index 5aff2c1..bc2f360 100644 --- a/index.html +++ b/index.html @@ -359,13 +359,6 @@ function linkify( selector ) { theme: Reveal.getQueryHash().theme, // available themes are in /css/theme transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none - // Generate a unique id and secret at http://revealjs.jit.su/token - multiplex: { - id: '', - secret: '', - url: 'revealjs.jit.su:80' - }, - // Optional libraries used to extend on reveal.js dependencies: [ { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, @@ -373,11 +366,8 @@ function linkify( selector ) { { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, { src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }, - // { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }, - // { src: 'socket.io/socket.io.js', async: true, condition: function() { return !!document.body.classList; } }, - // { src: 'plugin/multiplex/client.js', async: true, condition: function() { return !!document.body.classList; } }, - // { src: 'plugin/multiplex/master.js', async: true, condition: function() { return !!document.body.classList; } }, { src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } } + // { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } } ] }); -- 2.26.2