MSW: Expose "put_AdditionalBrowserArguments" in wxWebViewEdge through a public API (Issue #22506)

23 views
Skip to first unread message

beENABLED

unread,
Jun 9, 2022, 9:15:50 AM6/9/22
to wx-...@googlegroups.com, Subscribed

The behavior of the Chromium component can be controlled through various command line switches. In my case i'd like to pass "--autoplay-policy=no-user-gesture-required" to enable the autoplay of video.

But i think there could be other use cases as well.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22506@github.com>

Tobias Taschner

unread,
Jun 9, 2022, 9:20:11 AM6/9/22
to wx-...@googlegroups.com, Subscribed

While I wouldn't mind a dedicated API, please not that as a workaround you can call:

    wxSetEnv("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", "--autoplay-policy=no-user-gesture-required");

This has to be called before creating the first wxWebView using the edge backend


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22506/1151110574@github.com>

beENABLED

unread,
Jun 9, 2022, 9:32:17 AM6/9/22
to wx-...@googlegroups.com, Subscribed

Thanks for the quick answer, that's very neat.

How would i pass multiple arguments, additional wxSetEnv() calls, or one call with arguments separated by a space?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22506/1151124832@github.com>

Tobias Taschner

unread,
Jun 9, 2022, 9:33:58 AM6/9/22
to wx-...@googlegroups.com, Subscribed

Separated by space should be the correct way. Multiple calls would just overwrite the environment variable.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22506/1151126736@github.com>

beENABLED

unread,
Jun 9, 2022, 9:36:25 AM6/9/22
to wx-...@googlegroups.com, Subscribed

In that case a public API might not be needed at all. It might be worth mentioning your solution in the documentation.

Thanks!


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22506/1151129650@github.com>

mjx

unread,
Jun 9, 2022, 11:11:18 AM6/9/22
to wx-...@googlegroups.com, Subscribed

Closed #22506 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/22506/issue_event/6778886793@github.com>

Reply all
Reply to author
Forward
0 new messages