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:

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

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

API reference

MediaItem

Last updated