Technology Sharing

Jitsi Meet designated users become moderators

2024-07-12

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

Preface

When conducting a meeting in Jitsi Meet, we may use the function of scheduling a meeting. When scheduling a meeting, we hope that I will be the host of the meeting and do not want others to be the host.

However, Jitsi Meet assumes by default that the first person to enter the room is the host. This does not meet our requirements, so we need to change it.

Designated User Moderator

First of all, Jitsi Meet does not have an API to specify who is the host. We can use the previously mentioned interface for authentication using JWT and add a parameter to the JWT to determine whether the person is the host. The tutorial is at https://blog.csdn.net/qq_28880087/article/details/140305263

  • Add a parameter in jwtmoderator When the value is true, it means the user is a moderator, and when the value is false, it means the user is a normal user.

Where does Jitsi Meet determine the identity of the host?

Jitsi meet uses the xmpp protocol. There is a conference module in prosody, which uses the muc module.

  • We can create a lua script to do custom logic
    First, when the meeting is created, enter our lua script
module:hook("muc-room-created", function(event)
  • 1

Secondly, we find that the previous method for setting the host identity is set_affiliation, and we can write it according to our own business logic.