TechnologiesVideo, Photos & Camera

NowPlaying

iOSmacOStvOSwatchOSvisionOS

NowPlaying manages and presents media metadata, artwork, and now-playing information, including animated video artwork through AnimatedArtwork, Artwork, and ArtworkRepresentation. You describe what is playing with content types such as MusicContent, MovieContent, PodcastContent, RadioContent, TVShowContent, BookContent, and HomeMediaContent, conforming your own models through MediaContentRepresentable. Capture and report playback state with MediaPlaybackSnapshot, MediaType, MediaDuration, and MediaCommand, and coordinate playback across devices using MediaDevice and the RemoteMediaSessionAttributes protocol. Failures surface through MediaSessionError and RemoteMediaSessionError on iOS, macOS, tvOS, watchOS, and visionOS.

Describing Media Content 9

Conform your media models and represent what is currently playing across supported content kinds.

  • Pr
    MediaContentRepresentableiOS 27+
    A protocol that describes media content being played.
  • St
    GenericContentiOS 27+
    Content representing generic or unspecified media.
  • St
    MusicContentiOS 27+
    Content representing a music track or song.
  • St
    MovieContentiOS 27+
    Content representing a movie.
  • St
    PodcastContentiOS 27+
    Content representing a podcast episode.
  • St
    RadioContentiOS 27+
    Content representing a radio station or live audio stream.
  • St
    TVShowContentiOS 27+
    Content representing a TV show episode.
  • St
    BookContentiOS 27+
    Content representing an audiobook or book being read aloud.
  • St
    HomeMediaContentiOS 27+
    Content representing home media or ambient content.

Artwork 3

Provide static and animated artwork to accompany now-playing media.

  • St
    ArtworkiOS 27+
    Artwork for a media item that can be requested at a specified size.
  • St
    AnimatedArtworkiOS 27+
    Animated artwork for the media item with video and preview support.
  • St
    ArtworkRepresentationiOS 27+
    An artwork image representation, such as music album cover art, associated with a media item.

Playback State and Commands 4

Capture and report the current playback state, duration, type, and supported transport commands.

  • St
    MediaPlaybackSnapshotiOS 27+
    A snapshot of playback state and timing for a Now Playing session.
  • St
    MediaCommandiOS 27+
    A command that describes a media control action for a Now Playing session.
  • En
    MediaTypeiOS 27+
    The type of media being played.
  • En
    MediaDurationiOS 27+
    The duration of media content.

Remote and Cross-Device Sessions 2

Coordinate playback across devices through remote media session attributes and device information.

  • Pr
    RemoteMediaSessionAttributes
    A type that represents attributes for remote sessions.
  • St
    MediaDevice
    A device that plays media in a remote session.

Errors 2

Handle failures raised by local and remote media sessions.

  • En
    MediaSessionErroriOS 27+
    Errors that can occur during local session operations.
  • En
    RemoteMediaSessionError
    Errors that can occur during remote session operations.

Classes 3

  • Cl
    MediaSession
    A local Now Playing session that publishes metadata and commands to the system.
  • Cl
    RemoteMediaSession
    A session that manages remote media playback across devices.
  • Cl
    RemoteMediaSessionExtensionConfiguration
    The configuration object for a remote playback extension.

Protocols 3

  • Pr
    MediaSessionRepresentableiOS 27+
    A protocol that provides content metadata, playback state, and commands for a Now Playing session.
  • Pr
    RemoteMediaSessionExtension
    An app extension that provides remote media sessions.
  • Pr
    RemoteMediaSessionRepresentable
    A session that plays remotely, potentially across multiple devices.
← Video, Photos & Camera