update buildRTSPURL to handle secure flag

This commit is contained in:
Jake Daynes
2026-03-13 01:45:23 -07:00
parent c2c9a6e546
commit f66c0f6d94
+6 -1
View File
@@ -168,8 +168,13 @@ func buildRTSPURL(stream cameradar.Stream, route, username, password string) (*b
host := net.JoinHostPort(stream.Address.String(), strconv.Itoa(int(stream.Port)))
path := "/" + strings.TrimLeft(strings.TrimSpace(route), "/") // Ensure path starts with a single "/"
scheme := "rtsp"
if stream.Secure {
scheme = "rtsps"
}
u := &url.URL{
Scheme: "rtsp",
Scheme: scheme,
Host: host,
Path: path,
}