mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
80 lines
1.8 KiB
Text
80 lines
1.8 KiB
Text
// 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://w3c.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",
|
|
"skipad",
|
|
"stop",
|
|
"seekto"
|
|
};
|
|
|
|
callback MediaSessionActionHandler = void(MediaSessionActionDetails details);
|
|
|
|
[Exposed=Window]
|
|
interface MediaSession {
|
|
attribute MediaMetadata? metadata;
|
|
|
|
attribute MediaSessionPlaybackState playbackState;
|
|
|
|
void setActionHandler(MediaSessionAction action, MediaSessionActionHandler? handler);
|
|
|
|
void setPositionState(MediaPositionState? state);
|
|
};
|
|
|
|
[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 = "";
|
|
};
|
|
|
|
dictionary MediaPositionState {
|
|
required double duration;
|
|
double playbackRate = 1.0;
|
|
double position = 0.0;
|
|
};
|
|
|
|
dictionary MediaSessionActionDetails {
|
|
required MediaSessionAction action;
|
|
};
|
|
|
|
dictionary MediaSessionSeekActionDetails : MediaSessionActionDetails {
|
|
double? seekOffset;
|
|
};
|
|
|
|
dictionary MediaSessionSeekToActionDetails : MediaSessionActionDetails {
|
|
required double seekTime;
|
|
bool? fastSeek;
|
|
};
|