mobile CCTV,mobile surveillance,police body worn cameras

标题: ASP.Net MVC web application error Non-OCX application [打印本页]

author: jiwang    time: 2019-1-24 09:22
标题: ASP.Net MVC web application error Non-OCX application
I have been working on integrating the Besa sample code into our ASP.Net MVC web application to connect to the cameras remotely. I have tried a number of the automated login code samples and I keep getting this error:  (Please see attachments)

Here is a sample of the code I'm working with. Just want to get it to connect before moving on.
@{
ViewBag.Title = "TEST";
}

@section scripts {
<script src="~/Scripts/jsw.js"></script>
<script>

// 192.168.11.230:9701

window.onload = function () {
jSW.swInit ({
Url: 'http://192.168.11.230:9701', // bv_nginx.exe server address
Calltype: jSW.CallProtoType.HTTP,
});
}
window.onbeforeunload = function () {
jSW.swDeInit ();
}

if (this.session) { delete this.session; }
this.session = new jSW.SWSession({
Server: 'http://127.0.0.1',
port: '9701',
onopen: function(sess) {
sess.swLogin ({
user: 'admin',
password: '123456'
})
},
onclose: function(sess, evt) {
console.log(sess)
}
});

// Register event callback function
this.session.swAddCallBack('login', function (sender, event, json) {
alert(JSON.stringify(json, null, 4));
});

this.session.swLogin();

</script>
}


I have included the jsw.js file in the project. This is a non-OCX application. Am I missing any other components that may be required?

author: besovideo    time: 2019-1-24 09:29
hello, did you try our demo on http://61.191.27.18:8081
?
kindly pls try for compare.
author: IBeli    time: 2019-1-24 09:53
hello, i see you load jsw.js for ~/Scripts/jsw.js.
the jsw.js depend on many js from jswlib Folder.
you must make sure jsw.js and jswlib folder in same folder.[attach]1676[/attach]





欢迎光临 mobile CCTV,mobile surveillance,police body worn cameras (http://bbs.besovideo.com:8067/) Powered by Discuz! X3.2