0

Currently, I'm working on an Electron application with conferencing via the OpenVidu platform. I have a production deployment of OpenVidu and my Backend with HTTPS and everything set up.

It's working flawlessly when running Electron from npm start

But as soon as I package the application into .exe format, I'm "greeted" with some issues. (Using electron-builder build)

  1. require is not defined - well as I found out, even OpenVidu official tutorial has contextIsolation turned off (which is to my knowledge huge security risk and shouldn't be done). Worked around that by exposing require method through Preload (also not ideal, but at least my Preload works)
  2. With exposed require, I'm able to start the packaged app, but when I try to publish/subscribe to the video stream to OpenVidu, I'm getting errors like TypeError: w.send is not a function or Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'call')

Did anybody achieve contextIsolation: true and OpenVidu running in a packaged app? (some tips on what to look for or even better working repo would be awesome). Or do you have an idea what could cause this issue?

I tried to google, but no luck.

Jake_3H
  • 372
  • 4
  • 14

0 Answers0