mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
LibWeb: Implement HTMLMediaElement.load
This commit is contained in:
parent
9ad4c9e6b0
commit
e130525c24
2 changed files with 7 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, the SerenityOS developers.
|
* Copyright (c) 2020, the SerenityOS developers.
|
||||||
|
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -91,9 +92,11 @@ WebIDL::ExceptionOr<Bindings::CanPlayTypeResult> HTMLMediaElement::can_play_type
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/media.html#dom-media-load
|
// https://html.spec.whatwg.org/multipage/media.html#dom-media-load
|
||||||
void HTMLMediaElement::load() const
|
WebIDL::ExceptionOr<void> HTMLMediaElement::load()
|
||||||
{
|
{
|
||||||
dbgln("(STUBBED) HTMLMediaElement::load()");
|
// When the load() method on a media element is invoked, the user agent must run the media element load algorithm.
|
||||||
|
TRY(load_element());
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/media.html#dom-media-duration
|
// https://html.spec.whatwg.org/multipage/media.html#dom-media-duration
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, the SerenityOS developers.
|
* Copyright (c) 2020, the SerenityOS developers.
|
||||||
|
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -42,7 +43,7 @@ public:
|
||||||
};
|
};
|
||||||
ReadyState ready_state() const { return m_ready_state; }
|
ReadyState ready_state() const { return m_ready_state; }
|
||||||
|
|
||||||
void load() const;
|
WebIDL::ExceptionOr<void> load();
|
||||||
double duration() const;
|
double duration() const;
|
||||||
void pause() const;
|
void pause() const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue