如何配置 nginx 通过 JWplayer 提供 flv 视频流服务
我需要从一台服务器提供 flv 文件,并使用 JWPlayer 在另一台服务器的网页上显示这些视频。
我已经使用 flv 模块配置了 nginx,并将其放在 nginx.conf
位置 ~ .flv$ { .flv; 是
我在 jwplayer 中使用的代码
<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"
/>
其中 XX.XX.XX.XX 是服务器的 IP 地址(我们将配置一个适当的域,但首先我必须使整个事情正常工作:))
问题是没有任何反应。我不知道下一步该怎么做,网上的所有文章都只讨论如何编译 flv 模块(已经完成)并添加 nginx.conf 行。
任何帮助将不胜感激
提前致谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1) 您必须确保http://XX.XX.XX.XX/vid5.flv< /a> 可供下载。为了确保这一点,只需在浏览器中输入它的网址即可。
2)可能,您需要设置 http://XX.XX.XX.XX/crossdomain.xml< /a>,并在此文件中描述位于player.swf的所有域
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