سؤال

I have an MJPEG which streams on a web-page using an <img/> tag. The stream can sometimes fall down for some time, and then start working again later. I check the status of the stream using AJAX.

When the stream is down, I change the picture in the <img/> tag to some placeholder. When the stream is online again, I remove the placeholder to show the stream. I do this by replacing the tags with:

$('#xxx').html()

In Chrome this works fine, and after re-connection, the animation goes on fine. In Opera and Firefox however, after the stream goes back online, it will only show me a single static frame.

هل كانت مفيدة؟

المحلول

Well, it seems to be fixed with using <iframe src='path_to_mjpeg'> instead of <img src='path_to_mjpeg'> Chrome and Opera handle its creation with JS correctly. Firefox starts playing successfully to, but with huge memory leak.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top