<?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>280337</bug_id>
          
          <creation_ts>2024-09-25 09:31:24 -0700</creation_ts>
          <short_desc>[WPE][GTK] default currentTime is NaN</short_desc>
          <delta_ts>2024-09-26 16:15:21 -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 Nightly Build</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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jean-Yves Avenard [:jya]">jean-yves.avenard</reporter>
          <assigned_to name="Jean-Yves Avenard [:jya]">jean-yves.avenard</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2063035</commentid>
    <comment_count>0</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2024-09-25 09:31:24 -0700</bug_when>
    <thetext>When a MediaPlayerPrivateGStreamer, the initial currentTime will be NaN.

This is a consequence of 193933@main 

In `MediaTime MediaPlayerPrivateGStreamer::currentMediaTime() const` we have:
```
if (!m_pipeline || m_errorOccured)
        return MediaTime::invalidTime();
```

m_pipeline may not be set until content has been fully retrieved.

Per spec, on creation a media element has its currentTime attribute set to 0, not NaN.

This causes assertion when you enable ManagedMediaSource which uses the currentTime value to determine what the readyState is going to be as we build TimeRanges containing currentTime</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2063052</commentid>
    <comment_count>1</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2024-09-25 10:24:56 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/34230</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2063521</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-09-26 16:14:22 -0700</bug_when>
    <thetext>Committed 284322@main (32a477e91d09): &lt;https://commits.webkit.org/284322@main&gt;

Reviewed commits have been landed. Closing PR #34230 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2063523</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-09-26 16:15:21 -0700</bug_when>
    <thetext>&lt;rdar://problem/136787669&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>