How to Limit Numbers of Participants In Meeting for some guest user?

For guest users, I want to limit the number of participants to only 5

How can I achieve that from the frontend ?

Here is my code

<JitsiMeeting
                roomName = {'someName'}
                configOverwrite = {{
                    hideConferenceSubject: false,
                    // prejoinPageEnabled: false
                }}
                onApiReady = { externalApi => handleApiReady(externalApi) }

I have received the number of participants using handleJoined event,

Can anybody please help ?

Look into the prosody module mod_muc_max_occupants