This Wiki page is edited by participants of the HTML Accessibility Task Force. It does not necessarily represent consensus and it may have incorrect information or information that is not supported by other Task Force participants, WAI, or W3C. It may also have some very useful information.

Media WebVTT Changes

From HTML accessibility task force Wiki
Jump to: navigation, search

WebVTT as specified supports a large number of features, in particular for subtitles and captions. However, we keep coming across proposals for changes / improvements. This page has been created to collect them.

Related discussion:

Related document:

Allow file-wide Metadata

Allow for name-value pairs as file-wide metadata underneath the file magic string and specify the format for providing name-value pairs - an empty line determines the end of the header section.

NOTE: WebVTT is specified to ignore everything that is behind the "WEBVTT" identifier and the a blank line. Therefore, metadata can work like this:


00:00:15.000 --> 00:00:17.950
first cue

Rejected: Metadata like this will not be used by browsers. A different spec can make this possible, but not WebVTT. does it.

Default Cue Settings

Introduce default cue settings in the header part of the file, possibly as a name-value pair, or some alternative dedicated form.

NOTE: Defaults could be added like this:


DEFAULTS --> D:vertical A:end

00:00.000 --> 00:02.000
This is vertical and end-aligned.

00:02.500 --> 00:05.000
As is this.

DEFAULTS --> A:start

00:05.500 --> 00:07.000
This is horizontal and start-aligned.

Allow inline CSS

A subset of CSS features is required to bring HTML5 video captions on par with TV captions. Since non-browser applications will need to support these CSS features, too, it makes sense to allow the styles to be delivered inside a WebVTT file, too.

NOTE: This could be achieved with invalid cues like this:


  STYLE -->
  ::cue(v[voice=Bob]) { color: green; }
  ::cue(c.narration) { font-style: italic; }
  ::cue(c.narration i) { font-style: normal; }

  00:00.000 --> 00:02.000
  <v Bob>Welcome.

  00:02.500 --> 00:05.000
  <c .narration>To <i>WebVTT</i>.