mazarelo edited a comment on issue #178:
URL: 
https://github.com/apache/cordova-plugin-media/issues/178#issuecomment-733000078


   I have the same problem:
   `"cordova-android": "^9.0.0"`
    I minimized the code to a bare minimum to test it:
   ```ts
     async recordDemo() {
       const audioId = 'test.mp3';
       const path = this.filesService.getAudioDataDirectory() + '/' + audioId;
       const audio = this.media.create(path);
       // listeners
       audio.onStatusUpdate.subscribe(status => console.log('state:', status));
       audio.onSuccess.subscribe(() => console.log('Action is successful'));
       audio.onError.subscribe(error => console.log('Error!', error));
       // Errors when executing startRecord() here with { code: 1 }
       audio.startRecord();
       // Delay to stop
       setTimeout(() => {
         audio.stopRecord();
         audio.release();
       }, 3000);
     }
   ```
   and output as soon as `audio.startRecording()` is triggered, I get error: { 
code: 1 }
   Both listeners then return "Action is successful" from the `onSuccess` and 
"state: 4" from `onStatusUpdate`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to