mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02: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:
committed by
Jelle Raaijmakers
parent
0f9fa47352
commit
6caa2f99aa
Notes:
github-actions[bot]
2025-10-28 00:35:44 +00:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/LadybirdBrowser/ladybird/commit/6caa2f99aad Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6410 Reviewed-by: https://github.com/R-Goc Reviewed-by: https://github.com/gmta ✅
@@ -14,6 +14,7 @@
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/EventLoop/EventLoop.h>
|
||||
#include <LibWeb/HTML/HTMLMediaElement.h>
|
||||
#include <LibWeb/HTML/Scripting/Agent.h>
|
||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||
#include <LibWeb/HTML/Scripting/TemporaryExecutionContext.h>
|
||||
@@ -362,6 +363,10 @@ void EventLoop::update_the_rendering()
|
||||
return true;
|
||||
});
|
||||
|
||||
// AD-HOC: Update all the displayed video frames on HTMLMediaElements in documents' pages.
|
||||
for (auto& document : docs)
|
||||
document->page().update_all_media_element_video_sinks();
|
||||
|
||||
// FIXME: 4. Unnecessary rendering: Remove from docs any Document object doc for which all of the following are true:
|
||||
|
||||
// FIXME: 5. Remove from docs all Document objects for which the user agent believes that it's preferable to skip updating the rendering for other reasons.
|
||||
|
||||
Reference in New Issue
Block a user