mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 07:09:47 +00:00
LibWeb: Implement HTMLMediaElement.preload attribute
This implements the `preload` reflected attribute. No actual preloading is going on yet.
This commit is contained in:
parent
77a30bad9f
commit
fe933b2057
Notes:
github-actions[bot]
2024-08-13 12:08:55 +00:00
Author: https://github.com/gmta
Commit: fe933b2057
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1048
1 changed files with 10 additions and 1 deletions
|
@ -7,6 +7,15 @@
|
||||||
#import <HTML/VideoTrackList.idl>
|
#import <HTML/VideoTrackList.idl>
|
||||||
#import <HTML/Scripting/Fetching.idl>
|
#import <HTML/Scripting/Fetching.idl>
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/media.html#attr-media-preload
|
||||||
|
[MissingValueDefault=metadata, InvalidValueDefault=metadata]
|
||||||
|
enum Preload {
|
||||||
|
"auto",
|
||||||
|
"none",
|
||||||
|
"metadata"
|
||||||
|
};
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/media.html#canplaytyperesult
|
||||||
enum CanPlayTypeResult {
|
enum CanPlayTypeResult {
|
||||||
"",
|
"",
|
||||||
"maybe",
|
"maybe",
|
||||||
|
@ -30,7 +39,7 @@ interface HTMLMediaElement : HTMLElement {
|
||||||
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;
|
||||||
[FIXME, CEReactions] attribute DOMString preload;
|
[Reflect, CEReactions, Enumerated=Preload] attribute DOMString preload;
|
||||||
readonly attribute TimeRanges buffered;
|
readonly attribute TimeRanges buffered;
|
||||||
undefined load();
|
undefined load();
|
||||||
CanPlayTypeResult canPlayType(DOMString type);
|
CanPlayTypeResult canPlayType(DOMString type);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue