播放flv文件

<html>
<head>
<script type="text/javascript" src="[color=orange]swfobject.js[/color]"></script>
</head>
<body>
<h3>single file, with preview image:</h3>
<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
var s1 = new SWFObject("[color=orange]flvplayer.swf[/color]","single","300","170","7");
s1.addParam("allowfullscreen","true");
s1.addVariable("file","video.flv");
s1.addVariable("image","preview.jpg");
s1.addVariable("width","300");
s1.addVariable("height","170");
s1.write("player1");
</script>
<h3>playlist file, with different colors:</h3>
<p id="player2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
var s2 = new SWFObject("flvplayer.swf","playlist","300","312","7");
s2.addParam("allowfullscreen","true");
s2.addVariable("file","playlist.xml");
s2.addVariable("displayheight","200");
s2.addVariable("backcolor","0x000000");
s2.addVariable("frontcolor","0xCCCCCC");
s2.addVariable("lightcolor","0x557722");
s2.addVariable("width","300");
s2.addVariable("height","312");
s2.write("player2");
</script>
<p><a href="http://www.jeroenwijering.com/extras/wizard.html">online configuration wizard</a></p>
</body>
</html>

播放的前提是:
1、安装adobe的flash player
2、有flvplayer.swf文件
3、导入swfobject.js

可以解决flash在ie浏览器中需要激活控件的问题,更重要的不会因为flvplayer播放的文件文件名为空时宕机.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值