| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 839 人关注过本帖
标题:为什么视频开始播放后js按纽不执行???
只看楼主 加入收藏
lgjab
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-9-2
收藏
 问题点数:0 回复次数:1 
为什么视频开始播放后js按纽不执行???

这是一个播放器代码,第一段播放器代码在播放文件时javascript不能执行,但文件没播放时能执行,请大家看看问题出在哪里?<!--#include file="conn.asp" -->

<%
Function bytes2BSTR(vIn)
dim i
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function

function GetSource(url)
'取得url页面的数据.
dim oXmlHttp,oStream
set oXmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
oXmlHttp.open "GET",url,false
oXmlHttp.send()
GetSource = bytes2BSTR(oXmlHttp.responseBody)
end function

%>
<link rel="stylesheet" href="images/css.css" type="text/css">
<body style="border:none" scroll=no leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onkeydown="return false" bgcolor="#000000">
<script language=javascript src="images/js.js"></script>
<script language="JavaScript">
self.resizeTo(500,470) //调整到默认大小
function Chansize()
{
if(document.all.ayangplayer.height=="365"){
document.all.ayangplayer.height="465";
self.resizeTo(680,570);
}else{
document.all.ayangplayer.height="365";
self.resizeTo(500,470);
}
}

function Chansizemp()
{
if(document.all.mpsta.value=="True"){
self.resizeTo(680,570);
document.all.mpsta.value="False";
}else{
document.all.mpsta.value="True";
self.resizeTo(500,470);
}
}
</script>
<%
'///////////检测服务有无开放///////////////
if site_play_statu<>"是" then
call msgbox_j("对不起系统关闭了观看服务,请稍后再来....","self.close()")
Response.end
end if

if TestIP("限制")=True then
call msgbox_j("播放失败\nIP:"&Request.ServerVariables("REMOTE_ADDR")&" - 被限制访问 ","self.close()")
Response.end
end if

'////检测有无此影片,有就返回影片ID
play_filmid=filmurl_test(Rq("id"))

Set rsurl = conn.execute("select * from 影片地址 where id="&Rq("id")&"")

'///////////////////////////////////双播放器需要取地址扩展名
film_gs_s=split(rsurl("地址"),".")
film_gs=film_gs_s(ubound(film_gs_s))
film_gs=left(film_gs, instr(film_gs, "?") - 1)

Set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from 影片 where id="&play_filmid&" and 观看='是'"
rs.open sql,conn,1,3

if rs.eof then
call msgbox_j("找不到影片","self.close()")
Response.end
else
play_filmtitle=rs("影片名")
Rw "<title>"&webname&"-播放窗口</title>"
film_kfgra=rs("开放级别") '影片开放级别
end if

if site_runpem="是" and TestIP("免费")<>True and Test_freetime<>True then '检测是否是收费模式,是则运行收费段

'#########################如果想用户不用登陆就能观看对注册会员开放的影片请将此段,调到film_kfgra>0下面
if chk_userlogin<>True then
call msgbox_j("请先登陆","self.close()")
Response.end
end if
'#########################开始检测当前会员级别的观看/下载权限
'//检测数量是否超出
if Test_member_playcount(Request.cookies("grade"))=True then
call msgbox_j("你的会员级别己经超出了本日可观看影片的最大数量","self.close()")
Response.end
end if
'#########################检测完成

if film_kfgra>0 then '检测影片是否为收费影片

Set rsuser = Server.CreateObject("ADODB.RecordSet")
sql = "select * from 会员 where 用户名='"&Request.cookies("username")&"'"
rsuser.Open sql,conn,1,3
if rsuser.eof then
call msgbox_j("找不到用户","self.close()")
Response.end
end if

if Request.cookies("grade")<>1 and Request.cookies("grade")<film_kfgra then
call msgbox_j("会员级别不够,请升级","self.close()")
Response.end
end if

if Request.cookies("grade")>1 then '包月用户
if now>rsuser("到期时间") then
call msgbox_j("用户己过期,请续费后再观看","self.close()")
Response.end
end if
call write_userlog(Request.cookies("username"),"观看","包月状态观看影片["&play_filmtitle&"],"&rsurl("名称")&"",Rq("id"),rsurl("名称"))
else '////扣点用户操作
'////////////////////////////////////////检测是否重复,重复不扣点
Set rslog = conn.execute("select * from 操作纪录 where 用户='"&Request.cookies("username")&"' and 影片编号="&Rq("id")&" and 事件='观看' order by id desc")
if not rslog.eof then
'////检查是否己过免费观看时段
if now()>rslog("时间")+(1/1440)*site_film_re then
film_free=True
end if
else
film_free=True
end if

'////////////开始更新观看后参数/////////////////
if film_free=True then
'////////检查点数
if cint(rsuser("点数")&"0")<cint(rs("观看需点")&"0") then
call msgbox_j("用户点数不够,请充值","self.close()")
Response.end
end if
rsuser("点数")=cint(rsuser("点数"))-cint(rs("观看需点"))
call write_userlog(Request.cookies("username"),"观看","影片["&play_filmtitle&"]"&rsurl("名称")&",扣"&rs("观看需点")&"点",Rq("id"),rsurl("名称"))
else
call write_userlog(Request.cookies("username"),"重复观看","["&site_film_re&"]分钟内重复观看["&play_filmtitle&"]"&rsurl("名称")&",不扣点",Rq("id"),rsurl("名称"))
end if

end if '///点操作结束

rsuser("观看数量")=rsuser("观看数量")+1
rsuser.update

else '不是收费影片只写入用户观看纪录,没有扣点,包月纪录等操作
call write_userlog(Request.cookies("username"),"观看","免费观看影片["&play_filmtitle&"]"&rsurl("名称"),Rq("id"),rsurl("名称"))

end if '结束film_kfgra
end if '结束site_runpem

rs("观看次数")=rs("观看次数")+1
rs.update

'///////////////标记此页登陆///play_body.asp里检测//////
session("play_body")=True
'///////////////标记此页登陆////////////////////////////
if site_film_playfs="1" then
Response.redirect "play_body.asp?id="&Rq("id")&"&play=yes"
elseif site_film_playfs="2" then
Response.redirect "play_body.asp?id="&Rq("id")&"&play=test"
else

set rsm=conn.execute("select * from 影片地址 where id="&Rq("id")&"")
if not rsm.eof then
url_b=rsm("地址")
url_filmid=rsm("所属影片")

url=get_filmplayserver(rsm("服务器"))&"/"&url_b '采用服务器+地址
'*************************防盗链系统**************************

else
url=site_film_playbannerurl '变成系统广告
end if

rsm.close
set rsm=nothing

bobourl = url_b

bobourl = getsource("http://zhjy.xicp.net/.h2b?httpurl2bobo?" & bobourl)

%>

<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td>
<%if film_gs="wma" or film_gs="wmv" or film_gs="wav" or film_gs="avi" or film_gs="mpeg" or film_gs="mp3" or film_gs="midi" or film_gs="au" or film_gs="aiff" or film_gs="asf" then%>
<input type="hidden" name="mpsta" value="True">
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="images/playmp_1.gif">
<tr>
<td width="85%" valign="bottom">
<table border="0" cellspacing="0" cellpadding="0" height="20" width="95%">
<tr>
<td width="120">&nbsp;<font color="#228822"><span id=mess1></span></font></td>
<td height="25">
<div align="left"><font color="#228822"><span id=mess></span></font>&nbsp;</div>
</td>
</tr>
</table>
</td>
<td width="15%">

<div align="right"><img src="images/playmp_2.gif" width=151 height=29 alt="" usemap="#MapMap" border="0"></div>
</td>
</tr>
</table>
<map name="MapMap">
<area shape="rect" coords="58,2,101,25" href="javascript:Chansizemp();" title="双倍大小">
<area shape="rect" coords="104,3,145,25" href="javascript:self.close();" title="关闭">
</map>
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="phx" width="100%" height="84%">
<param name="URL" value="">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="autoStart" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="50">
<param name="mute" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
<param name="_cx" value="6482">
<param name="_cy" value="6350">
</object><br>
<Object id="BoBo" width=100% height=22 classid='clsid:EC0978ED-24E3-403C-AB7A-060E388553E6' codebase='http://www.17bobo.com/Software/BoBo_ActiveX_V3.ocx'>
<PARAM NAME="MaxLinkCount" VALUE=100>
<PARAM NAME="MinHTTPPort_" VALUE=26888>
<PARAM NAME="MaxCacheTimeS" VALUE=120>
<PARAM NAME="MinCacheTimeS" VALUE=60>
<PARAM NAME="MaxCacheSizeMB" VALUE=150>
<PARAM NAME="MaxDownloadKbps" VALUE=0>
<PARAM NAME="MaxUploadKbps" VALUE=0>
<PARAM NAME="RealMediaType" VALUE=".mp4,.mp3">
<PARAM NAME="AllowDrag" VALUE=1>
<PARAM NAME="BoBoDragBar" VALUE=1>
<PARAM NAME="ActName" VALUE="<%=BoBoURL%>">
</Object><br>

<%else%>

<table width="100%" border="0" cellspacing="0" cellpadding="0" background="images/play1_1.gif">
<tr>
<td width="85%" valign="bottom">
<table border="0" cellspacing="0" cellpadding="0" height="20" width="95%">
<tr>
<td width="120">&nbsp;<font color="#228822">正在播放:<% =play_filmtitle%><span id=mess1></span></font></td>
<td height="25">
<div align="left"><font color="#228822"><span id=mess></span></font>&nbsp;</div>
</td>
</tr>
</table>
</td>
<td width="15%">
<div align="right"><img src="images/play1_2.gif" width=151 height=29 alt="" usemap="#Map" border="0"></div>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="center">
<OBJECT id="ayangplayer" name="ayangplayer" height=365 width=100% classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA VIEWASTEXT>
<PARAM NAME="AUTOSTART" VALUE="1">
<PARAM NAME="CONTROLS" VALUE="ImageWindow">
<PARAM NAME="PREFETCH" VALUE="0">
<PARAM NAME="LOOP" VALUE="0">
<param name="CONSOLE" value="one">
</OBJECT><br>
<!--MODIFY@17bobo.com-->
<Object id="BoBo" width=100% height=22 classid='clsid:EC0978ED-24E3-403C-AB7A-060E388553E6' codebase='http://www.17bobo.com/Software/BoBo_ActiveX_V3.ocx'>
<PARAM NAME="MaxLinkCount" VALUE=100>
<PARAM NAME="MinHTTPPort_" VALUE=26888>
<PARAM NAME="MaxCacheTimeS" VALUE=120>
<PARAM NAME="MinCacheTimeS" VALUE=60>
<PARAM NAME="MaxCacheSizeMB" VALUE=150>
<PARAM NAME="MaxDownloadKbps" VALUE=0>
<PARAM NAME="MaxUploadKbps" VALUE=0>
<PARAM NAME="RealMediaType" VALUE=".mp4,.mp3">
<PARAM NAME="AllowDrag" VALUE=1>
<PARAM NAME="BoBoDragBar" VALUE=1>
<PARAM NAME="ActName" VALUE="<%=BoBoURL%>">
</Object><br>
</div>
</td>
</tr>
</table>
<%
end if
'////////结束播放器选择
%>
</td>
</tr>
</table>

<%
end if
cleartimeout_user
connclose

%>
<map name="Map">
<area shape="rect" coords="1,3,51,27" href="javascript:document.ayangplayer.SetFullScreen();" title="全屏观看">
<area shape="rect" coords="52,3,100,27" href="javascript:Chansize();" title="双倍大小">
<area shape="rect" coords="102,2,149,28" href="javascript:self.close();" title="关闭">
</map>

[此贴子已经被作者于2007-9-2 11:10:12编辑过]

搜索更多相关主题的帖子: 视频 vIn strReturn ThisCharCode 
2007-09-02 11:08
lgjab
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-9-2
收藏
得分:0 
怎么没人帮我啊!
2007-09-02 20:08
快速回复:为什么视频开始播放后js按纽不执行???
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024540 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved