# Screen share not working with existing session

**URL:** <https://openvidu.discourse.group/t/screen-share-not-working-with-existing-session/482>\
**Category:** How to implement?\
**Tags:** v2\
**Created:** [April 16, 2020, 7:15am UTC](https://openvidu.discourse.group/t/screen-share-not-working-with-existing-session/482 "2020-04-16T07:15:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![prakash.burra](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/prakash.burra/32/33_2.png) [@prakash.burra](https://openvidu.discourse.group/u/prakash.burra)\
**Post date:** [April 16, 2020, 7:15am UTC](https://openvidu.discourse.group/t/screen-share-not-working-with-existing-session/482/1 "2020-04-16T07:15:37Z")

</div>

Hello,

We are using openvidu browser and implemented screen share functionality like below doc.  
[https://docs.openvidu.io/en/2.11.0/advanced-features/screen-share/](https://docs.openvidu.io/en/2.11.0/advanced-features/screen-share/)

Here my problem is, in first time session creation screenshare working fine, but how to implement it in existing session with custom button triggering instead of initial session creation.

---

<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:** [April 16, 2020, 9:13am UTC](https://openvidu.discourse.group/t/screen-share-not-working-with-existing-session/482/2 "2020-04-16T09:13:56Z")

</div>

Hello @prakash.burra,

Please, consider to use the latest OpenVidu version (2.12.0). You can switch between camera and screen using [replaceTrack](https://docs.openvidu.io/en/2.12.0/advanced-features/switch-camera/#by-using-method-publisherreplacetrack) supported in this new release or [initializating a new publisher](https://docs.openvidu.io/en/2.12.0/advanced-features/switch-camera/#by-initializing-a-new-publisher).  
Take account you will have to set `videoSource` property to `screen` (if you want share your screen) or your video device ID.

Check the docs please.

Regards

---

<div class="post-metadata">

**Author:** ![Avinash\_Ravinuthala](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/avinash_ravinuthala/32/261_2.png) [@Avinash\_Ravinuthala](https://openvidu.discourse.group/u/Avinash_Ravinuthala)\
**Post date:** [April 20, 2020, 3:16pm UTC](https://openvidu.discourse.group/t/screen-share-not-working-with-existing-session/482/3 "2020-04-20T15:16:43Z")

</div>

Hello @CSantosM,

We have tried all possible ways and also tried the solution provided in latest OpenVidu version (2.12.0). We have done some good debugging from our end. But the issue remains the same. Below is the use case

We are trying to Stream the Screen & the Screen is visible to the user who’s sharing it but the attendees are not able to see the screen. There is a black image displayed

---

<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:** [April 20, 2020, 9:26pm UTC](https://openvidu.discourse.group/t/screen-share-not-working-with-existing-session/482/4 "2020-04-20T21:26:53Z")

</div>

This use case is added in OpenVidu Call. [Here](https://github.com/OpenVidu/openvidu-call/blob/b207311833ed7f622cdc700d042845ce1996995a/front/openvidu-call/src/app/video-room/video-room.component.ts#L213) you can see how we enable and disable screen sharing in a session. Simply you have to create a screen publisher and publish it.  
In addition, if you want to change the screen share you can replace the track as the docs says.

---

<div class="post-metadata">

**Author:** ![shreya](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/shreya/32/2201_2.png) [@shreya](https://openvidu.discourse.group/u/shreya)\
**Post date:** [March 27, 2023, 11:35am UTC](https://openvidu.discourse.group/t/screen-share-not-working-with-existing-session/482/5 "2023-03-27T11:35:52Z")

</div>

Hi,

we are trying to share screen but screen is only visible to the one who share it, other participants in the call cannot see the screen. there is black screen showing to other participant in the call. we are using OpenVidu version 2.24.0.

---

<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:** [April 13, 2023, 8:53am UTC](https://openvidu.discourse.group/t/screen-share-not-working-with-existing-session/482/6 "2023-04-13T08:53:31Z")

</div>

[https://docs.openvidu.io/en/stable/tutorials/openvidu-js-screen-share/](https://docs.openvidu.io/en/stable/tutorials/openvidu-js-screen-share/)
