Using the lobby feature using lib-jitsi-meet

I downloaded jitsi-meet-tokens, mod_token_affiliation, token_lobby_bypass, lobby_autostart plugins downloaded. Tested it and everything I expect for the lobby in the installed web interface is working.

I’m developing a custom UI using lib-jitsi-meet low level api, how should I go about it to use the lobby feature?

I can’t figure out exactly how I should go about it, I’d appreciate it if you could help :slight_smile:

To listen when lobby is enabled/disabled in a meeting:

Moderator receives a notification when someone joins lobby:

And when lobby participant leaves:

When a participant tries to join a conference where lobby is enabled, there is a conference failed event with member_onlu error:

And then that participant needs to join the lobby room:

Everything you need is implemented in jitsi-meet under feature lobby:

You can use it as an example and debug the js code using meet.jit.si.

2 Likes

thanks for your guidance

lobby feature is active and lobby is forming. I can see this in prosody.


Apr 28 08:04:19 mod_bosh        info    New BOSH session, assigned it sid '414caf35-fa15-4d69-a963-7164abe9f3e1'
Apr 28 08:04:19 bosh414caf35-fa15-4d69-a963-7164abe9f3e1        info    Authenticated as bcfd76aa-1f5b-4b0f-9a48-3beb5f0910e0@mydomain.com
Apr 28 08:04:21 mydomain.com:muc_lobby_rooms      info    Lobby room jid = example-room-name@lobby.mydomain.com created from:(nil)

I’m sending a message to the lobby

room = connection.initJitsiConference(roomName, confOptions);
room.sendLobbyMessage('demo-message')

but I can’t use addLobbyMessageListener method addLobbyMessageListenerFunction

I implemented this method like this

room.addLobbyMessageListener(e=>{
          console.log(e)
        })

Is there something wrong with my listener function, how exactly should I use the chat feature in the lobby? can you help me?

This is how you create the listener, your code seems correct.
You are sending the message too early. Make sure you get the conference error, then join the lobby, make aure you are in the lobby, then send a mesaage.

1 Like

thanks,
sendLobbyMessage function returned undefined. the user gets the CONFERENCE_FAILED error and joins the lobby, there is a lobby id side, but is there something like the enable chat feature of the lobby that the user joins is true or false, how can I access the lobby configuration I am in?

this is code :

room.on(
        JitsiMeetJS.events.conference.CONFERENCE_FAILED,
        (err) => {
            console.log('user failed to join the conference. : ', err);
            room.joinLobby()
                .then(()=>{
                    console.log(`lobby join success, local user lobby user id : ${room.myLobbyUserId()}`)
                .catch((err)=>{
                    console.log('lobby join error: ',err)
                })
            })
        }
    );

Ask to join on jitsi-meet web button, then moderator starts messaging. Is that why I can’t use the sendLobbyMessage function?

Can you guide us how to apply the ask to join button with lib-jitsi-meet low level api?

On conference_failed of type members_only error:

Open lobby screen with button join.

When join is clicked call:

Where the conference object is the same object you tried to join initially.

For the lobby chat is it enabled on your deployment?

Does it work with jitsi-meet?

1 Like

lobby chat is enabled in my distribution and I have provided all these features but I cannot send a message to the lobby and I cannot see the message sent to the lobby. I’m using jitsi-meet web and my own custom UI web app over distribution. I can only accept and decline the request to join

So it doesn’t work with pure jitsi-meet you say?

1 Like

no it works. I join the same meeting with pure jitsi-meet and on the other hand, with the custom app I created using a low level api, but I can’t see and send messages sent to the lobby.

two users in the meeting are sending and receiving messages to each other but I can’t send messages to the user in the lobby and I can’t receive the message that the moderator sent to the lobby

How do you sent the messages when you are in the lobby? And how the moderator is listening for those?

1 Like

using these two functions

If that works for jitsi-meet I don’t see why it would not work with your modifications. You can put a breakpoint on both of them and see how it behaves and the parameters that are passed when executed inside jitsi-meet and see what is the difference with your implementation.

1 Like

thanks i will try