Based on the Conway SDK javab/s

Source: Internet
Author: User

Download the Netvideoactivex23.cab file based on the JAVAB/S SDK and place it in the CodeBase folder below Webroot <%@ page language= "java" import= "java.util.* "Pageencoding=" Utf-8 "%> global variable definition var m_inowchanno =-1; Current channel number var m_iloginuserid =-1; Registered device User ID var m_ichannelnum =-1; Total number of analog channels var m_bdvrcontrol = null; OCX Control object var m_iprotocoltype = 0; protocol type, 0–TCP, 1-udp var m_istreamtype = 0; The stream type, 0 represents the main stream, and 1 indicates the sub-stream var m_iplay = 0; is currently previewing var M_irecord = 0; Are you currently recording var m_italk = 0; Are you currently talking about var m_ivoice = 0; Whether the sound is currently turned on var m_iautoptz = 0; Whether the current gimbal is rotating var m_iptzspeed = 4; Gimbal speed/************************************************* function:logmessage Description: Write execution result log input:msg: Log Output: No Return: no *************************************************/function LogMessage (msg) {//var mydate = new Date ( ); var sznowtime = mydate.tolocalestring (); Gets the date and time document.getElementById ("Operatlogbody"). InnerHTML = "--" + msg;} /************************************************* function:onload Description: After the page is loaded, determine whether the system date is in the 1971-2037 range Input: None Output: No Return: no *************************************************/window.onload = function () {functIon GetIP () {var obj = Bzmis.vidio_index2.getIP (); return obj.value;} function Getport () {var obj = bzmis.vidio_index2. Getport (); return obj.value; } function GetUserName () {var obj = Bzmis.vidio_index2.getUserName (); return obj.value;} function GetPassword () {var ob j = Bzmis.vidio_index2.getPassword (); return obj.value; } function Getchannelno () {var obj = Bzmis.vidio_index2.getChannelNo (); return obj.value;} var mydate = new Date (); var iyear = Mydate.getfullyear (); if (Iyear < 1971 | | iyear > 2037) {alert ("for normal use of the software, please set the system date to 1971-2037! "); parent.location.href = ". /login.php "; } if (document.getElementById ("HIKOBJECT1"). Object = = null) {alert ("Please download the control First and register!") "); M_bdvrcontrol = null; } else {M_bdvrcontrol = document.getElementById ("HIKOBJECT1"); Changestatus (1); Arrangewindow (1); } var szdevip = ' 192.168.32.31 '; var szdevport = ' 8000 '; var szdevuser = ' admin '; var szdevpwd = ' 12345 '; M_iloginuserid = M_bdvrcontrol.login (Szdevip, Szdevport, Szdevuser, szdevpwd); if (M_iloginuserid = =-1) {LogMessage ("Registration failed! "); } else {logmessage ("registered successfully! "); } M_inowchanno = 3; if (M_inowchanno >-1) {if (M_iplay = = 1) {M_bdvrcontrol.stoprealplay ();} var bRet = M_bdvrcontrol.startrealplay (m_i Nowchanno, M_iprotocoltype, M_istreamtype); if (BRet) {logmessage ("Preview channel" + (M_inowchanno + 1) + "Success! "); M_iplay = 1; } else {logmessage ("Preview channel" + (M_inowchanno + 1) + "failed! "); } } } /************************************************* function:changestatus Description: When the window is selected, the status of the corresponding channel displays Input: Iwindownum: Selected window number Output: no return: no *************************************************/function Changestatus ( Iwindownum) {M_bdvrcontrol = document.getElementById ("hikobject" + iwindownum),/*for (var i = 1; I <= 4; i + +) {if (i = = Iwindownum) {document.getElementById ("netplayocx" + i). Style.border = "1px solid #00F";} else {Document.getelementby Id ("Netplayocx" + i). Style.border = "1px solid #EBEBEB"; }} logmessage ("Currently selected window" + iwindownum); */}//document.oncontextmenu = RiGhtclick; /************************************************* function:rightclick Description: Web page Disabled Right-click Input: No Output: no Return: Bool:true false *************************************************/function RightClick () {return false;} function work Around () {Window.document.all.item ("OCX"). Style.display = "None"; Window.document.all.item ("ocx"). Style.display = "" ; document.getElementById ("HIKOBJECT1"). width = document.body.clientWidth; document.getElementById ("HIKOBJECT1"). Height = document.body.clientHeight; }//close resource, exit login function Exitapp () {M_bdvrcontrol = document.getElementById ("HIKOBJECT1"); This.m_bDVRControl.Logout ();}
//document.activex.url.value= "https://192.0.7.213"//ocxobj.sendcmd ();//ocxobj.numbig ();

Based on the Conway SDK javab/s

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.