Merge branch 'develop' of bitbucket.org:mavsystemsltd/mav-in-car-fe into feature/soundsettings
This commit is contained in:
@@ -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[] = [];
|
||||
|
||||
Reference in New Issue
Block a user