Regarding JItsi External API

Hello @All

I have implemented Jitsi External API in my web. everything going well but I was facing 3 issues
#1. I can’t able to set up only one moderator.
#2. I can’t able to get the Email Addresses of the Other participants.
#3. I can’t able to shear the screen of local participants.

Here what I have write in Code:

    var domain = "meet.jit.si";
    var options = {
        userInfo: {
            email: '{{Auth::user()->email}}',
            displayName: '{{Auth::user()->UserDetails->first_name}} {{Auth::user()->UserDetails->last_name}}',
            moderator: true,
        },
        roomName: '{{$class->class_name}}',
        // width: "100%",
        height: 630,
        parentNode: document.querySelector('#meet'),
        configOverwrite: {
            host:{
                anonymousdomain: 'guest.meet.jit.si',
                muc: 'conference.jitsi-meet.example.com',
                authdomain: 'meet.jit.si'
            },
            toolbarConfig: {
                alwaysVisible: true,
            },
            desktopSharingChromeDisabled: false,
            desktopSharingFirefoxDisabled: false,
            startScreenSharing: true,
            buttonsWithNotifyClick: ['hangup'],
            prejoinConfig: {
                enabled: true
            },
            bosh: '//meet.jit.si/http-bind',
            enableClosePage: false,
        },
        interfaceConfigOverwrite: { 
            SHOW_PROMOTIONAL_CLOSE_PAGE: false,
            DISABLE_DOMINANT_SPEAKER_INDICATOR: true,
            SHOW_WATERMARK_FOR_GUESTS:false, 
        },
    } 
    var api = new JitsiMeetExternalAPI(domain, options);

Please Help me asap.

Thanks in Advance.

I don’t think you can set the affiliation like this.

1 Like

You cannot control who gets moderator access by just setting a flag on the client side. That would be a security issue.

Moderator assignment is handle on the server side; there are many ways to configure this based on your requirements if you have your own server.

If you use meet.jit.si, then you have no control over this – all participants will be promoted to moderators.

Not sure what you are trying to achieve here.

If you are asking if you can retrieve email address of all participants in a room on meet.jit.si, then no, that should not be possible since that would be a privacy breach.

startScreenSharing option is no longer support since browsers will no longer allow a page to start screen sharing without user interaction.

1 Like

Thanks

How can I get screen sharing option in my local server using jitsi meet external API?

I need screen sharing option here please help me

Screen sharing should be available by default. What browser are you using?

Yes it’s visible in meet.jit.si domain only but i need it in my local server
Chrome and firefox

Screensharing should be enabled by default, even for your own deployments.

Have you by any chance customised toolbarButtons in your config.js or in External API configOverwrite?

Have you customised the web app?

Is this the actual code you used, or have you just replaced your domain with meet.jit.si here?
Also, I don’t think you can override host and bosh values using config override.

I have not deployed the server. I have used external api for this

So you want to host a meeting on your own site, and you don’t have your own server and want to use meet.jit.si as the Jitsi server?

That’s doable, but you should be aware that using meet.jit.si means you cannot control who is moderator. And you cannot change or hide any branding info as specified in the terms of use.

I’m not sure where you got the code example from, but a lot of the configs you used are not applicable (or no longer applicable).

Start with something like this and build up from there.

const domain = 'meet.jit.si';
const options = {
  userInfo: {
    email: 'test@email.com',
    displayName: 'Test User',
  },
  roomName: 'TestRoomName128376123',
  parentNode: document.querySelector('#meet'),
  configOverwrite: {
    toolbarConfig: {
      alwaysVisible: true,
    },

  },
};
const api = new JitsiMeetExternalAPI(domain, options);

You can see this exact code running here: JSFiddle

1 Like

Yes @shawn

Yes, I know that things. We can’t change the jitsi config.

Okay I will check with this code and let you know it’s working or not

@shawn Thanks for helping me

Uploading: 16704715537993841546183114157070.jpg…

I mad change in my code but I didn’t get screen share option.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src='[https://meet.jit.si/external_api.js'></script>](https://meet.jit.si/external_api.js'></script>)
    <script src="[https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>](https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>)
</head>
<body>
    <div id="meet"></div>
</body>
<script src="[https://code.jquery.com/jquery-3.5.1.min.js"></script>](https://code.jquery.com/jquery-3.5.1.min.js"></script>)
{{-- <script src="[https://meet.jit.si/libs/lib-jitsi-meet.min.js"></script>](https://meet.jit.si/libs/lib-jitsi-meet.min.js"></script>) --}}
<script type="text/javascript">
    "use strict";

    var localParticipantId = "";
    var domain = "meet.jit.si";
    var options = {
        userInfo: {
            email: '{{Auth::user()->email}}',
            displayName: '{{Auth::user()->UserDetails->first_name}} {{Auth::user()->UserDetails->last_name}}',
        },
        roomName: '{{$class->class_name}}',
        height🈯 document.querySelector('#meet'),
        configOverwrite: {
            toolbarConfig: {
                alwaysVisible: true,
            },
    } 
    var api = new JitsiMeetExternalAPI(domain, options);

</script>

Here is new sample code.

How are you accessing the file via http or https?

2 Likes

Using http

How can I mange only one Host in call?

The Host have all access like accept the join Request of participates, end the call etc.

Will check with https latter

Thank you so much, @damencho sir

Webrtc requires https in order to work.

1 Like

Okay, will check with HTTPS. Thanks @damencho Sir for Quick Replying.

As I said. If you use meet.jit.si, you have no control over that.

You could host your own Jitsi server which gives you complete control, or you could subscribe to JaaS which sounds like the perfect fit for your use case.

1 Like

Thank you so much for helping :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: