java调用海康ocx问题,急!!!!!!!!!!!!!! 10
各位大虾,本人在使用海康公布的NetVideoActiveX23.cab通过ocx调用NVR显示视频时,登录可以,但是无法获取视频通道,还请各位大虾指点。以下是主要代码<...
各位大虾,本人在使用海康公布的NetVideoActiveX23.cab通过ocx调用NVR显示视频时,登录可以,但是无法获取视频通道,还请各位大虾指点。以下是主要代码
<script type="text/javascript">
window.onload = function () {
var szDevIp = '192.168.1.103';
var szDevPort = '8000';
var szDevUser = 'admin';
var szDevPwd = '12345';
m_iLoginUserId = m_bDVRControl.Login(szDevIp, szDevPort, szDevUser, szDevPwd);
if (m_iLoginUserId == -1) {
LogMessage("注册失败!");
}
else {
LogMessage("注册成功!");
}
if (m_iNowChanNo > -1) {
if (m_iPlay == 1) {
m_bDVRControl.StopRealPlay();
}
var bRet = m_bDVRControl.StartRealPlay(m_iNowChanNo, m_iProtocolType, m_iStreamType);
if (bRet) {
LogMessage("预览通道" + (m_iNowChanNo + 1) + "成功!");
m_iPlay = 1;
}
else {
LogMessage("预览通道" + (m_iNowChanNo + 1) + "失败!");
}
}
}
</script>
<body onscroll="workaround();" topmargin="0" bottommargin="0"
leftmargin="0" rightmargin="0" scroll="no" onunload="ExitApp();">
<div align="center">
<table border="0" cellspacing="0" cellpadding="0" id="table">
<tr>
<td bgcolor="#294552" valign="top" colspan="2"><object
classid="CLSID:CAFCF48D-8E34-4490-8154-026191D73924"
codebase="NetVideoActiveX23.cab#version=2,3,19,1"
standby="Waiting..." id="HIKOBJECT1" name="HIKOBJECT1">
<param name="wndtype" value="3" />
<param name="playmode" value="undefined" />
</object> <script language="javascript" type="text/javascript">
//document.activex.url.value="https://192.0.7.213"
//OCXobj.SendCmd();
//OCXobj.NumBig();
</script></td>
</tr>
</table>
</div>
<div id='OperatLogBody' style="display: none"></div>
</body> 展开
<script type="text/javascript">
window.onload = function () {
var szDevIp = '192.168.1.103';
var szDevPort = '8000';
var szDevUser = 'admin';
var szDevPwd = '12345';
m_iLoginUserId = m_bDVRControl.Login(szDevIp, szDevPort, szDevUser, szDevPwd);
if (m_iLoginUserId == -1) {
LogMessage("注册失败!");
}
else {
LogMessage("注册成功!");
}
if (m_iNowChanNo > -1) {
if (m_iPlay == 1) {
m_bDVRControl.StopRealPlay();
}
var bRet = m_bDVRControl.StartRealPlay(m_iNowChanNo, m_iProtocolType, m_iStreamType);
if (bRet) {
LogMessage("预览通道" + (m_iNowChanNo + 1) + "成功!");
m_iPlay = 1;
}
else {
LogMessage("预览通道" + (m_iNowChanNo + 1) + "失败!");
}
}
}
</script>
<body onscroll="workaround();" topmargin="0" bottommargin="0"
leftmargin="0" rightmargin="0" scroll="no" onunload="ExitApp();">
<div align="center">
<table border="0" cellspacing="0" cellpadding="0" id="table">
<tr>
<td bgcolor="#294552" valign="top" colspan="2"><object
classid="CLSID:CAFCF48D-8E34-4490-8154-026191D73924"
codebase="NetVideoActiveX23.cab#version=2,3,19,1"
standby="Waiting..." id="HIKOBJECT1" name="HIKOBJECT1">
<param name="wndtype" value="3" />
<param name="playmode" value="undefined" />
</object> <script language="javascript" type="text/javascript">
//document.activex.url.value="https://192.0.7.213"
//OCXobj.SendCmd();
//OCXobj.NumBig();
</script></td>
</tr>
</table>
</div>
<div id='OperatLogBody' style="display: none"></div>
</body> 展开
2个回答
2014-06-21
展开全部
哪一步失败了?插件支持多浏览器吗?
更多追问追答
追问
var bRet = m_bDVRControl.StartRealPlay(m_iNowChanNo, m_iProtocolType, m_iStreamType);
这个地方调用不到,返回false
追答
服务器在本地吗? 有没有可能是防火墙的问题;或者是权限的问题;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询