Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

9. Audio and Video > 9.6. Playing Video Files

9.6. Playing Video Files

Problem

You would like to be able to play video files in your iOS application.

Solution

Use an instance of the MPMoviePlayerController class.

Note

If you simply want to display a full-screen movie player, you can use the MPMoviePlayerViewController class and push your movie player view controller into the stack of view controllers of a navigation controller (for instance), or simply present your movie player view controller as a modal controller on another view controller using the presentMoviePlayerViewControllerAnimated: instance method of UIViewController. In this recipe, we will use MPMoviePlayerController instead of MPMoviePlayerViewController in order to get full access to various settings that a movie player view controller does not offer, such as windowed-mode video playback (not full-screen).


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial