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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>160199</bug_id>
          
          <creation_ts>2016-07-26 09:36:42 -0700</creation_ts>
          <short_desc>MediaFragmentURIParser rejects valid NPT strings if &apos;hours&apos; is defined using 1 digit</short_desc>
          <delta_ts>2024-05-18 02:47:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fabien Vallée">fvallee</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>jeremyj-wk</cc>
    
    <cc>jer.noble</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1214560</commentid>
    <comment_count>0</comment_count>
    <who name="Fabien Vallée">fvallee</who>
    <bug_when>2016-07-26 09:36:42 -0700</bug_when>
    <thetext>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 https://www.w3.org/TR/media-frags/#rtsp: &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&apos;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 https://trac.webkit.org/browser/trunk/Source/WebCore/html/MediaFragmentURIParser.cpp#L281

Please let me know if I&apos;m missing something. thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1214836</commentid>
    <comment_count>1</comment_count>
    <who name="Fabien Vallée">fvallee</who>
    <bug_when>2016-07-27 00:50:55 -0700</bug_when>
    <thetext>FYI media/media-fragments/TC0078.html can PASS using Fragment: &apos;t=00000:00:03,00:00:07&apos;
Hours using more than 2 digits are accepted by the parser, only 1 digit hours is rejected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2036202</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-05-18 02:46:37 -0700</bug_when>
    <thetext>Committed 278951@main (1b08c7ea9a82): &lt;https://commits.webkit.org/278951@main&gt;

Reviewed commits have been landed. Closing PR #28748 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2036203</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-05-18 02:47:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/128318772&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>