网页播放mp4视频解决方案
时间:2015-10-21 阅读:次 QQ群:182913345
Web网页中播放mp4视频解决方案,代码如下:
播放器下载地址:CuPlayer.rar
<script type="text/javascript" src="/CuPlayer/images/swfobject.js"></script> <div id="CuPlayer"> <strong>php技术分享(php520.cn) 提示:您的Flash Player版本过低!</strong> </div> <script type="text/javascript"> var so = new SWFObject("/CuPlayer/CuPlayerMiniV4.swf","CuPlayerV4","680","510","9","#000000"); so.addParam("allowfullscreen","true"); so.addParam("allowscriptaccess","always"); so.addParam("wmode","opaque"); so.addParam("quality","high"); so.addParam("salign","lt"); so.addVariable("CuPlayerSetFile","/CuPlayer/CuPlayerSetFile.php"); //播放器配置文件地址 so.addVariable("CuPlayerFile","/video/php/PHP3.8.12.mp4"); //视频文件地址 so.addVariable("CuPlayerImage","/CuPlayer/images/start.jpg"); //视频略缩图,本图片文件必须正确 so.addVariable("CuPlayerWidth","680"); //视频宽度 so.addVariable("CuPlayerHeight","510"); //视频高度 so.addVariable("CuPlayerAutoPlay","no"); //视频高度 so.addVariable("CuPlayerLogo","/CuPlayer/images/logo.png"); //Logo文件地址 so.addVariable("CuPlayerPosition","bottom-right"); //Logo显示的位置 so.write("CuPlayer"); </script> |
播放器下载地址:CuPlayer.rar