Updating pixels on a live video stream

please format code with </> button * homework policy * asking questions

Here is my code. https://editor.p5js.org/bandhavya/sketches/BCFYuQzS-

Im unable to update the pixels of a live video. Please suggest how to proceed.

I would like to process the video in the same way like shown here @ Remove Person from Video with AI and JavaScript | Red Stapler Here a video.mp4 file is used but I want to live stream the content