Added multiplexing server
This commit is contained in:
20
index.html
20
index.html
@ -278,6 +278,15 @@ function linkify( selector ) {
|
||||
<script src="lib/js/head.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
var multiplex = {
|
||||
id: null
|
||||
, secret: null
|
||||
, url: 'revealjs.jit.su'
|
||||
};
|
||||
|
||||
var notes = false;
|
||||
|
||||
head.ready( function() {
|
||||
|
||||
// Fires when a slide with data-state=customevent is activated
|
||||
@ -326,11 +335,20 @@ function linkify( selector ) {
|
||||
|
||||
// If we're runnning the notes server we need to include some additional JS
|
||||
// TODO Is there a better way to determine if we're running the notes server?
|
||||
if( window.location.host === 'localhost:1947' ) {
|
||||
if( window.location.host === 'localhost:1947' || notes === true) {
|
||||
scripts.push( 'socket.io/socket.io.js' );
|
||||
scripts.push( 'plugin/speakernotes/client.js' );
|
||||
}
|
||||
|
||||
if( multiplex.id !== null ) {
|
||||
scripts.push( 'socket.io/socket.io.js' );
|
||||
scripts.push( 'plugin/multiplex/client.js' );
|
||||
|
||||
if( multiplex.secret !== null ) {
|
||||
scripts.push( 'plugin/multiplex/master.js' );
|
||||
}
|
||||
}
|
||||
|
||||
// Load the scripts and, when completed, initialize reveal.js
|
||||
head.js.apply( null, scripts );
|
||||
|
||||
|
Reference in New Issue
Block a user