Handling the active-share-change event when one joins the channel after someone shared the screen

One more issue i am facing -

As you created this pseudo code in our earlier conversation, this is what i am doing in the session at first.

async function audioHandler(){
  /* The microphone permission was blocked*/
  await stream.startAudio({speakerOnly:true});
  /* After some other things, rejoin the audio with the microphone connected*/
 await stream.stopAudio();
  await stream.startAudio(); // Can hear the sound, but cannot speak? And no error on the console?
}

After this i am sharing my screen with tab audio enabled, so because of this my mic gets muted and the tab audio start sharing. but when i am calling the muteShareAudio function then audio should switch to microphone but that is not happening. When i call the unmuteShareAudio function it successfully switching back to tab audio but there is some issue with switching to microphone.

Hey @vk-jangid

Did you start the audio with the speakerOnly option set true?

If so it is the same issue I mentioned above.

Thanks
Vic

Sorry, I forgot to mention that now mic permission is given and at first I started with speakerOnly option. and then I stopped the audio and started the audio again with speakerOnly set to false.

Now after this when I start the screen share with tab audio. then the mic audio gets muted and tab audio starts going to other participants. Now i am calling muteShareAudio function, after this tab audio gets muted but the microphone audio doesn’t start after that.
So when i am calling muteShareAudio, the audio source should switch to microphone now, but it is not happening right now.

Hey @vk-jangid

Thanks for your detailed explanation.

The root cause of this issue is the same as the above. We will fix it in the next release.

Thanks
Vic

1 Like

Ok, so the root cause here is speakerOnly option?

Hey @vk-jangid

Yes. We haven’t handled the speakerOnly option well in the Video SDK Web. That’s the root cause.

Thanks
Vic

1 Like

Understood, do you have any timeline of the next release?

Hey @vk-jangid ,

Typically our releases are at the end of the month. You can stay tuned here:

Or watch the repo for changes: GitHub - zoom/videosdk-web: Power custom video experiences with Zoom's core technology

Thanks,
Tommy

Hi,
if I want to use our own unique userId instead of the userId which zoom creates in the session, can we do that?

Hey @vk-jangid

It can be accomplished by using a Map to record the mapping of your own id and zoom provided userId. And broadcast the mapping via Command Channel.

Thanks
Vic

Hi @vic.yang

I want to get the volume of the audio track created by startAudio() function. How can I achieve that?
just like the function of getCurrentVolume provided for the localAudioTrack.

Thanks
Vivek

Hey @vk-jangid

We didn’t provide the getVolume API of the current user during the session. The audio will be adjusted to an appropriate volume inside the Video SDK before sending it to the other users.

Thanks
Vic

Ok, but if we want to show animation according to the audio volume, then we can’t do that.

Like on zoom, a green bar fills up the mic icon according to the volume of the audio.
image

Or we want to show animation like this for the participants of the session when they are speaking then we can’t do that.

I think you need to add this functionality.

Hey @vk-jangid

We have an active-speaker event in the Video SDK Web. In the ZOOM client, when someone (including the current user) is talking, the active-speaker event will be triggered. The animation green bar is not the reflection of the volume, it’s just an indication that the one is speaking.

Here is the event reference:

Hope this can help you.

Thanks
Vic

Through the active-speaker event, yes I will get to know who is speaking, but if I want to show the volume animation, then it is not possible.

Also, you are saying that “the green animation is not the reflection of the volume but an indication that one is speaking”.

But the green bar going up and down is based on the volume of the audio. It is detecting the audio volume and as per that, it is moving up and down.
if I will speak very low then the green bar will not fill up completely but if I will speak very high then the green bar will fill up completely.

Hey @vk-jangid

That’s right on the ZOOM native client, but on the ZOOM web client, the green bar is not related to the volume. We haven’t provided API for the accurate volume of each speaking user so far.

Thanks
Vic

Yeah Yeah, that’s why I am asking you to add this functionality.

Is there any plan of adding this feature in the future?

Hi @vic.yang

How can I start an audio and video with a specific deviceId?
Because in startAudio and startVideo function, I do not see any parameter of deviceId.

Thanks
Vivek

Hey @vk-jangid

In Video SDK, you can specify the camera device id in the startVideo method, here is the reference Stream | Zoom Video SDK for Web - 1.4.0

For the audio, we haven’t provided the similar option yet, but you can call the switchMicrophone or switchSpeaker method right after the startAudio method.

Hope this can help you.

Thanks
Vic

Hey @vic.yang

The reference you have mentioned here doesn’t show where the deviceId should be passed.