I am using cordova-plugin-media to record voice(with pause and resume features) in my ionic app for android. After I record it I need to get base64 string in order to play it using html audio tag. And the problem is: if I am trying to save recording which was paused and resumed as 3gp file('voice.3gp'), then when I use readAsDataURL method of cordova-plugin-file, I don't receive anything(the callback simply not called). If I am trying to save it as mp3 or wav file, then I receive only 1st part of the recording(before pause). I suppose that the proper audio file extension should be 3gp as this extension is used in the implementation of 'cordova-plugin-media' but then I have problems with playing this file using html audio tag. Any help is appriciated
相关问题
- Views base64 encoded blob in HTML with PHP
- Plugin with id 'com.google.gms.google-services
- POST Base64 encoded data in PHP
- How to pass form data from Ionic 3 to PHP file?
- apk big size with ionic 4 build
相关文章
- Ionic 4: Hardware Back Button Reloading Applicatio
- How to create base64Binary data?
- ionic - Copy/paste in input field in iOS 10 not wo
- Base64 Encoding: Illegal base64 character 3c
- net::ERR_CONNECTION_REFUSED ionic
- Base64URL decoding via JavaScript?
- Python 3 and base64 encoding of a binary file
- Typescript Error: Property 'files' does no
okay, I just found out that you can use method "resolveLocalFilesystemUrl" of the cordova-plugin-file which will return you the object and inside this object there is a property "nativeURL" which can be used as a source(src) for the video tag(had to video tag instead of audio because 3gp format is actually for video)
this works for me
Read this:https://ionicframework.com/docs/v3/native/base64/
It is the oficial website API of ionic. Just install that plugin and use this:
In this post, i explain it better. I let the link here: convert audio file to base64 in ionic 3