Added Foscam RTSP helper (no actual RTSP support yet though)

This commit is contained in:
Mark van Renswoude 2016-07-26 08:10:35 +02:00
parent f0f232209e
commit 1b29f0bac1
1 changed files with 13 additions and 0 deletions

View File

@ -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;