Skip to content

Commit fe95853

Browse files
committed
update readme
1 parent 0b7c245 commit fe95853

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ RNRK.stopRecording() // stops the recording and saves it <- Same as pressing Sto
3838
RKRK.getRecordings(recordings => console.log(recordings)) get all recordings stored in the app's Documents/Replays folder.
3939
4040
RNRK.previewRecording(path) // open a recording for trimming in the native editor.. save will replace the file, cancel just dismiss the editor.
41+
42+
RNRK.copyRecording(recordingPath, (recordings, copyPath) => {
43+
console.log(recordings) // the array of all your recordings
44+
console.log(copyPath) // the new path of the recording you just made by copying another
45+
})
46+
47+
RNRK.deleteRecording(recordingPath, (recordings, deletedPath) => {
48+
console.log(recordings) // the array of all your recordings
49+
console.log(deletedPath) // the new path of the recording just deleted
50+
})
4151
```
4252

4353
## Contributing

ios/RNReactNativeReplaykit.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ - (dispatch_queue_t)methodQueue
4747
RCT_EXPORT_METHOD(deleteRecording:(NSString *)path callback:(RCTResponseSenderBlock)callback)
4848
{
4949
[self.screenRecordCoordinator removeRecordingWithFilePath:path];
50-
callback(@[path]);
50+
NSArray *recordings = [self.screenRecordCoordinator listAllReplays];
51+
callback(@[recordings, path]);
5152
}
5253

5354
RCT_EXPORT_METHOD(copyRecording:(NSString *)path callback:(RCTResponseSenderBlock)callback)

0 commit comments

Comments
 (0)