mediaTypesRequiringUserActionForPlayback Configuration in iOS 26 WebView

Hello, I'm exploring the new SwiftUI WebView and WebPage APIs introduced in iOS 26, and I have a question about configuring media playback behavior.

In our app, we currently use WKWebView with the mediaTypesRequiringUserActionForPlayback property set to [] (or WKAudiovisualMediaTypeNone) to allow HTML videos with an "autoplay" attribute to play automatically without requiring user interaction. This property is part of WKWebViewConfiguration and controls which media types require a user gesture to begin playing. According to the official documentation (WKWebViewConfiguration.mediaTypesRequiringUserActionForPlayback), this allows us to support video content that needs to autoplay for our specific use case.

With the new iOS 26 WebView and WebPage APIs, I haven't been able to find a way to configure this behavior. Looking through the available configuration options, there doesn't appear to be an equivalent setting. My questions are:

  1. Has the default behavior changed for the new SwiftUI WebView? Does it now allow media autoplay by default?
  2. If not, is there a way to configure this behavior that I'm missing?
  3. If this configuration is intentionally not exposed, what is the recommended approach for apps that need to enable media autoplay?

Currently, we're wrapping WKWebView in a UIViewRepresentable to maintain this functionality, but we'd love to migrate to the native SwiftUI WebView later this year if possible.

Thank you for any guidance you can provide!

Answered by DTS Engineer in 861584022

If you'd like us to consider adding this functionality to the SwiftUI WebView, please file an enhancement request using the Feedback Assistant. If you file the request, please post the Feedback number here so we can make sure it gets routed to the right team.

If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?

If you'd like us to consider adding this functionality to the SwiftUI WebView, please file an enhancement request using the Feedback Assistant. If you file the request, please post the Feedback number here so we can make sure it gets routed to the right team.

If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?

mediaTypesRequiringUserActionForPlayback Configuration in iOS 26 WebView
 
 
Q