3

I am exploring WebRTC based solutions for video conferencing. Have found Jitsi to be one of the prominent candidate to look around from various frameworks.

Example Code:

<!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>

I am using example.js from Jitsi-meet Git Hub Example with below changes:

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'
};

Video gets launched on the browser bu I am not able to get

  1. Connection Callback -- onConnectionSuccess never gets called. I did put debugger there.
  2. Getting error on console 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.

EDIT:

After adding https: to bosh:'//beta.meet.jit.si/http-bind'. The CORS error is gone and also onConnectionSuccess is working fine.

Still, Need some pointers on working Conference example.

I am trying to achieve something similar to below example: jitsi-meet custom GUI

Hardik Mishra
  • 14,779
  • 9
  • 61
  • 96
  • Well, After adding 'https:' to `bosh:'//beta.meet.jit.si/http-bind'`. The CORS error is gone and also `onConnectionSuccess ` is working fine. – Hardik Mishra Jan 25 '19 at 16:48
  • As I know, you should install jitsi on your own server, if you want to customize it: https://jitsi.org/news/new-tutorial-installing-jitsi-meet-on-your-own-linux-server/ – Reza Amya Jan 27 '19 at 15:33
  • Please have a look at this answer: https://stackoverflow.com/a/63991215/8810941. – Pavindu Nov 17 '20 at 05:16

0 Answers0