<?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>260412</bug_id>
          
          <creation_ts>2023-08-18 15:23:56 -0700</creation_ts>
          <short_desc>REGRESSION (iOS 17 beta): Playing audio from a `MediaElementAudioSourceNode` silently fails</short_desc>
          <delta_ts>2023-09-23 15:59:57 -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 17</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>261414</dup_id>
          
          <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>
          <dependson>261414</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jordan Eldredge">jordan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alphanb+webkit.bugzilla</cc>
    
    <cc>cdumez</cc>
    
    <cc>chrisguttandin</cc>
    
    <cc>dtrenz</cc>
    
    <cc>ethanchong</cc>
    
    <cc>hyfedsn</cc>
    
    <cc>jer.noble</cc>
    
    <cc>lolwebkitbugtracker</cc>
    
    <cc>nkrantz23</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1972157</commentid>
    <comment_count>0</comment_count>
    <who name="Jordan Eldredge">jordan</who>
    <bug_when>2023-08-18 15:23:56 -0700</bug_when>
    <thetext>## Repro

Open the repro link (below) and click “Play”.

**Expected:** An audio sample plays (this happens on iOS 16)

**Actual:** No audio plays (this happens on iOS 17 Beta)

- Repro: [https://captbaritone.github.io/safari-17-element-source-bug/](https://captbaritone.github.io/safari-17-element-source-bug/)
- Repro code: [https://github.com/captbaritone/safari-17-element-source-bug](https://github.com/captbaritone/safari-17-element-source-bug)

### Impact

- This issue was discovered when [webamp.org](http://webamp.org) broke ([issue](https://github.com/captbaritone/webamp/issues/1223))
- The Webamp audio player is also used as an [optional audio player](https://blog.archive.org/2018/10/02/dont-click-on-the-llama/) on the Internet Archive [archive.org](https://archive.org), and the bug manifests there as well
- I’ve also discovered a few other project which worked on Safari 16, but seems to be broken on iOS by this beta release:
    - [https://visicality.derekwolpert.com](https://visicality.derekwolpert.com/) It also uses `MediaElementAudioSourceNode` ([source](https://github.com/derekwolpert/Visicality/blob/25518a682bbbfd55d9abd74fae38f6fce8e158e6/src/index.js#L217))
    - [https://saturn.fm](https://saturn.fm) (sound effects still work, but music does not play)

## Observations

- The issue reproduces on iOS 17.0 (21a5312c)
- The issue does *not* reproduce on iOS 16.3 (20D47)
- The issue does *not* reproduce on Safari 17 on MacOS. Tested on version 17.0 (18616.1.27.101.1, 18616)
- [Some projects](https://github.com/mrdoob/three.js/commit/1c07c8a9868f85f99fb098c82da946e7a7945d07) seem to avoid using `MediaElementAudioSourceNode` on iOS devices, going back to at least May 2020
- There have been a few previous WebKit bugs that look similar: [Bug 211394](https://bugs.webkit.org/show_bug.cgi?id=211394) and [Bug 203435](https://bugs.webkit.org/show_bug.cgi?id=203435)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1972381</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-08-21 08:40:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/114196266&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1972716</commentid>
    <comment_count>2</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2023-08-22 14:14:08 -0700</bug_when>
    <thetext>Thanks for the test case! It looks like playback never actually starts when a MediaElementAudioSourceNode is attached. The audio element moves to a playing state, but currentTime never progresses.

We&apos;ll take a look. Thanks for filing!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973039</commentid>
    <comment_count>3</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2023-08-23 10:59:20 -0700</bug_when>
    <thetext>This looks like a regression in iOS 17 media frameworks rather than WebKit. So it&apos;s unlikely this will be fixed by a change in WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973185</commentid>
    <comment_count>4</comment_count>
    <who name="Jordan Eldredge">jordan</who>
    <bug_when>2023-08-23 21:43:18 -0700</bug_when>
    <thetext>Thanks for taking the time to investigate and acknowledge. I&apos;ll assume that since this has been imported to Radar that it&apos;s been routed to the folks who maintain the media frameworks.

My (limited) understanding is that Safari bugs are not tracked publicly, so our best bet at this point is just to wait for new beta releases and try each one hoping it gets fixed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1976438</commentid>
    <comment_count>5</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2023-09-08 08:46:07 -0700</bug_when>
    <thetext>(In reply to Jordan Eldredge from comment #4)
&gt; Thanks for taking the time to investigate and acknowledge. I&apos;ll assume that
&gt; since this has been imported to Radar that it&apos;s been routed to the folks who
&gt; maintain the media frameworks.
&gt; 
&gt; My (limited) understanding is that Safari bugs are not tracked publicly, so
&gt; our best bet at this point is just to wait for new beta releases and try
&gt; each one hoping it gets fixed?

I&apos;ll do what I can to update this bugzilla when a fix is publicly available, which will likely happen in a iOS update seed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1977779</commentid>
    <comment_count>6</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2023-09-15 15:50:28 -0700</bug_when>
    <thetext>A fix for this issue landed in 267871@main, via bug #261414.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1977989</commentid>
    <comment_count>7</comment_count>
    <who name="Ethan">ethanchong</who>
    <bug_when>2023-09-18 00:36:01 -0700</bug_when>
    <thetext>Hello, we found an issue with AudioContext.createMediaElement breaking video playback(cannot play video at all). Could it be related to this issue (https://bugs.webkit.org/show_bug.cgi?id=261668)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979142</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-09-21 15:25:53 -0700</bug_when>
    <thetext>Marking as duplicate, as this issue is resolved per the above comment.

*** This bug has been marked as a duplicate of bug 261414 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>