<?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>229485</bug_id>
          
          <creation_ts>2021-08-24 18:11:47 -0700</creation_ts>
          <short_desc>HTMLVideoElement.currentTime keeps zero for audio source if HTMLVideoElement.muted is true</short_desc>
          <delta_ts>2023-07-28 04:48:01 -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>Safari 14</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Takahiro Aoyagi">taoyagi</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1787048</commentid>
    <comment_count>0</comment_count>
    <who name="Takahiro Aoyagi">taoyagi</who>
    <bug_when>2021-08-24 18:11:47 -0700</bug_when>
    <thetext>HTMLVideoElement.currentTime keeps zero for audio source if HTMLVideoElement.muted is true. It can&apos;t reproducible in Chrome of Firefox.

Example code:

&lt;script&gt;
const video = document.createElement(&apos;video&apos;);
video.src = &apos;your_audio_file.mp3&apos;;
video.loop = true;
video.muted = true;
const check = () =&gt; {
  setTimeout(check, 1000);
  console.log(video.currentTime);
};
check();
&lt;/script&gt;

Another example:

You can also confirm the problem in

https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_audio_all

by replacing the code with the following.

&lt;video muted controls&gt;
&lt;source src=&quot;your_audio_file.mp3&quot; type=&quot;audio/mpeg&quot;&gt;
&lt;/video&gt;

You will see zero duration time on the control panel.

OS: macOS Big Sur 11.5.2
Browser: Safari 14.1.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1789185</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-08-31 18:12:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/82605737&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1968603</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-07-28 04:48:01 -0700</bug_when>
    <thetext>Something like this:

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;

&lt;audio controls&gt;
  &lt;source src=&quot;horse.ogg&quot; type=&quot;audio/ogg&quot;&gt;
  &lt;source src=&quot;horse.mp3&quot; type=&quot;audio/mpeg&quot;&gt;
Your browser does not support the audio element.
&lt;/audio&gt;

&lt;video muted controls&gt;
&lt;source src=&quot;horse.mp3&quot; type=&quot;audio/mpeg&quot;&gt;
&lt;/video&gt;

&lt;script&gt;
const video = document.createElement(&apos;video&apos;);
video.src = &apos;horse.mp3&apos;;
video.loop = true;
video.muted = true;
const check = () =&gt; {
  setTimeout(check, 1000);
  console.log(video.currentTime);
};
check();
&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;



I tested and I get &apos;0&apos; multiple events in Safari 16.6, STP175 and Chrome Canary 117, or am I testing it wrong?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>