LibWeb: Make HTMLVideoElement part of CanvasImageSource union

This commit is contained in:
Totto16 2024-10-05 03:38:33 +02:00 committed by Andreas Kling
commit abe1172d70
Notes: github-actions[bot] 2024-10-05 07:21:47 +00:00
7 changed files with 42 additions and 8 deletions

View file

@ -42,6 +42,12 @@ public:
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;
}
private:
HTMLVideoElement(DOM::Document&, DOM::QualifiedName);