1
0
mirror of synced 2024-11-16 11:03:50 +00:00

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

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;