Implementing focus on user as he speaks

I want to implement a functionality that when a user in a room speaks the focus will be shown on him.There will be two users in the view at a time and when someone in the room speaks his video will be shown there, just like zoom meeting or any other video calling platform. I want to implement this using javascript.

Hi @Chahil,

Youy can get this behaviour and handle it with openvidu-browser using the speech detection event.

Regards

I want to show only two users at a time publisher and subscriber, in a room there can be multiple people but i want to show subscriber who is speaking and publisher will be there always

You can implement such logic in JavaScript.

speech detection event will notify the speaking participant. With that information, you decide who to appear in the screen.

Regards

You can detect subscriber using

session.on(‘publisherStartSpeaking’, (event)

event and for publisher you need to detect his mic volume using

publisher.on(‘streamAudioVolumeChange’, (event)

event; each event returns sufficient information to complete your requirement.

How to convert subscriber into publisher when subscriber starts speaking . And number of participant will be 500 and only 5 will be shown on big screen at Time.
Many people asked me.
Any help will be appreciated.
Thanks

You will have to implement such logic by yourself. But take into account the managing 500 participants at the same time in a browser can overload the browser even if only 5 videos are shown.

We plan to add this capability integrated in OpenVidu in the future in PRO edition. the dominant speaker will be detected at server level to avoid any kind of browser overload.

Regards.

I also think that point can you please tell me little bit How we can implement to application side backend

Any way thanks all of you for making such things.

It can not be implemented right now with the current OpenVidu architecture sorry.