Ad

How Config Nginx To Serve Flv Video Streaming With JWplayer

- 1 answer

I need to serve flv files from one server, and show those videos on a web page located in another server, with JWPlayer.

I already config nginx with the flv module, an put this on nginx.conf

location ~ .flv$ { flv; }

The code I use in the jwplayer is

 <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200"> 
<param name="movie" value="player.swf" /> 
<param name="allowfullscreen" value="true" /> 
<param name="allowscriptaccess" value="always" /> 
<param name="flashvars" value="file=http://XX.XX.XX.XX/vid5.flv&image=preview2.jpg" /> 
<embed 
    type="application/x-shockwave-flash"
    id="player2"
    name="player2"
    src="player.swf" 
    width="630" 
    height="385"
    allowscriptaccess="always" 
    allowfullscreen="true"
    flashvars="file=http://XX.XX.XX.XX/vid5.flv&image=preview2.jpg" 
/> 

Where XX.XX.XX.XX is the ip address of the server (we'll config an appropiate domain, but first i have to make the whole thing works :) )

The problem is that nothing happen. I don't know what to do next, all the articles on the internet only talks about how compile the flv module (already done) and add the nginx.conf lines.

Any help would be greatly appreciate

Thanks in advance

Ad

Answer

1) You must sure, that http://XX.XX.XX.XX/vid5.flv is available for download. In order to make sure this, just type it's url in browser.

2) Probably, you need setup http://XX.XX.XX.XX/crossdomain.xml, and describe in this file all domains, on which located player.swf

Ad
source: stackoverflow.com
Ad