1. 程式人生 > >網頁視訊播放器程式碼Vcastr2

網頁視訊播放器程式碼Vcastr2

 

TIP:播放的視訊地址必須是線上的

第一種:js

 <p style="text-align: center;">
        <script type="text/javascript"> 
        var swf_width=700
        var swf_height=525
        var texts='1'
        var files='http://www.zz-df.com.cn/images/zw01.flv'
		var cp_swf='images/vcastr2.swf'
        var config='1:自動播放|1:連續播放|100:預設音量|0:控制欄位置|2:控制欄顯示|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="'+cp_swf+'"><param name="quality" value="high">');
        document.write('<param name="menu" value="false">');
        document.write('<param name="allowFullScreen" value="true" />');
        document.write('<param name="wmode" value="transparent" />');
        document.write('<param name="FlashVars" value="vcastr_file='+files+'&vcastr_title='+texts+'&vcastr_config='+config+'">');
        document.write('<embed src="'+cp_swf+'" allowFullScreen="true" FlashVars="vcastr_file='+files+'&vcastr_title='+texts+'&vcastr_config='+config+'" menu="false" quality="high" wmode="transparent" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>'); 
        </script>
        </p>

第二種:直接寫

<p style="text-align: center;">
	   <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="700" height="525">
            <param name="movie" value="images/vcastr2.swf">
            <param name="quality" value="high">
            <param name="menu" value="false">
            <param name="allowFullScreen" value="true">
            <param name="wmode" value="transparent">
            <param name="FlashVars" value="vcastr_file=http://www.zz-df.com.cn/images/zw01.flv&amp;vcastr_title=1&amp;vcastr_config=1:自動播放|1:連續播放|100:預設音量|0:控制欄位置|2:控制欄顯示|0x000033:主體顏色|60:主體透明度|0x66ff00:光暈顏色|0xffffff:圖示顏色|0xffffff:文字顏色|:logo文字|:logo地址|:結束swf地址">
            <embed src="images/vcastr2.swf" allowfullscreen="true" flashvars="vcastr_file=http://www.zz-df.com.cn/images/zw01.flv&amp;vcastr_title=1&amp;vcastr_config=1:自動播放|1:連續播放|100:預設音量|0:控制欄位置|2:控制欄顯示|0x000033:主體顏色|60:主體透明度|0x66ff00:光暈顏色|0xffffff:圖示顏色|0xffffff:文字顏色|:logo文字|:logo地址|:結束swf地址" menu="false" quality="high" wmode="transparent" width="700" height="525" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
        </object>
		 </p>

 

程式碼+附件,下載地址:

https://download.csdn.net/download/cplvfx/10850811

 

延伸閱讀:

 

使用flv播放器 Vcastr 網頁視訊播放器程式碼中的引數說明

https://blog.csdn.net/willonboy/article/details/4425366