# Screen Sharing Permission in Electron App

**URL:** <https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408>\
**Category:** Web\
**Created:** [July 19, 2021, 9:47pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408 "2021-07-19T21:47:48Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris.7771](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chris.7771/32/22216_2.png) [@chris.7771](https://devforum.zoom.us/u/chris.7771)\
**Post date:** [July 19, 2021, 9:47pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/1 "2021-07-19T21:47:48Z")

</div>

**Description**  
I have an electron app and need to share my screen. Upon loading the app I prompt the user for audio, video, and screen recording permissions if they have not already done so.

I am trying to start sharing my screen via the following function:

```auto
    async startScreenShare(canvas: HTMLCanvasElement) {
        const client = await this.client();
        const stream = await client.getMediaStream();

        return stream?.startShareScreen(canvas);
    }

```

I can get a stream in the electron browser window with:

```auto
navigator.mediaDevices.getUserMedia({
    video: { mandatory: { chromeMediaSource: 'desktop' } }
});

```

I can also get access to user screen using the electron desktopCapturer:

```auto
desktopCapturer
    .getSources({ types: ['window', 'screen'] })
    .then((resp) => console.log('desktp get sources: ', resp));

```

So as far as the electron app is concerned, it appears to have all the permissions it needs. It prompted for recording permission and I gave it. But whenever I try to call the zoom client.startScreenShare(), it says “user deny permission”.

**Error**  
{  
type: “INVALID\_OPERATION”,  
reason: “user deny screen share”  
}

**Which Web Video SDK version?**  
1.1.0

**Screenshots**  
If applicable, add screenshots to help explain your problem.

**Device (please complete the following information):**

- Device: Macbook
- OS: Catalina: 10.15.7
- Browser: Electron
- Browser Version 8.5.5

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 2, 2021, 7:35pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/2 "2021-08-02T19:35:07Z")

</div>

Hey @chris.7771 ,

Happy to help! Do you have the `active-share-change` event listener in your code? Try implementing this and see if it resolves the error: [https://marketplace.zoom.us/docs/sdk/video/web/essential/screen-share#viewing-participants-screen-sharing](https://marketplace.zoom.us/docs/sdk/video/web/essential/screen-share#viewing-participants-screen-sharing)

If that does not work, this is possibly related to: [Electron + WebSDK Screensharing not working (@zoomus/websdk v1.7.10)](https://devforum.zoom.us/t/electron-websdk-screensharing-not-working-zoomus-websdk-v1-7-10/27996)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![chris.7771](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chris.7771/32/22216_2.png) [@chris.7771](https://devforum.zoom.us/u/chris.7771)\
**Post date:** [August 2, 2021, 8:36pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/3 "2021-08-02T20:36:08Z")

</div>

thanks for the reply.

haven’t gotten to using “active-screen-share” event yet, because I haven’t even gotten to the point where anyone can share screen yet, so since i can’t get anyone to successfully share screen, no one will be emitting any active-screen-share events.

i’ll take a look at the other post as well.

---

<div class="post-metadata">

**Author:** ![chris.7771](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chris.7771/32/22216_2.png) [@chris.7771](https://devforum.zoom.us/u/chris.7771)\
**Post date:** [August 2, 2021, 8:59pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/4 "2021-08-02T20:59:42Z")

</div>

what is the difference between websdk and videosdk-web? we are using videosdk-web, the post you mentioned is using websdk.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 3, 2021, 7:47pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/5 "2021-08-03T19:47:37Z")

</div>

Hey @chris.7771 ,

You can see the differences here: [https://marketplace.zoom.us/docs/sdk#comparing-zoom-sdks](https://marketplace.zoom.us/docs/sdk#comparing-zoom-sdks)

Even though they are different Zoom SDKs, the issue is with using the Zoom Web based SDK screen share functions in an electron web view.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![chris.7771](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chris.7771/32/22216_2.png) [@chris.7771](https://devforum.zoom.us/u/chris.7771)\
**Post date:** [August 6, 2021, 1:16pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/6 "2021-08-06T13:16:00Z")

</div>

The linked post ends with a bug was identified and was going to be fixed in websdk version 1.8.5.  
We’re using the latest videosdk. Did that fix also make it into the videosdk?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 10, 2021, 5:47pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/7 "2021-08-10T17:47:32Z")

</div>

Hey @chris.7771 ,

After throughout investigation, we are placing this in our long term backlog as it seems to be an Electron limitation.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![ephraimwwt](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@ephraimwwt](https://devforum.zoom.us/u/ephraimwwt)\
**Post date:** [August 11, 2021, 2:12pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/8 "2021-08-11T14:12:37Z")

</div>

Hi @tommy ,

This is definitely not a limitation with Electron. It must be an issue with how Zoom is interacting with Electron. We have had screen sharing working before in this app with another 3rd party SDK. The difference is that that SDK delegated the job of getting the screen share stream to us and then we passed them the stream. Your SDK does not give us that flexibility, but you are doing everything in a black box.

I really wish you all would make this SDK more flexible by not hiding everything in a black box.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 12, 2021, 3:52pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/9 "2021-08-12T15:52:24Z")

</div>

Hey @ephraimwwt ,

Thanks for your feedback! 🙂 We will evaluate this.

-Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [September 12, 2021, 1:53am UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/10 "2021-09-12T01:53:18Z")

</div>

Closed on September 12, 2021, 1:53am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 23, 2021, 5:40pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/11 "2021-09-23T17:40:45Z")

</div>

Hey @ephraimwwt , @chris.7771 ,

I have an update for you. 🙂

Electron’s `desktopCapturer` API doesn’t provide a chromium style desktop picker dialog, so we would need to implement one.

> **[electron-sample-apps/desktop-capture at master · hokein/electron-sample-apps](https://github.com/hokein/electron-sample-apps/tree/master/desktop-capture)**
>
> master/desktop-capture

We are evaluating where and when we can fit this into our roadmap.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 23, 2021, 5:40pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/12 "2021-09-23T17:40:52Z")

</div>

Opened on September 23, 2021, 5:40pm UTC



---

<div class="post-metadata">

**Author:** ![chris.7771](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chris.7771/32/22216_2.png) [@chris.7771](https://devforum.zoom.us/u/chris.7771)\
**Post date:** [September 24, 2021, 5:19pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/13 "2021-09-24T17:19:15Z")

</div>

Thanks for the update, looking forward to it getting into the release.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 24, 2021, 5:33pm UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/14 "2021-09-24T17:33:56Z")

</div>

You are welcome! 🙂

-Tommy

---

<div class="post-metadata">

**Author:** ![aloksharma](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/aloksharma/32/46803_2.png) [@aloksharma](https://devforum.zoom.us/u/aloksharma)\
**Post date:** [April 15, 2023, 11:01am UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/15 "2023-04-15T11:01:34Z")

</div>

@chris.7771

Is it working for you now with the new zoom Video SDK? I am still getting user deny permission when using latest video sdk in electron app.

---

<div class="post-metadata">

**Author:** ![george.georgie1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/george.georgie1/32/47607_2.png) [@george.georgie1](https://devforum.zoom.us/u/george.georgie1)\
**Post date:** [April 17, 2023, 1:33am UTC](https://devforum.zoom.us/t/screen-sharing-permission-in-electron-app/54408/16 "2023-04-17T01:33:03Z")

</div>

@tommy thanks for sharing
