<?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>12076</bug_id>
          
          <creation_ts>2011-02-15 09:27:31 +0000</creation_ts>
          <short_desc>&lt;video&gt; Recast WebVTT parser so that it first does line breaking then handles each line, instead of being character-oriented</short_desc>
          <delta_ts>2012-07-18 18:40:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#webvtt-parser</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>trivial</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to>contributor</assigned_to>
          <cc>ayg</cc>
    
    <cc>cdouble</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>45570</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-02-15 09:27:31 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html
Section: http://www.whatwg.org/specs/web-apps/current-work/#webvtt-parser

Comment:
Wishlist: line-based parser

Posted from: 83.218.67.122</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45571</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2011-02-15 09:44:56 +0000</bug_when>
    <thetext>I&apos;m calling this a wishlist item because it is editorial. Still, here&apos;s my reasoning:

When I made a JavaScript implementation of the earlier WebSRT parser, I found it quite hard to follow the steps because of how handling of CRLF is sprinkled all over, and even found a spec bug related to it (fixed already). Of course the spec should be precise down to every single byte what should happen, but I&apos;m hoping that could happen with a line-based parser as well.

If it&apos;s not obvious, by a line-based parser I mean one which operates on the input and generates lines for a second step. This wouldn&apos;t harm streaming, because AFAICT no cues will be output from the parser before CRLF or EOF is encountered anyway.

I dare say this makes it more likely that implementations of WebVTT in high-level languages like JavaScript and Python will actually follow the spec, since operating on lines is quite easier to understand for a format like WebVTT. If you go and look for random SRT parsers, I think you&apos;ll find that most work like this. (The ones I&apos;ve written do anyway.)

The spec is already mostly line-based, I&apos;m just suggesting that the line-splitting be separated out from the rest to improve readability. Do as you will.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45572</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2011-02-15 09:45:40 +0000</bug_when>
    <thetext>Oh yeah, it&apos;d be simple to add line-based comments to such a parser, too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48073</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-05-05 08:21:24 +0000</bug_when>
    <thetext>This would be a lot of risky work for minimal gain, IMHO.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48079</commentid>
    <comment_count>4</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2011-05-05 09:22:04 +0000</bug_when>
    <thetext>Risky in what sense? There&apos;s no existing content or implementations to break.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49043</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-06-02 00:38:00 +0000</bug_when>
    <thetext>Risky in the sense that I&apos;m almost certain to screw it up and spend hours spread over many days trying to fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49097</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-06-02 23:47:15 +0000</bug_when>
    <thetext>Let me keep this on my radar for a bit longer, in case I come across a stronger rationale for doing this. Currently though I&apos;m leaning towards not changing this. It would be a lot of effort for minimal gain, and the opportunity cost would thus be high.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56645</commentid>
    <comment_count>7</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2011-09-11 16:03:21 +0000</bug_when>
    <thetext>Comments from the Open Video Conference, with implementors of Opera, Firefox,
Chrome and Safari discussing WebVTT:

At this point of implementation we don&apos;t care about this any longer, closing this bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>