iOS Developer Library — Prerelease

Developer

Media Player Framework Reference

Introduction

Classes   Protocols   Other Reference  

The Media Player framework provides facilities for playing movie, music, audio podcast, and audio book files. This framework also gives your application access to the iPod library, letting you find and play audio-based media items synced from iTunes on the desktop. iPod library access is read-only.

This framework’s MPVolumeView class lets you present a control to let the user adjust system audio output volume and choose among the available output routes, such as for sending audio to an AirPlay-enabled device. The MPMoviePlayerController and MPTimedMetadata classes let you play streamed video content and respond to time-based metadata contained in the stream.

Apps can receive and respond to events sent by external media players using Media Player APIs. Use the MPPlayableContentManager class to control the interactions between the app and the external media player. A data source is provided to the content manager through the MPPlayableContentDataSource protocol. Playable media items are described by the MPContentItem class. Register and handle events received from an external media player through the various event APIs.

Classes

NSObject

NSObject is the root class of most Objective-C class hierarchies.

MPContentItem

An MPContentItem object contains the information for a particular media item.

MPMediaEntity

The MPMediaEntity class serves as the abstract superclass for MPMediaItem and MPMediaItemCollection instances, and in turn for MPMediaPlaylist instances.

MPMediaItem

A media item represents a single piece of media (such as one song or one video podcast) in the iPod library.

MPMediaItemCollection

A media item collection is a sorted set of media items (instances of the MPMediaItem class) from the iPod library.

MPMediaPlaylist

A media playlist is a playable collection of related media items.

MPMediaItemArtwork

An MPMediaItemArtwork object, or media item artwork, represents a graphical image, such as music album cover art, associated with a media item.

MPMediaLibrary

An MPMediaLibrary object, or media library, represents the state of the set of synced media items (such as songs) on a device.

MPMediaPredicate

Use this class’s concrete subclass, described in MPMediaPropertyPredicate Class Reference, to define the filter in a media query to retrieve a subset of media items from the iPod library.

MPMediaPropertyPredicate

Use one or more MPMediaPropertyPredicate objects, or media property predicates, to define the filter in a media query to retrieve a subset of media items from the iPod library.

MPMediaQuery

A media query specifies a set of media items (instances of MPMediaItem) from the iPod library by way of a filter and a grouping type.

MPMediaQuerySection

A media query section represents a range of media items or media item collections from within an iPod library media query.

MPMovieAccessLog

A movie access log accumulates key metrics about network playback for an associated movie player that is playing streamed content.

MPMovieAccessLogEvent

A movie access log event represents a single piece of information for a movie access log.

MPMovieErrorLog

A movie error log contains data describing network resource playback failures for the associated movie player.

MPMovieErrorLogEvent

A movie error log event represents a single piece of information for a movie error log.

MPMoviePlayerController

A movie player (of type MPMoviePlayerController) manages the playback of a movie from a file or a network stream.

MPMusicPlayerController

Use an MPMusicPlayerController object, or music player, to play media items from the device Music library.

MPNowPlayingInfoCenter

Use a now playing info center to set now-playing information for media being played by your app.

MPNowPlayingInfoLanguageOption

MPNowPlayingInfoLanguageOptionGroup

MPPlayableContentManager

Use the MPPlayableContentManager class to control interactions between a media app and system-provided or external media player interfaces.

MPPlayableContentManagerContext

MPRemoteCommand

The MPRemoteCommand class provides methods for adding and removing target-action pairs.

MPChangePlaybackRateCommand

The MPChangePlaybackRateCommand class provides additional information for the playback commands described in the MPRemoteCommandCenter class.

MPFeedbackCommand

An MPFeedbackCommand object reflects the state of feedback for what your app is currently playing.

MPRatingCommand

The MPRatingCommand class provides additional information for the rating commands described in MPRemoteCommandCenter class.

MPSkipIntervalCommand

The MPSkipIntervalCommand class provides additional information for the skip interval command properties described in the MPRemoteCommandCenter class.

MPRemoteCommandCenter

The MPRemoteCommandCenter class vends objects for handling remote control events sent by external accessories and system transport controls.

MPRemoteCommandEvent

The MPRemoteCommandEvent class provides the basic information for a command.

MPChangeLanguageOptionCommandEvent

MPChangePlaybackRateCommandEvent

The MPChangePlaybackRateCommandEvent class provides the playback rate for a media item when it is requested from an external media player.

MPFeedbackCommandEvent

The MPFeedbackCommandEvent class provides additional information for the feedback properties described in MPRemoteCommandCenter Class Reference.

MPRatingCommandEvent

The MPRatingCommandEvent class provides the rating for an item requested by an external media player.

MPSeekCommandEvent

The MPSeekCommandEvent class provides additional information for the seek properties described in the MPRemoteCommandCenter class.

MPSkipIntervalCommandEvent

The MPSkipIntervalCommandEvent class provides the time interval rate when requested from an external media player.

MPTimedMetadata

An instance of the MPTimedMetadata class, called a timed metadata object, carries time-based information within HTTP streamed media.

UIViewController

The UIViewController class provides the infrastructure for managing the views of your iOS apps.

MPMediaPickerController

An MPMediaPickerController object, or media item picker, is a specialized view controller that you employ to provide a graphical interface for selecting media items.

MPMoviePlayerViewController

The MPMoviePlayerViewController class implements a simple view controller for displaying full-screen movies.

UIView

The UIView class defines a rectangular area on the screen and the interfaces for managing the content in that area.

MPVolumeView

Use a volume view to present the user with a slider control for setting the system audio output volume, and a button for choosing the audio output route.

Protocols

MPMediaPickerControllerDelegate

The delegate for a media item picker can respond to a user making media item selections.

MPMediaPlayback

The MPMediaPlayback protocol defines the interface adopted by the MPMoviePlayerController class for controlling media playback.

MPPlayableContentDataSource

To support external media players, create a class that conforms to the MPPlayableContentDataSource protocol.

MPPlayableContentDelegate

Use the MPPlayableContentDelegate protocol to let external media players send playback commands to an app.

Other Reference

Media Player Functions Reference

UIViewController MediaPlayer Additions Reference