diff --git a/config-foscam.js b/config-foscam.js index 2a9341c..16d9d1c 100644 --- a/config-foscam.js +++ b/config-foscam.js @@ -57,6 +57,19 @@ foscam.mjpegStream = function(host, username, password, rate, resolution) return url.format(urlObject); } +foscam.rtspStream = function(host, username, password) +{ + var urlObject = { + protocol: 'rtsp:', + host: host + }; + + if (typeof(username) !== 'undefined' || typeof(password) !== 'undefined') + urlObject.auth = (username || '') + ':' + (password || ''); + + return url.format(urlObject); +} + foscam.gotoPreset = function(host, presetNumber, username, password) { if (presetNumber < 1) presetNumber = 1;