Re: meta-data in the VTT file header, a strawman proposal

On Apr 10, 2012, at 1:37 , Silvia Pfeiffer wrote:

> On Tue, Feb 28, 2012 at 4:39 AM, David Singer <singer@apple.com> wrote:
>>> 
>>> Message-Header style gives us another way to escape continued lines,
>>> which is to indent them with whitespace. This isn't any harder
>>> programmatically, but is easier to read. (You did it anyway in your
>>> example!) Might be more confusing to debug blank line escapes though.
>> 
>> Yes. I also toyed with SMTP-like multi-line (no opening bracket, and the end is a period on a line by itself), but I don't think that's so easy to read, visually, and seems more error-prone.  Few people read SMTP input; people do expect to read VTT files.  I am guessing that for many cases, no escaping at all will be needed (']]' on a line by itself is pretty unlikely in CSS, as are lines starting with \, and stylesheets don't need to have blank lines).
>> 
>>> 
>>>> Examples:
>>>> 
>>>> kind=captions examplecompany-test = for steve
>>>> initialTStimestamp=162642774
>>>> stylesheetURL=http://www.example.com/vtt-plain.css stylesheet=
>>>> [[ p { font-size: 100px; } \ p::first-line { background:
>>>> url(http://www.w3.org/StyleSheets/TR/logo-REC) no-repeat;
>>>> font-size: 10px; span { border-left: solid 1em black; } } ]]
>>>> srclang=en-US label=Zeroes for King!
>>> 
>>> My suggestion would look like:
>>> 
>>> Kind: captions
>>> X-examplecompany-test: for steve
>>> Timestamp-offset: 162642774
>>> StylesheetURL: http://www.example.com/vtt-plain.css
>>> Style:
>>> p { font-size: 100px; }
>>> 
>>> p::first-line {
>>>   background: url(http://www.w3.org/StyleSheets/TR/logo-REC) no-repeat;
>>>   font-size: 10px;
>>>   span { border-left: solid 1em black; }
>>> }
>>> srclang: en_US
>>> Label: 𝟎s for 王!
>>> 
>> 
>> what terminates the block, in your syntax?
> 
> A line that starts without white space is not part of a block,
> according to RFC822 (it's called "folding").

RFC 822 defines clearly that everything after the first null line is the message body, not headers, so your example would have us treating 

 p::first-line {
  background: url(http://www.w3.org/StyleSheets/TR/logo-REC) no-repeat;
  font-size: 10px;
  span { border-left: solid 1em black; }
}
srclang: en_US
Label: 𝟎s for 王!

as cue-text :-(.  Or am I missing something?  That's also the case in the current VTT spec (that the header lines terminate on the first blank line). 

RFC 822 generally considers values as "one long line that can be folded if it's too long", and I am not sure that's right for us.   I think that line-breaks can be significant in some of the values we cant, no?  (Such as CSS).


On my reading of 822, I think this example would have to be:

Kind: captions
X-examplecompany-test: for steve
Timestamp-offset: 162642774
StylesheetURL: http://www.example.com/vtt-plain.css
Style:
 p { font-size: 100px; }
 p::first-line {
   background: url(http://www.w3.org/StyleSheets/TR/logo-REC) no-repeat;
   font-size: 10px;
   span { border-left: solid 1em black; }
 }
srclang: en_US
Label: 𝟎s for 王!



David Singer
Multimedia and Software Standards, Apple Inc.

Received on Tuesday, 10 April 2012 20:12:59 UTC