mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +00:00
LibWeb: Port HTMLVideoElement to play videos with Video::PlaybackManager
This has several advantages over the current manual demuxing currently being performed. PlaybackManager hides the specific demuxer being used, which will allow more codecs to be added transparently to LibWeb. It also provides buffering and controls playback rate for us. Further, it will allow us to much more easily implement the "media timeline" to render a timestamp and implement seeking.
This commit is contained in:
committed by
Linus Groh
parent
7132047c92
commit
edf85d39c6
@@ -28,6 +28,8 @@ public:
|
||||
u32 video_height() const;
|
||||
|
||||
void set_video_track(JS::GCPtr<VideoTrack>);
|
||||
|
||||
void set_current_frame(Badge<VideoTrack>, RefPtr<Gfx::Bitmap> frame);
|
||||
RefPtr<Gfx::Bitmap> const& current_frame() const { return m_current_frame; }
|
||||
|
||||
private:
|
||||
@@ -42,7 +44,6 @@ private:
|
||||
virtual void on_paused() override;
|
||||
|
||||
JS::GCPtr<HTML::VideoTrack> m_video_track;
|
||||
RefPtr<Platform::Timer> m_video_timer;
|
||||
RefPtr<Gfx::Bitmap> m_current_frame;
|
||||
|
||||
u32 m_video_width { 0 };
|
||||
|
||||
Reference in New Issue
Block a user