Mute All by default

Hi,
I have a scenario where the moderator can speak but all participants join with mute audio and if they want to speak they should raise their hands and the moderator can allow them to speak.

Inside the Participant pane there is an option of Mute All and inside dialog moderator can uncheck the option “Allow attendees to unmute themselves” and press ok and good to go.
I wanted to add this functionality as soon as the moderator started the meeting without doing it from the participant pane.

I saw there is a function “muteAllParticipants” I called this function but no luck.
I am working on a source. Can somebody guide me how I can achieve this behaviour?

Inside conference.js I am hacking with a join event as shown below. By doing this all participants can join meetings without audio which is good but they should not unmute themselves until moderators allow and accept their request to unmute the mic.

 room.on(JitsiConferenceEvents.USER_ROLE_CHANGED, (id, role) => { 
        APP.store.dispatch(muteAllParticipants([{ id }], MEDIA_TYPE.AUDIO));

        if (this.isLocalId(id)) {
            logger.info(`My role changed, new role: ${role}`);

            if (role === 'moderator') {
                APP.store.dispatch(maybeSetLobbyChatMessageListener());
                config.isHost = true;

            }

            APP.store.dispatch(localParticipantRoleChanged(role));
            APP.API.notifyUserRoleChanged(id, role);
        } else {
            APP.store.dispatch(participantRoleChanged(id, role));
        }
    });

Thanks