I
I
Ilya2018-10-09 16:00:06
JavaScript
Ilya, 2018-10-09 16:00:06

How to determine when mjpg to img translation breaks?

How does an element: Determine if a thread is interrupted? The event fires when the first frame is rendered, events like this don't fire at all. The event fires only if the server initially responded with an error, if a disconnect occurs after a successful connection, it does not fire. So far, the only option is to check naturalWidth every few seconds, which changes to 0 when the broadcast is interrupted, and then an empty image is not always transmitted at the end, sometimes the last one freezes and then this method also does not work. Perhaps this can be implemented somehow more correctly? Through an event
<img src="/cam.mjpg">
loadprogress, stalled, suspend, loadend
error

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question