Based off of Paul Irish's dotfiles, I have a camerausedby()
function in my .bash_profile
, that is ostensibly used to check if any process is accessing my camera.
The command is:
lsof | grep -w "AppleCamera\|USBVDC\|iSight" | awk '{printf $2"\n"}' | xargs ps
The idea being that you get all open files, find the camera related ones, get the pid, and then find which process has that pid.
For me, this is consistently the output:
PID TT STAT TIME COMMAND
<some-pid> ?? S 448:25.32 /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Google Chrome seems to be using my camera!
If I only run until the grep part of the command, I get:
Google <some-pid> <user> txt REG 1,4 353776 56666788 /Library/CoreMediaIO/Plug-Ins/DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera
This was somewhat scary for the first couple of seconds (why does Chrome have access to my camera even when it's not using it?!) but I realized that it's probably because I've granted webcam access to Chrome in the past. But I guess my question is: why does Chrome have access to the camera even when it's not active?
I'd love to know more about what exactly is happening here.