今天给客户做一个视频播放器模块,因播放器过小导致按钮重叠起来,如下图:
经过一番研究,石家庄网站建设(http://www.viming.com)找到解决方案,引用插件的代码如下:
以下是引用片段:
<script type="text/javascript" src="swfobject.js"></script> <div id="CuPlayer" ></div> <script type=text/javascript> var so = new SWFObject("Player.swf","CuPlayer","200","150","9","#000000"); so.addParam("allowfullscreen","true"); so.addParam("allowscriptaccess","always"); so.addParam("wmode","opaque"); so.addParam("quality","high"); so.addParam("salign","lt"); so.addVariable("CuPlayerFile","move.flv");//视频文件地址 so.addVariable("CuPlayerShowImage","true"); so.addVariable("CuPlayerWidth","200");//视频宽度 so.addVariable("CuPlayerHeight","150");//视频高度 so.addVariable("CuPlayerAutoPlay","yes");//是否自动播放 so.addVariable("CuPlayerAutoHideTime","6"); so.addVariable("CuPlayerVolume","80"); so.addVariable("CuPlayerGetNext","false"); so.write("CuPlayer"); </script> |
上面的效果如下图:
下载文件:Player.rar
石家庄网站建设公司-伟明网站设计,拥有专业设计团队为企业提供网站设计,网页制作,网址是www.viming.com