- 4.代码使用
- 4.1 [A]swfObject调用
- 4.2 [B]object调用
- 4.3 [C]Ebemb调用
- 4.4 [D]JS形式调用
- 4.5 函数接口
- 4.6 广告相关
- [1] 前置广告
- [2] 视频广告
- [3] 暂停广告
- [4] 角标广告
- [5] 后置广告
- 4.7 开灯关灯
- 4.8 高清模式
- 4.9 分享模式
- 4.10 视频模式
- 4.11 RTMP点播
- 4.12 RTMP直播
- 4.13 视频结束动作
- 4.14 色彩自定义
- 4.15 移动终端适配(New)
- 4.16 HLS直播(m3u8适配)
- 4.17 适配PC/安卓/苹果
- 4.18 收费模式(节目预览)
4.6.4 角标广告
以上示意图角标广告位置为: top-center 角标广告位于中上效果
以上示意图角标广告位置为: bottom-center 角标广告位于中下效果
以上示意图角标广告位置为: top-right 角标广告位于左上效果
以上示意图角标广告位置为: top-left 角标广告位于右上效果
以上示意图角标广告位置为: bottom-right 角标广告位于右下效果
- 角标广告:
视频播放时,如果开启了角标广告,则在视频区显示一个角标广告;
支持swf,jpg,gif,png文件格式,均可以添加广告链接地址。
角标广告的位置控制:
本款播放器为角标广告提供了六种位置设定的参数JcScpACornerPosition
该参数对应值为:
top-right 右上角
top-left 左上角
bottom-right 右下角
bottom-left 左下角
bottom-center底部具中
top-center 上部具中
- 例(4.6.4)-1:调用方式一
-
-
//HTML代码参数
<script type="text/javascript" src="images/swfobject.js"></script>
<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://vhotwsh.video.qq.com/flv/209/39/7DyThulBJia.mp4");
so.addVariable("JcScpImg","/Player/Images/flashChangfa2.jpg");
......
//-角标广告-----------------------------
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.write("CuPlayer");
</script>
-
- 例(4.6.4)-2:调用方式二
-
-
//HTML代码参数
<script type="text/javascript" src="images/swfobject.js"></script>
<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://vhotwsh.video.qq.com/flv/209/39/7DyThulBJia.mp4");
so.addVariable("JcScpImg","/Player/Images/flashChangfa2.jpg");
so.write("CuPlayer");
</script>
-
//配置文件参数
......
<Flashvars_Set
JcScpServer =""
JcScpVideoPath = "http://mv.top100.cn/special_26851/Everytime.flv"
JcScpVideoPathHD = "http://mv.top100.cn/special_26851/Everytime.flv"
JcScpImg ="Images/flashChangfa2.jpg"
......
ShowJcScpACorner = "yes"
JcScpACornerPath = "Images/SevenColorPlayer_a10.swf"
JcScpACornerW = "80"
JcScpACornerH = "50"
JcScpACornerPosition = "top-right"
JcScpACornerLink = "http://yxp.163.com/act/20120214.html"
......
-