Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reveal.js multiplexing doesn't work

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!

like image 577
thomastuts Avatar asked Apr 17 '13 11:04

thomastuts


1 Answers

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!

like image 92
HdK Avatar answered Oct 03 '22 21:10

HdK