You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "phiasco12 (via GitHub)" <gi...@apache.org> on 2024/03/09 10:19:36 UTC

[I] Failed to start recording using AVAudioRecorder: (null) code:1 [cordova-plugin-media]

phiasco12 opened a new issue, #396:
URL: https://github.com/apache/cordova-plugin-media/issues/396

   # Bug Report
   
   Failed to start recording using AVAudioRecorder: (null) code:1
   
   ## Problem
   
   
   when I try the simple code provided, I get the above error.
   
   
   ### What is expected to happen?
   
   Start recording Audio.
   
   ### What does actually happen?
   
   the above error happens.
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   
   This is my code:
   
   ```
       var src = cordova.file.cacheDirectory + "myrecording.wav";
       //var src = "myrecording.wav";
       var mediaRec = new Media(src,
           // Success callback
           function() {
               alert("Recording success");
           },
   
           // Error callback
           function(err) {
               alert("Recording error: " + JSON.stringify(err));
           });
   
       // Start recording
       mediaRec.startRecord();
   ```
   
   
   when I run this code, I get the above error. This is tested on iOS 17.1
   
   I have the Audio permission set as well before calling this function/code.
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   iOS 17.1 iPhone Pro
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova 12
   iOS 17.1
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ x] I searched for existing GitHub issues
   - [ x] I updated all Cordova tooling to most recent version
   - [ x] I included all the necessary information above
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org

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


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


Re: [I] Failed to start recording using AVAudioRecorder: (null) code:1 [cordova-plugin-media]

Posted by "EYALIN (via GitHub)" <gi...@apache.org>.
EYALIN commented on issue #396:
URL: https://github.com/apache/cordova-plugin-media/issues/396#issuecomment-2053946093

   @phiasco12 when i change it to "wav" instead "mp3" the error disappear, but it still not recording


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

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


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