I have a php page that acts as a proxy for a mjpeg stream for some IP cameras
....
header('Content-Type: multipart/x-mixed-replace; boundary=myboundary');
readfile('http://<local_server_ip>:<port>/'.$camId."/mjpg";
ob_end_flush();
....
and a html/javascript page where I display the mjpeg in an img tag, along with camera functions (move left, right, up, down).
Everything works great with less than 6 cameras on the same page; once I add the 6th camera everything else stops working: I can see the 6 camera streams, but I can no longer do anything else on the page - pressing the logout button or pressing the camera move buttons doesn't do anything, Dev Tools shows the actions as pending.
I've read that there is a limit of maximum persistent http connections to a domain (https://stackoverflow.com/a/985704/3668883), and in Chrome (which I am using), the limit is 6.
I cannot remove the php proxy from the equation - this page has to be accessible from the exterior as well, so I cannot put the local ip in the img tag.
Does anyone know a way to do this?