Capacitor/electron Camera plugin doesn't work

I have an ionic/capcitor app that uses camera plugin and it works fine on ios and android and in browser. But when I run it as an electron app, the camera cannot take photon.
The camera UI opens and shows the content but when click on take photo button I get this error:

Unable to take photo! DOMException: setOptions failed

I did some search on the web and looks like the “setOptions” has been replaced by passing options to takePhoto function, but looks like capacitor’s PWA elements are not up to date.

Any workaround?