mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:08:12 +00:00
LibWeb: Implement the AudioTrack and AudioTrackList interfaces
These are used to own and manage the playing of audio data.
This commit is contained in:
parent
a34e369252
commit
c89fd6dff0
12 changed files with 455 additions and 0 deletions
|
@ -85,6 +85,7 @@ public:
|
|||
WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Promise>> play();
|
||||
WebIDL::ExceptionOr<void> pause();
|
||||
|
||||
JS::NonnullGCPtr<AudioTrackList> audio_tracks() const { return *m_audio_tracks; }
|
||||
JS::NonnullGCPtr<VideoTrackList> video_tracks() const { return *m_video_tracks; }
|
||||
|
||||
void set_layout_mouse_position(Badge<Painting::MediaPaintable>, Optional<CSSPixelPoint> mouse_position) { m_mouse_position = move(mouse_position); }
|
||||
|
@ -211,6 +212,9 @@ private:
|
|||
// https://html.spec.whatwg.org/multipage/media.html#dom-media-paused
|
||||
bool m_paused { true };
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/media.html#dom-media-audiotracks
|
||||
JS::GCPtr<AudioTrackList> m_audio_tracks;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/media.html#dom-media-videotracks
|
||||
JS::GCPtr<VideoTrackList> m_video_tracks;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue