<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@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>fvallee@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>: "Minutes and seconds must be specified as exactly two digits, hours and fractional seconds can be any number of digits".
As far as I understand the specifications, "t=0:02:00,121.5" 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 "t=00:00:03,00:00:07" string, as defined in LayoutTests/media/media-fragments/media-fragments.js:
TC0078 : { start: 3, end: 7, valid: true, description: "NPT HH:MM:SS format", fragment: "t=00:00:03,00:00:07", comment: "The media is requested from a to b."},
If the fragment is changed to "t=0:00:03,00:00:07" (use only 1 digit for the hour), the test fails (based on my understanding "NPT H:MM:SS format" is valid and the test should pass).
===================
Note: 1-digit hour string ("0:00:03") 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>