update m3u RTSP URL formatter to handle scheme

This commit is contained in:
Jake Daynes
2026-03-13 02:01:45 -07:00
parent 5912ed5283
commit 5c30baa11e
+6 -1
View File
@@ -119,5 +119,10 @@ func formatRTSPURL(stream cameradar.Stream) string {
credentials = stream.Username + ":" + stream.Password + "@" credentials = stream.Username + ":" + stream.Password + "@"
} }
return "rtsp://" + credentials + stream.Address.String() + ":" + strconv.FormatUint(uint64(stream.Port), 10) + path scheme := "rtsp"
if stream.Secure {
scheme = "rtsps"
}
return fmt.Sprintf("%s://%s%s:%s%s", scheme, credentials, stream.Address.String(), strconv.FormatUint(uint64(stream.Port), 10), path)
} }