Reputation: 5183
I want to ask how to save video and audio content that I'm loading from some site through a NetStream as an FLV file.
Is there any possible way to do this?
var ns:NetStream = new NetStream(nc);
ns.play('http://somefile.com/file.flv');
var file:FileReference=new FileReference();
**ns.doSomething(file); /// ???**
file.save(data,"flvfile.flv");
Upvotes: 0
Views: 1413
Reputation: 11294
I don't think you can do this with NetStream - it doesn't necessarily hold the entire file at any one time.
Why not just point the file reference to 'http://somefile.com/file.flv' - open that, then grab the data from it and save that with another reference once it has completed downloading? You can either run the NS in parallel as a separate operation, or open the NS from the local disc once it has finished downloading.
There's a good answer regarding downloading directly using a FileReference, and the gotchas it involves, here: Flex 3 file download - Without URLRequest
Upvotes: 1