ladybird/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.idl

35 lines
1,000 B
Text

#import <HTML/HTMLElement.idl>
#import <HTML/VideoTrackList.idl>
enum CanPlayTypeResult {
"",
"maybe",
"probably"
};
// https://html.spec.whatwg.org/multipage/media.html#htmlmediaelement
[Exposed=Window]
interface HTMLMediaElement : HTMLElement {
// network state
[Reflect, CEReactions] attribute DOMString src;
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;
undefined load();
CanPlayTypeResult canPlayType(DOMString type);
// playback state
readonly attribute unrestricted double duration;
[Reflect, CEReactions] attribute boolean autoplay;
[Reflect, CEReactions] attribute boolean loop;
undefined pause();
// controls
[Reflect, CEReactions] attribute boolean controls;
// tracks
[SameObject] readonly attribute VideoTrackList videoTracks;
};