Skip to content

Commit 755fa00

Browse files
committed
move folder create to the init function instead of startRecording
1 parent f448777 commit 755fa00

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

ios/RNReactNativeReplaykit.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
@interface RNReactNativeReplaykit : NSObject <RCTBridgeModule>
1515

1616
@property (strong, nonatomic) RPScreenRecorder *screenRecorder;
17-
@property (strong, nonatomic) AVAssetWriter *assetWriter; // TODO
18-
@property (strong, nonatomic) AVAssetWriterInput *assetWriterInput; // TODO
1917
@property (strong, nonatomic) RPPreviewViewController *previewViewController;
2018
@property (strong, nonatomic) ScreenRecordCoordinator *screenRecordCoordinator;
2119

ios/RNReactNativeReplaykit.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ - (dispatch_queue_t)methodQueue
1717
RCT_EXPORT_METHOD(initialize)
1818
{
1919
self.screenRecordCoordinator = [[ScreenRecordCoordinator alloc] init];
20+
[ReplayFileUtil createReplaysFolder];
2021
}
2122

2223
RCT_EXPORT_METHOD(startRecording:(RCTResponseSenderBlock)callback)
2324
{
24-
[ReplayFileUtil createReplaysFolder];
2525
static NSString *letters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
2626
NSMutableString *randomString = [NSMutableString stringWithCapacity: 15];
2727
for (int i=0; i<15; i++) {

ios/ScreenRecord/ScreenRecorder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import AVKit
3434
videoInput = AVAssetWriterInput (mediaType: AVMediaTypeVideo as String, outputSettings: videoOutputSettings)
3535
videoInput.expectsMediaDataInRealTime = true
3636
assetWriter.add(videoInput)
37-
37+
// RPScreenRecorder.shared().
3838
RPScreenRecorder.shared().startCapture(handler: { (sample, bufferType, error) in
3939
// print(sample,bufferType,error)
4040

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-replaykit",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "A React Native module to access ReplayKit Screen Recording Framework on iOS",
55
"main": "index.js",
66
"license" : "MIT",

0 commit comments

Comments
 (0)