MediaPlayer gives your app access to the user's media library and to music playback. Query the library with MPMediaQuery and MPMediaPredicate to find MPMediaItem, MPMediaItemCollection, and MPMediaPlaylist objects, present MPMediaPickerController so the user can choose songs, and check access with MPMediaLibraryAuthorizationStatus before reading MPMediaLibrary. The framework also publishes Now Playing information and a remote command center for audio and video, controls movie playback through MPMoviePlayerController and the MPMediaPlayback protocol, and manages a music player's queue with MPMusicPlayerControllerQueue and MPMusicPlayerControllerMutableQueue.
Media Items and Collections 6
The model objects that represent songs and other media in the user's library and how they are grouped.
- ClMPMediaEntityiOS 4.2+The abstract base class for media library objects that have queryable properties.
- ClMPMediaItemiOS 3.0+A single piece of media, such as a song or audiobook, in the user's media library.
- ClMPMediaItemCollectioniOS 3.0+An ordered collection of media items from the user's library.
- ClMPMediaItemArtworkiOS 3.0+An object that provides the cover art associated with a media item.
- ClMPMediaItemAnimatedArtworkiOS 26.0+An animated image, such as an animated music album cover art, for a media item.
- StMPMediaTypeiOS 3.0+An option set that identifies the types of media an item can represent.
The Media Library 2
Accessing the user's media library and confirming authorization to read it.
- ClMPMediaLibraryiOS 3.0+An object that represents the user's collection of media and reports changes to it.
- EnMPMediaLibraryAuthorizationStatusiOS 9.3+Constants that indicate an app's authorization to access the media library.
Querying the Library 6
Constructing queries and predicates to find media items and organize results into sections.
- ClMPMediaQueryiOS 3.0+An object that specifies a set of media items from the library through filter predicates.
- ClMPMediaQuerySectioniOS 4.2+An object that describes a range of items grouped within a media query's results.
- ClMPMediaPredicateiOS 3.0+The abstract base class for predicates used to filter a media query.
- ClMPMediaPropertyPredicateiOS 3.0+A predicate that filters media items by comparing a property against a value.
- EnMPMediaGroupingiOS 3.0+Constants that specify how a media query groups and sorts its results.
- EnMPMediaPredicateComparisoniOS 3.0+Constants that specify how a property predicate compares its value.
Playlists 3
Representing and creating playlists in the user's library.
- ClMPMediaPlaylistiOS 3.0+A media item collection that represents a playlist in the user's library.
- ClMPMediaPlaylistCreationMetadataiOS 9.3+An object that describes the attributes used when creating a new playlist.
- StMPMediaPlaylistAttributeiOS 3.0+An option set that describes the attributes of a playlist.
Picking Media 2
Presenting a system interface that lets the user choose media items from their library.
- ClMPMediaPickerControlleriOS 3.0+A view controller that lets the user choose media items from their library.
- PrMPMediaPickerControllerDelegateMethods for responding to the user's selection in a media picker controller.
Music Playback 6
Controlling the system or application music player and the items it plays.
- ClMPMusicPlayerControlleriOS 3.0+An object that plays media items from the user's library and controls playback.
- ClMPMusicPlayerApplicationControlleriOS 10.3+A music player that plays media within your app and maintains its own playback state.
- PrMPSystemMusicPlayerControllerA protocol that identifies a music player that controls the systemwide Music app.
- EnMPMusicPlaybackStateiOS 3.0+Constants that describe the current playback state of a music player.
- EnMPMusicRepeatModeiOS 3.0+Constants that specify how a music player repeats playback.
- EnMPMusicShuffleModeiOS 3.0+Constants that specify how a music player shuffles playback.
Managing the Playback Queue 7
Building and describing the queue of items a music player will play.
- ClMPMusicPlayerControllerQueueiOS 10.3+An object that represents the read-only playback queue of a music player.
- ClMPMusicPlayerControllerMutableQueueiOS 10.3+An object that represents a music player queue you can rearrange and modify.
- ClMPMusicPlayerQueueDescriptoriOS 10.1+The abstract base class for objects that describe the contents of a music player queue.
- ClMPMusicPlayerMediaItemQueueDescriptoriOS 10.1+A queue descriptor that builds a playback queue from a media query or item collection.
- ClMPMusicPlayerStoreQueueDescriptoriOS 10.1+A queue descriptor that builds a playback queue from store identifiers.
- ClMPMusicPlayerPlayParametersiOS 11.0+An object that encapsulates the parameters needed to play a piece of catalog content.
- ClMPMusicPlayerPlayParametersQueueDescriptoriOS 11.0+A queue descriptor that builds a playback queue from play parameters objects.
Movie Playback 13
The legacy movie player interface, its playback protocol, and presentation options.
- ClMPMoviePlayerControllerA legacy object that manages the playback of a movie from a file or network stream.
- ClMPMoviePlayerViewControllerA legacy view controller that presents full-screen movie playback.
- PrMPMediaPlaybackiOS 3.0+A protocol that defines the basic transport controls for an object that plays media.
- ClMPTimedMetadataAn object that represents a piece of timed metadata delivered during playback.
- StMPMovieLoadStateAn option set that indicates the network load state of a movie player.
- StMPMovieMediaTypeMaskAn option set that indicates which media types are present in a movie.
- EnMPMovieScalingModeConstants that specify how a movie's video is scaled to fit its view.
- EnMPMoviePlaybackStateConstants that describe the current playback state of a movie player.
- EnMPMovieRepeatModeConstants that specify how a movie player repeats playback.
- EnMPMovieControlStyleConstants that specify the style of the onscreen controls of a movie player.
- EnMPMovieFinishReasonConstants that describe why movie playback ended.
- EnMPMovieSourceTypeConstants that specify whether a movie is a file or a streaming source.
- EnMPMovieTimeOptionConstants that specify how a movie player resolves a requested playback time.
Movie Playback Logs 5
Diagnostic logs that record playback access and error events for a movie player.
- ClMPMovieAccessLogA log that records the playback access events for a movie player.
- ClMPMovieErrorLogA log that records the playback error events for a movie player.
- ClMPMovieAccessLogEventAn object that describes a single playback access event in a movie access log.
- ClMPMovieErrorLogEventAn object that describes a single playback error event in a movie error log.
- ClMPAdTimeRangeiOS 16.0+An object that describes the time range of an advertisement within playback content.
Now Playing Information 8
Publishing the currently playing item's metadata and managing a now playing session.
- ClMPNowPlayingInfoCenteriOS 5.0+An object that publishes information about the currently playing item to the system.
- ClMPNowPlayingSessioniOS 16.0+An object that coordinates now playing information and remote commands for a set of players.
- PrMPNowPlayingSessionDelegateiOS 16.0+Methods for responding to changes in a now playing session.
- ClMPNowPlayingInfoLanguageOptioniOS 9.0+Represents a single language option option.
- ClMPNowPlayingInfoLanguageOptionGroupiOS 9.0+An object that groups mutually exclusive language options for selection.
- EnMPNowPlayingInfoMediaTypeiOS 10.0+Constants that identify the media type reported in now playing information.
- EnMPNowPlayingPlaybackStateiOS 11.0+Constants that describe the playback state reported in a now playing session.
- EnMPNowPlayingInfoLanguageOptionTypeiOS 9.0+Constants that identify the type of a now playing language option.
Remote Command Center 10
Registering handlers for remote control commands sent from the Control Center, headphones, and other accessories.
- ClMPRemoteCommandCenteriOS 7.1+A central object that vends the remote control commands your app responds to.
- ClMPRemoteCommandiOS 7.1+An object that responds to a specific remote control command from an external accessory.
- ClMPSkipIntervalCommandiOS 7.1+A remote command that skips playback forward or backward by a set interval.
- ClMPFeedbackCommandiOS 7.1+A remote command that submits like, dislike, or bookmark feedback for the current item.
- ClMPRatingCommandiOS 7.1+A remote command that sets a numeric rating for the current item.
- ClMPChangePlaybackRateCommandiOS 7.1+A remote command that changes the current playback rate.
- ClMPChangePlaybackPositionCommandiOS 9.0+Command for changing the current playback position in a now playing item.
- ClMPChangeShuffleModeCommandiOS 8.0+Command for changing the current shuffle mode to use during playback. To
- ClMPChangeRepeatModeCommandiOS 8.0+Command for changing the current repeat mode to use during playback. To
- EnMPRemoteCommandHandlerStatusiOS 7.1+Constants that a remote command handler returns to report the result of handling an event.
Remote Command Events 14
The event objects delivered to remote command handlers and the constants that describe them.
- ClMPRemoteCommandEventiOS 7.1+The base event object delivered when a remote command is invoked.
- ClMPSkipIntervalCommandEventiOS 7.1+An event delivered when a skip-interval remote command is invoked.
- ClMPSeekCommandEventiOS 7.1+An event delivered when a seek remote command begins or ends.
- ClMPRatingCommandEventiOS 7.1+An event delivered when a rating remote command is invoked, carrying the chosen rating.
- ClMPChangePlaybackRateCommandEventiOS 7.1+An event delivered when a change-playback-rate remote command is invoked.
- ClMPFeedbackCommandEventiOS 7.1+An event delivered when a feedback remote command is invoked.
- ClMPChangeLanguageOptionCommandEventiOS 9.0+An event delivered when a change-language-option remote command is invoked.
- ClMPChangePlaybackPositionCommandEventiOS 8.0+An event delivered when a change-playback-position remote command is invoked.
- ClMPChangeShuffleModeCommandEventiOS 8.0+An event delivered when a change-shuffle-mode remote command is invoked.
- ClMPChangeRepeatModeCommandEventiOS 8.0+An event delivered when a change-repeat-mode remote command is invoked.
- EnMPSeekCommandEventTypeiOS 7.1+Constants that indicate whether a seek command event is beginning or ending.
- EnMPShuffleTypeiOS 3.0+Constants that specify a shuffle mode for a remote command event.
- EnMPRepeatTypeiOS 3.0+Constants that specify a repeat mode for a remote command event.
- EnMPChangeLanguageOptionSettingiOS 9.3+Constants that specify the scope of a language option change request.
Playable Content 5
Exposing a hierarchy of playable content to external playback systems such as CarPlay.
- ClMPPlayableContentManagerMPPlayableContentManager is a class that manages the interactions between a
- ClMPPlayableContentManagerContextMPPlayableContentManagerContext represents the current state of
- PrMPPlayableContentDataSourceMPPlayableContentDataSource is a protocol that application objects conform to
- PrMPPlayableContentDelegateThe MPPlayableContentDelegate is a protocol that allows for external media
- ClMPContentItemiOS 7.1+MPContentItem represents high-level metadata for a particular media item for
Volume Control 1
A standard view for adjusting system audio volume and choosing an output route.
- ClMPVolumeViewiOS 2.0+A view that presents controls for adjusting system audio volume and selecting an output route.
Errors 1
The error domain used by the framework.
- StMPErroriOS 9.3+A structure that describes errors reported by the MediaPlayer framework.
Classes 1
- ClMPAppEntityIdentifieriOS 27.0+
Type Aliases 1
- TyMPMediaEntityPersistentID