[webvtt] Live captioning - incremental cues review

silviapfeiffer has just created a new issue for 
https://github.com/w3c/webvtt:

== Live captioning - incremental cues review  ==
**To address REQ2 of #318 , we are after an extension of the WebVTT 
file format.**

The principle idea is that we map the TextTrack API calls from #319 to
 how we would archive them in a WebVTT file to replicate the 
functionality.

The approach we try out here is to use the <00:00:00> cue timestamps 
as the means to separate cues into smaller incremental cues. <now()> 
will be  acue timestamp with the now() time.


| Ref | 608 control commands | TextTrackCue API calls | WebVTT file 
addition
|---|---|---|---
| 1 | start caption text / resume caption text / resume direct 
captioning | `new VTTCue(now(), NULL, '')` - make sure to set the 
defaults as required by 608 - then: `textTrack.addCue(cue)` | `now() 
--> NULL`
| 2 | add a character | `cue.text += char` | `<now()> char`
| 3 | next row down toggle (includes end all style) | `cue.text += 
'\n'` (may need to end `</c>`,`</i>`,`</b>`,`</u>`) | `<now()> \n`
| 4 | row indicator (one of 15 rows) | `cue.line = row` (whichever row
 calculated) | `<now()> <set line=row>`
| 5 | underline toggle | `cue.text += "<u>"` or `cue.text += "</u>"` 
(need to keep track of toggle state) | `<now()> <u>` or `<now()> </u>`
| 6 | style change (one of 7 text colors and italics) | `cue.text += 
"<c.white>"` (need to have the color style classes pre-defined) and 
`cue.text += "<i>"` | `<now()> <c.white> <i>` etc.
| 7 | 8 ident positions | `cue.positionAlign = offset` (whichever 
offset calculated from ident pos) | `<now()> <set 
positionAlign=offset>`
| 8 | 8 background colors | `cue.text += "<c.bg_white>"` (need to have
 the background color style classes pre-defined) | `<now()> 
<c.bg_white>`
| 9 | backspace | `cue.text = cue.text.substr(0, cue.text.length - 1)`
 | `<now()> <set substr=(0,-1)>`
| 10 | delete till end of row | `cue.text = cue.text.substr(0, 
cursor_pos)` (need to keep track of the 608 cursor position) | 
`<now()> <set substr=(0, cursor_pos)>`
| 11 | rollup caption with 2, 3 or 4 rows | `new VTTRegion()` then 
`region.lines = x` | N/A - make sure any required regions have been 
defined in the header
| 12 | flash on (srlsy?) | `cue.text += "<c.blink>"` | `<now()> 
<c.blink>`
| 13 | erase displayed memory (clear screen) | `cue.text = ''` | 
`<now()> <set substr=(0,0)>`
| 14 | carriage return (scroll lines up) | `cue.endTime = now(); 
cue.region = region; new VTTCue();` | `<now()> <set region=ID> \n\n 
now() --> NULL`
| 15 | end of caption | `cue.endTime = now()` | `<now()> <set 
endTime=now()>`
| 16 | clear screen (erase display memory) | `cue.text = ''` | 
`<now()> <set substr=(0,0)>`
| 17 | tab offset 1/2/3 (add whitespace) | `cue.text += " " * 
num_space` (calculate numspace from tab offset as per 
https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/608toVTT.html
 ) | `<now()> ` (add required number of spaces)

Looks like what we need is a way to change cue settings and cut cue 
length half-way through cues, as well as an undefined end time that 
can be set at a later stage.

Please view or discuss this issue at 
https://github.com/w3c/webvtt/issues/320 using your GitHub account

Received on Friday, 14 October 2016 23:29:50 UTC