MPMoviePlayerViewController Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/MediaPlayer.framework
Availability
Available in iOS 3.2 and later.
Declared in
MPMoviePlayerViewController.h

Overview

The MPMoviePlayerViewController class implements a simple view controller for displaying full-screen movies. Unlike using an MPMoviePlayerController object on its own to present a movie immediately, you can incorporate a movie player view controller wherever you would normally use a view controller. For example, you can present it using a tab bar or navigation bar-based interface, taking advantage of the transitions offered by those interfaces.

To present a movie player view controller modally, you typically use the presentMoviePlayerViewControllerAnimated: method. This method is part of a category on the UIViewController class and is implemented by the Media Player framework. The presentMoviePlayerViewControllerAnimated: method presents a movie player view controller using the standard transition animations for presenting video content. To dismiss a modally presented movie player view controller, call the dismissMoviePlayerViewControllerAnimated method.

Tasks

New Methods

Properties

moviePlayer

The movie player controller object used to present the movie. (read-only)

@property(nonatomic, readonly) MPMoviePlayerController *moviePlayer
Discussion

The MPMoviePlayerController object in this property is created automatically by the receiver and cannot be changed. However, you can use the object to manage the presentation and configuration of the movie playback.

Availability
  • Available in iOS 3.2 and later.
Declared In
MPMoviePlayerViewController.h

Instance Methods

initWithContentURL:

Returns a movie player view controller initialized with the specified movie.

- (id)initWithContentURL:(NSURL *)contentURL
Parameters
contentURL

The URL that points to the content to be played.

Return Value

A movie player view controller initialized with the specified URL.

Availability
  • Available in iOS 3.2 and later.
Declared In
MPMoviePlayerViewController.h