The PhoneGap API provides us with a relatively straightforward process to play back audio files. These can be files stored within the application's local filesystem, bundled with the application, or over remote files accessible by a network connection. Wherever the files may be, the method of playback is achieved in exactly the same way.
We must create a new
Media object and pass into it the location of the audio file we want to play back:
<!DOCTYPE HTML> <html> <head> ...