O'Reilly logo

iPhone JavaScript Cookbook by Arturo Fernandez Montoro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recording an audio

As you probably know, the iPhone can be used as a sound and voice recorder. Surely, some developers need to integrate this functionality inside their applications. In this recipe, you'll learn how to build a native application using JavaScript, CSS, and HTML code with the ability of recording sound. Yes, you guessed it; we're going to use the PhoneGap framework because it has the advantages of compiling to a native application.

The application for this recipe will display three different buttons: one for recording, an other for stopping, and a third for playing our new recording. For simplicity, we will only write the code for accepting these actions in this order. In a production application, we would have to consider what ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required