<?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>204228</bug_id>
          
          <creation_ts>2019-11-15 09:16:10 -0800</creation_ts>
          <short_desc>HTMLAudioElement currentTime out of sync with actual audio when linked to AudioContext</short_desc>
          <delta_ts>2022-05-18 02:00:03 -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>Web Audio</component>
          <version>Safari 13</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.14</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>sam</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>brianpeiris</cc>
    
    <cc>chrisguttandin</cc>
    
    <cc>tero</cc>
    
    <cc>thomas.blackmon</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1590524</commentid>
    <comment_count>0</comment_count>
    <who name="">sam</who>
    <bug_when>2019-11-15 09:16:10 -0800</bug_when>
    <thetext>It seems that when an HTMLAudioElement is linked up to AudioContext (via createMediaElementSource), the audio element&apos;s currentTime is out of sync with playback.

Steps to reproduce:

1. Go to https://codesandbox.io/s/safari-time-delay-9hokn
2. Click the play button in the audio control, confirm that the tones occur exactly on the second
3. Reload the page
4. Click the “Connect to AudioContext” button
5. Click the play button

You&apos;ll then see that the timing is off. This doesn&apos;t occur in Chrome nor Firefox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1591751</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-11-19 16:22:00 -0800</bug_when>
    <thetext>&lt;rdar://problem/57341556&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1601044</commentid>
    <comment_count>2</comment_count>
    <who name="Brian Peiris">brianpeiris</who>
    <bug_when>2019-12-20 17:43:31 -0800</bug_when>
    <thetext>We&apos;re running into this problem on https://hubs.mozilla.com/ with videos as well. We use createMediaElementSource to implement 3D positional audio in our WebGL app.

I&apos;ve adapted Sam&apos;s test to demonstrate the bug with videos as well, where the delay is much more prominent. https://brianpeiris.github.io/safari-video-source-test/

I reproduce on a 2018 13-inch MacBook Pro, with macOS 10.14.6 and Safari 13.0.4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1812556</commentid>
    <comment_count>3</comment_count>
    <who name="Tero Parviainen">tero</who>
    <bug_when>2021-11-08 01:33:18 -0800</bug_when>
    <thetext>This is still an issue. Tested on Safari 15.1 on Monterey, and iOS 15.0.2.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>