While there are a number of techniques that allow a JavaScript program to detect that an image hasn't loaded after a set timeout, things get more complicated if the said image is a MotionJPEG stream.
Is it possible to check if any content has been transmitted during the last N seconds while loading a remote resource?