20. Media Playback and Background Execution

Many applications on a mobile device have a need for audio and video playback. The iPhone SDK offers a few options for audio and video playback routines, and, in this chapter, you will learn how to use the most common ones.

Creating the MediaPlayer Application

Create a Window-Based Application in Xcode. Name this project MediaPlayer.

This application will have a very simple interface so that you can concentrate on the guts of media playback. The application will display two buttons that will initiate different types of audio playback, and it will also display a movie. The object diagram for this application is shown in (Figure 20.1).

Figure 20.1. MediaPlayer

Figure 20.2. MediaPlayer object diagram ...

Get iPhone Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.