mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +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
|
|
@ -36,17 +36,10 @@ public:
|
|||
void set_video_height(u32 video_height) { m_video_height = video_height; }
|
||||
u32 video_height() const;
|
||||
|
||||
void set_video_track(GC::Ptr<VideoTrack>);
|
||||
|
||||
void set_current_frame(Badge<VideoTrack>, RefPtr<Gfx::Bitmap> frame, double position);
|
||||
VideoFrame const& current_frame() const { return m_current_frame; }
|
||||
RefPtr<Gfx::Bitmap> const& poster_frame() const { return m_poster_frame; }
|
||||
|
||||
// FIXME: This is a hack for images used as CanvasImageSource. Do something more elegant.
|
||||
RefPtr<Gfx::Bitmap> bitmap() const
|
||||
{
|
||||
return current_frame().frame;
|
||||
}
|
||||
RefPtr<Gfx::Bitmap> bitmap() const;
|
||||
|
||||
private:
|
||||
HTMLVideoElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
@ -63,11 +56,6 @@ private:
|
|||
virtual GC::Ptr<Layout::Node> create_layout_node(GC::Ref<CSS::ComputedProperties>) override;
|
||||
virtual void adjust_computed_style(CSS::ComputedProperties&) override;
|
||||
|
||||
virtual void on_playing() override;
|
||||
virtual void on_paused() override;
|
||||
virtual void on_seek(double, MediaSeekMode) override;
|
||||
virtual void on_volume_change() override;
|
||||
|
||||
WebIDL::ExceptionOr<void> determine_element_poster_frame(Optional<String> const& poster);
|
||||
|
||||
GC::Ptr<HTML::VideoTrack> m_video_track;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue