1

I have built an electron app that uses the camera, via getUserMedia. When I build the app in the development environment (with the electron cmd), the Ecamm Live virtual camera works fine. However, when I build for production with electron-builder (with hardened runtime and notarization), Ecamm Live no longer shows up in the production app. I am building and testing in macOS.

I am using navigator.mediaDevices.enumerateDevices() to list the devices. Other physical cameras work in the production app, just not virtual cameras such as Ecamm Live.

Any idea what's going on? I have upgraded the Electron version to 9.1.0, as I had read that there were some changes in Chrome >80 that might affect this, but that didn't help. FWIW, the camera appears fine in my Chrome app.

1 Answers1

3

Figured it out, with some clues from this question.

To get virtual cameras to work in a notarized, hardened runtime app (I believe this also applies to fully native mac apps), you need to disable library validation with the com.apple.security.cs.disable-library-validation entitlement.

Once I added that entitlement and rebuilt the electron app, virtual cameras worked as expected.