webview / webview_java

A Java wrapper of https://github.com/webview/webview
Other
68 stars 11 forks source link

how can i set the webview init param ,for example like : --disable-web-security ; --autoplay-policy=no-user-gesture-required #10

Closed fangyuchuang closed 1 year ago

fangyuchuang commented 1 year ago

how can i set the webview init param ,for example like the chromiun can support the start param : --disable-web-security ; --autoplay-policy=no-user-gesture-required that is important for de developer to customized the webview behavor. wish for your reply ,thanks!

e3ndr commented 1 year ago

As far as I know, the upstream library does not support this as it's inconsistent across platforms. You may want to investigate other libraries such as Eclipse SWT or JCEFMaven.

fangyuchuang commented 1 year ago

thank you, i have resolved it, i make an example in c# by webview2, and i will integrated it to the java.

in c# mainwindow function ,before the InitializeComponent(); call Environment.SetEnvironmentVariable("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", "--autoplay-policy=no-user-gesture-required");

At 2023-09-24 14:05:05, "Alex" @.***> wrote:

As far as I know, the upstream library does not support this as it's inconsistent across platforms. You may want to investigate other libraries such as Eclipse SWT or JCEFMaven.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>