Video and Audio Freeze intermittently
I have been running FMIS 3.5 since April of this year. In August, we started recording conferences, but I'm not sure that this is the issue. We are under very low load at the moment. We never have more than one conference going simultaneously. Our server is spec'ed with a 64-bit operating system (MS08), 24GB RAM, and 24 processors.
I notice that in some of our conferences, the video and audio freezes for 5 to 10 seconds. Then they recover and resume where they left off. When this occurs, it recurs every one or two minutes, which is very disruptive. People have to constantly repeat themselves.
FMIS is configured with defaults out of the box, with the exception that we are recording live video and audio. How do I solve a problem like this? Is it Internet latency? Is it our internal network? Is it FMIS 3.5? Not sure where to start.
Now I've inherited much of the Flex 3 code that is used in the stream and player Flash components. I notice in the player component that the original programmer is using a timer to monitor the mx.Event.VideoEvent.STATE_CHANGED event. As long as the event fires, he resets the timer. But if 10 seconds expires and the STATE_CHANGED event has not fired, he restarts the player. Is this a valid methodology? Here is the code fragment.
<mx:Script>
<![CDATA[
var lastUpdate : Number = 0;
private var pulse : Timer = null;
private function onInit() : void {
viewVideo.addEventListener(VideoEvent.STATE_CHANGE, function() : void {
if (!lastUpdate) {
pulse.start();
}
lastUpdate = new Date().getTime();
});
pulse = new Timer(2500);
pulse.addEventListener(TimerEvent.TIMER, onHealthCheck);
}
public function onHealthCheck(te : TimerEvent) : void {
var diff : Number = (new Date().getTime() - lastUpdate) / 1000;
if (diff > HEALTH_THRESHOLD) {
var t : String = viewVideo.source;
viewVideo.source = null;
viewVideo.source = t;
viewVideo.bufferTime = 0.1;
playVideo();
}
}
public function playVideo() : void {
/* obviously this is a serious hack; (Yes, that's the original programmer's comment!) */
setTimeout(function() : void {
try {
viewVideo.play();
invalidateDisplayList();
//notify(PlayerEvent.PlayerStarted);
}
catch (ex : Object) {
playVideo();
}
}, 5500);
}
]]>
</mx:Script>
<mx:VideoDisplay width="100%" height="100%" id="viewVideo" live="true" />
Could this logic be causing our video and audio freezing?
