-
1. Re: How can I download FLV completely and only then play video on Flash?
Flashing Mathur Apr 17, 2012 11:47 PM (in response to PauliusLiekis)Hi,
The error you have reported. It seems that flash player is unable to access to the document root folder of your web server. Place crossdomain.xml in the web server’s document root directory.
This should solve the problem you are facing.
Thanks!
-
2. Re: How can I download FLV completely and only then play video on Flash?
PauliusLiekis Apr 18, 2012 2:50 PM (in response to Flashing Mathur)No, I don't think that's the issue. I have no problems downloading the video using URLLoader, which does the crossdomain check. Problem is when I do this:
stream = new NetStream(connection);
// ... snip ...
video = new Video();
video.attachNetStream(stream);
addChild(video);
stream.play(null);
stream.appendBytes(videoByteArray as ByteArray); // videoByteArray is taken from URLLoader downloaded content, i.e. the video
As you can see NetStream doesn't know anything about the video, it doesn't know anything about the server, so it can not take something from crossdomain.xml.
As far as I've read, it's imposible to do what I'm doing: simply Flash security won't allow to take contents of anonymous stream (i.e. stream started with play(null)).
So my question is: how do I download video first and then play (instead of streaming) it in some other way? I couldn't find such API on NetStream itself.
-
3. Re: How can I download FLV completely and only then play video on Flash?
Yin_Zhang May 27, 2012 8:21 PM (in response to PauliusLiekis)Have you found a solution to make Bitmap.draw() work with NetStream.appendBytes()? I ran into the same problem and couldn't find a solution.
-
4. Re: How can I download FLV completely and only then play video on Flash?
PauliusLiekis May 27, 2012 11:17 PM (in response to Yin_Zhang)Yin_Zhang wrote:
Have you found a solution to make Bitmap.draw() work with NetStream.appendBytes()? I ran into the same problem and couldn't find a solution.
No, my conclusion was that it is imposible due to security sandbox restrictions. We ended up prestreaming part of video using NetStream and then simply unpausing it.


