mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibWeb: Update the ready state after enabling tracks
Otherwise, the buffered ranges used won't include the tracks that are supposed to be enabled.
This commit is contained in:
committed by
Gregory Bertilson
parent
c8382bb465
commit
bece3c360d
Notes:
github-actions[bot]
2026-04-10 20:22:25 +00:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/LadybirdBrowser/ladybird/commit/bece3c360d6 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8809
@@ -1705,9 +1705,6 @@ void HTMLMediaElement::on_metadata_parsed()
|
||||
// 6. Set the readyState attribute to HAVE_METADATA.
|
||||
set_ready_state(ReadyState::HaveMetadata);
|
||||
|
||||
// AD-HOC: If we've already got buffered data, we need to upgrade the readyState further than HAVE_METADATA.
|
||||
update_ready_state();
|
||||
|
||||
// 7. Let jumped be false.
|
||||
[[maybe_unused]] auto jumped = false;
|
||||
|
||||
@@ -1739,6 +1736,9 @@ void HTMLMediaElement::on_metadata_parsed()
|
||||
return IterationDecision::Break;
|
||||
});
|
||||
}
|
||||
|
||||
// AD-HOC: If we've already got buffered data, we need to upgrade the readyState further than HAVE_METADATA.
|
||||
update_ready_state();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/media.html#media-data-processing-steps-list
|
||||
|
||||
Reference in New Issue
Block a user