diff --git a/index.bs b/index.bs index 0d2df30..2621776 100644 --- a/index.bs +++ b/index.bs @@ -383,8 +383,8 @@ platform UI or media keys, thereby improving the user experience. the playback has a notion of playlist.
  • - skipad: the action's - intent is to skip the advertisement that is currently playing. + skip: the action's + intent is to skip the media item that is currently playing.
  • stop: the action's intent @@ -751,7 +751,7 @@ enum MediaSessionAction { "seekforward", "previoustrack", "nexttrack", - "skipad", + "skip", "stop", "seekto", "togglemicrophone", @@ -1079,6 +1079,7 @@ interface MediaMetadata { attribute DOMString title; attribute DOMString artist; attribute DOMString album; + readonly attribute MediaKind kind; attribute FrozenArray<object> artwork; [SameObject] readonly attribute FrozenArray<ChapterInformation> chapterInfo; }; @@ -1087,9 +1088,21 @@ dictionary MediaMetadataInit { DOMString title = ""; DOMString artist = ""; DOMString album = ""; + MediaKind kind = ""; sequence<MediaImage> artwork = []; sequence<ChapterInformationInit> chapterInfo = []; }; + +enum MediaKind { + "advertisement", + "closing-credits", + "cold-open-scene", + "opening-credits", + "post-credits-scene", + "summary", + "content", + "" +};

    @@ -1109,6 +1122,46 @@ dictionary MediaMetadataInit { which are DOMString.

    +

    + A {{MediaMetadata}} has an associated kind, + which is a {{MediaKind}}, which can have one of the following value: +

    + +

    + This enumeration is experimental and is subject to changes. +

    +

    A {{MediaMetadata}} has an associated sequence of artwork images, which is a sequence of type @@ -1130,6 +1183,7 @@ dictionary MediaMetadataInit {

  • Its title is the empty string.
  • Its artist is the empty string.
  • Its album is the empty string.
  • +
  • Its kind is the empty string.
  • Its artwork images length is 0.
  • Its chapter information length is @@ -1156,6 +1210,10 @@ dictionary MediaMetadataInit { Set metadata's {{MediaMetadata/album}} to init's {{MediaMetadataInit/album}}.
  • +
  • + Set metadata's {{MediaMetadata/kind}} to + init's {{MediaMetadataInit/kind}}. +
  • Run the convert artwork algorithm with init's {{MediaMetadataInit/artwork}} as input and set @@ -1245,6 +1303,11 @@ user agent MUST run the following steps: set the {{MediaMetadata}}'s album to the given value.

    +

    + The kind attribute reflects the + {{MediaMetadata}}'s kind. On getting, it MUST return + the {{MediaMetadata}}'s kind.

    +

    The artwork attribute reflects the {{MediaMetadata}}'s artwork @@ -1344,12 +1407,14 @@ interface interface ChapterInformation { readonly attribute DOMString title; readonly attribute double startTime; + readonly attribute MediaKind kind; [SameObject] readonly attribute FrozenArray<MediaImage> artwork; }; dictionary ChapterInformationInit { DOMString title = ""; double startTime = 0; + MediaKind kind = ""; sequence<MediaImage> artwork = []; }; @@ -1373,6 +1438,12 @@ dictionary ChapterInformationInit { startTime which is double.

    +

    + A {{ChapterInformation}} has an associated kind + which is a {{MediaKind}}. +

    +

    A {{ChapterInformation}} has an associated list of @@ -1397,6 +1468,10 @@ dictionary ChapterInformationInit { for=ChapterInformation>startTime is negative or greater than [=duration=], throw a TypeError.

  • +
  • + Set chapterInfo's {{ChapterInformation/kind}} to + init's {{ChapterInformationInit/kind}}. +
  • Let {{ChapterInformationInit/artwork}} be the result of running the convert artwork algorithm with init's @@ -1425,6 +1500,12 @@ dictionary ChapterInformationInit { for=ChapterInformation>startTime.

    +

    + The kind attribute reflects the + {{ChapterInformation}}'s kind. On getting, it + MUST return the {{ChapterInformation}}'s kind. +

    +

    The artwork attribute reflects the {{ChapterInformation}}'s