diff --git a/lib/imaging.js b/lib/imaging.js index 19969580..11800ded 100644 --- a/lib/imaging.js +++ b/lib/imaging.js @@ -114,6 +114,22 @@ Cam.prototype.setImagingSettings = function(options, callback) { '' ) : '' ) + + + + + ( + options.focus ? (options.focus.autoFocusMode ? + ( + '' + + '' + + options.focus.autoFocusMode + + '' + + '' + + (options.focus.defaultSpeed ? options.focus.defaultSpeed : 1) + + '' + + '' + ) : '') : '' + ) + '' + @@ -215,4 +231,4 @@ Cam.prototype.setCurrentImagingPreset = function(options, callback) { callback.call(this, err, err ? null : linerase(data).setCurrentPresetResponse, xml); } }.bind(this)); -}; \ No newline at end of file +}; diff --git a/lib/ptz.js b/lib/ptz.js index 63d0e584..b194e150 100644 --- a/lib/ptz.js +++ b/lib/ptz.js @@ -431,6 +431,25 @@ Cam.prototype.stop = function(options, callback) { }, callback.bind(this)); }; +/** + * /PTZ/ Go to home position + * @param {object} options + * @param {string} [options.profileToken] + * @param {string} options.speed e.g.{x:0.1, y:0.1, zoom:0} + * @param {function} callback + */ +Cam.prototype.gotoHomePosition = function(options, callback) { + this._request({ + service: 'ptz' + , body: this._envelopeHeader() + + '' + + '' + (options.profileToken || this.activeSource.profileToken) + '' + + (options.speed ? '' + this._panTiltZoomVectors(options.speed) + '' : '') + + '' + + this._envelopeFooter() + }, callback.bind(this)); +}; + /** * Create ONVIF soap vector * @param [ptz.x]