1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

LibWeb: Begin implementing the HTMLAudioElement for audio playback

This uses LibAudio to attempt to decode resoures downloaded with <audio>
elements, and draws some basic media controls for the element.
This commit is contained in:
Timothy Flynn 2023-06-12 13:55:43 -04:00 committed by Andreas Kling
parent c89fd6dff0
commit ac2238ee70
9 changed files with 241 additions and 20 deletions

View file

@ -16,10 +16,18 @@ class HTMLAudioElement final : public HTMLMediaElement {
public:
virtual ~HTMLAudioElement() override;
Layout::AudioBox* layout_node();
Layout::AudioBox const* layout_node() const;
private:
HTMLAudioElement(DOM::Document&, DOM::QualifiedName);
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
virtual void on_playing() override;
virtual void on_paused() override;
};
}