aboutsummaryrefslogtreecommitdiff
path: root/plugin/multiplex
diff options
context:
space:
mode:
authorDavid Banham <david@banham.id.au>2013-03-08 11:51:58 +1100
committerDavid Banham <david@banham.id.au>2013-03-08 12:43:18 +1100
commit580a72c4449c57cb743e09f44eeeb374cd00f172 (patch)
tree684a7f7920e903f6372e590d606aede0b09fb287 /plugin/multiplex
parent61c229a4f969a0720085c2710f8a7cfd8a12b4a6 (diff)
downloadfosdem-2018-presentation-580a72c4449c57cb743e09f44eeeb374cd00f172.tar
fosdem-2018-presentation-580a72c4449c57cb743e09f44eeeb374cd00f172.tar.gz
Bring multiplex up to date
Diffstat (limited to 'plugin/multiplex')
-rw-r--r--plugin/multiplex/client.js3
-rw-r--r--plugin/multiplex/index.js7
-rw-r--r--plugin/multiplex/master.js3
3 files changed, 4 insertions, 9 deletions
diff --git a/plugin/multiplex/client.js b/plugin/multiplex/client.js
index 6fc0d4d..cb7b27a 100644
--- a/plugin/multiplex/client.js
+++ b/plugin/multiplex/client.js
@@ -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');
});
}());
diff --git a/plugin/multiplex/index.js b/plugin/multiplex/index.js
index 4665639..aa8a55a 100644
--- a/plugin/multiplex/index.js
+++ b/plugin/multiplex/index.js
@@ -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();
diff --git a/plugin/multiplex/master.js b/plugin/multiplex/master.js
index 3704fa4..a896244 100644
--- a/plugin/multiplex/master.js
+++ b/plugin/multiplex/master.js
@@ -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);
} );
}());