add filePath to define recording directory

- add CaptureError.createRecordingDirectoryError
- stub RCTViewManager to be able to compile CameraViewManager
This commit is contained in:
Rui Rodrigues
2024-07-16 09:50:21 +01:00
parent 621bfe333c
commit 9f2c7906e5
10 changed files with 61 additions and 22 deletions

View File

@@ -27,8 +27,8 @@ class ChunkedRecorder: NSObject {
private var chunkIndex: UInt64 = 0
init(url: URL, onChunkReady: @escaping ((Chunk) -> Void)) throws {
outputURL = url
init(outputURL: URL, onChunkReady: @escaping ((Chunk) -> Void)) throws {
self.outputURL = outputURL
self.onChunkReady = onChunkReady
guard FileManager.default.fileExists(atPath: outputURL.path) else {
throw CameraError.unknown(message: "output directory does not exist at: \(outputURL.path)", cause: nil)