Playing Movie Files

MPMoviePlayerController is responsible for playing movies on iOS. The YouTube application uses the same class to play its movies, so you’ve probably seen the interface in Figure 27.4 before.

Figure 27.4  MPMoviePlayerController in action

MPMoviePlayerController in action

Playing a movie file on iOS is fairly restricted. You are limited to two formats:

  • H.264 (Baseline Profile Level 3.0)
  • MPEG-4 Part 2 video (Simple Profile)

(Fortunately, iTunes has an option to convert video files into these formats. In iTunes, select a movie file and choose Create iPod or iPhone Version from the Advanced menu.)

Instances of MPMoviePlayerController can also play streaming video ...

Get iOS Programming: The Big Nerd Ranch Guide, Second Edition 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.