做的项目,在不久的将来相关的Flash玩家使用,需要播放视频的网页上,不同的视频资源,需要不同的球员。基于使用稳定性、的嵌入式和嵌入式复杂性能的优点概括起来有两种方式(不同的玩家),视频资源也略有不同,当中第一种方式比較简单,支持的视频格式要少一些(支持flv,mp4,mov,f4v,3gp等视频格式)。以下是官网上的一张截图介绍:

嵌入在网页上Flash媒体播放器(1)_嵌入式

(官网:http://www.cuplayer.com/Cu/CuPlayerMiniV4/)

页面嵌入代码:

<script type="text/javascript" src="<%=request.getContextPath()%>/js/player/images/swfobject.js"></script>
<div class="video" id="CuPlayer">
</div>
<script type="text/javascript">
var so = new SWFObject("<%=request.getContextPath()%>/js/player/CuPlayerMiniV4.swf","CuPlayerV4","600","410","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","<%=request.getContextPath()%>/js/player/CuPlayerSetFile.xml");
so.addVariable("CuPlayerFile","videoURL(视频播放地址)"); //视频资源路径,能够动态赋值
so.addVariable("CuPlayerImage","<%=request.getContextPath()%>/js/player/images/start.jpg");//视频略缩图,本图片文件必须正确
so.addVariable("CuPlayerWidth","600"); //视频宽度
so.addVariable("CuPlayerHeight","410"); //视频高度
so.addVariable("CuPlayerAutoPlay","yes"); //是否自己主动播放
so.write("CuPlayer");
</script>

备注:这仅仅是页面的嵌入代码。他还须要一些资源文件,我将须要的全部资源文件作为demo放在目录里打包上传到空间里了。