0
votes

I am recording MP3 using phonegap in an app. Storing the MP3 in a database Base64 Encoded. I can retrieve those records, save them to an MP3 file on phone or computer and play them. Media in phonegap works as well as the local players. What does not work is either 1) playing them directly as base64 on a windows computer in a browser or 2) saving to an MP3 file on the server and playing through the browser.

I gave up and switched to a download button, which works, by storing the MP3 file locally and playing it using the local audio player.

the HTML format I used is for the file the source was the file path relative to the web root For the base64 it was "data:audio/mpeg;base64,..."

In all cases it did not work, and the controls were either grayed out or had an error on them.

1
I solved this The solution that works for html5 browser, android, and ios is to use m4a format. In cordova phonegap I used cordova-media-with-compression rather than the regular cordova-media plugin.Andrew Lindzon
When you solve your own problem, you should also answer your own question. That helps SO meet its purpose of creating a big library of questions and answers.O. Jones

1 Answers

0
votes

The solution that works for browser, android, and ios is to use m4a format. In cordova phonegap I used cordova-media-with-compression