1

I want to create a chat room using the Jitsi meet API (https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-iframe) in advance with the room having a password.

The problem which I encounter is that the pwd is only valid as long as the meeting is active. I cannot be planned in advance. The Jitsi API has no events or options I could use.

Below is the code I use to construct the Jitsi object. But the room is created right away and when the window which started the room is closed all the settings are lost. I am really stuck here. Please advise ....

var callback = function(records) {


for (var i=0; i<records.length; i++) {

        if (records[i].get("key") == 'JitsiServerURL') {

            var val = records[i].get("value");
            var api = new JitsiMeetExternalAPI(val, options);
        }
}

me.jitsiObject = api;


if (pwd != "") {

  setTimeout(() => {

    // when local user is trying to enter in a locked room
    api.addEventListener('passwordRequired', () => {
        api.executeCommand('password', pwd);
    });

    // when local user has joined the video conference
    api.addEventListener('videoConferenceJoined', (response) => {
        api.executeCommand('password', pwd);
    });

}, 10);

}

};

Jacob
  • 3,580
  • 22
  • 82
  • 146

1 Answers1

0

Before doing these things first you have to setup Jitsi in your own server under your own domain. After that, you have to enable password-based authentication into your Jitsi server. After that, you can control your Jitsi server using the iframe API.