# Prevent audio from stop when sharing screen

**URL:** <https://openvidu.discourse.group/t/prevent-audio-from-stop-when-sharing-screen/2653>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [February 5, 2021, 4:57pm UTC](https://openvidu.discourse.group/t/prevent-audio-from-stop-when-sharing-screen/2653 "2021-02-05T16:57:51Z")\
**Posts on this page:** 3\
**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:** [February 5, 2021, 4:57pm UTC](https://openvidu.discourse.group/t/prevent-audio-from-stop-when-sharing-screen/2653/1 "2021-02-05T16:57:51Z")

</div>

Hello guys,  
So, I have a OpenVidu working perfectly, the only thing is bothering me is that, when user is speaking and starts sharing a screen, the audio goes out. I think this is happening because I am unpublishing the user to publish the screen. The audio comes back right when the screen is publish, but can you think about some way I can prevent that from happening?

---

<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:** [February 5, 2021, 6:05pm UTC](https://openvidu.discourse.group/t/prevent-audio-from-stop-when-sharing-screen/2653/2 "2021-02-05T18:05:54Z")

</div>

Using replaceTrack instead unpublish and publish

[https://docs.openvidu.io/en/2.16.0/advanced-features/switch-camera/#switch-camera](https://docs.openvidu.io/en/2.16.0/advanced-features/switch-camera/#switch-camera)

---

<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:** [February 7, 2021, 1:15am UTC](https://openvidu.discourse.group/t/prevent-audio-from-stop-when-sharing-screen/2653/3 "2021-02-07T01:15:26Z")

</div>

Man, you guys are so awesome with the support. Thanks a lot, worked for me!
