Update HTMLMediaElement.webidl according to spec

This commit is contained in:
Anthony Ramine 2017-10-10 09:50:51 +02:00
parent 2cd9dcebee
commit 8754155a11

View file

@ -3,25 +3,25 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#htmlmediaelement // https://html.spec.whatwg.org/multipage/#htmlmediaelement
enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" }; enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" };
[Abstract] [Abstract]
interface HTMLMediaElement : HTMLElement { interface HTMLMediaElement : HTMLElement {
// error state // error state
readonly attribute MediaError? error; readonly attribute MediaError? error;
// network state // network state
[CEReactions] [CEReactions] attribute DOMString src;
attribute DOMString src; // attribute MediaProvider? srcObject;
readonly attribute DOMString currentSrc; readonly attribute DOMString currentSrc;
// [CEReactions] // [CEReactions] attribute DOMString crossOrigin;
// attribute DOMString crossOrigin;
const unsigned short NETWORK_EMPTY = 0; const unsigned short NETWORK_EMPTY = 0;
const unsigned short NETWORK_IDLE = 1; const unsigned short NETWORK_IDLE = 1;
const unsigned short NETWORK_LOADING = 2; const unsigned short NETWORK_LOADING = 2;
const unsigned short NETWORK_NO_SOURCE = 3; const unsigned short NETWORK_NO_SOURCE = 3;
readonly attribute unsigned short networkState; readonly attribute unsigned short networkState;
[CEReactions] [CEReactions] attribute DOMString preload;
attribute DOMString preload;
// readonly attribute TimeRanges buffered; // readonly attribute TimeRanges buffered;
void load(); void load();
CanPlayTypeResult canPlayType(DOMString type); CanPlayTypeResult canPlayType(DOMString type);
@ -36,34 +36,26 @@ interface HTMLMediaElement : HTMLElement {
// readonly attribute boolean seeking; // readonly attribute boolean seeking;
// playback state // playback state
// attribute double currentTime; // attribute double currentTime;
// void fastSeek(double time); // void fastSeek(double time);
// readonly attribute unrestricted double duration; // readonly attribute unrestricted double duration;
// Date getStartDate(); // Date getStartDate();
readonly attribute boolean paused; readonly attribute boolean paused;
// attribute double defaultPlaybackRate; // attribute double defaultPlaybackRate;
// attribute double playbackRate; // attribute double playbackRate;
// readonly attribute TimeRanges played; // readonly attribute TimeRanges played;
// readonly attribute TimeRanges seekable; // readonly attribute TimeRanges seekable;
// readonly attribute boolean ended; // readonly attribute boolean ended;
[CEReactions] [CEReactions] attribute boolean autoplay;
attribute boolean autoplay; // [CEReactions] attribute boolean loop;
// [CEReactions]
// attribute boolean loop;
Promise<void> play(); Promise<void> play();
void pause(); void pause();
// media controller
// attribute DOMString mediaGroup;
// attribute MediaController? controller;
// controls // controls
// [CEReactions] // [CEReactions] attribute boolean controls;
// attribute boolean controls; // attribute double volume;
// attribute double volume; // attribute boolean muted;
// attribute boolean muted; // [CEReactions] attribute boolean defaultMuted;
// [CEReactions]
// attribute boolean defaultMuted;
// tracks // tracks
// readonly attribute AudioTrackList audioTracks; // readonly attribute AudioTrackList audioTracks;