.getImageData
is a function of <canvas>
elements, not <video>
elements. If you checked your browser console, you'd see something along the lines of getImageData is not a function
.
This is why the innerHTML
is not set - due to the error, the code stops.