From 8754155a114ea9b470ece4c6c190fd4a00441b87 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 10 Oct 2017 09:50:51 +0200 Subject: [PATCH] Update HTMLMediaElement.webidl according to spec --- .../dom/webidls/HTMLMediaElement.webidl | 38 ++++++++----------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/components/script/dom/webidls/HTMLMediaElement.webidl b/components/script/dom/webidls/HTMLMediaElement.webidl index b9c112bf44d..5b142780aa1 100644 --- a/components/script/dom/webidls/HTMLMediaElement.webidl +++ b/components/script/dom/webidls/HTMLMediaElement.webidl @@ -3,25 +3,25 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlmediaelement + enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" }; + [Abstract] interface HTMLMediaElement : HTMLElement { // error state readonly attribute MediaError? error; // network state - [CEReactions] - attribute DOMString src; + [CEReactions] attribute DOMString src; + // attribute MediaProvider? srcObject; readonly attribute DOMString currentSrc; - // [CEReactions] - // attribute DOMString crossOrigin; + // [CEReactions] attribute DOMString crossOrigin; const unsigned short NETWORK_EMPTY = 0; const unsigned short NETWORK_IDLE = 1; const unsigned short NETWORK_LOADING = 2; const unsigned short NETWORK_NO_SOURCE = 3; readonly attribute unsigned short networkState; - [CEReactions] - attribute DOMString preload; + [CEReactions] attribute DOMString preload; // readonly attribute TimeRanges buffered; void load(); CanPlayTypeResult canPlayType(DOMString type); @@ -36,34 +36,26 @@ interface HTMLMediaElement : HTMLElement { // readonly attribute boolean seeking; // playback state - // attribute double currentTime; + // attribute double currentTime; // void fastSeek(double time); // readonly attribute unrestricted double duration; // Date getStartDate(); readonly attribute boolean paused; - // attribute double defaultPlaybackRate; - // attribute double playbackRate; + // attribute double defaultPlaybackRate; + // attribute double playbackRate; // readonly attribute TimeRanges played; // readonly attribute TimeRanges seekable; // readonly attribute boolean ended; - [CEReactions] - attribute boolean autoplay; - // [CEReactions] - // attribute boolean loop; + [CEReactions] attribute boolean autoplay; + // [CEReactions] attribute boolean loop; Promise play(); void pause(); - // media controller - // attribute DOMString mediaGroup; - // attribute MediaController? controller; - // controls - // [CEReactions] - // attribute boolean controls; - // attribute double volume; - // attribute boolean muted; - // [CEReactions] - // attribute boolean defaultMuted; + // [CEReactions] attribute boolean controls; + // attribute double volume; + // attribute boolean muted; + // [CEReactions] attribute boolean defaultMuted; // tracks // readonly attribute AudioTrackList audioTracks;