---
title: MLMediaObject
framework: medialibrary
role: symbol
role_heading: Class
path: medialibrary/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.

## Declaration

```swift
class MLMediaObject
```

## Overview

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](medialibrary/mlmediaobject/identifier.md)
- [mediaSourceIdentifier](medialibrary/mlmediaobject/mediasourceidentifier.md)
- [mediaLibrary](medialibrary/mlmediaobject/medialibrary.md)

### Accessing Object Attributes

- [attributes](medialibrary/mlmediaobject/attributes.md)
- [mediaType](medialibrary/mlmediaobject/mediatype.md)
- [contentType](medialibrary/mlmediaobject/contenttype.md)
- [name](medialibrary/mlmediaobject/name.md)
- [url](medialibrary/mlmediaobject/url.md)
- [originalURL](medialibrary/mlmediaobject/originalurl.md)
- [fileSize](medialibrary/mlmediaobject/filesize.md)
- [modificationDate](medialibrary/mlmediaobject/modificationdate.md)
- [thumbnailURL](medialibrary/mlmediaobject/thumbnailurl.md)
- [artworkImage](medialibrary/mlmediaobject/artworkimage.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Classes

- [MLMediaGroup](medialibrary/mlmediagroup.md)
- [MLMediaLibrary](medialibrary/mlmedialibrary.md)
- [MLMediaSource](medialibrary/mlmediasource.md)
