MediaItem
The MediaItem
class represents a single media item in a playlist and includes metadata and state information about the media. Below is a detailed reference for each property and method available in the MediaItem
class.
Constructors
MediaItem
Description: Initializes a new instance of the
MediaItem
class.Parameters:
UriType type
: The type of URI.string uri
: The URI of the media item.MediaMetadata metadata
(optional): Metadata associated with the media item.
Usage:
Properties
Index
Description: Gets or sets the index of the media item in the playlist.
Type:
int
Usage:
PlaylistIndex
Description: Gets or sets the index of the playlist to which this media item belongs.
Type:
int
Usage:
MetadataState
Description: Gets or sets the state of the metadata retrieval process.
Type:
MetadataState
Usage:
DownloadDirectory
Description: Gets or sets the download directory for the media item.
Type:
string
Usage:
MetadataType
Description: Gets or sets the type of metadata retrieval.
Type:
MetadataType
Usage:
Metadata
Description: Gets or sets the metadata of the media item.
Type:
MediaMetadata
Usage:
Uri
Description: Gets the URI of the media item.
Type:
string
Usage:
UriType
Description: Gets the URI type of the media item.
Type:
UriType
Usage:
Title
Description: Gets the title of the media item.
Type:
string
Usage:
Artist
Description: Gets the artist of the media item.
Type:
string
Usage:
Genre
Description: Gets the genre of the media item.
Type:
string
Usage:
ReleaseDate
Description: Gets the release date of the media item.
Type:
string
Usage:
AlbumTitle
Description: Gets the album title of the media item.
Type:
string
Usage:
AlbumArtist
Description: Gets the album artist of the media item.
Type:
string
Usage:
Artwork
Description: Gets the artwork of the media item.
Type:
Artwork
Usage:
SerializedMediaItem
Description: Gets or sets the serialized representation of the media item.
Type:
string
Usage:
Methods
RetrieveMetadata
Description: Retrieves the metadata for the media item.
Usage:
SetMetadata
Description: Sets the metadata for the media item.
Parameters:
MediaMetadata metadata
: The metadata to set.
Usage:
MetadataWarning
Description: Logs a warning if metadata is not retrieved yet.
Usage:
Example Usage
Here's an example of how you might use the MediaItem
class in your application:
Last updated