Ionic record audio not back to view

Asked

Viewed 164 times

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
    });
}

});

1 answer

2


Browser other questions tagged

You are not signed in. Login or sign up in order to post.