haXe Forum > Remote access to flv is not working
-
Dripstone Mar 15 at 10:33
Hello, I am writing a simple flv player. I can load the swf from local file manager and play flv correctly. When I open swf from a web browser, it doesn't work.
I tried the following steps:
1. Compile swf with -D network-sandbox
2. Put crossdomain.xml and flv file in root directory of localhost
3. crossdomian.xml:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
4. Access remote flv using:
stream = new NetStream(connection);
...
stream.play("http://localhost/test.flv");
...Any help? Thanks!
-
Oleg Sivokon Mar 15 at 16:04
The connection should be null for static FLV files. Check your htaccess and make sure your server is configured to serve FLV files at all.
-
Dripstone Mar 16 at 15:01
I think it is null. I use the following code:
var connection = new NetConnection();
connection.connect(null);I can download the file if I open "http://localhost/test.flv" in browser. And I can play FLV files via wordpress.