# Shared Screen In Another Div

**URL:** <https://openvidu.discourse.group/t/shared-screen-in-another-div/3338>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [August 28, 2021, 10:38am UTC](https://openvidu.discourse.group/t/shared-screen-in-another-div/3338 "2021-08-28T10:38:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ovdev](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/ovdev/32/1497_2.png) [@ovdev](https://openvidu.discourse.group/u/ovdev)\
**Post date:** [August 28, 2021, 10:38am UTC](https://openvidu.discourse.group/t/shared-screen-in-another-div/3338/1 "2021-08-28T10:38:31Z")

</div>

Trying to implement shared screen with OV. Currently, I have something like this for the user’s camera:

```auto
  let OV = new OpenVidu();
  let session = OV.initSession();
  let publisher = OV.initPublisher("layout", {
    mirror: true,
  });

  session.on('streamCreated', event => {
    session.subscribe(event.stream, "layout");
  });

```

And for screen sharing I have:

```auto
    ScreenSharer = new OpenVidu();
    screensession = ScreenSharer.initSession();

    skreen = ScreenSharer.initPublisher("screendiv", {
      videoSource: "screen",
      publishAudio: false,
    });

    skreen.once('accessAllowed', () => {
      screensession.publish(skreen);
    });

```

What I expect is that the shared screen is shown inside the “screendiv” div, instead it shows inside the “layout” div. How do I fix this?

Is this the best way to have a camera and a screen in the same session?

---

<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:** [September 2, 2021, 7:28am UTC](https://openvidu.discourse.group/t/shared-screen-in-another-div/3338/2 "2021-09-02T07:28:32Z")

</div>

Hi,

I don’t know what is your template logic or if you are using some OpenVidu tutorial but this is not really related with OpenVidu. This is a templating html issue so, my recommendation is start from the beginning.  
I mean, I would add screen share to the simplest tutorial, once I get it I keep trying with a complex one, change the template, understanding the end to end logic.  
If you’re using OpenVidu call, you need medium-high Angular skills for understanding it’s behavior. Also you have the OpenVidu call documentation available here [OpenVidu Docs](https://docs.openvidu.io/en/2.19.0/demos/openvidu-call/)  
As I said before, this is a complex tutorial and everything is designed for adding every new stream inside of layout.
