Audio playback


#1

Hi There,

So I have used the cordova plugin for media capture.
Doing this just works out fine:

navigator.device.capture.captureAudio(
          (mediaFiles) => {
            mediaFile = mediaFiles[0];
            console.log('audio success. mediaFile Obj:' + JSON.stringify(mediaFile));
            console.log('media path:' + mediaFile.fullPath);
            console.log('media name: ' + mediaFile.name);
            console.log('media size: ' + mediaFile.size);
          },
          function (e) { console.log('audio fail: ', e); },
          { duration: 300, limit: 1 });

It’s recording and when I am using my emulator I can take the mediaFile.fullPath and play it back in VLC or other external apps. But When i try to play it back in an <audio tag it does not work.

E.g. like so:

 <audio id="subheader-playercontrol" ng-ended="menuCtrl.playerControllerToggle()">
          <source ng-src="{{menuCtrl.mediaFile.src | trusted}}" type="audio/wav">
      </audio>

Should I use another path? or?? .the https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/ is for me a bit confusing.

Please help - I am a bit lost here!

/Steffen