# Main Video managed remotely

**URL:** <https://openvidu.discourse.group/t/main-video-managed-remotely/2570>\
**Category:** How to implement?\
**Tags:** v2\
**Created:** [January 18, 2021, 11:30pm UTC](https://openvidu.discourse.group/t/main-video-managed-remotely/2570 "2021-01-18T23:30:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jefersonbrz.costa](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jefersonbrz.costa](https://openvidu.discourse.group/u/jefersonbrz.costa)\
**Post date:** [January 18, 2021, 11:30pm UTC](https://openvidu.discourse.group/t/main-video-managed-remotely/2570/1 "2021-01-18T23:30:48Z")

</div>

Hi guys, thanks for you help in advance…

I have implemented OpenVidu in my Reactjs app, everything working great.

Now, I created a layout that looks like Google Meet, 1 big screen for the main presenter and others small for the participantes.  
What would like to implement such function that will switch the video to the main screen when the user is talking. Found out about the speech recognition and that is working great. Now, I know how to send the video to the main screen locally (it is on the initial template). But my doubt is, how can I have the main screen video controlled by the server, so when I change the video source for the user that is talking, I could change for all the users that in on the conference ?

---

<div class="post-metadata">

**Author:** ![CSantosM](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/csantosm/32/16_2.png) [@CSantosM](https://openvidu.discourse.group/u/CSantosM)\
**Post date:** [January 19, 2021, 10:30am UTC](https://openvidu.discourse.group/t/main-video-managed-remotely/2570/2 "2021-01-19T10:30:50Z")

</div>

Hey @jefersonbrz.costa ,

You can use a custom signal on your client and send a message to others when a user change the video source. [OpenVidu Docs](https://docs.openvidu.io/en/2.16.0/cheatsheet/send-messages/#send-text-messages-between-users)

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [January 19, 2021, 12:43pm UTC](https://openvidu.discourse.group/t/main-video-managed-remotely/2570/3 "2021-01-19T12:43:43Z")

</div>

Or you can just use the speech event for all streams, in all clients. Each client will trigger the event for all subscribed streams. No need to interchange messages between clients, as all of them are locally capable of knowing which user is the one talking at every moment.

---

<div class="post-metadata">

**Author:** ![jefersonbrz.costa](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jefersonbrz.costa](https://openvidu.discourse.group/u/jefersonbrz.costa)\
**Post date:** [January 19, 2021, 4:52pm UTC](https://openvidu.discourse.group/t/main-video-managed-remotely/2570/4 "2021-01-19T16:52:47Z")

</div>

Thanks for the reply, so, as far I understood, I can 🙂 mySession.on(‘publisherStartSpeaking’, (event) =\> {  
// GET THIS PUBLISHER VIDEO SOURCE AND SET IN MY MAIN DIV THAT HAS TEH BIGGER VIDEO  
})

?

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [January 20, 2021, 10:24am UTC](https://openvidu.discourse.group/t/main-video-managed-remotely/2570/5 "2021-01-20T10:24:55Z")

</div>

Of course. Just as explained in the docs: [https://docs.openvidu.io/en/latest/advanced-features/speech-detection/](https://docs.openvidu.io/en/latest/advanced-features/speech-detection/)

---

<div class="post-metadata">

**Author:** ![jefersonbrz.costa](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jefersonbrz.costa](https://openvidu.discourse.group/u/jefersonbrz.costa)\
**Post date:** [January 21, 2021, 1:39am UTC](https://openvidu.discourse.group/t/main-video-managed-remotely/2570/6 "2021-01-21T01:39:49Z")

</div>

Hey @pabloFuente I am using voice recognition, getting the connection and changing the state getting the video from subscribers and putting in the mainDiv, but the problem it is only working for one user, do you know the reason?

---

<div class="post-metadata">

**Author:** ![jefersonbrz.costa](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jefersonbrz.costa](https://openvidu.discourse.group/u/jefersonbrz.costa)\
**Post date:** [January 21, 2021, 1:50am UTC](https://openvidu.discourse.group/t/main-video-managed-remotely/2570/7 "2021-01-21T01:50:50Z")

</div>

Hi CSantos, how can I be listening to the user in order to send the signal? Do you have any suggestion?

---

<div class="post-metadata">

**Author:** ![vipin\_mishra](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vipin_mishra/32/32_2.png) [@vipin\_mishra](https://openvidu.discourse.group/u/vipin_mishra)\
**Post date:** [January 22, 2021, 4:30am UTC](https://openvidu.discourse.group/t/main-video-managed-remotely/2570/8 "2021-01-22T04:30:31Z")

</div>

You can send a signal message to opposite user and using this change the layout…  
This is also a way but what I suggested you also best way is detect volume in pubilsher
