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/. */
// 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<void> 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;