Copy link to clipboard
Copied
I am developing a video player for FMS 3.0 and my client complains that when he leaves the player running overnight or after computer goes to sleep when he comes back the elapsed time displayed as NaN and when he tries to play, nothing happens.
Why is this happening? Does it mean that the connection with the FMS dropped and I have to reconnect? How can test for the dropped connection? Thanks.
Copy link to clipboard
Copied
I think this is what might be happening :
I think in both cases, when he is playing it overnight , his machine might be going to sleep , and his network connection to server migth be goign off. Since network connection goes off, NetConnection would be closed resulting in NetStream going out of scope which results in NaN for NetStream.time.
You can basically display error message when you connection goes down by using watching for NetConnection.Connect.Closed message in your NetConnection handler. And you can either assign display of NetStream time visually as 0 instead of NaN for better user experience.
Copy link to clipboard
Copied
yep, you were right. The machine went to sleep and internet connection was lost. And of course in the morning, when he was back, he would wake the computer up and click play right away. The problem was that it took time to get the internet connection back and reconnect to the server. I ended up putting a internet connection check to make sure that I can successfully reconnect to server once it's available.