mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
LibWeb: Do not handle media ready state changes for empty network states
This was missed in the header text of the ready state transition spec.
This commit is contained in:
parent
27fd31b2ad
commit
1fb0c7826b
1 changed files with 6 additions and 0 deletions
|
@ -904,6 +904,12 @@ void HTMLMediaElement::set_ready_state(ReadyState ready_state)
|
||||||
{
|
{
|
||||||
ScopeGuard guard { [&] { m_ready_state = ready_state; } };
|
ScopeGuard guard { [&] { m_ready_state = ready_state; } };
|
||||||
|
|
||||||
|
// When the ready state of a media element whose networkState is not NETWORK_EMPTY changes, the user agent must
|
||||||
|
// follow the steps given below:
|
||||||
|
if (m_network_state == NetworkState::Empty)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// 1. Apply the first applicable set of substeps from the following list:
|
||||||
// -> If the previous ready state was HAVE_NOTHING, and the new ready state is HAVE_METADATA
|
// -> If the previous ready state was HAVE_NOTHING, and the new ready state is HAVE_METADATA
|
||||||
if (m_ready_state == ReadyState::HaveNothing && ready_state == ReadyState::HaveMetadata) {
|
if (m_ready_state == ReadyState::HaveNothing && ready_state == ReadyState::HaveMetadata) {
|
||||||
// Queue a media element task given the media element to fire an event named loadedmetadata at the element.
|
// Queue a media element task given the media element to fire an event named loadedmetadata at the element.
|
||||||
|
|
Loading…
Add table
Reference in a new issue