You're missing the required HTTP headers and frame boundaries in your MJPEG stream handler. Browsers expect each JPEG frame to be preceded by a boundary string and headers like Content-Type
and Content-Length
. Your code sends raw frame data without these, thus the white screen.