JitsiMeetElectron.obtainDesktopStreams but it is not defined

I’m using jitsi to developed video conference for Website and desktop (currently using Nextjs for website and nextron saltyshiomix/nextron: :zap: Next.js + Electron :zap: (github.com) for desktop)

Enable to share screen on desktop

when i’m trying to share screen it’s working fine on the website but when on the desktop i’m having this problem.

what i’m doing is loading the jitsi meet URL in the iframe for the website and desktop.

can i implement it like that? or should i use jitsi/jitsi-meet-electron: Jitsi Meet desktop application powered by (github.com)?

You need to use jitsi-meet-electron-utils in your project adding this functionality, there is instructions in the README.

Hi I have installed jitsi-meet-electron-utils package in my electron app for screensharing but I am getting this same error JitsiMeetElectron.obtainDesktopStreams it is not defined and when I use it with window.JitsiMeetElectron.obtainDesktopStreams then it says Cannot read property ‘obtainDesktopStreams’ of undefined.
How can I import JitsiMeetElectron in the file so that JitsiMeetElectron.obtainDesktopStreams will be available? BTW I am using lib-jitsi-meet

Please suggest me on above query @damencho or any developer

Here is how to use it GitHub - jitsi/jitsi-meet-electron-sdk: Jitsi Meet SDK for Electron

I believe this implementation is for iframe as mentioned ( Requirements : The screen sharing utility requires iframe HTML Element that will load Jitsi Meet.).
But I am using low level api for making my custom UI.

This is how jitsi-meet-electron works, you need those calls to adopt them to your case in order to use it in electron, you also need to implement the UI for it, as this is done in jitsi-meet

Hi damencho,
I am stuck on this part and kind of struggling to achieve screen sharing on electron app. I am keep getting the same error.
const { JitsiMeetElectron } = window result undefined
thats why this also dont work JitsiMeetElectron && JitsiMeetElectron.obtainDesktopStreams
I am not able understand how this JitsiMeetElectron can be used from window. I dont see where it is set in window.

Can you please explain me briefly how this works?

Have you read the docs? The electron-sdk just adds an object in the window object which the lib-jitsi-meet finds and uses. Download jitsi-meet-electron where this is implement it play with it, debug it, to get better idea hot to add it to your app