Code is not executed in Processing, but in p5.js Web Editor

I just tried the SO code in p5.js web editor with Chrome and it runs without error. I have two cameras connected to my Mac and it flicked both of them on at startup. Right now my conclusion is that it won’t run in Safari. Other possibility is Processing IDE, but supposedly it turns everything over to the browser when running p5.js.