I'm a an audiobook maniac. Listening to audiobooks requires MP3 player to have a special feature, which remembers last file/track played in a folder and last position within that file, for all folders, not just current one. This allows to listen to many audiobooks simultaneously, just as you'd be making bookmarks to a regular, printed book. All MP3 player, that I tested so far, hasn't got than feature. Once you switched from folder/book A to folder/book B and then back to A, book/folder A was "reset" and play started from the very beginning. In this situation, I decided to write my own audiobook player in PhoneGap and release it as open source. Pity, but I failed to finish this project. Thus, I'm publishing only an unfinished sources and links to resources.
During my very preliminary works over this project, I have found "FolderPlayer" application (website, Google Play) and "MortPlayer" (Google Play) for my Android-based devices. And "audiobooked" (website, Windows Marketplace) for my Windows Mobile and Windows 10 based devices. Both applications fits my needs perfectly, so I have abandoned mentioned project. Here, in this article, you'll find links to sources, code examples and websites, I planned to use during development of this application, as good as some very early versions of its source code. Have fun!
There is no (as far as I know) ready solution or plugin for selecting files and folders in PhoneGap application and you have to write it yourself, in pure PhoneGap API. That was the start of my work over my very own audiobook player. It is written in pure PhoneGap 2.9.0 File API, with no extra visual frameworks used (like jQuery Mobile). It uses Font Awesome and Zepto.js.
It is based on:
Tested on four different devices and Android versions:
- Samsung Galaxy Nexus with Android 4.3 (previously Android 4.2.2),
- LG GT540 with Android 2.3.3 and CyanogenMod,
- GSmart Rola G1317D with Android 2.2.2,
- Sony Xperia E with Android 4.1.1.
Tested only as compiled through PhoneGap Build. Never compiled locally or tested after such build.
You'll find sources at GitHub.
Well... here it is. A very simple, yet unifinished PhoneGap MP3 player. It was targeted toward audiobook lovers and was planned to allow to listen to many audiobooks in the same time. It was projected to keep track of file and position in file, where you left in all folders, not just in current one.
Icons and images used in this project are taken from:
This project uses following sources, articles and ideas:
- Play an MP3 Audio Stream in PhoneGap,
- Audio Player made with PhoneGap and jQuery Mobile,
Mediaobject's API description in PhoneGap 2.9.0
- Two-Minute Tutorial 1 Part 1: Use PhoneGap Media API & jQuery Mobile UI Framework.
Tested in the same conditions as mentioned above, on the same set of devices and Android version and after building via PhoneGap Build only.
Sources can also be found at GitHub.