From 1b29f0bac1eba044bf235b906a3fbca939adce9e Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Tue, 26 Jul 2016 08:10:35 +0200 Subject: [PATCH] Added Foscam RTSP helper (no actual RTSP support yet though) --- config-foscam.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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;