How to pause a video using webcam detection

Hi!
I would like to pause a movie file in by using a video device in. When the webcam doesn’t detect anyone then the video would pause. If someone apears in front of the webcam then the video would play.
Is it possible? And if it is, could someone help me please?

Thank you so much
:slight_smile: