This page contains notes for the development of the first version of timed track features in HTML.
- 1 Requirements
- 2 Architecture
- 3 Open issues
Subtitle/Caption/Karaoke File Format
- multiple rendered titles
- per-segment time in/out cues
- inline time cues for karaoke
- bidi, newlines, ruby
- full typographic features
- vertical: top/middle/bottom/absolute/relative (default bottom)
- horizontal: left/center/right/absolute/relative (default center for subtitles only)
- text alignment: horizontal text: left, right, center, at tab stop; vertical text: top, middle, bottom, at tab stop
- display modes: replace previous text, add to previous text, scroll previous text up and add to bottom, paint text on to create single block, clear screen
Multiple voices placed in adjacent places would need to automatically stack so they don't overlap. Multiple segments with overlapping times would need to be stacked so they don't overlap.
(Relative positions could work like background-position in CSS.)
- horizontal and vertical text directions, with changes of same, must be supported
- some cases use ruby
- italics and typeface changes (and, rarely, underlining and small caps) necessary
- color (foreground, background mask, drop shadow, outline, other) is needed for readability on different types of video
- cannot ship without native ability to create and alter background mask, which is not the largest rectangle that can be drawn around all displayed text
- Webfonts desirable
- providing a classname to style each voice could likely be sufficient for authors who want overall formatting control (this would also allow user overrides conveniently)
Cannot work from the assumption that we are providing only a script for a computer to read out loud, a use case never attempted in the real world. Actual audio descriptions are prerecorded voices mixed into main audio. Redefining the spec to pretend that a script for a computer to read aloud constitutes “audio description” stands to be rejected by actual blind users.
If our spec defines audio description (added audio track), it must also define dubbing (another added audio track).
All combinations of features must be possible and no combination must be banned. Common use cases include:
- dubbing with captioning
- dubbing with subtitling
- captioning with subtitling
- audio description with dubbing
- audio description with captioning
- audio description with subtitling
- an API and UI for exposing what timed tracks exist and selectively enabling/disabling them
- format for external subtitles/captions
- format for external audio description
- some mechanism for text in the page to be used instead of external files, for subtitles/captions or audio description
- an API to allow a segment to be dynamically inserted into the rendering on the fly
- an API for exposing what the currently relevant segments of each timed track are
- a way to hook into this mechanism to advance slides
- native rendering of subtitles
- native rendering of audio description
- native rendering of multiple audio or video tracks, to allow pre-recorded audio description to be mixed in and sign language video to be overlaid
- a way to hook into this to manually render timed tracks
Somebody needs to write an alt text for this image.
Declaring timed tracks
Each timed track is either:
- enabled, in which case it is downloaded, triggers events, and if appropriate is rendered by the user agent; or
- disabled, in which case it does nothing
The enabled/disabled state is by default based on user preferences and the kind of timed track as described below, but can be overridden on a per-track basis.
Each timed track has a kind which is one of:
- for visual display (subtitles, captions, translations), enabled based on user preferences, shows in video playback area
- for audio playback (audio description, dubbing), enabled based on user preferences, renders as audio
- for navigation (chapter titles), enabled by default, shows in UA UI
- for off-video display (lyrics), disabled by default in this version, not shown by UA
- for metadata (slide timings, annotation data for app-rendered annotations), enabled by default, not shown by UA
Tracks that are for visual display or audio playback have additionally a user-facing label and a language.
Tracks that are for visual display have an additional boolean indicating if they include sound effects and speaker identification (intended for the deaf, hard of hearing, or people with sound muted) or not (i.e. translations intended for people with audio enabled but who cannot understand the language, or karaoke lyrics).
Each timed track associated with a media resource, like the media resource itself, can have multiple sources.
Each source for a timed track has:
- type (if there are multiple sources)
The media resource can also imply certain timed tracks based on data in the media resource.
The script can also add “virtual” timed tracks dynamically.
Other minor things
We need to make sure that media playback is paused until all enabled timed tracks are locally available.
- How do we handle sign-language tracks?
- Do we handle multiple alternate audio tracks from this or is that restricted to in-band data? (in the media resource)