File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ @implementation FlutterRTCAudioRecorder
18
18
19
19
-(id ) initWithPath : (NSString *) path {
20
20
self = [super init ];
21
- recordingSession = [AVAudioSession sharedInstance ];
21
+ recordingSession = [[ AVAudioSession alloc ] init ];
22
22
23
23
[recordingSession setCategory: AVAudioSessionCategoryPlayAndRecord error: nil ];
24
24
[recordingSession setActive: true error: nil ];
@@ -46,6 +46,7 @@ -(id) initWithPath:(NSString *) path {
46
46
}
47
47
48
48
-(void )stop : (OnRecordingStopped) callback {
49
+ [recordingSession setActive: false error: nil ];
49
50
onRecordingStopped = callback;
50
51
if (audioRecorder != nil ) {
51
52
[audioRecorder stop ];
Original file line number Diff line number Diff line change @@ -496,7 +496,6 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult) result
496
496
result ([NSNumber numberWithBool: (BOOL )flag]);
497
497
}];
498
498
}
499
- result (nil );
500
499
} else {
501
500
result (FlutterMethodNotImplemented);
502
501
}
You can’t perform that action at this time.
0 commit comments