Find and play user-installed media items including songs, audio podcasts, and audio books. Play custom movie files, such as cut scenes in games.
- iOS 2.0+
- tvOS 9.0+
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.
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
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.