Introduction
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 is the root class of most Objective-C class hierarchies. |
|
|
An MPContentItem object contains the information for a particular media item. |
|
|
The MPMediaEntity class serves as the abstract superclass for MPMediaItem and MPMediaItemCollection instances, and in turn for MPMediaPlaylist instances. |
|
|
A media item represents a single piece of media (such as one song or one video podcast) in the iPod library. |
|
|
A media item collection is a sorted set of media items (instances of the MPMediaItem class) from the iPod library. |
|
|
A media playlist is a playable collection of related media items. |
|
|
An MPMediaItemArtwork object, or media item artwork, represents a graphical image, such as music album cover art, associated with a media item. |
|
|
An MPMediaLibrary object, or media library, represents the state of the set of synced media items (such as songs) on a device. |
|
|
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. |
|
|
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. |
|
|
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. |
|
|
A media query section represents a range of media items or media item collections from within an iPod library media query. |
|
|
A movie access log accumulates key metrics about network playback for an associated movie player that is playing streamed content. |
|
|
A movie access log event represents a single piece of information for a movie access log. |
|
|
A movie error log contains data describing network resource playback failures for the associated movie player. |
|
|
A movie error log event represents a single piece of information for a movie error log. |
|
|
A movie player (of type MPMoviePlayerController) manages the playback of a movie from a file or a network stream. |
|
|
Use an MPMusicPlayerController object, or music player, to play media items from the device Music library. |
|
|
Use a now playing info center to set now-playing information for media being played by your app. |
|
|
|
|
|
|
|
|
Use the MPPlayableContentManager class to control interactions between a media app and system-provided or external media player interfaces. |
|
|
|
|
|
The MPRemoteCommand class provides methods for adding and removing target-action pairs. |
|
|
|
|
|
The MPChangePlaybackRateCommand class provides additional information for the playback commands described in the MPRemoteCommandCenter class. |
|
|
An MPFeedbackCommand object reflects the state of feedback for what your app is currently playing. |
|
|
The MPRatingCommand class provides additional information for the rating commands described in MPRemoteCommandCenter class. |
|
|
The MPSkipIntervalCommand class provides additional information for the skip interval command properties described in the MPRemoteCommandCenter class. |
|
|
The MPRemoteCommandCenter class vends objects for handling remote control events sent by external accessories and system transport controls. |
|
|
The MPRemoteCommandEvent class provides the basic information for a command. |
|
|
|
|
|
|
|
|
The MPChangePlaybackRateCommandEvent class provides the playback rate for a media item when it is requested from an external media player. |
|
|
The MPFeedbackCommandEvent class provides additional information for the feedback properties described in MPRemoteCommandCenter Class Reference. |
|
|
The MPRatingCommandEvent class provides the rating for an item requested by an external media player. |
|
|
The MPSeekCommandEvent class provides additional information for the seek properties described in the MPRemoteCommandCenter class. |
|
|
The MPSkipIntervalCommandEvent class provides the time interval rate when requested from an external media player. |
|
|
An instance of the MPTimedMetadata class, called a timed metadata object, carries time-based information within HTTP streamed media. |
|
|
The UIViewController class provides the infrastructure for managing the views of your iOS apps. |
|
|
An MPMediaPickerController object, or media item picker, is a specialized view controller that you employ to provide a graphical interface for selecting media items. |
|
|
The MPMoviePlayerViewController class implements a simple view controller for displaying full-screen movies. |
|
|
The UIView class defines a rectangular area on the screen and the interfaces for managing the content in that area. |
|
|
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
|
The delegate for a media item picker can respond to a user making media item selections. |
|
|
The MPMediaPlayback protocol defines the interface adopted by the MPMoviePlayerController class for controlling media playback. |
|
|
To support external media players, create a class that conforms to the MPPlayableContentDataSource protocol. |
|
|
Use the MPPlayableContentDelegate protocol to let external media players send playback commands to an app. |
Other Reference
Copyright © 2015 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2014-03-10
