在jitsi-meet中创建视频会议示例

时间:2019-01-23 18:19:00

标签: jitsi jitsi-meet

我正在探索基于WebRTC的视频会议解决方案。发现Jitsi是从各种框架环顾四周的杰出候选人之一。

示例代码:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <?php 
        $webroot =  '/openemr-local';
     ?>
    <script src="<?php echo $webroot ?>/jitsi-meet/libs/lib-jitsi-meet.min.js"></script>
    <script src="<?php echo $webroot ?>/jitsi-meet/libs/jquery-2.1.1.min.js"></script>
    <script src="<?php echo $webroot ?>/jitsi-meet/libs/strophe/strophe.js"></script>
    <script src="<?php echo $webroot ?>/jitsi-meet/libs/strophe/strophe.disco.min.js?v=1"></script>
    <script type="text/javascript" src="<?php echo $webroot ?>/jitsi-meet/example.js"></script>
</head>
<body>
    <div class="container">
        <div id="jitsi-test">
            <span>Join Meeting Name</span><input type="text" id="meetingroom" name="meetingroom"/>
            <button id="join" name="join" onclick="joinMeeting()">Join Me</button>
            <button id="disconnect" name="disconnect" onclick="unload()">Disconnect</button>
        </div>  
        <div id="video-container">
        </div>     
    </div>
</body>
</html>

我正在使用Jitsi-meet Git Hub Example中的example.js,并进行以下更改:

const options = {
    hosts: {
        domain: 'beta.meet.jit.si',

        muc: 'conference.beta.meet.jit.si', // FIXME: use XEP-0030
        focus: 'focus.beta.meet.jit.si',
    },
    bosh:'//beta.meet.jit.si/http-bind', // FIXME: use xep-0156 for that
    // The name of client node advertised in XEP-0115 'c' stanza
    clientNode: 'http://jitsi.org/jitsimeet'
};

无法在浏览器上启动视频

  1. 连接回调-onConnectionSuccess从未被调用。我确实放了 调试器。
  2. 在控制台上出现错误 Access to XMLHttpRequest at 'http://beta.meet.jit.si/http-bind' from origin 'http://localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

编辑:

https:添加到bosh:'//beta.meet.jit.si/http-bind'之后。 CORS错误消失了,并且onConnectionSuccess正常工作。

仍然,需要一些有关工作会议示例的提示。

我正在尝试实现类似于以下示例的内容: jitsi-meet custom GUI

0 个答案:

没有答案