mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +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:
parent
7132047c92
commit
edf85d39c6
5 changed files with 87 additions and 93 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue