MediaMetadata Class
The metadata of a media (https://w3c.github.io/mediasession/#the-mediametadata-interface): its title, its artist, its album, its artwork and its chapters, shown by the media controls of the platform when it is the metadata of a MediaSession.
public sealed class MediaMetadataConstructors
| Name | Description |
|---|---|
| MediaMetadata(MediaMetadataInit?) | Initializes a new instance of the MediaMetadata class (https://w3c.github.io/mediasession/#dom-mediametadata-mediametadata). The URLs of the images are parsed with the API base URL of the current global object. |
MediaMetadata(MediaMetadataInit?)
MediaSession.csInitializes a new instance of the MediaMetadata class (https://w3c.github.io/mediasession/#dom-mediametadata-mediametadata). The URLs of the images are parsed with the API base URL of the current global object.
public MediaMetadata(MediaMetadataInit? init = null)Parameters
initMediaMetadataInit?- The initial values.
Exceptions
TypeErrorException- The URL of an image is not valid.
See also
Properties
| Name | Description |
|---|---|
| Album | Gets or sets the album of the media. |
| Artist | Gets or sets the artist of the media. |
| Artwork | Gets or sets the images of the artwork of the media, with absolute URLs: the URLs of the new images are parsed with the API base URL of the current global object (https://w3c.github.io/mediasession/#convert-artwork-algorithm). The pages get a frozen array of frozen objects. |
| ChapterInfo | Gets the chapters of the media. |
| Title | Gets or sets the title of the media. |
Album
MediaSession.csGets or sets the album of the media.
public string Album { get; set; }Artist
MediaSession.csGets or sets the artist of the media.
public string Artist { get; set; }Artwork
MediaSession.csGets or sets the images of the artwork of the media, with absolute URLs: the URLs of the new images are parsed with the API base URL of the current global object (https://w3c.github.io/mediasession/#convert-artwork-algorithm). The pages get a frozen array of frozen objects.
public IReadOnlyList<MediaImage> Artwork { get; set; }ChapterInfo
MediaSession.csGets the chapters of the media.
public IReadOnlyList<ChapterInformation> ChapterInfo { get; }Title
MediaSession.csGets or sets the title of the media.
public string Title { get; set; }