What to change in DemoApp Sample[defalut one from "C:\Program Files\Milestone\Milestone Mobile Server\Web\DemoApp" ] to do PTZ Operations ? Want to achieve similar to Web Client ? Any Samples or suggestions are highly appreciatedTIAKote

Hi Koteswara,

There are two possible solutions for your needs:

  1. You have to manually call/implement mobile server protocol command.

You can find the documentation of the protocol at :

http://doc.developer.milestonesys.com/html/index.html

(in particular Home > Protocol Integration > Protocols > Mobile Server Protocol > Command Channel)

There you can search for “ControlPTZ” command.

For it to work, you should provide “PtzMove” and “CameraId” (as shown in the request example).

How to send generic command to the server could be seen in the “requestStream.js” file.

Your code should look like:

var controlPtzXmlMessage = generateXMLMessage({

sequenceId: 1, // just a random number, we are not going to track the sequenceId

connectionId: connect.connectionId,

command: ‘ControlPTZ’,

inputParams: {

CameraId: cameraId,

PtzMove: ‘Up’

}

});

sendCommandRequest(controlPtzXmlMessage , function(response) {});

// cameraId is the ID of the camera for which you want to control the Ptz

// connect.connectionId is Id of the connection received on the connect command response

  1. I’ll highly encourage you however to migrate to newer XPMobileSdk.

You can find the documentation at: http://doc.developer.milestonesys.com/mipsdkmobile/

(Home > Web > Log-in and show streams)

In the SDK all the commands are wrapped so you can just call :

XPMobileSDK.ptzMove()

or

XPMobileSDK.ptzSwipe()

or

XPMobileSDK.ptzTapAndHold()

If you open “XPMobileSDK.js” there is an usable per command documentation in the way of comments.