Enabling face detection p5.js camera access in chrome extension


I am trying to make a pop up chrome extension using this face detector example made with p5.js from https://github.com/stc/face-tracking-p5js/tree/master/008_emotion example. Basically, I want to count the number of times I smile in a day and display the smile count when clicking on the pop up. However, when I added the emotion example to the extension, the pop up does not seem to be getting any camera data. The graphics show, but the face tracking data doesn’t. Is this because there are issues with accessing the browser camera? It runs when not made into an extension. I have tried using other p5 camera examples and they don’t load as well, so it’s definitely a camera permissions thing…

    "name": "Smile",
    "version": "0.1",
    "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
    "content_scripts": [
            "js": ["content.js"]

    "browser_action": {
        "default_icon": "ct.png",
        "default_popup" : "smile/index.html",
        "default_title": "Smile Count:"

Let me know what I can do, thank you!