Skip to content

Commit

Permalink
Merge pull request #175 from nielsvanvelzen/nvv-media-gestures
Browse files Browse the repository at this point in the history
Add mediaPlaybackRequiresUserGesture option to AndroidWebsettings
  • Loading branch information
KevinnZou authored Jun 12, 2024
2 parents b5650e2 + 65d9b79 commit 57d31ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ fun AccompanistWebView(
defaultFontSize = it.defaultFontSize
loadsImagesAutomatically = it.loadsImagesAutomatically
domStorageEnabled = it.domStorageEnabled
mediaPlaybackRequiresUserGesture = it.mediaPlaybackRequiresUserGesture
}
}
if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ sealed class PlatformWebSettings {
* Whether the DOM storage API is enabled. The default value is {@code false}.
*/
var domStorageEnabled: Boolean = false,
/**
* Whether the a user gesture is required to play media. The default is {@code true}.
*/
var mediaPlaybackRequiresUserGesture: Boolean = true,
/**
* The Layer Type of the WebView.
* Default is [LayerType.HARDWARE]
Expand Down

0 comments on commit 57d31ab

Please sign in to comment.