Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start recording using AVAudioRecorder: (null) code:1 #396

Open
phiasco12 opened this issue Mar 9, 2024 · 1 comment
Open

Failed to start recording using AVAudioRecorder: (null) code:1 #396

phiasco12 opened this issue Mar 9, 2024 · 1 comment

Comments

@phiasco12
Copy link

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

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

Environment, Platform, Device

iOS 17.1 iPhone Pro

Version information

Checklist

  • [ 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
@EYALIN
Copy link

EYALIN commented Apr 14, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants