I have a URL that dynamically serves an FLV file or GIF file at different times.
For example, if I put http://www.myserver.com/path1/var=somevalue in my browser, and the server happens to serve an FLV file at that time, the browser will ask me to download the FLV file. If the server happens to serve a GIF file at that time, the browser will display the GIF. Basically http://www.myserver.com/path1/var=somevalue will generate dynamic file content.
In my actionscript I have the following code (assume the video object, netconnection, and other initialization are already done):
netStream.play(http://www.myserver.com/path1/var=somevalue);
When the URL serves an FLV file, the video plays successfully in my flashplayer.
Note that the actual FLV file is not specified, only the path that is supposed to contain it. I haven’t seen any example of this before, but it works when I try it.
Problem:
If the URL happens to serve a GIF, my flashplayer stalls.
Question:
How can I detect that the URL served a GIF? (so that my player can recover)
I tried checking if an onStatus event was fired (I’m expecting NetStream.Play.StreamNotFound), but there doesn’t seem to be any. It looks like the netstream object did not react to the wrong input.
Can anybody help me?
Thanks.