Zoom meet join role problem

Here this code i embedded zoom in my website using meeting sdk.
here this code when first user join then he is a host in zoom meet. and then when others user join the same meeting all the user join as co-host. but here without first join user the rest of the user need to join as participant not co-host. how can I fix this issue.
please help.

  <script>
                        const client = ZoomMtgEmbedded.createClient()

                        let meetingSDKElement = document.getElementById('meetingSDKElement')

                        var authEndpoint = "/api/zoom_signature";
                        var sdkKey = 'isNISQDGRmyneq9LYUgitA';
                        var role = 1;
                        var registrantToken = '';
                        var zakToken = '';
                        var leaveUrl = 'https://agm.spiralworld.biz/agm-board';

                        var meetingNumberInput = document.getElementById('meetingNumberInput');
                        var UserNameInput = document.getElementById('UserInput');
                        var passWordInput = document.getElementById('passWordInput');
                        var userEmailInput = document.getElementById('EmailInput');

                        var meetingNumber = meetingNumberInput.value;
                        var passWord = passWordInput.value;
                        var userName = UserNameInput.value;
                        var userEmail = userEmailInput.value;
                        console.log(meetingNumber, passWord, userName, userEmail);
                        function getSignature() {
                        var joinMeetingBtn = document.getElementById('joinMeetingBtn');
                        joinMeetingBtn.style.display = 'none';

                        fetch(authEndpoint, {
                        method: 'POST',
                        headers: {
                        'Content-Type': 'application/json'
                        },
                        body: JSON.stringify({
                        meetingNumber: meetingNumber,
                        role: role
                        })
                        }).then((response) => {
                        return response.json()
                        }).then((data) => {
                        console.log(data)
                        var signature = data.result.signature;
                        startMeeting(signature)
                        }).catch((error) => {
                        console.log(error)
                        })
                        }

                        function startMeeting(signature) {

                        let meetingSDKElement = document.getElementById('meetingSDKElement')

                        client.init({
                        zoomAppRoot: meetingSDKElement,
                        language: 'en-US',
                        customize: {
                        video: {
                        isResizable: true,
                        viewSizes: {
                        default: {
                        width: 800,
                        height: 500
                        },
                        ribbon: {
                        width: 800,
                        height: 500
                        }
                        }
                        }
                        }
                        }).then(() => {
                        client.join({
                        signature: signature,
                        sdkKey: sdkKey,
                        meetingNumber: meetingNumber,
                        password: passWord,
                        userName: userName,
                        userEmail: userEmail,
                        tk: registrantToken,
                        zak: zakToken
                        }).then(() => {
                        console.log('joined succesfully')
                        }).catch((error) => {
                        console.log(error)
                        })
                        }).catch((error) => {
                        console.log(error)
                        })
                        }
                    </script>

@chunsiong.zoom
Please help me

Hi @zoom78
Thanks for reaching out to us
Have you been able to troubleshoot this on your end?

@elisa.zoom
I fix this issue but i am facing another problem is that in my zoom meeting sdk participant can unmute themselves. But i want to restrict that only host can unmute them. In zoom meeting there is a option called Allow Participant to unmute themselves but in zoom meeting sdk i could not found this option. So what is the way to do this in zoom meeting sdk.

Hi @zoom78
Have you looked into the methods mute and muteAll?

@elisa.zoom
yes I added muteall function. after add this function participant joint as mute but they can unmute themselves. But here only host can unmute them. Here when I use Zoom meeting sdk Client view then I find the option allow unmute themselves but when I use component view then this option not visible i can not find the option. Here I need to use component view so i need this to participant can not unmute themselves.

Have you tested this with our sample app?

@elisa.zoom
I was integrate Zoom meeting sdk via javascript.

Can you able to replicate using the sample app you shared with me @zoom78

@elisa.zoom
Do I need to create another app using same meeting sdk js as i used before?
If I create another meeting sdk component view using the js then same thing happen. What will be the change same problem i will face.

Elisa good afternoon, could you help me with problem?

Hi @edel_08
Please open a new thread under the right category and describe the issue you are facing and we will help you from there :slight_smile:

1 Like

Elisa thanks a lot for the reply :slightly_smiling_face:

@elisa.zoom
Do I need to create another app using same meeting sdk js as i used before?
If I create another meeting sdk component view using the js then same thing happen. What will be the change same problem i will face.