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:
Zaggy1024 2025-10-03 00:39:39 -05:00 committed by Jelle Raaijmakers
parent 0f9fa47352
commit 6caa2f99aa
Notes: github-actions[bot] 2025-10-28 00:35:44 +00:00
15 changed files with 371 additions and 1234 deletions

View file

@ -30,6 +30,16 @@ public:
GC::Ptr<VideoTrack> get_track_by_id(StringView id) const;
i32 selected_index() const;
template<typename Callback>
void for_each_track(Callback&& callback)
{
for (auto& video_track : m_video_tracks) {
auto iteration_decision = callback(*video_track);
if (iteration_decision == IterationDecision::Break)
break;
}
}
void set_onchange(WebIDL::CallbackType*);
WebIDL::CallbackType* onchange();