几种在网页中播放FLV视频文件的代码(附FLV播放器)方法一、js嵌入直接copy下面代码,修改其中红色部分,即:swf_width、swf_height、texts、files 参数引用<script type="text/javascript">var swf_width=240var swf_height=240var texts=’群英传WEB版宣传视频’var files=’/flv/qyzweb.flv’document.write(’<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="/pub/shockwave/cabs/flash/swflash.cab#v ersion=6,0,0,0" width="’+ swf_width +’" height="’+ swf_height +’">’);document.write(’<param name="movie"value="/flv/flvplayer.swf"><param name="quality" value="high">’); document.write(’<param name="menu" value="false"><param name="allowFullScreen" value="true" />’);document.write(’<param name="FlashVars"value="vcastr_file=’+files+’&vcastr_title=’+texts+’">’);document.write(’<embed src="/flv/flvplayer.swf"allowFullScreen="true" FlashVars="vcastr_file=’+files+’&vcastr_title=’+texts+’"menu="false" quality="high" width="’+ swf_width +’" height="’+ swf_height +’"type="application/x-shockwave-flash"pluginspage="/go/getflashplayer" />’);document.write(’</object>’);</script>其中:群英传WEB版宣传视频是标题。
/flv/qyzweb.flv是FLV文件地址。
/flv/flvplayer.swf 是FLV文件播放器地址(如果你不会制作,可下载别人的然后上传到自己的空间再调用)。
flv播放器Vcastr 2.0 下载:/flv/flvplayer.rar方法二、简单直接传递影片地址引用<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,29,0" width="240" height="180"><param name="movie"value="/flv/flvplayer.swf?vcastr_file=/flv/qyzwe b.flv"><param name="quality" value="high"><param name="allowFullScreen" value="true" /><embedsrc="/flv/flvplayer.swf?vcastr_file=/flv/qyzweb. flv" allowFullScreen="true" quality="high"pluginspage="/go/getflashplayer"type="application/x-shockwave-flash" width="240" height="180"></embed></object>方法三、读取影片xml引用<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,29,0" width="240" height="120"><param name="movie"value=/flv/flvplayer.swf?vcastr_xml=/flv/vcastr .xml><param name="quality" value="high"><param name="allowFullScreen" value="true" /><embedsrc="/flv/flvplayer.swf?vcastr_xml=/flv/vcastr.x ml" allowFullScreen="true" quality="high"pluginspage="/go/getflashplayer"type="application/x-shockwave-flash" width="240" height="120"></embed></object>其中:/flv/vcastr.xml是播放列表的xml地址高级选项引用<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,29,0" width="240" height="180"><param name="movie"value="/flv/flvplayer.swf?vcastr_file=/flv/qyzwe b.flv"><param name="quality" value="high"><param name="allowFullScreen" value="true" /><embedsrc="/flv/flvplayer.swf?vcastr_file=/flv/qyzweb. flv" allowFullScreen="true" quality="high"pluginspage="/go/getflashplayer"type="application/x-shockwave-flash" width="240" height="180"></embed></object>引用</product/vcastr2/vcastr22.swf?参数A=111&参数B=222&....>在以上"参数A=111&参数B=222"部分添加参数,使用参数=值的格式,多个参数用&连接,参数数量不限制,注意有2个红色部分/product/vcastr2/vcastr22.swf 地方需要修改例如:引用value="/flv/flvplayer.swf?vcastr_file=/flv/qyzwe b.flv&vcastr_title=幸福的脚丫预告片&BarColor=0xFF6600&BarPosition=1"表示影片地址是"/product/vcastr/flv/happy_feet.flv",标题是"变形金刚预告片",控制栏颜色是0xFF6600,控制栏位置在下方。
引用<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,29,0" width="500" height="224"><param name="movie"value="/flv/flvplayer.swf?vcastr_file=/flv/qyzwe b.flv&vcastr_title=幸福的脚丫预告片&BarColor=0xFF6600&BarPosition=1"><param name="quality" value="high"><param name="allowFullScreen" value="true" /><embedsrc="/flv/flvplayer.swf?vcastr_file=/flv/qyzweb. flv&vcastr_title=幸福的脚丫预告片&BarColor=0xFF6600&BarPosition=1" allowFullScreen="true" quality="high"pluginspage="/go/getflashplayer"type="application/x-shockwave-flash" width="500" height="224"></embed>常见问题问:Logo 文字无法显示答:Logo 文字不能支持中文,可以用LogoUrl参数将Logo做成.swf文件或者.png文件。