在线客服QQ: 176797520 极酷FlvPlayer在线客服 酷播网页视频播放器

4.1 swfObject调用

swfObject调用,是指通过第三方flash加载模块( swfobject.js ),调用本款flash播放器。虽然swfobject.js并不是adobe官方提供的,但由于其使用方便,并且swfobject参数的写法,简洁明了,所以本站比较推荐使用这种调用方式。

例(4.1)-1:swfObject模式调用示例1

<script type="text/javascript" src="/player/images/swfobject.js"></script>
<div class="video" id="CuPlayer"><b>网页视频播放器加载中,请稍后...</b></div>
<script type="text/javascript">
var so = new SWFObject("/Player/player.swf","ply","520","325","9","#000000");
so.addParam("allowfullscreen","true");
so.addParam("allowscriptaccess","always");
so.addParam("wmode","opaque");
so.addParam("quality","high");
so.addParam("salign","lt");
so.addVariable("JcScpFile","/Player/CuSunV2Set.xml");
so.addVariable("JcScpVideoPath","http://demo.cuplayer.com/file/test.mp4");
so.addVariable("JcScpImg","/player/Images/flashChangfa2.jpg");
so.write("CuPlayer");
</script>

例(4.1)-2:swfObject模式调用示例2

<script type="text/javascript" src="/player/images/swfobject.js"></script>
<div class="video" id="CuPlayer"><b>网页视频播放器加载中,请稍后...</b></div>
<script type="text/javascript">
var so = new SWFObject("/player/player.swf?FlvID=745","ply","520","325","9","#000000");
so.addParam("allowfullscreen","true");
so.addParam("allowscriptaccess","always");
so.addParam("wmode","opaque");
so.addParam("quality","high");
so.addParam("salign","lt");
so.addVariable("JcScpFile","/player/CuSunV2Set.asp");
so.write("CuPlayer");
</script>

例(4.1)-3:swfObject模式调用示例3

<script type="text/javascript" src="Images/swfobject.js"></script>
<div class="video" id="CuPlayer"><b>网页视频播放器加载中,请稍后...</b></div>
<script type="text/javascript">
var so = new SWFObject("/player/player.swf","ply","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("JcScpFile","CuSunV2set.asp");
//视频文件及略缩图--------------------------
//so.addVariable("JcScpServer","rtmp://www.yoursite.com/vod");
so.addVariable("JcScpVideoPath","http://demo.cuplayer.com/file/test.mp4");
so.addVariable("JcScpVideoPathHD","http://demo.cuplayer.com/file/test.mp4");
so.addVariable("JcScpImg","Images/flashChangfa2.jpg");
//-前置Flash广告-----------------------------
so.addVariable("ShowJcScpAFront","yes");
so.addVariable("JcScpCountDownsPosition","top-left");
so.addVariable("JcScpCountDowns","4");
so.addVariable("JcScpAFrontW","520");
so.addVariable("JcScpAFrontH","325");
so.addVariable("JcScpAFrontPath","Images/SevenColorPlayer_650x418.swf");
so.addVariable("JcScpAFrontLink","http://yxp.163.com/act/20120214.html");
//-视频广告参数-----------------------------
so.addVariable("ShowJcScpAVideo","no");
so.addVariable("JcScpAVideoPath","http://www.roewe.com.cn/download/roewew5/video/01/video/1.flv");
so.addVariable("JcScpAVideoLink","http://www.roewe.com.cn");
//-暂停广告参数-----------------------------
so.addVariable("ShowJcScpAPause","yes"); 
so.addVariable("JcScpAPauseW","375"); 
so.addVariable("JcScpAPauseH","230"); 
so.addVariable("JcScpAPausePath","Images/Apause375x250.jpg"); 
so.addVariable("JcScpAPauseLink","http://yxp.163.com/act/20120214.html");
//-角标广告参数-----------------------------
so.addVariable("ShowJcScpACorner","yes"); 
so.addVariable("JcScpACornerW","85"); 
so.addVariable("JcScpACornerH","50"); 
so.addVariable("JcScpACornerPath","Images/SevenColorPlayer_a10.swf"); 
so.addVariable("JcScpACornerPosition","bottom-right");
so.addVariable("JcScpACornerLink","http://www.163.com");
//-----------------------------------------
so.addVariable("JcScpSharetitle","标题信息");
so.write("CuPlayer");
</script>

swfObject调用,是指通过第三方flash加载模块( swfobject.js ),调用本款flash播放器。虽然swfobject.js并不是adobe官方提供的,但由于其使用方便,并且swfobject参数的写法,简洁明了,所以本站比较推荐使用这种调用方式。