You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
// AD-HOC(ish): According to https://dev.w3.org/html5/html-sourcing-inband-tracks/, kind should be set according to format, and the following criteria within
1241
+
// the specified formats.
1242
+
// WebM:
1243
+
// - "main": the FlagDefault element is set on the track
1244
+
// - "translation": not first audio (video) track
1245
+
// MP4:
1246
+
// - "main": first audio (video) track
1247
+
// - "translation": not first audio (video) track
1248
+
// Though the behavior for WebM is not clear if its first track is not marked with FlagDefault, the idea here seems to be that the preferred
1249
+
// track should be marked as "main", and the rest should be marked as "translation".
0 commit comments