Commit graph

7 commits

Author SHA1 Message Date
Zaggy1024
3d0b8cc30c LibWeb: Set AudioTrack and VideoTrack fields according to spec
The two classes now inherit from a common base MediaTrackBase, to
deduplicate the attributes that are shared between the two.

The integer ID from the container is used for each track's id
attribute.

The kind attribute is set to "main" or "translation" according to:
https://dev.w3.org/html5/html-sourcing-inband-tracks/

The label attribute is set to the human-readable name of the track, if
one is present.

The language attribute is set to a BCP 47 language tag, if one can be
parsed successfully.
2025-10-27 17:28:49 -07:00
Zaggy1024
5456072d48 LibWeb: Implement audio media data processing through PlaybackManager 2025-10-27 17:28:49 -07:00
Tim Ledbetter
ed6f2f9b81 LibWeb: Ensure audio tracks are set to the correct volume before playing
Previously, a video or audio element with the `autoplay` and `muted`
attributes set, would not mute the audio before playing.
2025-06-26 09:56:39 -04:00
Andreas Kling
a6dfc74e93 LibWeb: Only set prototype once for object with IDL interface
Before this change, we were going through the chain of base classes for
each IDL interface object and having them set the prototype to their
prototype.

Instead of doing that, reorder things so that we set the right prototype
immediately in Foo::initialize(), and then don't bother in all the base
class overrides.

This knocks off a ~1% profile item on Speedometer 3.
2025-04-20 18:43:11 +02:00
Luke Wilde
509eaca73d LibWeb: Play audio tracks alongside video tracks with the video element
The underlying media element class already parses out the audio tracks,
regardless of the media type. Let's play them with videos!
2025-03-13 19:33:44 +01:00
Shannon Booth
f87041bf3a LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibWeb/HTML/AudioTrack.cpp (Browse further)