track kind subtitles/captions/chapters

Resolves track kind with subtitles as missing default and metadata as invalid default. Empty present values are invalid. This does not validate track language or WebVTT content.

Description

Text tracks can supply subtitles, captions, descriptions, chapters or metadata.

Text tracks can supply subtitles, captions, descriptions, chapters or metadata. The kind attribute has different defaults when missing and when invalid.1

The tool returns state, validKeyword. The fields describe the supplied local pattern or effective state, or contain the formatted markup shown below.

When to use track kind subtitles/captions/chapters

Use this for the following task: Resolves track kind with subtitles as missing default and metadata as invalid default. Empty present values are invalid. This does not validate track language or WebVTT content. Provide the requested local fields extracted from the relevant element or attribute.

How to use track kind subtitles/captions/chapters and understand its results

  1. Prepare the parsed element names, attribute values or direct element-child lists requested below. Keep attribute presence separate from its value.
  2. Enter present, value according to the field table, then run the tool.
  3. Read state, validKeyword. Check the effective state, recognized-token flags or generated markup against the rules below.
  4. Correct any reported local mismatch and check the resulting markup in its intended document and browser context.
Input fieldMeaningValue type and boundsRequirement
presentPresentbooleanRequired
valueValuestring; maximum text length 100000Required

Supply presence and value. Match the five track-kind keywords, returning the effective state and whether a present keyword was recognized.

missing → subtitles; recognized keyword → itself; invalid present value → metadata

The symbols and boundary conditions refer to the supplied fields and the implementation described above.

Output fieldMeaningValue type
stateStatestring
validKeywordValid Keywordboolean
json
{
  "input": {
    "present": true,
    "value": "CAPTIONS"
  },
  "output": {
    "state": "captions",
    "validKeyword": true
  }
}

Limitations and assumptions

The present flag distinguishes an absent attribute from a present empty value. Keyword matching folds ASCII uppercase without trimming. An empty present value is invalid. Track language, WebVTT syntax and actual content are not validated.

The tool does not fetch a page, run a browser or validate an entire HTML document. Malformed tool requests produce input errors; valid requests can still report unrecognized values or failed local checks.

Alternative or Complementary methods

Choose audio preload metadata/none/auto Values when you need its operation: Resolves audio preload hints none, metadata or auto, with empty present value mapping to auto. Both omitted and invalid attributes are implementation-defined; this does not predict network buffering. Choose source type codecs Parameter Lookup for the complementary operation: Builds a source MIME type with a quoted codecs parameter from a restricted codec-identifier profile (ASCII letters, digits, dot, underscore and hyphen). It does not identify or guarantee browser codec support.

Background reference: HTML Standard: track kind subtitles/captions/chapters.

References

  1. HTML Standard: track kind subtitles/captions/chapters — WHATWG

Similar or alternative tools

  • audio preload metadata/none/auto Values

    Resolves audio preload hints none, metadata or auto, with empty present value mapping to auto. Both omitted and invalid attributes are implementation-defined; this does not predict network buffering.

  • source type codecs Parameter Lookup

    Builds a source MIME type with a quoted codecs parameter from a restricted codec-identifier profile (ASCII letters, digits, dot, underscore and hyphen). It does not identify or guarantee browser codec support.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies