rejas / MMM-MotionDetector

This is a motion detector module for MagicMirror
MIT License
53 stars 11 forks source link

Multi-Camera issue #47

Closed camaro4life18 closed 3 years ago

camaro4life18 commented 3 years ago

I have 2 camera's connected to my Pi, another app is using one of the cams, which MotionDetector keeps trying to use and fails with error... NotReadableError: could not start video source

camaro4life18 commented 3 years ago

As usual, I got impatient and solved my own problem by changing the code to be this... navigator.mediaDevices .getUserMedia({ video: { deviceId: "video0"} }) Basically had to hard code it to pick a specific camera. If I get time I may put in a pull request to add this as a config option. The weird behavior however, is It acts like it is using both cams now for motion detection.

rejas commented 3 years ago

Hi @camaro4life18 I also got impatient and crated a PR with the option to specify the deviceId. Can you give it a try and report back if it helps you?