Simplest/easiest way to add audio playback capability (of web hosted audio files) to my Cordova app (iPhone + Android)?

Viewed 17

I've got an existing Cordova app to which I want to add the ability to play back a variety of short (e.g. 30 seconds - 1 minute) audio clips stored in Amazon S3. For project-related reasons I need the development of this to be as quick and easy as possible. I'm wondering what my options are here?

The simplest easiest method seems to me to create a regular HTML button that's just a link to the .mp3 file (or whatever format, would Android and iPhone need different formats?) and then let the built in Webview (that the Cordova app is running in) handle download and present a player (assuming that's what happens?). Are there any drawbacks to this solution? Would the webview cache the audio file on the first play so subsequent plays wouldn't re-download it? (this would be ideal)

Are there any better solutions to the above that would be significantly better for little or no extra development effort?

Ideally I want a solution that doesn't display or make accessible the URL of the mp3 file, so it can't be easily downloaded outside the app.

Thanks

0 Answers
Related