<?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>190775</bug_id>
          
          <creation_ts>2018-10-20 10:56:35 -0700</creation_ts>
          <short_desc>Need Safari setting to allow autoplaying audio for web-platform-tests</short_desc>
          <delta_ts>2025-06-11 15:53: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>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=280829</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philip Jägenstedt">philip</reporter>
          <assigned_to name="Qianlang Chen">qianlangchen</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>gsnedders</cc>
    
    <cc>jer.noble</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1471109</commentid>
    <comment_count>0</comment_count>
    <who name="Philip Jägenstedt">philip</who>
    <bug_when>2018-10-20 10:56:35 -0700</bug_when>
    <thetext>A web-platform-tests infrastructure test I added in https://github.com/web-platform-tests/wpt/pull/13622 is failing in Safari because the audio element&apos;s paused attribute is still true immediately after calling `a.play()`.

There are a lot of tests in web-platform-tests written before autoplay restrictions were widespread, so to make these work a setting to disable these restrictions is needed. Something like the com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically setting.

Testing with Safari TP 67.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471183</commentid>
    <comment_count>1</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2018-10-22 00:19:36 -0700</bug_when>
    <thetext>Philip, there is UI for enabling autoplay in Safari and STP. Preferences -&gt; Websites -&gt; Auto-Play -&gt; &quot;When visiting other websites&quot;: &quot;Allow all auto-play&quot;. This can either be done globally for all websites, or you can add settings for each of the WPT domains.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471184</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-10-22 00:29:30 -0700</bug_when>
    <thetext>One possibility would be to expose this through Web Driver or scripting so that WPT infra could opt in that mode more easily.

Another approach is to rewrite tests in a way that autoplay is respected. For instance, a routine to call play() as part of a Web Driver click event callback.
Not sure how much tests are impacted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523450</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Jägenstedt">philip</who>
    <bug_when>2019-04-02 13:56:41 -0700</bug_when>
    <thetext>Jer, do you know if that setting is backed by something that can be written using defaults write com.apple.Safari ... ?

I tried changing the setting back and forth but can&apos;t observe any change in the output of `defaults read com.apple.Safari` or `defaults read com.apple.SafariTechnologyPreview`.

There are a bunch of Safari-only failures on wpt.fyi because of this and it would be nice to get those failures out of the way to see if there&apos;s something more interesting:
https://wpt.fyi/results/html/semantics/embedded-content/media-elements?run_id=5141852206399488&amp;run_id=6579630693679104&amp;run_id=5904569678692352</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1740223</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-03-16 14:51:04 -0700</bug_when>
    <thetext>&lt;rdar://problem/75495649&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2121804</commentid>
    <comment_count>5</comment_count>
    <who name="Qianlang Chen">qianlangchen</who>
    <bug_when>2025-06-04 16:06:25 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/46342</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2123113</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-06-11 15:53:19 -0700</bug_when>
    <thetext>Committed 296109@main (6e333ad75559): &lt;https://commits.webkit.org/296109@main&gt;

Reviewed commits have been landed. Closing PR #46342 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>