update m3u RTSP URL formatter to handle scheme
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user