(buffer: string | undefined)
| 140 | } |
| 141 | |
| 142 | function parseLastAbsoluteMp4Path(buffer: string | undefined): string | null { |
| 143 | if (!buffer) return null; |
| 144 | const matches = [...buffer.matchAll(/(\s|^)(\/[^\s'"]+\.mp4)\b/gi)]; |
| 145 | if (matches.length === 0) return null; |
| 146 | const last = matches[matches.length - 1]; |
| 147 | return last?.[2] ?? null; |
| 148 | } |
| 149 | |
| 150 | function createSessionId(simulatorUuid: string): string { |
| 151 | return `${simulatorUuid}:${Date.now()}`; |