w3c/mediasession

Consider adding a `kind` property to `MediaImage`

Opened this issue · 1 comments

The MediaImage dictionary is described as being used to describe an image associated with the media. Great! However, without any indication of what the image is, it can be complicated to make smart decisions about how to present the images found in the artwork list.

I'd like to propose adding a kind (or other appropriately named) property to MediaImage that indicates what kind of image is represented. This would take a value from an enum, MediaImageKind, that looks something like:

enum MediaImageKind {
  "artist", /* artist photo */
  "back-cover", /* back cover of the CD/DVD case */
  "front-cover", /* front cover of the case */
  "page", /* page from a booklet */
  "poster", /* movie or artist poster image */
  "thumbnail", /* thumbnail/poster-frame from the video */
  "frame" /* captured frame from the video */
};

Specific list of the kinds could change of course, but I'm sure this gets the idea across. Being able to know what each image is makes it possible to create incredibly nice, friendly interfaces that make real, proper use of each image as needed.

If application/pdf is or could be made to be an acceptable image type for MediaImage, the page kind could be replaced with booklet. This would improve things since page provides no mechanism for ensuring the ordering of pages.

Just updated the intro comment with some changes to improve my proposal a bit.