Screen Sharing Permission in Electron App

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:

    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:

    video: { mandatory: { chromeMediaSource: 'desktop' } }

I can also get access to user screen using the electron 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”.

reason: “user deny screen share”

Which Web Video SDK version?

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