Mac Developer Library

Developer

Media Library Constants Reference

Options
Deployment Target:

On This Page

Media Library Constants Reference

Constants

  • Specifies the source type associated with a particular media source. Source type reflects the primary type of media within the source. These constants are used to specify values for MLMediaLoadSourceTypesKey in the initWithOptions: method of MLMediaLibrary.

    Declaration

    typedef NS_OPTIONS (NSUInteger, MLMediaSourceType ) { MLMediaSourceTypeAudio = 1 << 0, MLMediaSourceTypeImage = 1 << 1, MLMediaSourceTypeMovie = 1 << 2, };

    Constants

    • MLMediaSourceTypeAudio

      Audio source type. Includes iTunes, GarageBand, and Logic.

    • MLMediaSourceTypeImage

      Image source type. Includes iPhoto, Aperture, and Photo Booth.

    • MLMediaSourceTypeMovie

      Movie source type. Includes iMovie and Final Cut Pro.

  • Specifies the media type associated with a particular media object. These constants are used to specify a media object’s mediaType attribute.

    Declaration

    typedef NS_ENUM (NSUInteger, MLMediaType ) { MLMediaTypeAudio = 1 << 0, MLMediaTypeImage = 1 << 1, MLMediaTypeMovie = 1 << 2, };

    Constants

    • MLMediaTypeAudio

      Audio media type.

    • MLMediaTypeImage

      Image media type.

    • MLMediaTypeMovie

      Video media type.

  • Identifiers for media group types in folder-based media sources. These constants are used to specify a media group’s typeIdentifier attribute.

    Declaration

    NSString* const MLFolderRootGroupTypeIdentifier; NSString* const MLFolderGroupTypeIdentifier;

    Constants

    • MLFolderRootGroupTypeIdentifier

      The root media group for folder-based media.

    • MLFolderGroupTypeIdentifier

      A media group that represents a folder in folder-based media.

  • Identifiers for media group types in the iTunes media source. These constants are used to specify a media group’s typeIdentifier attribute.

    Declaration

    NSString* const MLiTunesRootGroupTypeIdentifier; NSString* const MLiTunesPlaylistTypeIdentifier; NSString* const MLiTunesSmartPlaylistTypeIdentifier; NSString* const MLiTunesGeniusPlaylistTypeIdentifier; NSString* const MLiTunesSavedGeniusPlaylistTypeIdentifier; NSString* const MLiTunesFolderPlaylistTypeIdentifier; NSString* const MLiTunesAudioBooksPlaylistTypeIdentifier; NSString* const MLiTunesiTunesUPlaylistTypeIdentifier; NSString* const MLiTunesMoviesPlaylistTypeIdentifier; NSString* const MLiTunesMusicPlaylistTypeIdentifier; NSString* const MLiTunesPodcastPlaylistTypeIdentifier; NSString* const MLiTunesPurchasedPlaylistTypeIdentifier; NSString* const MLiTunesTVShowsPlaylistTypeIdentifier;

    Constants

    • MLiTunesRootGroupTypeIdentifier

      The root media group for iTunes.

    • MLiTunesPlaylistTypeIdentifier

      A media group that represents a user-created playlist in iTunes.

    • MLiTunesSmartPlaylistTypeIdentifier

      A media group that represents a smart playlist in iTunes.

    • MLiTunesGeniusPlaylistTypeIdentifier

      A media group that represents a genius playlist in iTunes.

    • MLiTunesSavedGeniusPlaylistTypeIdentifier

      A media group that represents a saved genius playlist in iTunes.

    • MLiTunesFolderPlaylistTypeIdentifier

      A media group that represents a folder in iTunes.

    • MLiTunesAudioBooksPlaylistTypeIdentifier

      The media group that represents the Audio Books playlist in iTunes.

    • MLiTunesiTunesUPlaylistTypeIdentifier

      The media group that represents the iTunes U playlist in iTunes.

    • MLiTunesMoviesPlaylistTypeIdentifier

      The media group that represents the Movies playlist in iTunes.

    • MLiTunesMusicPlaylistTypeIdentifier

      The media group that represents the Music playlist in iTunes.

    • MLiTunesPodcastPlaylistTypeIdentifier

      The media group that represents the Podcast playlist in iTunes.

    • MLiTunesPurchasedPlaylistTypeIdentifier

      The media group that represents the Purchased playlist in iTunes.

    • MLiTunesTVShowsPlaylistTypeIdentifier

      The media group that represents the TV Shows playlist in iTunes.

  • Identifiers for media group types in the iPhoto media source. These constants are used to specify a media group’s typeIdentifier attribute.

    Declaration

    NSString* const MLiPhotoRootGroupTypeIdentifier; NSString* const MLiPhotoAlbumTypeIdentifier; NSString* const MLiPhotoSmartAlbumTypeIdentifier; NSString* const MLiPhotoLibraryAlbumTypeIdentifier; NSString* const MLiPhotoFolderAlbumTypeIdentifier; NSString* const MLiPhotoEventAlbumTypeIdentifier; NSString* const MLiPhotoEventsFolderTypeIdentifier; NSString* const MLiPhotoLastViewedEventAlbumTypeIdentifier; NSString* const MLiPhotoLastImportAlbumTypeIdentifier; NSString* const MLiPhotoLastNMonthsAlbumTypeIdentifier; NSString* const MLiPhotoFlaggedAlbumTypeIdentifier; NSString* const MLiPhotoSubscribedAlbumTypeIdentifier; NSString* const MLiPhotoSlideShowAlbumTypeIdentifier; NSString* const MLiPhotoPhotoStreamAlbumTypeIdentifier; NSString* const MLiPhotoFacesAlbumTypeIdentifier; NSString* const MLiPhotoPlacesAlbumTypeIdentifier; NSString* const MLiPhotoPlacesCountryAlbumTypeIdentifier; NSString* const MLiPhotoPlacesProvinceAlbumTypeIdentifier; NSString* const MLiPhotoPlacesCityAlbumTypeIdentifier; NSString* const MLiPhotoPlacesPointOfInterestAlbumTypeIdentifier; NSString* const MLiPhotoFacebookAlbumTypeIdentifier; NSString* const MLiPhotoFacebookGroupTypeIdentifier; NSString* const MLiPhotoFlickrAlbumTypeIdentifier; NSString* const MLiPhotoFlickrGroupTypeIdentifier;

    Constants

    • MLiPhotoRootGroupTypeIdentifier

      The root media group for iPhoto.

    • MLiPhotoAlbumTypeIdentifier

      A media group that represents an album in iPhoto.

    • MLiPhotoSmartAlbumTypeIdentifier

      A media group that represents a smart album in iPhoto.

    • MLiPhotoLibraryAlbumTypeIdentifier

      The media group that represents the Photos album in iPhoto.

    • MLiPhotoFolderAlbumTypeIdentifier

      A media group that represents a folder in iPhoto.

    • MLiPhotoEventAlbumTypeIdentifier

      A media group that represents an event in iPhoto.

    • MLiPhotoEventsFolderTypeIdentifier

      The media group that represents the Events album in iPhoto.

    • MLiPhotoLastViewedEventAlbumTypeIdentifier

      The media group that represents the last viewed event in iPhoto.

    • MLiPhotoLastImportAlbumTypeIdentifier

      The media group that represents the Last Import album in iPhoto.

    • MLiPhotoLastNMonthsAlbumTypeIdentifier

      The media group that represents the recent content album in iPhoto, known as the Last N Months album. The value for N is usually 12 (settable in iPhoto > Preferences > General).

    • MLiPhotoFlaggedAlbumTypeIdentifier

      The media group that represents the album of flagged media in iPhoto.

    • MLiPhotoSubscribedAlbumTypeIdentifier

      A media group that represents a subscribed album in iPhoto.

    • MLiPhotoSlideShowAlbumTypeIdentifier

      A media group that represents a slideshow album in iPhoto.

    • MLiPhotoPhotoStreamAlbumTypeIdentifier

      A media group that represents a photo stream in iPhoto.

    • MLiPhotoFacesAlbumTypeIdentifier

      A media group that represents a Faces album in iPhoto. Individual Faces albums are nested in the main Faces album.

    • MLiPhotoPlacesAlbumTypeIdentifier

      The media group that represents the Places album in iPhoto.

    • MLiPhotoPlacesCountryAlbumTypeIdentifier

      A media group that represents a Places album for a country in iPhoto. A country album is nested in the main Places album.

    • MLiPhotoPlacesProvinceAlbumTypeIdentifier

      A media group that represents a Places album for a province or state in iPhoto. A province or state album is nested in a country album.

    • MLiPhotoPlacesCityAlbumTypeIdentifier

      A media group that represents a Places album for a city in iPhoto. A city album is nested in a province or state album.

    • MLiPhotoPlacesPointOfInterestAlbumTypeIdentifier

      A media group that represents a Places album for a point-of-interest in iPhoto. A point of interest album is nested in a city album.

    • MLiPhotoFacebookAlbumTypeIdentifier

      A media group that represents a Facebook album that is visible in iPhoto.

    • MLiPhotoFacebookGroupTypeIdentifier

      A media group that represents a Facebook user account in iPhoto. A Facebook user account contains one or more Facebook albums.

    • MLiPhotoFlickrAlbumTypeIdentifier

      A media group that represents a Flickr album that is visible in iPhoto.

    • MLiPhotoFlickrGroupTypeIdentifier

      A media group that represents a Flickr user account in iPhoto. A Flickr user account contains one or more Flickr albums.

  • Identifiers for media group types in the Aperture media source. These constants are used to specify a media group’s typeIdentifier attribute.

    Declaration

    NSString* const MLApertureRootGroupTypeIdentifier; NSString* const MLApertureUserAlbumTypeIdentifier; NSString* const MLApertureUserSmartAlbumTypeIdentifier; NSString* const MLApertureProjectAlbumTypeIdentifier; NSString* const MLApertureFolderAlbumTypeIdentifier; NSString* const MLApertureProjectFolderAlbumTypeIdentifier; NSString* const MLApertureAllProjectsTypeIdentifier; NSString* const MLApertureAllPhotosTypeIdentifier; NSString* const MLApertureLastViewedEventAlbumTypeIdentifier; NSString* const MLApertureLastImportAlbumTypeIdentifier; NSString* const MLApertureLastNMonthsAlbumTypeIdentifier; NSString* const MLApertureFlaggedTypeIdentifier; NSString* const MLApertureLightTableTypeIdentifier; NSString* const MLApertureSlideShowTypeIdentifier; NSString* const MLAperturePhotoStreamAlbumTypeIdentifier; NSString* const MLApertureFacesAlbumTypeIdentifier; NSString* const MLAperturePlacesAlbumTypeIdentifier; NSString* const MLAperturePlacesCountryAlbumTypeIdentifier; NSString* const MLAperturePlacesProvinceAlbumTypeIdentifier; NSString* const MLAperturePlacesCityAlbumTypeIdentifier; NSString* const MLAperturePlacesPointOfInterestAlbumTypeIdentifier; NSString* const MLApertureFacebookAlbumTypeIdentifier; NSString* const MLApertureFacebookGroupTypeIdentifier; NSString* const MLApertureFlickrAlbumTypeIdentifier; NSString* const MLApertureFlickrGroupTypeIdentifier; NSString* const MLApertureSmugMugGroupTypeIdentifier; NSString* const MLApertureSmugMugAlbumTypeIdentifier;

    Constants

    • MLApertureRootGroupTypeIdentifier

      The root media group for Aperture.

    • MLApertureUserAlbumTypeIdentifier

      A media group that represents a user-created album in Aperture.

    • MLApertureUserSmartAlbumTypeIdentifier

      A media group that represents a user-created smart album in Aperture.

    • MLApertureProjectAlbumTypeIdentifier

      A media group that represents a project in Aperture.

    • MLApertureFolderAlbumTypeIdentifier

      A media group that represents a folder in Aperture.

    • MLApertureProjectFolderAlbumTypeIdentifier

      A media group that represents a folder within a project in Aperture.

    • MLApertureAllProjectsTypeIdentifier

      The media group that represents all projects in Aperture.

    • MLApertureAllPhotosTypeIdentifier

      The media group that represents all photos in Aperture.

    • MLApertureLastViewedEventAlbumTypeIdentifier

      The media group that represents the last viewed event in Aperture.

    • MLApertureLastImportAlbumTypeIdentifier

      The media group that represents the last import album in Aperture.

    • MLApertureLastNMonthsAlbumTypeIdentifier

      The media group that represents the recent content album in Aperture, known as the Last N Months album. The value for N is usually 12 (settable in Aperture > Preferences > General).

    • MLApertureFlaggedTypeIdentifier

      The media group that represents the album of flagged media in Aperture.

    • MLApertureLightTableTypeIdentifier

      A media group that represents a light table in Aperture.

    • MLApertureSlideShowTypeIdentifier

      The media group that represents a slideshow in Aperture.

    • MLAperturePhotoStreamAlbumTypeIdentifier

      A media group that represents a photo stream in Aperture.

    • MLApertureFacesAlbumTypeIdentifier

      A media group that represents a Faces album in Aperture. Individual Faces albums are nested in the main Faces album.

    • MLAperturePlacesAlbumTypeIdentifier

      The media group that represents the Places album in Aperture.

    • MLAperturePlacesCountryAlbumTypeIdentifier

      A media group that represents a Places album for a country in Aperture. A country album is nested in the main Places album.

    • MLAperturePlacesProvinceAlbumTypeIdentifier

      A media group that represents a Places album for a province or state in Aperture. A province or state album is nested in a country album.

    • MLAperturePlacesCityAlbumTypeIdentifier

      A media group that represents a Places album for a city in Aperture. A city album is nested in a province or state album.

    • MLAperturePlacesPointOfInterestAlbumTypeIdentifier

      A media group that represents a Places album for a point-of-interest in Aperture. A point of interest album is nested in a city album.

    • MLApertureFacebookAlbumTypeIdentifier

      A media group that represents a Facebook album that is visible in Aperture.

    • MLApertureFacebookGroupTypeIdentifier

      A media group that represents a Facebook user account in Aperture. A Facebook user account contains one or more Facebook albums.

    • MLApertureFlickrAlbumTypeIdentifier

      A media group that represents a Flickr album that is visible in Aperture.

    • MLApertureFlickrGroupTypeIdentifier

      A media group that represents a Flickr user account in Aperture. A Flickr user account contains one or more Flickr albums.

    • MLApertureSmugMugAlbumTypeIdentifier

      A media group that represents a SmugMug album that is visible in Aperture.

    • MLApertureSmugMugGroupTypeIdentifier

      A media group that represents a SmugMug user account in Aperture. A SmugMug user account contains one or more SmugMug albums.

  • Identifiers for media group types in the GarageBand media source. These constants are used to specify a media group’s typeIdentifier attribute.

    Declaration

    NSString* const MLGarageBandRootGroupTypeIdentifier; NSString* const MLGarageBandFolderGroupTypeIdentifier;

    Constants

    • MLGarageBandRootGroupTypeIdentifier

      The root media group for GarageBand.

    • MLGarageBandFolderGroupTypeIdentifier

      A media group that represents a folder in GarageBand.

  • Identifiers for media group types in the Logic media source. These constants are used to specify a media group’s typeIdentifier attribute.

    Declaration

    NSString* const MLLogicRootGroupTypeIdentifier; NSString* const MLLogicProjectTypeIdentifier; NSString* const MLLogicProjectsGroupTypeIdentifier; NSString* const MLLogicBouncesGroupTypeIdentifier;

    Constants

    • MLLogicRootGroupTypeIdentifier

      The root media group for Logic.

    • MLLogicProjectTypeIdentifier

      A media group that represents a project in Logic. Projects may be nested.

    • MLLogicProjectsGroupTypeIdentifier

      The media group that represents all projects in Logic.

    • MLLogicBouncesGroupTypeIdentifier

      The media group that represents all bounces in Logic.

  • Identifiers for media group types in the iMovie media source. These constants are used to specify a media group’s typeIdentifier attribute.

    Declaration

    NSString* const MLiMovieRootGroupTypeIdentifier; NSString* const MLiMovieProjectGroupTypeIdentifier; NSString* const MLiMovieFolderGroupTypeIdentifier; NSString* const MLiMovieEventGroupTypeIdentifier; NSString* const MLiMovieEventCalendarGroupTypeIdentifier; NSString* const MLiMovieEventLibraryGroupTypeIdentifier;

    Constants

    • MLiMovieRootGroupTypeIdentifier

      The root media group for iMovie.

    • MLiMovieProjectGroupTypeIdentifier

      A media group that represents a project in iMovie.

    • MLiMovieFolderGroupTypeIdentifier

      A media group that represents a folder in iMovie.

    • MLiMovieEventGroupTypeIdentifier

      A media group that represents an event in iMovie.

    • MLiMovieEventCalendarGroupTypeIdentifier

      A media group that represents a collection of events from a specific time period in iMovie.

    • MLiMovieEventLibraryGroupTypeIdentifier

      The media group that represents the event library in iMovie. The event library contains all event calendar groups.

  • Identifiers for media group types in the Final Cut Pro media source. These constants are used to specify a media group’s typeIdentifier attribute.

    Declaration

    NSString* const MLFinalCutRootGroupTypeIdentifier; NSString* const MLFinalCutProjectGroupTypeIdentifier; NSString* const MLFinalCutFolderGroupTypeIdentifier; NSString* const MLFinalCutEventGroupTypeIdentifier; NSString* const MLFinalCutEventCalendarGroupTypeIdentifier; NSString* const MLFinalCutEventLibraryGroupTypeIdentifier;

    Constants

    • MLFinalCutRootGroupTypeIdentifier

      The root media group for Final Cut Pro.

    • MLFinalCutProjectGroupTypeIdentifier

      A media group that represents a project in Final Cut Pro.

    • MLFinalCutFolderGroupTypeIdentifier

      A media group that represents a folder in Final Cut Pro.

    • MLFinalCutEventGroupTypeIdentifier

      A media group that represents an event in Final Cut Pro.

    • MLFinalCutEventCalendarGroupTypeIdentifier

      A media group that represents a collection of events from a specific time period in Final Cut Pro.

    • MLFinalCutEventLibraryGroupTypeIdentifier

      The media group that represents the event library in Final Cut Pro. The event library contains all event calendar groups.

  • Attribute keys for a media object. These constants are used to specify keys within a media object’s attributes dictionary.

    Declaration

    NSString* const MLMediaObjectDurationKey; NSString* const MLMediaObjectArtistKey; NSString* const MLMediaObjectAlbumKey; NSString* const MLMediaObjectGenreKey; NSString* const MLMediaObjectKindKey; NSString* const MLMediaObjectTrackNumberKey; NSString* const MLMediaObjectBitRateKey; NSString* const MLMediaObjectSampleRateKey; NSString* const MLMediaObjectChannelCountKey; NSString* const MLMediaObjectResolutionKey; NSString* const MLMediaObjectCommentsKey; NSString* const MLMediaObjectKeywordsKey; NSString* const MLMediaObjectProtectedKey;

    Constants

    • MLMediaObjectDurationKey

      Specifies the media object’s duration, in seconds. The value for this key is a number (NSNumber).

    • MLMediaObjectArtistKey

      Specifies the media object’s artist. The value for this key is a string (NSString).

    • MLMediaObjectAlbumKey

      Specifies the media object’s album. The value for this key is a string (NSString).

    • MLMediaObjectGenreKey

      Specifies the media object’s genre. The value for this key is a string (NSString).

    • MLMediaObjectKindKey

      Used by iTunes only. Specifies the media object’s file format (shown in the “Kind” column in iTunes). The value for this key is a string (NSString).

    • MLMediaObjectTrackNumberKey

      Specifies the media object’s track number. The value for this key is a number (NSNumber).

    • MLMediaObjectBitRateKey

      Specifies the media object’s bit rate, in kilobits per second. The value for this key is a number (NSNumber).

    • MLMediaObjectSampleRateKey

      Specifies the media object’s sample rate, in samples per second (Hz). The value for this key is a number (NSNumber).

    • MLMediaObjectChannelCountKey

      Specifies the media object’s channel count. The value for this key is a number (NSNumber).

    • MLMediaObjectResolutionStringKey

      Specifies the media object’s resolution. The value for this key is a string (NSString) intended to be converted to a size (NSSize) using the NSSizeFromString method.

    • MLMediaObjectCommentsKey

      Specifies the contents of the comments field associated with the media object. The value for this key is a string (NSString).

    • MLMediaObjectKeywordsKey

      Specifies the keywords associated with the media object. The value for this key is an array (NSArray) of strings (NSString).

    • MLMediaObjectProtectedKey

      Specifies whether the media object is protected by DRM (Digital Rights Management). The value for this key is a number (NSNumber), 0 or 1, that represents a Boolean value.