How to detect video stream freeze in player

Hello,

I have a video player which plays only live streams. The stream could contain audio / video or audio only. I am seeing an intermittant freeze only in the video. I am not able to track down the source of the freeze. If I restart the player everything works fine. The audio does not have any problem, even when the video is frozen.

I am trying to find out if there is any way to detect that video streaming has frozen in the player. I am thinking that if I can detect that video streaming is frozen, I could silently restart the player.

Is there a way to detect this video freeze?

Thanks,
-Jayant.