File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -30,16 +30,18 @@ - (dispatch_queue_t)methodQueue
3030 [self .screenRecordCoordinator
3131 startRecordingWithFileName: randomString
3232 recordingHandler: ^(NSError *error) {
33-
3433 if (error)
3534 {
36-
35+ callback (@[[ NSNull null ], error.localizedDescription]);
3736 }
3837 }
3938 onCompletion: ^(NSError *error) {
40-
4139 if (error)
4240 {
41+ callback (@[[NSNull null ], error.localizedDescription]);
42+ } else {
43+ NSArray *recordings = [self .screenRecordCoordinator listAllReplays ];
44+ callback (@[recordings, [NSNull null ]]);
4345 }
4446 }];
4547}
@@ -75,9 +77,12 @@ - (dispatch_queue_t)methodQueue
7577 callback (@[recordings]);
7678}
7779
78- RCT_EXPORT_METHOD (stopRecording)
80+ RCT_EXPORT_METHOD (stopRecording:(RCTResponseSenderBlock)callback )
7981{
8082 [self .screenRecordCoordinator stopRecording ];
83+ NSArray *recordings = [self .screenRecordCoordinator listAllReplays ];
84+ callback (@[recordings]);
85+
8186}
8287
8388RCT_EXPORT_METHOD (previewRecording:(NSString *)path)
Original file line number Diff line number Diff line change 33 "version" : " 1.0.1" ,
44 "description" : " " ,
55 "main" : " index.js" ,
6+ "license" : " MIT" ,
67 "scripts" : {
78 "test" : " echo \" Error: no test specified\" && exit 1"
89 },
You can’t perform that action at this time.
0 commit comments