Playing an audio file

This recipe will describe the process of playing an audio file from a web application designed specifically for the iOS operating system. We'll learn three different ways for playing a file with our various frameworks.

This recipe shows a simple method for playing audio, but you can integrate it with your own code or application for building more sophisticated applications.

We're going to play an audio file in MP3 format; however, other audio formats, such as WAF and AAC-LC, can be played as well.

Our recipe describes how to display a simple player with controls for playing and pausing a specific and preloaded MP3 file.

For one of the three approaches explained in our recipe, we don't need any framework because we'll take advantage ...

Get iPhone JavaScript Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.