具有reveal.js幻灯片的Multiplex功能 [英] Multiplex functionality with reveal.js slides

查看:75
本文介绍了具有reveal.js幻灯片的Multiplex功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用slides.com reveal.js 演示文稿http://slides.com/ =nofollow>界面以节省时间,然后添加 Multiplex 功能,允许控制其他设备上的演示文稿。为此,我编辑了初始化选项和依赖项:

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)

当我在透视中手动生成它时,我能够获得Multiplex功能(控制器听众)。但是这个版本中断了(链接)。是否有另一种方法可以将依赖项添加到slides.com生成的演示文稿中?

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?

推荐答案

reveal.js依赖于 head.js 用于依赖加载。但是,head.js不包含在Slides的导出演示文稿中,因为它不会加载任何依赖项。

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.

要修复此问题,您需要将head.js添加到你的演讲:

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>

这篇关于具有reveal.js幻灯片的Multiplex功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆