Is there a way to detect when a webcam is being used.
When I join a video call or use Photo Booth, the leds on my Logitech C920 (usb) webcam turn on, I would like to be able to detect that so I can automatically change the color of my "smart" lights.
Either through command line or something that I code, I have done some research but haven't found anything that seems to work.