Bug 259581 - Implement automatic text track selection for 'metadata' tracks
Summary: Implement automatic text track selection for 'metadata' tracks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://wpt.live/html/semantics/embedd...
Keywords: BrowserCompat, InRadar, WPTImpact
Depends on:
Blocks:
 
Reported: 2023-07-27 16:52 PDT by Ahmad Saleem
Modified: 2023-07-28 01:45 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-07-27 16:52:15 PDT
Hi Team,

Going through WPT failures, came across following WPT test case failing:

Blink Commit: https://src.chromium.org/viewvc/blink?view=revision&revision=189185

WPT: https://wpt.fyi/results/html/semantics/embedded-content/media-elements/track/track-element/track-selection-metadata.html?label=experimental&label=master&aligned=

Just raising so we can fix and align with spec.

_____

This below compiles and progresses following test:

void HTMLMediaElement::configureMetadataTextTrackGroup(const TrackGroup& group)
{
    ASSERT(group.tracks.size());
    // https://html.spec.whatwg.org/multipage/embedded-content.html#honor-user-preferences-for-automatic-text-track-selection
    // 3. If there are any text tracks in the media element's list of text tracks whose text track kind is
    // chapters or metadata that correspond to track elements with a default attribute set
    // whose text track mode is set to disabled, then set the text track mode of all such tracks to hidden.
    for (auto& textTrack : group.tracks) {
        if (textTrack->mode() != TextTrack::Mode::Disabled)
            continue;
        if (!textTrack->isDefault())
            continue;
        textTrack->setMode(TextTrack::Mode::Hidden);
    }
}

_______

Just wanted to raise so we can fix it.
Comment 1 Radar WebKit Bug Importer 2023-07-27 17:10:50 PDT
<rdar://problem/113004825>
Comment 2 Ahmad Saleem 2023-07-27 17:11:16 PDT
PR - https://github.com/WebKit/WebKit/pull/16154
Comment 3 EWS 2023-07-28 01:45:31 PDT
Committed 266380@main (ec1a4f3966b2): <https://commits.webkit.org/266380@main>

Reviewed commits have been landed. Closing PR #16154 and removing active labels.