mirror of
https://github.com/koush/scrypted.git
synced 2026-02-12 10:02:04 +00:00
* initial commit * Cleanup * Rename * Cleanup * cleanup * Save work * save work * save work * save work * cleanup package.json * Use a testcall n startup to get the SDP and use it later. * Audio via gstreamer * Working with gstreamer mpegtsmux for audio with audiomixer * Make sure that we wait fro the SIP OK after SIP BYE * Cleanup * Cleanup and remove motion sensor * SIP plugin does not support snapshots. * Working version without gstreamer. * Force usage of TCP transport for RTSP video stream * Add H264 infos * Implement settings * Cleanup * Save work * Add SIP settings to UI. Clean up.
21 lines
538 B
TypeScript
21 lines
538 B
TypeScript
import { v4 as generateRandomUuid, v5 as generateUuidFromNamespace } from 'uuid'
|
|
|
|
const uuidNamespace = 'e53ffdc0-e91d-4ce1-bec2-df939d94739d'
|
|
|
|
export function generateUuid(seed?: string) {
|
|
if (seed) {
|
|
return generateUuidFromNamespace(seed, uuidNamespace)
|
|
}
|
|
|
|
return generateRandomUuid()
|
|
}
|
|
|
|
export function randomInteger() {
|
|
return Math.floor(Math.random() * 99999999) + 100000
|
|
}
|
|
|
|
export function randomString(length: number) {
|
|
const uuid = generateUuid()
|
|
return uuid.replace(/-/g, '').substring(0, length).toLowerCase()
|
|
}
|