Reveal.js multiplexing doesn't work
Asked Answered
P

2

6

I followed the examples at the following link: https://github.com/hakimel/reveal.js#multiplexing, but somehow the multiplexing doesn't work -- the clients don't update when the master slide updates. I've tried it with both the reveal.js demo socket.io server, and tried hosting my own.

Neither of those options work, and I'm pretty sure I've configured them right. Here's my config code for both:

master/index.html

  Reveal.initialize({
    controls: true,
    progress: true,
    history: true,
    center: true,

    multiplex: {
      id: 'e2bc6e79f19fbe63',
      secret: '13661966883862075064',
      url: 'revealjs.jit.su:80'
    },

    dependencies: [
      { src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.10/socket.io.min.js', async: true },
      { src: 'plugin/multiplex/client.js', async: true },
      { src: 'plugin/multiplex/master.js', async: true },
    ]
    // { src: 'plugin/search/search.js', async: true, condition: function() { return !!document.body.classList; } }
    // { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }
  });

client/index.html

  Reveal.initialize({
            controls: true,
            progress: true,
            history: true,
            center: true,

    multiplex: {
      id: 'e2bc6e79f19fbe63',
      secret: null,
      url: 'revealjs.jit.su:80'
    },

    dependencies: [
      { src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.10/socket.io.min.js', async: true },
      { src: 'plugin/multiplex/client.js', async: true },
      { src: 'plugin/multiplex/master.js', async: true },
    ]
    // { src: 'plugin/search/search.js', async: true, condition: function() { return !!document.body.classList; } }
  });

Obviously, I went to http://revealjs.jit.su/token to get a token and secret, and the client secret is null so they cannot control the presentation themselves. However, when I go to another slide in the master, the client doesn't follow at all despite being configured to do so. Both master and client are hosted locally under XAMPP (I've also tried hosting the master with node static, but same results).

Has anyone got any idea on how to solve this? Any help is much appreciated!

Possie answered 17/4, 2013 at 11:15 Comment(2)
Curious, have you found a solution ? I have been trying for last 3 hours and it doesn't workAntiperiodic
Yep, I can't get it working either. I get a "Bad Request" response back from the socket io serverBrunette
B
1

You have to set some extra dependencies (to make the socket request actually work)

{ src: 'http://revealjs.jit.su/socket.io/socket.io.js', async: true }, 
{ src: 'plugin/multiplex/client.js', async: true },
{ src: 'plugin/multiplex/master.js', async: true }

Make sure your plugin folder does contain the multiplex files!

Benison answered 22/4, 2013 at 13:0 Comment(0)
C
0

http://revealjs.jit.su/ is not working anymore. Its better to use localhost first for you socket.io server Also can you show you console logs

Confident answered 24/1, 2014 at 9:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.