Open Shabinder opened 15 hours ago
KCEF already supports loading from the bundled binaries for a while and even autodetects this since https://github.com/DatL4g/KCEF/releases/tag/v2024.04.20.4
However everyone seems to ignore my comments (since I mentioned it multiple times to @KevinnZou for example and some issues/PRs). That means no downloading required anymore, just build and bundle the app with the JetBrains JCEF SDK.
Of course you can switch to your mentioned alternatives however I can tell you already that the Linux version won't support all distros.
That means no downloading required anymore, just build and bundle the app with the JetBrains JCEF SDK.
@DatL4g was not aware about above, do you have any insights on how building with JetbrainsRuntime impacts binary size ? Bundling in, would generally mean a version of JCEF is shipped within final installation package making it bloated, r8?, hence not actually addressing the size of it issue?
Yes the binary size grows of course, that's the price you have to pay if you want to support all platforms.
I can only speak of Linux here as I haven't used another OS for 5 years but using WebKitGTK would be nice of course but isn't available on all distros.
It would be possible to check if it's available and if not the jcef binaries could be downloaded.
Some more thoughts on this topic.
This section describes some availability issues depending on the platform and if it's nice to have (on a end-user perspective).
Using WKWebview
would be easy? and nice (isn't the same thing used for iOS already?)
No complaints on that.
Maybe @KevinnZou can elaborate on that as he uses MacOS if I remember correctly.
Using WebView2
would be nice here as well.
Is there any known Kotlin/Java implementation yet?
The documentation specifies that it's "powered by Microsoft Edge (Chromium)"
.
Some minimal Windows installations do not come with Microsoft Edge (or it got uninstalled), is that a problem then?
Does it fallback to the specified standard browser, e.g. Chrome or Firefox?
Using WebKitGTK
would be nice as well as long as it's available on the system.
Some distros don't support it, but most do.
I can think of 3 possible outcomes for the library-user here (based on the above options got implemented):
1. They don't care if everyone can use it as long as most can
2. They want all benefits of the above options and want to address every user
3. They want all benefits of the above options, address every user and don't want to download KCEF
I am in fact a supporter of WebView2, WebKit and WKWebview but you can't just declare that as THE SOLUTION. My products are required in the more niche section and therefore require the fallback to KCEF so everyone can use it.
The conclusion to the availability and outcomes is that splitted modules would be perfect. However I am not sure if that is even possible with the current structure @KevinnZou?
io.github.kevinnzou:compose-webview-multiplatform
.io.github.kevinnzou:compose-webview-multiplatform-kcef-fallback
instead.
Please let me know what your thoughts on this topic and explanations are and the technical possibility.
See: https://pub.dev/packages/desktop_webview_window | Github
Obviously this wont be a smaller task, and have breaking changes, but I believe this would be crucial in future since KCEF as the standalone option doesn't cut for many apps, Where we can't just ask and w8 for user to download a browser while to just open a simple webpage and do simple tasks in-app, we will have many other added benefits of going this route, to name one, would be in-app login support, since many socials dont allow login in JCEF/KCEF.
Also, since this is mostly a Dart Wrapper over C/C++, we should be able to port this to KMP with Cinterop/cklib, with not that great of an effort.
thoughts ?