Bring multiplex up to date
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
(function() {
|
||||
var multiplex = window.globals.multiplex;
|
||||
var socketId = multiplex.id;
|
||||
var socket = io.connect(multiplex.url);
|
||||
|
||||
@ -7,6 +8,6 @@
|
||||
if (data.socketId !== socketId) { return; }
|
||||
if( window.location.host === 'localhost:1947' ) return;
|
||||
|
||||
Reveal.navigateTo(data.indexh, data.indexv, 'remote');
|
||||
Reveal.slide(data.indexh, data.indexv, null, 'remote');
|
||||
});
|
||||
}());
|
||||
|
@ -15,7 +15,6 @@ var opts = {
|
||||
|
||||
io.sockets.on('connection', function(socket) {
|
||||
socket.on('slidechanged', function(slideData) {
|
||||
console.log(slideData);
|
||||
if (createHash(slideData.secret) === slideData.socketId) {
|
||||
slideData.secret = null;
|
||||
socket.broadcast.emit(slideData.socketId, slideData);
|
||||
@ -32,12 +31,6 @@ app.configure(function() {
|
||||
app.get("/", function(req, res) {
|
||||
fs.createReadStream(opts.baseDir + '/index.html').pipe(res);
|
||||
});
|
||||
app.get("/fixed.html", function(req, res) {
|
||||
fs.createReadStream(opts.baseDir + '/fixed.html').pipe(res);
|
||||
});
|
||||
app.get("/fixedmaster.html", function(req, res) {
|
||||
fs.createReadStream(opts.baseDir + '/fixedmaster.html').pipe(res);
|
||||
});
|
||||
|
||||
app.get("/token", function(req,res) {
|
||||
var ts = new Date().getTime();
|
||||
|
@ -1,6 +1,7 @@
|
||||
(function() {
|
||||
// don't emit events from inside the previews themselves
|
||||
if ( window.location.search.match( /receiver/gi ) ) { return; }
|
||||
var multiplex = window.globals.multiplex;
|
||||
|
||||
var socket = io.connect(multiplex.url);
|
||||
|
||||
@ -27,6 +28,6 @@
|
||||
socketId : multiplex.id
|
||||
};
|
||||
|
||||
if( event.origin !== 'remote') socket.emit('slidechanged', slideData);
|
||||
if( typeof event.origin === 'undefined' && event.origin !== 'remote') socket.emit('slidechanged', slideData);
|
||||
} );
|
||||
}());
|
||||
|
Reference in New Issue
Block a user