方法一:flash方式嵌入优酷视频
<embed src=" http://static.youku.com/v1.0.0149/v/swf/qplayer_rtmp.swf?VideoIDS=XNTY1NDEzMTA4&winType=adshow&isAutoPlay=false" quality="high" width="660" height="330" align="middle" allowFullScreen="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"></embed>
只需更改上述代码中的VideoIDS后面的字符串XNTY1NDEzMTA4即可。
方法二:iframe方式嵌入优酷视频(好处是支持ipad、iphone)
<iframe height=600 width=330 src="http://player.youku.com/embed/XNTcyMzIwMTE2" frameborder=0 allowfullscreen></iframe>
更改URL中embed/后面的字符串XNTcyMzIwMTE2即可
方法三:flv文件在自己的服务器的情况 flash方式
<SCRIPT type="text/javascript"> var swf_width=720 var swf_height=500 var texts='宣传片' var files="1.flv" var config='0:自动播放|0:连续播放|100:默认音量|1:控制栏位置|1:控制栏显示|0x000033:主体颜色|60:主体透明度|0x66ff00:光晕颜色|0xffffff:图标颜色|0xffffff:文字颜色|: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="vcastr.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="vcastr.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>
在同级目录中放入vcastr.swf文件 ,网上很容易找到,然后更改files的flv视频路径即可。