Unable to lock the conference from JitsiMeetExternalAPI

Hello,

I am currently running jitsi with docker-compose from https://github.com/jitsi/docker-jitsi-meet repository.
I am building an app where the first user automatically locks the room when created:

  const JitsiMeetExternalAPI = await getJitsiMeetExternalAPI();
  this.videoConference = new JitsiMeetExternalAPI(url, this.jitsiOptions);
  this.videoConference.on("videoConferenceJoined", this.onVideoConferenceJoined);

  function onVideoConferenceJoined() {
      this.videoConference.executeCommand("password", "secret");
  }

Sadly this does not work and display a Lock Failed error like this:

Capture d’écran 2020-03-19 à 15.21.44

Do I miss something?
Thanks a lot

Christophe

Just found that I am able to send the password command correctly if I wait a little bit. Is there an event I need to wait to receive to be able to send it? videoConferenceJoined does not seems the right one but I can not see anything else from the documentation nor the code.

Hi, found any solution?

I switched to JWT tokens which are really better, at lest for my current usecase

oh ok thats nice, whats the expiry time you have set for jwt token?

Hi @chamerling,

are you making use JWT with the external api call? please share the details/sample code on how to generate and pass the jwt token to external api.

Thanks