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

@@ -43,9 +43,9 @@ final class CameraViewManager: RCTViewManager {
// This means that any errors that occur in this function have to be delegated through
// the callback, but I'd prefer for them to throw for the original function instead.
@objc
final func startRecording(_ node: NSNumber, options: NSDictionary, onRecordCallback: @escaping RCTResponseSenderBlock) {
final func startRecording(_ node: NSNumber, options: NSDictionary, filePath: NSString, onRecordCallback: @escaping RCTResponseSenderBlock) {
let component = getCameraView(withTag: node)
component.startRecording(options: options, callback: onRecordCallback)
component.startRecording(options: options, filePath: filePath as String, callback: onRecordCallback)
}
@objc