Ionic audio capture

2

I made an app that captures audio by the native recorder of the cell phone, now I needed to get these stockings, how can I get the phone media?

I made the following controller to capture

.controller('CapturaAudio', function ($scope, $cordovaCapture) {

    $scope.captureAudio = function () {
        var options = {
            limit: 3,
            duration: 10
        };

        $cordovaCapture.captureAudio(options).then(function (audioData) {
            // Success! Audio data is here
        }, function (err) {
            // An error occurred. Show a message to the user
        });
    }
    
asked by anonymous 13.09.2016 / 19:50

1 answer

0

You could do something like this:

 $cordovaCapture.captureAudio(options).then(function (audioData) {
            // Success! Audio data is here
            console.log('captureSuccess');console.dir(e);
            $scope.sound.file = e[0].localURL;
            $scope.sound.filePath = e[0].fullPath;
        }, function (err) {
            // An error occurred. Show a message to the user
        });
    
12.12.2016 / 19:25