Skip to content

Commit

Permalink
[e] (0) Add some material to WebVTT regarding line breaks.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=16643
Affected topics: Video Text Tracks

git-svn-id: http://svn.whatwg.org/webapps@7442 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 8, 2012
1 parent e0a4ef4 commit 4ffe4f9
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions source
Expand Up @@ -39193,6 +39193,8 @@ The General Relativistic Field Equations</pre>

<h2>Introduction</h2>

<!--END dev-html--><p><i>This section is non-normative.</i></p><!--START dev-html-->

<p>The <dfn>WebVTT</dfn> format (Web Video Text Tracks) is a
format intended for marking up external text track resources.</p>

Expand Down Expand Up @@ -39241,6 +39243,73 @@ The General Relativistic Field Equations</pre>
&lt;v Roger Bingham>You know I'm so excited my glasses are falling off here.</pre>



<h3>Cues with multiple lines</h3>

<!--END dev-html--><p><i>This section is non-normative.</i></p><!--START dev-html-->

<p>Line breaks in cues are honored. User agents will also insert extra line breaks if necessary to
fit the cue in the cue's width. In general, therefore, authors are encouraged to write cues all on
one line except when a line break is definitely necessary, and to not manually line-wrap for
aesthetic reasons alone.</p>

<div class="example">

<p>These captions on a public service announcement video demonstrate line breaking:</p>

<pre>WEBVTT

00:01.000 --> 00:04.000
Never drink liquid nitrogen.

00:05.000 --> 00:09.000
&mdash; It will perforate your stomach.
&mdash; You could die.

00:10.000 --> 00:04.000
The Organisation for Sample Public Service Announcements accepts no liability for the content of this advertisement, or for the consequences of any actions taken on the basis of the information provided.</pre>

<p>The first cue is simple, it will probably just display on one line. The second will take two
lines, one for each speaker. The third will wrap to fit the width of the video, possibly taking
multiple lines. For example, the three cues could look like this:</p>

<pre> Never drink liquid nitrogen.

&mdash; It will perforate your stomach.
&mdash; You could die.

The Organisation for Sample Public Service
Announcements accepts no liability for the content
of this advertisement, or for the consequences of
any actions taken on the basis of the information
provided.</pre>

<p>If the width of the cues is smaller, the firs two cues could wrap as well, as in the following
example. Note how the second cue's explicit line break is still honored, however:</p>

<pre> Never drink liquid
nitrogen.

&mdash; It will perforate your
stomach.
&mdash; You could die.

The Organisation for
Sample Public Service
Announcements accepts no
liability for the content
of this advertisement, or
for the consequences of
any actions taken on the
basis of the information
provided.</pre>

</div>





<!--END dev-html-->
<h2>Conformance</h2>

Expand Down

0 comments on commit 4ffe4f9

Please sign in to comment.