TechnologiesVideo, Photos & Camera

MediaLibrary

iOSmacOStvOSwatchOSvisionOS

MediaLibrary provides read-only access to the photo, music, movie, and other media libraries on a user's Mac. You browse a library through an MLMediaLibrary, which exposes media sources as MLMediaSource objects organized into hierarchies of MLMediaGroup containers and individual MLMediaObject items. Use MLMediaSourceType and MLMediaType to identify the source and the kind of media you are working with.

Library Access 2

Open and browse the media libraries available on the user's Mac.

  • Cl
    MLMediaLibrary
    An object that provides read-only access to the photo, music, movie, and other media libraries on a user's Mac.
  • Cl
    MLMediaSource
    An object that represents a single media library, exposing its groups and objects to your app.

Media Content 2

The group hierarchies and individual items that make up a media source.

  • Cl
    MLMediaGroup
    An object that represents a container of media, organized hierarchically within a media source.
  • Cl
    MLMediaObject
    An object that represents an individual media item, such as a photo, song, or movie.

Identifying Sources and Media 2

Values that identify the kind of media source and the type of media you are working with.

  • St
    MLMediaSourceType
    Constants that identify the kind of media source, such as photos, music, or movies.
  • En
    MLMediaType
    Constants that specify the type of media a source or object provides.
← Video, Photos & Camera