Merge branch 'develop' of bitbucket.org:mavsystemsltd/mav-in-car-fe into feature/soundsettings

This commit is contained in:
2025-10-03 14:59:04 +01:00
5 changed files with 55 additions and 12 deletions

View File

@@ -19,6 +19,23 @@ const randomChars = () => {
return letter;
};
export function parseRTSPUrl(url: string) {
const regex = /rtsp:\/\/([^:]+):([^@]+)@([^:/]+):?(\d+)?(\/.*)?/;
const match = url.match(regex);
if (!match) {
return null;
}
return {
username: match[1],
password: match[2],
ip: match[3],
port: match[4] || "554", // default RTSP port
path: match[5] || "/",
};
}
const generateNumberPlate = () => {
const numberPlateLetters = new Array(4);
const characters: string[] = [];