I need to use this snippet and read that I would need to import an addon for this:
p5.setup = function() { video = p5.createCapture(p5.VIDEO); }