<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>16643</bug_id>
          
          <creation_ts>2012-04-05 16:36:02 +0000</creation_ts>
          <short_desc>WebVTT: Displaying multiple lines</short_desc>
          <delta_ts>2012-10-08 23:01:49 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>TextTracks CG</product>
          <component>WebVTT</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Frank Olivier">franko</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>glenn</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-texttracks</cc>
    
    <cc>silviapfeiffer1</cc>
          
          <qa_contact name="This bug has no owner yet - up for the taking">dave.null</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66447</commentid>
    <comment_count>0</comment_count>
    <who name="Frank Olivier">franko</who>
    <bug_when>2012-04-05 16:36:02 +0000</bug_when>
    <thetext>(See http://lists.w3.org/Archives/Public/public-texttracks/2012Apr/0002.html) 

As an caption file author, I would expect that WebVTT would have some mechanism for defining and displaying multiple lines in a single cue 
(Use cases: One line each for two+ simultaneous speakers; A line of dialogue + a line with a sound effect description, etc )

In the spec, WebVTT line terminators are used to indicate separate (parsed) lines; we should apply this to cue text as well:

00:00:00.142 --&gt; 00:00:08.501
Line 1
Line 2

Line 1 would render above Line 2 in the video.

We should change the spec to clearly specify that WebVTT line terminators indicate a line break in cue text.

For the sample cue above, .getCueAsHTML() should return a document fragment with three nodes:
Line 1
&lt;br /&gt;
LIne 2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66456</commentid>
    <comment_count>1</comment_count>
    <who name="Glenn Maynard">glenn</who>
    <bug_when>2012-04-05 21:22:49 +0000</bug_when>
    <thetext>This is not how WebVTT should behave.  Please see the discussion in the thread you started (as well as earlier discussions):

http://lists.w3.org/Archives/Public/public-texttracks/2012Apr/0002.html

If you want an explicit line break, you should be required to insert one explicitly, as with HTML.

00:00:00.142 --&gt; 00:00:08.501
Line 1&lt;br&gt;
Line 2

(As an aside, note that if you have two simultaneous speakers, or other simultaneous but distinct events, you should generally encode that as two cues with the same timestamp, not as one cue with a line break encoded in it.)

Please follow-up on the mailing list where this is being discussed, to avoid fragmenting the discussion.  Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67077</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-04-25 22:39:21 +0000</bug_when>
    <thetext>http://lists.w3.org/Archives/Public/public-texttracks/2012Apr/0108.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71353</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-07-24 04:51:45 +0000</bug_when>
    <thetext>Frank: Can you elaborate on why the spec isn&apos;t clear that line breaks are preserved when rendering cues? The spec says &quot;The &apos;white-space&apos; property on the (root) List of WebVTT Node Objects must be set to &apos;pre-wrap&apos;&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71523</commentid>
    <comment_count>4</comment_count>
    <who name="Frank Olivier">franko</who>
    <bug_when>2012-07-26 18:48:51 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Frank: Can you elaborate on why the spec isn&apos;t clear that line breaks are
&gt; preserved when rendering cues? The spec says &quot;The &apos;white-space&apos; property on the
&gt; (root) List of WebVTT Node Objects must be set to &apos;pre-wrap&apos;&quot;.

I think it would be better to clearly define in the spec how multi-line cues should be constructed. Right now, there is no clear indicator that I should use &lt;br&gt; or \n (reading through the parsing algorithm defined in the spec indicates that multi-line cues as not supported at all)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71861</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-08-06 21:27:16 +0000</bug_when>
    <thetext>I can add some non-normative prose somewhere to make it clearer to people just scanning through the spec, but as far as I can tell what an implementation must do is unambiguously defined.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75644</commentid>
    <comment_count>6</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-10-08 23:01:49 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7442.
Check-in comment: Add some material to WebVTT regarding line breaks.
http://html5.org/tools/web-apps-tracker?from=7441&amp;to=7442</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>