摘要:
<script type="text/javascript" src="swfobject.js"><...
<script type="text/javascript" src="swfobject.js"></script>//引入播放器核心js文件 <script>var so = new SWFObject("CuPlayerMiniV4.swf","CuPlayerV4","1068","520","9","#000");//设置播放器界面flash 和 尺寸背景颜色等so.addParam("allowfullscreen","true");//是否允许全屏so.addParam("allowscriptaccess","always");so.addParam("wmode","opaque");so.addParam("quality","high");so.addParam("salign","lt");so.addVariable("CuPlayerSetFile","CuPlayerSetFile.php");// 视频配置文件可以不设置so.addVariable("CuPlayerFile","<?php echo '/video.mp4'?>"); //视频文件的路径,必须是绝对路径so.addVariable("CuPlayerImage","<?php echo '/video.jpg'?>");//预览图片地址,必须是绝对路径so.addVariable("CuPlayerWidth","1068"); //视频宽度so.addVariable("CuPlayerHeight","520"); //视频高度so.addVariable("CuPlayerAutoPlay","no");//是否自动播放so.write("svideo"); //写入容器id</script>
官网测试地址:http://www.cuplayer.com/Cu/CuPlayerMiniV4/index.html