shareScreen Desktop Jitsi

Hello,
I have an application in electron, I load an iframe from my jitsi web server like this:

mainWindow.loadURL(‘https://meet.xxx.dev/’)

the problem that on the desktop electron when I manage to share the screen I had this error

JitsiMeetElectron.obtainDesktopStreams but it is not defined

I tried to install this module

jitsi-meet-electron-sdk

and I did the same instructions as in readme but I still had the same problem.

Can you help me please I’m stuck

Thanks

I’m probably missing something, but why aren’t you using the iFrame API the way it’s specified?

@Freddie
Thanks for you replay

I didn’t think of that, but except this solution you think I could make the screen sharing work in desktop

any idea @damencho please
thanks

Download jitsi-meet-electron, build it run it, does desktop sharing works for you?
If yes, you have a working example to compare with.

Thanks for replay

I have already cloned and it works but jitsi meet electron it uses

mainWindow.loadURL(indexURL);

// URL for index.html which will be our entry point.
const indexURL = URL.format({
pathname: path.resolve(basePath, ‘./build/index.html’),
protocol: ‘file:’,
slashes: true
});

when I change the code and put this

mainWindow.loadURL('https://meet.jit.si/');

so that it gathers my code, it does not work

sorry about my English
@damencho

What about if you just change the default server url instead of the index url?

If you change that mainWindow.loadURL entry, you’re bypassing the local entry point of the app that includes all the extra functionality to make things work from electron.

Hello, @shawn
if I change defaultServerURL it works but it’s not what I’m looking for, I have an electron application that just loads my meet server url

Sorry. I don’t think I understand your requirements so I’m afraid I cannot offer much help.

Only thing else I can offer is that if you’re writing your own Electron App rather that just modifying jitsi-meet-electron, and you are including jitsi-meet-electron-sdk, also make sure that you are loading the Jitsi site via the IFrame API and not directly. This is mentioned in the requirements section in the README and done so in the jitsi-meet-electron.