Thanx for your reply, I am trying to use File. I had a look at your code, it helped me see some thing i may change but my issue persists. The real issue is access to this blob.
there is a method:
mediaRecorder = new MediaStreamRecorder(stream);
mediaRecorder.mimeType = 'audio/wav'; // check this line for audio/wav
mediaRecorder.ondataavailable = function (blob)
//So i get a blob here... i need to store this blob, but if i use 'this.myMethod(blob)'
// then it tries to use methods within mediaRecorder, which are actually in my .ts
//and the blob dissapears after this method ...
// i use DOM in an attempt to save the blob somewhere
//start recording with a lenth limit of 100 000ms
alert("mediarecorder catch "+error);
As you can see here i try to save the Blob within a src attribute… i fear that this will not work as intended.
anyways, after the recording is stopped i attempt to save this blob and then play it
var deblob = document.getElementById('myblob').getAttribute('src');
this.nativeAudio.preloadComplex('Vocal',this.file.cacheDirectory+'/recording.wav', 1, 1, 0).then(this.loadedFile(), this.onError);
I then obviously call play for native audio. this seems to be okay, except that the recorded blob never plays anything back… I suspect because the ‘src’ equals ‘[object blob]’ rather than the actual blob file.
Because of the scope issue in the mediarecorder.ondataavailible method i have no other access to this blob.
THERE IS HOWEVER a save() method included in this .js which returns nothing but attemps a savedialog. it will save properly on web, but on ionic nothing will happen.