Milestone Expert - cameras view from image viewer- javascript-SCADA integration

We are able to view videos from smart client and also through web server page.

Currently we are using Milestone XProtect Expert 2018 R3. however the old system was using Milestone enterprise 6.5 & 2014. it was working fine with both version. The issue is with Milestone XProtect expert 2018 r3.

Our live and recording view integration works with our existing Milestone setup but doesn’t work with the new setup.

(Existing Milestone Versions : Milestone Xprotect Enterprise 6.5d & Milestone Xprotect Enterprise 2014 8.6c / New Milestone Version : Milestone Xprotect 2018 R3)

Are there any Milestone settings that can be adjusted on the new setup to make this work or do we need to change our implementation and what would need to be changed exactly ?

Following are more details on our existing implementation:

The following is part of our Cam-Live-ViaNVR.html used for the integration: - attached png file

This works on our existing milestone with shown URL: - attached png file

But with the new Milestone it gives following error: - attached png file

We also tried changing port nr. to 7563 which gives following error:

- attached png file

Attached the script which is copied from view source of video page - Source.doc

Im looking for html coding which can connect to the cameras which is inside the recording servers.

The parameters which is using for milestone Enterprise 2014 / 6.5 is as below but I’m are looking for parameters using for milestone Expert 2018

// Init and connect to the specefied camera with the user name and password

function initAndConnect()

{

// set window to the front, if already open

//window.focus();

setFocus();

// set a window timer, which closes the window after a 30 minutes time

window.setTimeout(“StillOpen()”, glWindowTimeout );

var user = getParameter(‘user’);

var password = getParameter(‘pwd’);

var address = getParameter(‘hostname’);

var port = getParameter(‘port’);

var camera = “[” + getParameter(‘CameraName’) + “] Camera 1”;

glCameraName = getParameter(‘CameraName’);

//initialize image viewer

oViewer.Init();

//enable the onConnectResponseReceived event

oViewer.SetOnConnectResponseReceivedEventStatus(true);

//connect to the camera

oViewer.Connect(user, password, address, port, camera);

oViewer.SetShowFrameRateStatus(1);

}

// Event handler that start live feed if connection was granted.

function onConnectResponseReceivedFromViewer(connectionGranted)

{

//start live feed if connection was granted

if(connectionGranted)

{

document.getElementById(“oViewer”).LiveStart();

}

}

<object id=“oViewer” style=“width:640px;height:500px;” classid="clsid:e7b12a6b-3

anybody help pls

I believe you are already in contact with our support, so let’s keep the communication through that channel.

For anyone else I will post an update here once we have resolved the issue.

Dear. Peter I still didnt get any update from support.

I was using the below jscript but it was showing all camera in the milestone servers. I need to see only one cameras (cameras which I need to view) with the script. could you please help to script to view only one cameras by mentioning cameras name/hw name.

attached is the script which I used. the script is inside the folder named js.

Hi Gopi,

I saw you migrated to the MIP SDK mobile.

Which is really great :slight_smile:

I’m not sure however, what filter you want to apply to cameras.

Do you want to filter them by specific name ?

If that is the case, you can look the code in method:

	function connectionDidLogIn() {
		XPMobileSDK.getAllViews(function (items) {
		    for (var i = 0; i < items[0].Items[0].Items[0].Items.length; i++) {
		        buildCameraElement(items[0].Items[0].Items[0].Items[i]);
		    }
		});

Here you get all the view groups from the system with all the folders, sub-folders, views and cameras in them.

The code relies on some hard-coded things, but in shorts in gets first view group (items[0] - All Cameras group), it’s first folder (items[0].Items[0] - All Cameras folder), it’s first view (items[0].Items[0].Items[0] - All Cameras view) and iterates trough it’s childs, which are cameras (items[0].Items[0].Items[0].Items[i]).

Every “Item” do have “Name” property, which is in fact name of the cameras in the system.

So here, in this method, you could make filtering by name.

Dear peter,

Actually I want to filter it to view only a single camera by camera name mentioned in the management server

Actually i want to get live feed (live view) of a single camera by its name using image view ActiveX object.

Hi Gopi,

We are a bit confused here, since the last piece of code you posted was using the Mobile SDK, whereas the initial post was about the ImageViewer ActiveX.

We clearly recommend to use the Mobile SDK going forward as the ImageViewer ActiveX will be discontinued with the upcoming 2019 R1 release.

Regarding your problems with the ImageViewer ActiveX after changing to XProtect Expert I think it is due to this being based on another code base than the previous products you have used your solution with, and the code base used for Expert require you to use GUIDs instead of the camera name. One way of seeing the GUID of a camera is by holding down the CTRL button while navigating to the Info tab of a camera in the Management Client. It is of course also possible to look up the GUID through code - please refer to the SDK documentation for more information on that.

Best regards,

Peter

Would be very helpful if your SDK team do the full code for us. I was checking for GUID and since I’m not a developer it is very difficult for me to understand and also create a script

Please team up with a developer. All the functionality in the Milestone software development kits (MIP SDK - Mobile SDK) is there for developers to utilize. You should never expect any sample to fulfill a needed solution but using the kits good solutions can be developed.