mappum / electron-webrtc

⚛ Use WebRTC in Node.js via a hidden Electron process
317 stars 47 forks source link

a way to tell if deps are installed? #40

Open mafintosh opened 8 years ago

mafintosh commented 8 years ago

freaking cool project!

is there any way to tell whether or not all deps required to run electron-webrtc are installed on the computer? like a electronWebrtc.supported or electronWebrtc.supported(callback) (if it is async)?

i'd like to do my own error handling instead of having electron-webrtc print out the message telling users to install xvfb.

mappum commented 8 years ago

Good idea. Although, currently the way it checks if xvfb is installed is by trying to run it: https://github.com/mappum/electron-eval/blob/master/src/index.js#L77-L93

mappum commented 8 years ago

I'm not sure how to check other than trying to run it, but maybe we could make electronWebrtc.supported(callback) spawn a xvfb process then kill it right away.

mafintosh commented 8 years ago

sounds good!