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.
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