File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -94,11 +94,11 @@ class Recorder extends EventEmitter {
94
94
if ( this . _state === MediaStates . IDLE ) {
95
95
tasks . push ( ( next ) => {
96
96
this . prepare ( ( err , fsPath ) => {
97
- if ( Platform . OS === 'harmony' ) {
98
- if ( fsPath ) {
97
+ if ( Platform . OS === 'harmony' ) {
98
+ if ( fsPath ) {
99
99
this . _updateState ( err , MediaStates . RECORDING ) ;
100
100
callback ( err , fsPath ) ;
101
- } else {
101
+ } else {
102
102
this . _updateState ( err , MediaStates . IDLE ) ;
103
103
callback ( err , null ) ;
104
104
}
@@ -111,11 +111,15 @@ class Recorder extends EventEmitter {
111
111
RCTAudioRecorder . record ( this . _recorderId , next ) ;
112
112
} ) ;
113
113
async . series ( tasks , ( err ) => {
114
- if ( Platform . OS !== 'harmony' ) {
114
+ if ( Platform . OS !== 'harmony' ) {
115
+ this . _updateState ( err , MediaStates . RECORDING ) ;
116
+ callback ( err ) ;
117
+ return ;
118
+ }
119
+ if ( this . _state === MediaStates . PAUSED ) {
115
120
this . _updateState ( err , MediaStates . RECORDING ) ;
116
121
callback ( err ) ;
117
122
}
118
-
119
123
} ) ;
120
124
return this ;
121
125
}
You can’t perform that action at this time.
0 commit comments