Skip to main content
Participating Frequently
November 3, 2009
Answered

NetStream.Play.StreamNotFound not dispatching

  • November 3, 2009
  • 1 reply
  • 3509 views

Hello..

I have a strange problem. I'm recording audio using FMIS, the file is being saved out as a FLV file and I am able to play it back. Eventually that file may be deleted after some time and I would like to notify the user if the file is no longer available. I was expecting to see NetStream.Play.StreamNotFound after deleting the file on the server but I'm not getting that message. Instead I get:

-->      NetStream.Play.Reset
-->      NetStream.Play.Start

And nothing plays which is expected since the file is deleted, but I dont get the right message. I'm calling the file like so:

ns.play ("flv:file_to_stream");

Any idea what could be the problem?

Thanks
Ryan


    This topic has been closed for replies.
    Correct answer

    I see two issues:

    1. Don't use a prefix for flv files.

    2. You need to use the start flag in your ns.play constructor to tell FMS what you want. The default value is -2, which first looks for a live stream, then a recorded stream. If no recorded stream is found, a live stream is created.

    Try this:

    ns.play ("file_to_stream", 0,-1);

    1 reply

    Correct answer
    November 3, 2009

    I see two issues:

    1. Don't use a prefix for flv files.

    2. You need to use the start flag in your ns.play constructor to tell FMS what you want. The default value is -2, which first looks for a live stream, then a recorded stream. If no recorded stream is found, a live stream is created.

    Try this:

    ns.play ("file_to_stream", 0,-1);

    Participating Frequently
    November 4, 2009

    Indeed, that's what it was. Point number 2 solved my problem.

    Once I set those flags I was able to get the StreamNotFound msg.

    Originally I had not used the flv prefix but added it because I thought that was the reason. I've also removed prefix again.

    Thanks!