Windows Media Player 11 SDK Media.getItemInfoByType
Previous | Next |
Media.getItemInfoByType
The getItemInfoByType method retrieves the value of the attribute corresponding to the specified attribute name, language, and index.
Syntax
Parameters
name
String containing the name of the attribute. For information about the attributes supported by Windows Media Player, see the Windows Media Player Attribute Reference.
language
String representing the language. If the value is set to null or "" (empty string) the current locale string is used. Otherwise, the value must be a valid RFC 1766 language string such as "en-us".
index
Number (long) containing the zero-based index of the value to retrieve from the attribute.
Return Values
This method returns a Number, String, MetadataPicture object, or MetadataText object as indicated in the following table.
Attribute | Return value |
SyncState | Number (unsigned long) |
WM/Lyrics_Synchronised | MetadataText object |
WM/Picture | MetadataPicture object |
WM/UserWebURL | MetadataText object |
All other attributes | String |
For attributes whose underlying value is Boolean, this method returns the string "true" or "false".
Remarks
This method retrieves the metadata for an individual digital media item or a media item that is part of a playlist.
This method supports attributes with multiple values and attributes with complex values. The getItemInfo method does not support attributes with multiple values and attributes with complex values.
The attributeCount property contains the number of attribute names available for a given Media object. Index numbers can then be used with the getAttributeName method to determine the name of each available attribute. Individual attribute names can be passed to the name parameter of getItemInfoByType.
The getAttributeCountByType method returns the number of attributes that correspond to a particular attribute name for a given Media object. Index numbers can then be passed to the index parameter of getItemInfoByType. This is useful when a digital media item has been categorized under multiple genres, for example.
To use this method, read access to the library is required. For more information, see Library Access.
This method can cause errors. You should include error-handling code when you call this method. For example, in JScript you can implement error handling by using the try...catch...finally structure.
Windows Media Player 10 Mobile: This method is not supported.
Requirements
Version: Windows Media Player 9 Series or later.
Library: Use wmp.dll.
See Also
- Media Object
- Media.attributeCount
- Media.getAttributeCountByType
- Media.getAttributeName
- Media.getItemInfo
- Media.setItemInfo
- MetadataPicture Object
- MetadataText Object
- Reading Attribute Values
- Settings.mediaAccessRights
- Settings.requestMediaAccessRights
Previous | Next |