> For the complete documentation index, see [llms.txt](https://glitch9.gitbook.io/native-media-player/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glitch9.gitbook.io/native-media-player/legacy-docs/legacy-documents/media-item.md).

# Media Item

The `MediaItem` class is designed to represent an individual media item within a media player.

#### Key Points:

* **Holds Information**: Stores important information about a media item, like its position in a playlist, its URI, and its metadata (such as title, artist, and album).
* **Metadata Management**: Handles the retrieval and storage of metadata, which provides additional details about the media item.
* **Equality Operations**: Includes methods to compare two media items to check if they are the same.

#### Basic Properties:

1. **Index**: Position of the media item in a playlist.
2. **PlaylistIndex**: Index of the playlist this media item belongs to.
3. **Uri**: The location (address) of the media item.
4. **Metadata**: Additional information about the media item (title, artist, etc.).

#### Constructor Examples:

* **Basic Initialization**:

  ```csharp
  var mediaItem = new MediaItem("http://example.com/media.mp3");
  ```
* **With Metadata**:

  ```csharp
  var mediaItem = new MediaItem("http://example.com/media.mp3", metadata);
  ```

## API reference

{% content-ref url="/pages/tkMVfrEqk5DU3JLPJ8PB" %}
[MediaItem](/native-media-player/legacy-docs/legacy-api-references/mediaitem.md)
{% endcontent-ref %}
