views:

238

answers:

1

Hello,

Is there a way to cancel a netstream publish from flex to a flash media server?

The issue is I have code where I can Start/Stop a recording to my Flash media server. However in my front end I have a cancel button which allows the user to cancel the current recording and all this code essentially does it close the netstream. But the issue is it still creates the file on my flash media server even though the user has canceled the stream. Is there a function that I can call that will clear up the stream and remove the file that was created?

Thanks

A: 

The thing is that FMS records the stream to the disk while it's being streamed. So when you call netStream.close(), it just stops recording data. AFAIK, there is no way to remove stream as a stream, but each recorded stream is stored in a file, so you can manually remove the file from the server using server-side script and file.remove() there. If you use Flash Media Streaming Server (which means you cannot modify FMS server-side scripts), then use some scripting language such as Python or PHP to do file removing job.

Hrundik
yea I was figuring that was the route I would need to take. I had did a bit of searching and I could not find a way for fms to handle it besides writing server side code.
JustFoo