在网页中加入flv视频

1.利用js

 <script type="text/javascript">
    var swf_width=250   
    var swf_height=195
    var texts='影视宣传片'
    var files='upload/1.flv'
    var config='1:自动播放|1:连续播放|100:默认音量|0:控制栏位置|2:控制栏显示|0x000033:主体颜色|60:主体透明度|0x66ff00:光晕颜色|0xffffff:图标颜色|0xffffff:文字颜色|shengse:logo文字|:logo地址|:结束swf地址'
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
    document.write('<param name="movie" value="flvplayer.swf"><param name="quality" value="high">');
    document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
    document.write('<param name="FlashVars" value="vcastr_file='+files+'&vcastr_title='+texts+'&vcastr_config='+config+'">');
    document.write('<embed src="flvplayer.swf" wmode="opaque" FlashVars="vcastr_file='+files+'&vcastr_title='+texts+'&vcastr_config='+config+'" menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
    document.write('</object>');
   </script>

     说明: files   这是你要播放的flv的url

             flvplayer.swf  这是你的flv的播放器的url

          

posted on 2009-11-17 17:21  Primary  阅读(798)  评论(0编辑  收藏  举报

导航