I am using version 1.4.1 of zoom video SDK.
So when I join the zoom channel when more than 2 participants are already in the channel, at that time only 2 events are coming of user-added, one for the self and one for some other user.
For the rest of the users, the user-added event is not coming.
Did you mean only the new participant can receive the complete user-added message? The rest participants are not able to receive them, so they are not aware of the new coming participant?
No No, I meant that like If I am a user and I am joining a channel that already has more than 2 participants in that. So I am getting only 2 events of user-added, one with my own data and one for some other user who is already in the channel.
But for the rest of the participants, I am not getting user-added events.
Yes, I want one user-added event per participant. this is how it is supposed to happen, right?
Otherwise, what is the point of sending 2 user-added events, one with the data of the self-user and the second for some random user in the session?
By rest of the participants, I mean, like in a channel 5 participants are already there and after that, I am joining a channel, so in that case, 2 events which are coming was one with my data, the second one with some random user from the 5 participants and for the rest of the 4 participants there are no events.
The payload of the âuser-addedâ is an array. The first event payload contains the self-user, and the second one contains users that are already in the session before joining.
await mediaStream.startAudio({ speakerOnly: true });
// after some time
try {
await mediaStream.stopAudio();
await mediaStream.startAudio({ speakerOnly: false }); // this will throw an error of USER_FORBIDDEN_MICROPHONE
} catch (err) {
if (err.reason === 'USER_FORBIDDEN_MICROPHONE') {
mediaStream.startAudio({ speakerOnly: true });
}
}
After getting the error when i am trying to start the audio with speakerOnly option then it is not working.
First of all, i think it should be handled by your end that if the user is in speakerOnly mode and then if user tries to start the microphone but the mic is blocked then after the error the audio should immediately switch to the speakerOnly.
Second, if this canât be handled at your end then we should be able to call startAudio with speakerOnly option in the catch block.
Also can you tell me about this error and a log message, what does it mean and how can we handle this. Sometimes, It comes after calling startAudio()
Letâs assume that a session has 3 participants (A, B, and C, here A is the host)
Now already B is sharing the screen but at that time A starts the screen share and because A is the host the screen share stop at B and the control goes to A.
But in this scenario, only B gets the active-share-change event, and C doesnât get that event because of that, the screen shared by A canât be rendered at Câs end.
Mute share audio can be done in the share-audio-change event, now youâre able to get the correct share audio state via mediaStream.getShareAudioStatus()
Why do we not suggest muting share audio right after the mediaStream. startShareScreen method? Capturing the screen and capturing the audio are different processes in Video SDK, they are independent. We cannot guarantee they work as you expected.
Thatâs a tricky issue. I have reproduced it.
For now, a workaround to solve it is to wrap the fallback startAudio with speakerOnly:true into a setTimeout callback.
try {
await stream.stopAudio();
await stream.startAudio({ speakerOnly: false }); // this will throw an error of USER_FORBIDDEN_MICROPHONE
} catch (err) {
if (err.reason === "USER_FORBIDDEN_MICROPHONE") {
setTimeout(()=>{
stream.startAudio({ speakerOnly: true });
},100)
}
}
Why does calling stream.startAudio({ speakerOnly: true }); synchronously not take effect? Inside the Video SDK, when the microphone is blocked, we will take time to do the cleanup work. So it conflicts with the second attempt.
Ok, I reported this issue because, in our earlier conversation, you said it was working fine for you when you were calling muteShareAudio right after the startShareScreen call.