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

4.18 收费模式(节目预览模式的实现)播放指定秒数后,视频结束,提示登陆的效果


收费模式的含义:一个50分钟的视频节目,实现未注册用户只能观看10分钟(相当于预览一小部分),用户登陆后,观看整个视频节目。

终端适配测试效果图说明:左侧为PC端画面,右侧为IPAD终端

例(4.18)-1:收费模式(节目预览模式的实现)写法示例 1

收费模式判断过程示例::

<!--#include file="conn.asp"-->
<%
'首先判断用户的session,来确定用户是否登陆
dim username,users
user=request.cookies("users")("username")
%>
<%
'当用户没有登陆,设定视频播放10秒结束
if Session("bgmuser")="" then
endtime=10
else
'当用户登陆,播放完整视频
endtime=0
end if
%>
<%
FlvID=request("FlvID")
if not isnumeric(FlvID) then
response.write("<script>alert('非法操作!');window.close();</script>")
response.end
end if
sql="select * from shipin where id="&FlvID
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof then
response.write "<script>window.alert('系统未找到此视频!');javascript:location='/';</script>"
response.end
else
shipin_url=rs("shipin_url")
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
<CuPlayer>
<Player_Set
JcScpBufferTime = "5"
JcScpVolume = "75"
JcScpCode = "utf8"
JcScpImgDisplay = "no"
JcScpAutoHideControl="yes"
JcScpControlHideTime="8"
JcScpControlHeight="40"
JcScpShowList= "next"
JcScpAutoRepeat = "no"
JcScpAutoPlay = "yes"
JcScpsetMode = "1"
JcScpAFrontCanClose = "no"
JcScpShowRightmenu = "yes"
JcScpShareMode = "JcScpVideoPath"
/>
<Logo_Set
JcScpLogoDisplay = "yes"
JcScpLogoPath = "images/logo.png"
JcScpLogoPosition = "top-left"
JcScpLogoWidth = "165"
JcScpLogoHeight = "75"
JcScpLogoAlpha = "1"
/>
<Flashvars_Set
JcScpServer =""
JcScpVideoPath = "<%=shipin_url%>"
JcScpVideoPathHD = ""
JcScpImg ="images/startpic.jpg"

JcScpStarTime = "0"
JcScpEndTime = "<%=endtime%>"

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