We have already implemented a solution with MIP SDK that identify when a camera is not being streamed and switch into a pre-recording video.
In order to identify that, we are using the following MIP Event:
_imageViewerControl1.ImageDisplayedEvent += (x, y) =>
{
if (y.WindowSize.Height != 0 && y.WindowSize.Width != 0)
Online();
else if (y.WindowSize.Height == 0 && y.WindowSize.Width == 0)
Offline();
};
We did some testing, and it seems to be working fine when (for example) network connection is lost at our app side. As soon as connection is lost, Height and Widhth goes to 0, so Offline applies.
On the other hand, if I unplug the network cable from camera, the live stream shows “the server hast lost connection to the camera” and directly, _imageViewerControl1.ImageDisplayed Event is never triggered.
Having said that, I would like to ask you: What would be the best way to detect this type of streaming lost using MIP SDK?
Thanks in advance.