News for hackers. Stuff that matters.
Re:Automatically Light Up a Sign When Your Webcam Is in Use by isatty on Friday August 27, 2021 @01:50PM (#28330890)
Here you go: https://stty.io/2020/07/31/lamp-control-based-on-video-confe...

I’ve been using this for ~1 and it’s been more reliable than I expected - no maintenance required even with the update to Big Sur.

To save you a click:

log show --predicate 'subsystem == "com.apple.VDCAssistant" && \ eventMessage CONTAINS[c] "kCameraStream"' --last 1m --no-debug --no-pager \ --style compact | tail -n +2)

#or log stream ... # streaming is better to generate events

Re:Automatically Light Up a Sign When Your Webcam Is in Use by jeremy8883 on Saturday August 28, 2021 @09:48AM (#28338010)
Thank you! I couldn't originally figure this out for my "on air" script, so my workaround was to query the existance of the `zoom.us` process every second.