Add WebVTT header metadata to disambiguate metadata cues (#511)#548
Open
cookiecrook wants to merge 3 commits into
Open
Add WebVTT header metadata to disambiguate metadata cues (#511)#548cookiecrook wants to merge 3 commits into
cookiecrook wants to merge 3 commits into
Conversation
Replaces the ATTRIBUTES-block approach explored in w3c#523 with the TTWG-consensus design: file-level key/value pairs are written on the lines immediately following the WEBVTT file header line and are terminated by a blank line, rather than living in a separate block. Key behaviors per the April 23 + May 7 TTWG meeting consensus and follow-up review comments: - Reserves four header keys: lang, kind, label, type (all optional; lang aligns with HTML <track srclang>; type addresses w3c#511 by identifying metadata schemas, with the taxonomy work continuing in w3c#512). - Accepts both ":" and "=" as separators; "=" is permitted for HLS-compatible files but is marked non-recommended. - Matches reserved keys case-sensitively; authors must use lowercase. - Allows Unicode in keys and values, excluding bidi controls, line breaks, and the "-->" substring. - Requires non-reserved keys to contain a hyphen and not start with one, reserving the hyphen-free namespace for future standardization. - Parses leniently: invalid lines are ignored individually and do not invalidate the rest of the header; no parser warnings are required. - Adds the parser plumbing (a new |header metadata| slot on the parser signature, a "collect WebVTT header metadata" algorithm, and a new return path from "collect a WebVTT block" when the in-header flag is set). - Updates the WebVTT metadata text prose to recommend declaring kind and type for files delivered outside an HTML context, addressing the cue-format ambiguity from w3c#511. Closes w3c#511. Defers HTML-integration details (precedence between VTT header metadata and <track> attributes, processing model) to whatwg/html#11665.
cookiecrook
commented
May 28, 2026
cookiecrook
commented
May 28, 2026
cookiecrook
commented
May 28, 2026
cookiecrook
commented
May 28, 2026
cookiecrook
commented
May 28, 2026
cookiecrook
commented
May 28, 2026
cookiecrook
commented
May 28, 2026
- Data model: explicitly state that unrecognized pairs are preserved only when the key meets the hyphen requirement; pairs that don't are dropped by the parser. Explains the webcompat motivation for reserving the unhyphenated key-name space. - Reframe the `type` reserved key as a name reservation with no values defined here; defer the registry (with `video.strobing. general-flash` as the expected first entry) to w3c#512. Drop the now redundant "future revision" note. - Replace duplicated reserved-key lists in the syntax section and in the "collect WebVTT header metadata" algorithm with references to the data-model section. - Drop the "opaque" framing in the metadata-text paragraph per Nigel's earlier objection. - Remove the parenthetical formatting from the parser's "ignore invalid line" step.
Closed
Addresses a missed cleanup from PR w3c#548 feedback. Removes the hardcoded count of "four" reserved keys in the parser notes, and corrects the explanation of how incorrectly-cased keys are handled (they are ignored immediately due to lacking a hyphen, rather than being collected as unrecognized pairs).
This was referenced May 29, 2026
Contributor
|
@cookiecrook (note, not sure what the WG has decided on usage of AI tool to generate specification text...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the ATTRIBUTES-block approach explored in #523 with the TTWG-consensus design: file-level key/value pairs are written on the lines immediately following the WEBVTT file header line and are terminated by a blank line, rather than living in a separate block.
Key behaviors per the April 23 + May 7 TTWG meeting consensus and follow-up review comments:
Closes #511. Defers HTML-integration details (precedence between VTT header metadata and attributes, processing model) to whatwg/html#11665.
Note: GenAI (Claude Opus 4.8) used in the creation of this latest iteration.
Preview | Diff