Inspiration

At some point in your life, you have probably found yourself watching a YouTube or Netflix video when a friend calls your name to get your attention. If you really cared about your show, you would hit the pause button on your video so that you could focus your attention on your friend.

What it does

facext is a Chrome extension that automatically pauses your video when you look away from the screen and resumes the video when you look back at the screen.

How we built it

We analyze the webcam data stream using the clmtrackr JavaScript library. We play or pause the video based on whether or not a face is detected.

Challenges we ran into

As it turns out, clmtrackr can only analyze a data stream if it renders the video in some form or another. Fun fact: This is the real reason why a small dropdown appears when you click on the extension icon in the Chrome toolbar. The webcam video is being rendered in a hidden video element.

Accomplishments that we're proud of

We finished the barebones functionality of our Chrome extension fairly quickly, so we had time to delve into other cool features like emotion detection. You can enable the emotion detection graph in the options page for the extension.

What we learned

  • Simulating keypresses is difficult.
  • Playing and pausing video is easy.
  • clmtrackr is a pretty good JavaScript library for face detection.
  • Chrome extensions have a pretty "strong" default security setting, which is sometimes a pain for hacks.

What's next for facext

More elaborate data visualization based on collected emotion data? Easy way to share your emotional responses to videos?

Built With

Share this project:

Updates