# Titanium.Media.Item

> A representation of a media item returned by [openMusicLibrary](https://titaniumsdk.com/docs/sdk/Titanium.Media.md#openMusicLibrary) or [queryMusicLibrary](https://titaniumsdk.com/docs/sdk/Titanium.Media.md#queryMusicLibrary).

- Source: https://titaniumsdk.com/docs/sdk/13.1.0/Titanium.Media.Item
- Titanium SDK version: 13.1.0
- Kind: proxy
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 1.4.0
- Extends: Titanium.Proxy
- Inheritance: Titanium.Proxy

This is a read-only object that describes a single media item, not a playlist. 
Titanium does not support access to playlists.

`Item` objects cannot be created explicitly.  The 
[openMusicLibrary](https://titaniumsdk.com/docs/sdk/Titanium.Media.md#openMusicLibrary) returns `Item` objects in its
`success` callback function, while [queryMusicLibrary](https://titaniumsdk.com/docs/sdk/Titanium.Media.md#queryMusicLibrary)
returns an array of `Item` objects.

## Properties

### albumArtist

- Type: String
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Artist credited for the album containing this item.

### albumArtistPersistentID

- Type: Number
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

The persistent identifier for an album artist.

### albumPersistentID

- Type: Number
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

The key for the persistent identifier for an album.

### albumTitle

- Type: String
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Title of the album containing this item.

### albumTrackCount

- Type: Number
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Number of tracks for the album containing this item.

### albumTrackNumber

- Type: Number
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Track number for this item.

### artist

- Type: String
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Artist credited for this item.

### artwork

- Type: Titanium.Blob
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Image for the item's artwork as a `Blob` object,  or `null` if no artwork is
available.

### assetURL

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

A URL pointing to the media item.

### beatsPerMinute

- Type: Number
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

The number of musical beats per minute for the media item.

### bookmarkTime

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

The user's place in the media item the most recent time it was played.

### comments

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

Textual information about the media item.

### composer

- Type: String
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Composer of this item.

### dateAdded

- Type: Date
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

Date when the item was added to the music library.

### discCount

- Type: Number
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Total number of discs for the album containing this item.

### discNumber

- Type: Number
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Disc number for this item in the album.

### genre

- Type: String
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Genre of this item.

### genrePersistentID

- Type: Number
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

The persistent identifier for a genre.

### hasProtectedAsset

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

True if the item represents a protected asset.

### isCloudItem

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

True if the media item is an iCloud item.

### isCompilation

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Permission: read-only

True if this item is part of a compilation album.

### isExplicit

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

True if this item is marked as "Explicit".

### lastPlayedDate

- Type: Date
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

The most recent calendar date on which the user played the media item.

### lyrics

- Type: String
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Lyrics for this item.

### mediaType

- Type: Number
- Platforms: iPhone, iPad, macOS
- Permission: read-only

The type of the media.

At least in theory, a single item can have more than one media type, in which case the
value represents a bitwise-OR of all the applicable media types.

Accepts: `Titanium.Media.MUSIC_MEDIA_TYPE_ALL`, `Titanium.Media.MUSIC_MEDIA_TYPE_ANY_AUDIO`, `Titanium.Media.MUSIC_MEDIA_TYPE_AUDIOBOOK`, `Titanium.Media.MUSIC_MEDIA_TYPE_MUSIC`, `Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST`

### persistentID

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

The key for the persistent identifier for the media item.

### playbackDuration

- Type: Number
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Length (in seconds) of this item.

### playbackStoreID

- Type: Number
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Requires: iOS 10.3+
- Permission: read-only

Used to enqueue store tracks by their ID.

### playCount

- Type: Number
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Number of times the item has been played.

### podcastPersistentID

- Type: Number
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

The persistent identifier for an audio podcast.

### podcastTitle

- Type: String
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Title of a podcast item.

Only included if the media type is [Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST](https://titaniumsdk.com/docs/sdk/Titanium.Media.md#MUSIC_MEDIA_TYPE_PODCAST).

### rating

- Type: Number
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Rating for this item.

### releaseDate

- Type: Date
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

Date when this this item was released.

### skipCount

- Type: Number
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Number of times this item has been skipped.

### title

- Type: String
- Platforms: iPhone, iPad, macOS
- Permission: read-only

Title of this item.

### userGrouping

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- Permission: read-only

Grouping information for the media item.

## Inherited members

6 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/13.1.0/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `removeEventListener`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

