Extended the header section to include inline styling.
authorSilvia Pfeiffer
Thu, 08 Nov 2012 12:32:27 +1100
changeset 26 3499d1367b01
parent 25 24e5fdc2c24f
child 27 e5f48a0cb409
Extended the header section to include inline styling.
608toVTT/608toVTT.html
--- a/608toVTT/608toVTT.html	Thu Nov 08 12:09:13 2012 +1100
+++ b/608toVTT/608toVTT.html	Thu Nov 08 12:32:27 2012 +1100
@@ -139,6 +139,35 @@
 @import(cea608.css)
 ##
 Kind: captions
+Language: en-US
+        </pre>
+
+        <p>
+          Notice the metadata fields that this header includes: "Style", "Kind" and "Language". It is recommended to always provide these three with the "Kind" field set to "captions" or "subtitles" and the "Language" field set to a BCP 47 language tag [[BCP47]].
+        </p>
+
+        <p>
+          The @import command on the "Style" field imports the CSS directives defined in the "Rendering in Browsers" section into the WebVTT file. Browsers will use these CSS directives to make use of their rendering engines for styling cues and cue sections of text.
+        </p>
+
+        <p>
+          It is also possible to avoid importing an external style sheet and include the styles directly in the WebVTT header. Here is an example:
+        </p>
+        <pre>
+WEBVTT
+Style:
+::cue {
+  line-height: 5.33vh;
+  font-size: 4.1vh;
+  font-family: monospace;
+  font-style: normal;
+  font-weight: normal;
+  background-color: black;
+  color: white;
+}
+##
+Kind: captions
+Language: en-US
         </pre>
       </section>
 
@@ -185,7 +214,7 @@
         </p>
 
         <p>
-          In WebVTT CEA-608, each CEA-608 box is mapped to a tree of WebVTT Node Objects, which are displayed into the WebVTT rendering area, i.e. the video viewport. A tree of WebVTT Node Objects contains a parsed representation of the cue content that is to be rendered. They map easily to HTML DOM nodes which simplifies rendering when a browser rendering engine is available. We call the root of a WebVTT Node Object tree the WebVTT cue box.
+          In WebVTT CEA-608, each CEA-608 box is mapped to a tree of WebVTT Node Objects, which are displayed into the WebVTT rendering area, i.e. the video viewport. A tree of WebVTT Node Objects contains a parsed representation of the cue content that is to be rendered. They map easily to HTML DOM nodes which simplifies rendering when a browser rendering engine is available. We call the root of a WebVTT Node Object tree the "WebVTT cue box".
         </p>
 
         <p>