blob: d2d16c232b7c72704b2648f844b64b4482ff2072 [file] [log] [blame]
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports)
// Source: Media Session Standard (https://wicg.github.io/mediasession/)
[Exposed=Window]
partial interface Navigator {
[SameObject] readonly attribute MediaSession mediaSession;
};
enum MediaSessionPlaybackState {
"none",
"paused",
"playing"
};
enum MediaSessionAction {
"play",
"pause",
"seekbackward",
"seekforward",
"previoustrack",
"nexttrack",
"skip-ad",
};
callback MediaSessionActionHandler = void();
[Exposed=Window]
interface MediaSession {
attribute MediaMetadata? metadata;
attribute MediaSessionPlaybackState playbackState;
void setActionHandler(MediaSessionAction action, MediaSessionActionHandler? handler);
};
[Constructor(optional MediaMetadataInit init), Exposed=Window]
interface MediaMetadata {
attribute DOMString title;
attribute DOMString artist;
attribute DOMString album;
attribute FrozenArray<MediaImage> artwork;
};
dictionary MediaMetadataInit {
DOMString title = "";
DOMString artist = "";
DOMString album = "";
sequence<MediaImage> artwork = [];
};
dictionary MediaImage {
required USVString src;
DOMString sizes = "";
DOMString type = "";
};