视频收费模式(节目预览 / 视频收费 / 节目试看)

 

视频收费模式的含义:例如一个50分钟的视频节目,提供给用户观看一小段,然后视频就关闭,并提示用户注册或收费等信息;用户登陆或付费后,观看整个视频节目。
值得提示的是,收费模式结合RTMP流媒体协议使用,效果更佳。

 

 

网页视频播放器加载中,请稍后...

 

例(4.18)-1:收费模式(节目预览模式的实现)简单写法示例:(本示例官方下载地址>>

<script type="text/javascript" src="/demos/basic/playergetEnd/js/swfobject.js"></script>
<div class="video" id="CuPlayer"><b><img src="/demos/basic/playergetEnd/images/loading.gif" /> 网页视频播放器加载中,请稍后...</b></div>
<script type="text/javascript">
var so = new SWFObject("/demos/basic/playergetEnd/player.swf","myCuPlayer","750","420","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","/demos/basic/playergetEnd/CuSunV3set.xml");
//视频文件及略缩图--------------------------
//so.addVariable("JcScpServer","rtmp://www.yoursite.com/vod");//流媒体服务器
so.addVariable("JcScpAutoPlay","yes"); //是否自动播放
so.addVariable("JcScpEndTime","18"); //视频结束时间点/秒数/此参数也可以写在CuSunV3set.xml配置文件中
so.addVariable("JcScpVideoPath","http://admin.geely.com/videoFile/geelyxingxiang.flv"); //视频文件地址
so.addVariable("JcScpImg","/demos/basic/playergetEnd/images/startpic.jpg");//视频缩略图
//-----------------------------------------
so.addVariable("JcScpSharetitle","极酷阳光播放器(CuSunPlayerV3.5)版使用官方演示实例");
so.write("CuPlayer");
function getEnd(pars){
var _html = '';
_html += '<div class="payInfo">';
_html += '<p class="info">该视频为收费视频,请购买后观看</p>';
_html += '<p class="title">您要购买的视频:《小学三年级语文视频教程》</p>';
_html += '<p class="pay">需支付论坛币:10个</p>';
_html += '<p class="paybtn">';
_html += '<a class="btn1" href="http://v3.cuplayer.com/" target="_blank">立即购买</a>';
_html += '<a class="btn2" href="http://wpa.qq.com/msgrd?v=3&uin=261532593&site=qq&menu=yes" target="_blank"><i class="qqLogo"></i>在线咨询</a></p>';
_html += '</div>';
document.getElementById('CuPlayer').innerHTML = _html;
}
</script>

注意:本收费模式的范例只支持PC端,不支持安卓,不支持IOS.