From 6c7f45e1e3f89805a9fd6b58a9382a6bbc2b0c28 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Tue, 4 Jun 2024 18:13:59 +0200 Subject: [PATCH] fix(windows): Typo in autoplay browser arg (#1287) --- .changes/windows-autoplay.md | 5 +++++ src/webview2/mod.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/windows-autoplay.md diff --git a/.changes/windows-autoplay.md b/.changes/windows-autoplay.md new file mode 100644 index 000000000..0e4cb5f65 --- /dev/null +++ b/.changes/windows-autoplay.md @@ -0,0 +1,5 @@ +--- +wry: patch +--- + +Fixed a regression causing autoplay on windows to require user gestures. diff --git a/src/webview2/mod.rs b/src/webview2/mod.rs index f5b811bdf..7f73d1719 100644 --- a/src/webview2/mod.rs +++ b/src/webview2/mod.rs @@ -264,7 +264,7 @@ impl InnerWebView { let mut arguments = String::from(default_args); if attributes.autoplay { - arguments.push_str("--autoplay-policy=no-user-gesture-required"); + arguments.push_str(" --autoplay-policy=no-user-gesture-required"); } if let Some(proxy_setting) = &attributes.proxy_config {