<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - MediaFragmentURIParser rejects valid NPT strings if 'hours' is defined using 1 digit"
   href="https://bugs.webkit.org/show_bug.cgi?id=160199">160199</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MediaFragmentURIParser rejects valid NPT strings if 'hours' is defined using 1 digit
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Minor
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Media Elements
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>fvallee&#64;connected-labs.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>If a media uri contains a fragment, the MediaFragmentURIParser (Source/WebCore/html/MediaFragmentURIParser.cpp) is used to get the temporal clipping values (if any).

Based on <a href="https://www.w3.org/TR/media-frags/#rtsp">https://www.w3.org/TR/media-frags/#rtsp</a>: &quot;Minutes and seconds must be specified as exactly two digits, hours and fractional seconds can be any number of digits&quot;.
As far as I understand the specifications, &quot;t=0:02:00,121.5&quot; is valid (it's an example from the W3C specs anyway) but this string is rejected by the MediaFragmentURIParser (Source/WebCore/html/MediaFragmentURIParser.cpp)

===================
Steps to reproduce:

The regression test LayoutTests/media/media-fragments/TC0078.html can PASS using &quot;t=00:00:03,00:00:07&quot; string, as defined in LayoutTests/media/media-fragments/media-fragments.js:
TC0078 : { start: 3, end: 7, valid: true, description: &quot;NPT HH:MM:SS format&quot;, fragment: &quot;t=00:00:03,00:00:07&quot;, comment: &quot;The media is requested from a to b.&quot;},

If the fragment is changed to &quot;t=0:00:03,00:00:07&quot; (use only 1 digit for the hour), the test fails (based on my understanding &quot;NPT H:MM:SS format&quot; is valid and the test should pass).

===================
Note: 1-digit hour string (&quot;0:00:03&quot;) is rejected because of <a href="https://trac.webkit.org/browser/trunk/Source/WebCore/html/MediaFragmentURIParser.cpp#L281">https://trac.webkit.org/browser/trunk/Source/WebCore/html/MediaFragmentURIParser.cpp#L281</a>

Please let me know if I'm missing something. thanks.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>