fix: Handle both file:// and file:/ URI prefixes #19

Merged
loewy merged 2 commits from dean/fix-file-prefix-fmp4 into main 2026-01-06 19:41:33 +00:00

View File

@@ -44,7 +44,8 @@ class RecordingSession(
data class Video(val path: String, val durationMs: Long, val size: Size)
// Normalize path - expo-file-system passes file:// URIs but File expects raw paths
private val outputPath: File = File(filePath.removePrefix("file://"))
// Handle both file:// and file:/ variants
private val outputPath: File = File(filePath.replace(Regex("^file:/+"), "/"))
private val bitRate = getBitRate()