Hi @Rodrigo Ferriols
In short - Yes, it is.
On protocol level there few commands for that:
- GetPtzPresets - to retrieve the list of presets
- ControlPTZ - to apply (activate) PTZ preset (by camera id)
- ChangeStream - to activate PTZ preset by currently active live video stream id
All the derivates of the MIP SDK Mobile (.NET, JS, iOS, Android) support those.
In which platform you are interested in ?
Thanks Petar! I forgot to mention that we are trying to do this with the XPMobileSDK.js 2020 r3 version.
It is available in JS via XPMobileSDK.
I’m copying here the comments from the XPMobileSDK.js:
/**
* Sends a GetPtzPresets command to the server.
*
* @method getPtzPresets
* @param {GUID} cameraId - the current camera related to the presets this request will return
* @param {Function} successCallback - function that is called when the command execution was successful and the result is passed as a parameter.
* @param {Function} errorCallback - function that is called when the command execution has failed and an error object is passed as a parameter.
*
* @return {ConnectionRequest} - the ConnectionRequest object
*/
function getPtzPresets(cameraId, successCallback, errorCallback) {
return XPMobileSDK.library.Connection.getPtzPresets(cameraId, successCallback, errorCallback);
}
/**
* Sends a ControlPTZ command to the server. Controls PTZ Preset.
* The parameter needs to be a valid preset name, otherwise nothing will happen.
*
* @method ptzPreset
* @param {VideoConnection} videoConnection - existing VideoConnection object representing a camera stream
* @param {String} presetName - the name of the preset to be activated
*
* @return {ConnectionRequest} - the ConnectionRequest object
*/
function ptzPreset(videoConnection, presetName) {
return XPMobileSDK.library.Connection.ptzPreset(videoConnection, presetName);
}
Thanks, Petar! That was a big help!