Skip to content

Titanium.Media.MusicLibraryOptionsType

Simple object for specifying options to openMusicLibrary.

Platforms: iphone, ipad, macos

Properties #

allowMultipleSelections#

Type: Boolean

Set to true to allow the user to select multiple items from the library.

animated#

Type: Boolean

Boolean if the dialog should be animated when showing and hiding.

autohide#

Type: Boolean

Specifies that the library should be hidden automatically after media selection is completed.

cancel#

Type: Callback<FailureResponse>

Function to call if the user presses the cancel button.

error#

Type: Callback<FailureResponse>

Function to call upon receiving an error.

mediaTypes#

Type: Number, Array<Number>

An array of media type constants defining selectable media.

Specify one or more of the MUSIC_MEDIA_TYPE constants from Titanium.Media. To
specify multiple types, either pass an array of values, or pass a
single value that represents the bitwise-OR of the desired media types. For example,
the following values are equivalent:

mediaTypes: [Titanium.Media.MUSIC_MEDIA_TYPE_MUSIC, Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST]

Or:

mediaTypes: Titanium.Media.MUSIC_MEDIA_TYPE_MUSIC|Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST

success#

Type: Callback<MusicLibraryResponseType>

Function to call when the music library selection is made.

Titanium SDK Documentation