mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibMedia+LibWeb: Rewrite PlaybackManager using the provider/sink model
With this commit, all PlaybackManager can do is autoplay a file from start to finish, with no pausing or seeking functionality. All audio playback functionality has been removed from HTMLMediaElement and HTMLAudioElement in anticipation of PlaybackManager taking that over, for both audio-only and audio/video.
This commit is contained in:
parent
0f9fa47352
commit
6caa2f99aa
Notes:
github-actions[bot]
2025-10-28 00:35:44 +00:00
Author: https://github.com/Zaggy1024
Commit: 6caa2f99aa
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6410
Reviewed-by: https://github.com/R-Goc
Reviewed-by: https://github.com/gmta ✅
15 changed files with 371 additions and 1234 deletions
|
|
@ -502,6 +502,13 @@ void Page::unregister_media_element(Badge<HTML::HTMLMediaElement>, UniqueNodeID
|
|||
});
|
||||
}
|
||||
|
||||
void Page::update_all_media_element_video_sinks()
|
||||
{
|
||||
for_each_media_element([](auto& media_element) {
|
||||
media_element.update_video_frame_and_timeline();
|
||||
});
|
||||
}
|
||||
|
||||
void Page::did_request_media_context_menu(UniqueNodeID media_id, CSSPixelPoint position, ByteString const& target, unsigned modifiers, MediaContextMenu const& menu)
|
||||
{
|
||||
m_media_context_menu_element_id = media_id;
|
||||
|
|
|
|||
|
|
@ -183,6 +183,8 @@ public:
|
|||
void register_media_element(Badge<HTML::HTMLMediaElement>, UniqueNodeID media_id);
|
||||
void unregister_media_element(Badge<HTML::HTMLMediaElement>, UniqueNodeID media_id);
|
||||
|
||||
void update_all_media_element_video_sinks();
|
||||
|
||||
struct MediaContextMenu {
|
||||
URL::URL media_url;
|
||||
bool is_video { false };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue