Titanium.Media.Item
> Titanium.Media.Item

A representation of a media item returned by openMusicLibrary or queryMusicLibrary.

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 returns Item objects in its success callback function, while queryMusicLibrary returns an array of Item objects.

  • 1.4.0
  • 1.4.0
Defined By

Properties

Titanium.Media.Item
albumArtist : Stringreadonly

Artist credited for the album containing this item.

Artist credited for the album containing this item.

Titanium.Media.Item
albumArtistPersistentID : Numberreadonly

The persistent identifier for an album artist.

The persistent identifier for an album artist.

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
albumPersistentID : Numberreadonly

The key for the persistent identifier for an album.

The key for the persistent identifier for an album.

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
albumTitle : Stringreadonly

Title of the album containing this item.

Title of the album containing this item.

Titanium.Media.Item
albumTrackCount : Numberreadonly

Number of tracks for the album containing this item.

Number of tracks for the album containing this item.

Titanium.Media.Item
albumTrackNumber : Numberreadonly

Track number for this item.

Track number for this item.

apiName : Stringreadonly

The name of the API that this proxy corresponds to.

The name of the API that this proxy corresponds to.

The value of this property is the fully qualified name of the API. For example, Button returns Ti.UI.Button.

  • 3.2.0
  • 3.2.0
  • 3.2.0
Titanium.Media.Item
artist : Stringreadonly

Artist credited for this item.

Artist credited for this item.

Titanium.Media.Item
artwork : Titanium.Blobreadonly

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

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

Titanium.Media.Item
assetURL : Stringreadonly

A URL pointing to the media item.

A URL pointing to the media item.

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
: Numberreadonly
The number of musical beats per minute for the media item, corresponding to the "BPM" field in the Info tab in the "...

The number of musical beats per minute for the media item, corresponding to the "BPM" field in the Info tab in the "Get Info" dialog in iTunes.

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
bookmarkTime : Stringreadonly

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

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

  • 6.1.0
  • 6.1.0
Indicates if the proxy will bubble an event to its parent. ...

Indicates if the proxy will bubble an event to its parent.

Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window. Other common parents are table sections to their rows, table views to their sections, and scrollable views to their views. Set this property to false to disable the bubbling to the proxy's parent.

Default: true

  • 3.0.0
  • 3.0.0
  • 3.0.0
Titanium.Media.Item
: Stringreadonly
Textual information about the media item, corresponding to the "Comments" field in in the Info tab in the Get Info d...

Textual information about the media item, corresponding to the "Comments" field in in the Info tab in the Get Info dialog in iTunes.

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
composer : Stringreadonly

Composer of this item.

Composer of this item.

Titanium.Media.Item
: Datereadonly
Date when the item was added to the music library. ...

Date when the item was added to the music library.

Requires: iOS 10.0 and later

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
discCount : Numberreadonly

Total number of discs for the album containing this item.

Total number of discs for the album containing this item.

Titanium.Media.Item
discNumber : Numberreadonly

Disc number for this item in the album.

Disc number for this item in the album.

Titanium.Media.Item
genre : Stringreadonly

Genre of this item.

Genre of this item.

Titanium.Media.Item
genrePersistentID : Numberreadonly

The persistent identifier for a genre.

The persistent identifier for a genre.

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
hasProtectedAsset : Booleanreadonly

True if the item represents a protected asset.

True if the item represents a protected asset.

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
isCloudItem : Booleanreadonly

True if the media item is an iCloud item.

True if the media item is an iCloud item.

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
isCompilation : Booleanreadonly

True if this item is part of a compilation album.

True if this item is part of a compilation album.

Titanium.Media.Item
isExplicit : Booleanreadonly

True if this item is marked as "Explicit".

True if this item is marked as "Explicit".

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
lastPlayedDate : Datereadonly

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

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

  • 6.1.0
  • 6.1.0

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.

  • 3.6.0
Titanium.Media.Item
lyrics : Stringreadonly

Lyrics for this item.

Lyrics for this item.

Titanium.Media.Item
mediaType : Numberreadonly

The type of the media.

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.

This API can be assigned the following constants:

Titanium.Media.Item
persistentID : Stringreadonly

The key for the persistent identifier for the media item.

The key for the persistent identifier for the media item.

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
playCount : Numberreadonly

Number of times the item has been played.

Number of times the item has been played.

Titanium.Media.Item
playbackDuration : Numberreadonly

Length (in seconds) of this item.

Length (in seconds) of this item.

Titanium.Media.Item
: Numberreadonly
Used to enqueue store tracks by their ID. ...

Used to enqueue store tracks by their ID.

Requires: iOS 10.3 and later

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
podcastPersistentID : Numberreadonly

The persistent identifier for an audio podcast.

The persistent identifier for an audio podcast.

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
podcastTitle : Stringreadonly

Title of a podcast item.

Title of a podcast item.

Only included if the media type is Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST.

Titanium.Media.Item
rating : Numberreadonly

Rating for this item.

Rating for this item.

Titanium.Media.Item
releaseDate : Datereadonly

Date when this this item was released.

Date when this this item was released.

  • 6.1.0
  • 6.1.0
Titanium.Media.Item
skipCount : Numberreadonly

Number of times this item has been skipped.

Number of times this item has been skipped.

Titanium.Media.Item
title : Stringreadonly

Title of this item.

Title of this item.

Titanium.Media.Item
userGrouping : Stringreadonly

Corresponds to the "Grouping" field in the Info tab in the "Get Info" dialog in iTunes.

Corresponds to the "Grouping" field in the Info tab in the "Get Info" dialog in iTunes.

  • 6.1.0
  • 6.1.0
Defined By

Methods

Adds the specified callback as an event listener for the named event. ...

Adds the specified callback as an event listener for the named event.

Parameters

  • name : String

    Name of the event.

  • callback : Callback<Object>

    Callback function to invoke when the event is fired.

Returns

  • void
Applies the properties to the proxy. ...

Applies the properties to the proxy.

Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • props : Dictionary

    A dictionary of properties to apply.

Returns

  • void
Fires a synthesized event to any registered listeners. ...

Fires a synthesized event to any registered listeners.

Parameters

  • name : String

    Name of the event.

  • event : Dictionary

    A dictionary of keys and values to add to the Titanium.Event object sent to the listeners.

Returns

  • void
Titanium.Media.Item
( ) : String
Gets the value of the albumArtist property. ...

Gets the value of the albumArtist property.

Returns

  • String
Titanium.Media.Item
( ) : Number
Gets the value of the albumArtistPersistentID property. ...

Gets the value of the albumArtistPersistentID property.

  • 6.1.0
  • 6.1.0

Returns

  • Number
Titanium.Media.Item
( ) : Number
Gets the value of the albumPersistentID property. ...

Gets the value of the albumPersistentID property.

  • 6.1.0
  • 6.1.0

Returns

  • Number
Titanium.Media.Item
( ) : String
Gets the value of the albumTitle property. ...

Gets the value of the albumTitle property.

Returns

  • String
Titanium.Media.Item
( ) : Number
Gets the value of the albumTrackCount property. ...

Gets the value of the albumTrackCount property.

Returns

  • Number
Titanium.Media.Item
( ) : Number
Gets the value of the albumTrackNumber property. ...

Gets the value of the albumTrackNumber property.

Returns

  • Number
Gets the value of the apiName property. ...

Gets the value of the apiName property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Returns

  • String
Titanium.Media.Item
( ) : String
Gets the value of the artist property. ...

Gets the value of the artist property.

Returns

  • String
Titanium.Media.Item
( ) : Titanium.Blob
Gets the value of the artwork property. ...

Gets the value of the artwork property.

Returns

Titanium.Media.Item
( ) : String
Gets the value of the assetURL property. ...

Gets the value of the assetURL property.

  • 6.1.0
  • 6.1.0

Returns

  • String
Titanium.Media.Item
( ) : Number
Gets the value of the beatsPerMinute property. ...

Gets the value of the beatsPerMinute property.

  • 6.1.0
  • 6.1.0

Returns

  • Number
Titanium.Media.Item
( ) : String
Gets the value of the bookmarkTime property. ...

Gets the value of the bookmarkTime property.

  • 6.1.0
  • 6.1.0

Returns

  • String
Gets the value of the bubbleParent property. ...

Gets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Returns

  • Boolean
Titanium.Media.Item
( ) : String
Gets the value of the comments property. ...

Gets the value of the comments property.

  • 6.1.0
  • 6.1.0

Returns

  • String
Titanium.Media.Item
( ) : String
Gets the value of the composer property. ...

Gets the value of the composer property.

Returns

  • String
Titanium.Media.Item
( ) : Date
Gets the value of the dateAdded property. ...

Gets the value of the dateAdded property.

  • 6.1.0
  • 6.1.0

Returns

  • Date
Titanium.Media.Item
( ) : Number
Gets the value of the discCount property. ...

Gets the value of the discCount property.

Returns

  • Number
Titanium.Media.Item
( ) : Number
Gets the value of the discNumber property. ...

Gets the value of the discNumber property.

Returns

  • Number
Titanium.Media.Item
( ) : String
Gets the value of the genre property. ...

Gets the value of the genre property.

Returns

  • String
Titanium.Media.Item
( ) : Number
Gets the value of the genrePersistentID property. ...

Gets the value of the genrePersistentID property.

  • 6.1.0
  • 6.1.0

Returns

  • Number
Titanium.Media.Item
( ) : Boolean
Gets the value of the hasProtectedAsset property. ...

Gets the value of the hasProtectedAsset property.

  • 6.1.0
  • 6.1.0

Returns

  • Boolean
Titanium.Media.Item
( ) : Boolean
Gets the value of the isCloudItem property. ...

Gets the value of the isCloudItem property.

  • 6.1.0
  • 6.1.0

Returns

  • Boolean
Titanium.Media.Item
( ) : Boolean
Gets the value of the isCompilation property. ...

Gets the value of the isCompilation property.

Returns

  • Boolean
Titanium.Media.Item
( ) : Boolean
Gets the value of the isExplicit property. ...

Gets the value of the isExplicit property.

  • 6.1.0
  • 6.1.0

Returns

  • Boolean
Titanium.Media.Item
( ) : Date
Gets the value of the lastPlayedDate property. ...

Gets the value of the lastPlayedDate property.

  • 6.1.0
  • 6.1.0

Returns

  • Date
Gets the value of the lifecycleContainer property. ...

Gets the value of the lifecycleContainer property.

  • 3.6.0

Returns

Titanium.Media.Item
( ) : String
Gets the value of the lyrics property. ...

Gets the value of the lyrics property.

Returns

  • String
Titanium.Media.Item
( ) : Number
Gets the value of the mediaType property. ...

Gets the value of the mediaType property.

Returns

  • Number
Titanium.Media.Item
( ) : String
Gets the value of the persistentID property. ...

Gets the value of the persistentID property.

  • 6.1.0
  • 6.1.0

Returns

  • String
Titanium.Media.Item
( ) : Number
Gets the value of the playCount property. ...

Gets the value of the playCount property.

Returns

  • Number
Titanium.Media.Item
( ) : Number
Gets the value of the playbackDuration property. ...

Gets the value of the playbackDuration property.

Returns

  • Number
Titanium.Media.Item
( ) : Number
Gets the value of the playbackStoreID property. ...

Gets the value of the playbackStoreID property.

  • 6.1.0
  • 6.1.0

Returns

  • Number
Titanium.Media.Item
( ) : Number
Gets the value of the podcastPersistentID property. ...

Gets the value of the podcastPersistentID property.

  • 6.1.0
  • 6.1.0

Returns

  • Number
Titanium.Media.Item
( ) : String
Gets the value of the podcastTitle property. ...

Gets the value of the podcastTitle property.

Returns

  • String
Titanium.Media.Item
( ) : Number
Gets the value of the rating property. ...

Gets the value of the rating property.

Returns

  • Number
Titanium.Media.Item
( ) : Date
Gets the value of the releaseDate property. ...

Gets the value of the releaseDate property.

  • 6.1.0
  • 6.1.0

Returns

  • Date
Titanium.Media.Item
( ) : Number
Gets the value of the skipCount property. ...

Gets the value of the skipCount property.

Returns

  • Number
Titanium.Media.Item
( ) : String
Gets the value of the title property. ...

Gets the value of the title property.

Returns

  • String
Titanium.Media.Item
( ) : String
Gets the value of the userGrouping property. ...

Gets the value of the userGrouping property.

  • 6.1.0
  • 6.1.0

Returns

  • String
Removes the specified callback as an event listener for the named event. ...

Removes the specified callback as an event listener for the named event.

Multiple listeners can be registered for the same event, so the callback parameter is used to determine which listener to remove.

When adding a listener, you must save a reference to the callback function in order to remove the listener later:

var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);

To remove the listener, pass in a reference to the callback function:

window.removeEventListener('click', listener);

Parameters

  • name : String

    Name of the event.

  • callback : Callback<Object>

    Callback function to remove. Must be the same function passed to addEventListener.

Returns

  • void
Sets the value of the bubbleParent property. ...

Sets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • bubbleParent : Boolean

    New value for the property.

Returns

  • void
Sets the value of the lifecycleContainer property. ...

Sets the value of the lifecycleContainer property.

  • 3.6.0

Parameters

Returns

  • void