Reputation: 23811
I want to create reveal.js presentations using the slides.com interface to save time, and then add the multiplex functionality to allow controlling of the presentation on other devices. To do this, I edited the initialize options and dependencies:
Reveal.initialize({
multiplex:{
secret: null, // Obtained from the socket.io server. Gives this (the master) control of the presentation
id: ID,
url: NODEURL // Location of socket.io server
},
dependencies: [
{ src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.10/socket.io.min.js', async: true },
{ src: 'reveal/plugin/multiplex/client.js', async: true },
]
});
But get this error in the console, that seems deeply buried in the reveal code:
Uncaught ReferenceError: head is not defined (index: 46)
When I produce this manually in reveal, I'm able to get the multiplex functionality (controller, listener). But this version breaks (link). Is there another way of adding dependencies to the presentations produced from slides.com?
Upvotes: 6
Views: 2093
Reputation: 1362
reveal.js relies on head.js for dependency loading. However head.js is not included in the exported presentation from Slides since that doesn't load any dependencies.
To fix this you'll need to add head.js to your presentation:
<script src="https://cdnjs.cloudflare.com/ajax/libs/headjs/0.96/head.min.js"></script>
Upvotes: 15