mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 23:15:08 +00:00
LibWeb: Implement the :buffering
and :stalled
pseudo-classes
Currently, HTMLMediaElement doesn't implement the stall timeout, so `:stalled` always returns false.
This commit is contained in:
parent
eb7cda1172
commit
f6e4caf197
7 changed files with 42 additions and 2 deletions
|
@ -1273,7 +1273,10 @@ void HTMLMediaElement::forget_media_resource_specific_tracks()
|
|||
// https://html.spec.whatwg.org/multipage/media.html#ready-states:media-element-3
|
||||
void HTMLMediaElement::set_ready_state(ReadyState ready_state)
|
||||
{
|
||||
ScopeGuard guard { [&] { m_ready_state = ready_state; } };
|
||||
ScopeGuard guard { [&] {
|
||||
m_ready_state = ready_state;
|
||||
set_needs_style_update(true);
|
||||
} };
|
||||
|
||||
// When the ready state of a media element whose networkState is not NETWORK_EMPTY changes, the user agent must
|
||||
// follow the steps given below:
|
||||
|
@ -1624,6 +1627,12 @@ bool HTMLMediaElement::blocked() const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool HTMLMediaElement::stalled() const
|
||||
{
|
||||
// FIXME: Implement stall timeout. https://html.spec.whatwg.org/multipage/media.html#stall-timeout
|
||||
return false;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/media.html#potentially-playing
|
||||
bool HTMLMediaElement::potentially_playing() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue