ionic record audio not back to view

2

I made an app, to record audio, it opens the native recorder, but does not return the audio to view.

.controller('MyCtrl', function ($scope, $cordovaCapture) {
$scope.captureAudio = function () {
    var captureSuccess = function (mediaFiles) {
        var i, path, len;
        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
            path = mediaFiles[i].fullPath;
            // do something interesting with the file
        }
    };

    // capture error callback
    var captureError = function (error) {
        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
    };

    // start audio capture
    navigator.device.capture.captureAudio(captureSuccess, captureError, {
        limit: 2
    });
}

});

    
asked by anonymous 14.09.2016 / 20:12

1 answer

2

Rodrigo, Good Night,

I recommend using the following plugin for audio recording: cordova-plugin-media-with-compression ( link ). I already used it and I did not have any problems.

    
12.10.2016 / 02:43