<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.9.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "MediaLibrary",
  "identifier" : "/documentation/MediaLibrary/MLMediaObject",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Media Library"
    ],
    "preciseIdentifier" : "c:objc(cs)MLMediaObject"
  },
  "title" : "MLMediaObject"
}
-->

# MLMediaObject

The `MLMediaObject` class describes a single media file, such as a photo, song, or movie. Each media object contains basic metadata including a name, media type, URL, and so on. Additional information about each object is stored in its list of attributes. For a list of possible object attribute keys, see [Media Object Attribute Keys](/documentation/MediaLibrary/media-object-attribute-keys).

```
class MLMediaObject
```

## Overview

A media object belongs to a single media source but can be referenced by several groups within that source. In other words, an object can appear in multiple places in the group hierarchy under a single media source. In iTunes, a movie that was purchased through the iTunes Store is referenced by both the Purchased playlist and the Movies playlist. If a user adds the movie to his own playlist, the group respresenting that playlist will also reference the movie. All three groups reference the same media object.

All `MLMediaObject` properties are read-only, so this information can be accessed but not altered.

## Topics

### Identifying the Object

[`identifier`](/documentation/MediaLibrary/MLMediaObject/identifier)

An identifier for the media object.

[`mediaSourceIdentifier`](/documentation/MediaLibrary/MLMediaObject/mediaSourceIdentifier)

An identifier for the source that loaded the media object.

[`mediaLibrary`](/documentation/MediaLibrary/MLMediaObject/mediaLibrary)

A pointer to the media library instance that loaded the media object’s source.

### Accessing Object Attributes

[`attributes`](/documentation/MediaLibrary/MLMediaObject/attributes)

A dictionary of attributes describing the media object.

[`mediaType`](/documentation/MediaLibrary/MLMediaObject/mediaType)

The media object’s type of media (image, audio, or movie).

[`contentType`](/documentation/MediaLibrary/MLMediaObject/contentType)

The UTI associated with the media object.

[`name`](/documentation/MediaLibrary/MLMediaObject/name)

The name of the media object.

[`url`](/documentation/MediaLibrary/MLMediaObject/url)

The location of the media object.

[`originalURL`](/documentation/MediaLibrary/MLMediaObject/originalURL)

The location of the original media object, if [`url`](/documentation/MediaLibrary/MLMediaObject/url) is not the original location.

[`fileSize`](/documentation/MediaLibrary/MLMediaObject/fileSize)

The size, in bytes, of the media object.

[`modificationDate`](/documentation/MediaLibrary/MLMediaObject/modificationDate)

The date and time when the media object was last altered.

[`thumbnailURL`](/documentation/MediaLibrary/MLMediaObject/thumbnailURL)

The location of the media object’s thumbnail image.

[`artworkImage`](/documentation/MediaLibrary/MLMediaObject/artworkImage)

Album artwork associated with the media object.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)