reveal/multiplex

Unable to control a client presentation

Closed this issue · 1 comments

I'm trying to get the Multiplex plugin working, and although I followed the instructions in the README I'm not able to control a client presentation from a master presentation when using https://reveal-multiplex.glitch.me/ as the socket.io server (or when using my own socket.io server).

I am running the master presentation locally via node node_modules/reveal-multiplex - accessed on http://localhost:1948/ - is that correct? In that case, what purpose does npm install node-static && static serve?

My client presentation is deployed on GitHub pages here: https://burningdog.github.io/php-api-comparison-presentation/index.html and I've opened that url in a different browser.

I am using https://reveal-multiplex.glitch.me/ as the socket.io server and generated a token there. In my master presentation the multiplex.secret has the correct value and in the client presentation it is null.

Then, in my master presentation I advance a slide, switch browsers to the client presentation. I expected the slide there to advance too but it's still on the first slide.

Is this not working because https://reveal-multiplex.glitch.me/ is not available? If so, I'd expect to see some kind of error message in the console but there are none.

In addition, the README says that we can see a demo of a reveal.js presentation at https://reveal-multiplex.glitch.me/ but there is not one there. I'm happy to put together a PR to update this in the README, but I first need to solve this issue!

What am I doing wrong? I even set up my own socket.io server, by forking your glitch.me project, creating a new access token and changing the urls in Reveal.initialize to point to that server...and still I can't control a client presentation.

Ok, I got this working now, by putting in console.logs on the glitch app and seeing how the socket.io server was handling events. I missed the difference between including master.js on the master presentation and client.js on the client-side.

  // Don't forget to add the dependencies
  dependencies: [
    { src: 'https://reveal-multiplex.glitch.me/socket.io/socket.io.js', async: true },
    // On the master presentation
    // { src: 'https://reveal-multiplex.glitch.me/master.js', async: true }
    // On the client presentation
    // { src: 'https://reveal-multiplex.glitch.me/client.js', async: true }
  ]