[html5] r7442 - [e] (0) Add some material to WebVTT regarding line breaks. Fixing https://www.w3 [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Oct 8 16:01:41 PDT 2012


Author: ianh
Date: 2012-10-08 16:01:40 -0700 (Mon, 08 Oct 2012)
New Revision: 7442

Modified:
   source
Log:
[e] (0) Add some material to WebVTT regarding line breaks.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=16643
Affected topics: Video Text Tracks

Modified: source
===================================================================
--- source	2012-10-08 21:29:45 UTC (rev 7441)
+++ source	2012-10-08 23:01:40 UTC (rev 7442)
@@ -39193,6 +39193,8 @@
 
   <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>
 
@@ -39241,6 +39243,73 @@
 <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
+— It will perforate your stomach.
+— 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.
+
+        — It will perforate your stomach.
+                — 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.
+
+— It will perforate your
+        stomach.
+    — 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>
 




More information about the Commit-Watchers mailing list