* Format ISO timestamp into readable time
(isoTimestamp: string)
| 172 | * Format ISO timestamp into readable time |
| 173 | */ |
| 174 | function formatTimestamp(isoTimestamp: string): string { |
| 175 | try { |
| 176 | const date = new Date(isoTimestamp) |
| 177 | return date.toLocaleTimeString('en-US', { |
| 178 | hour: '2-digit', |
| 179 | minute: '2-digit', |
| 180 | second: '2-digit', |
| 181 | hour12: false, |
| 182 | }) |
| 183 | } catch { |
| 184 | return isoTimestamp.slice(11, 19) |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | /** |
| 189 | * Export session replay as an animated GIF |