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

For me the code works only in Firefox. In Chrome I get the same error. If you have only one camera you have to change deviceList[1].id to deviceList[0].id as well.

comment: But I have already been able to solve the problem using GoToLoops procedure. The answer I have also already posted, but must be released by a forum admin for the thread.