fix(linux): enable WebRTC in WebKitGTK; add Arch package build
Build Lotus Chat Desktop / prepare (push) Successful in 1m0s
Build Lotus Chat Desktop / build-windows (push) Successful in 41m27s
Build Lotus Chat Desktop / build-linux (push) Successful in 46m34s
Build Lotus Chat Desktop / build-arch (push) Failing after 23s
Build Lotus Chat Desktop / update-manifest (push) Successful in 12s
Build Lotus Chat Desktop / prepare (push) Successful in 1m0s
Build Lotus Chat Desktop / build-windows (push) Successful in 41m27s
Build Lotus Chat Desktop / build-linux (push) Successful in 46m34s
Build Lotus Chat Desktop / build-arch (push) Failing after 23s
Build Lotus Chat Desktop / update-manifest (push) Successful in 12s
WebKitGTK ships enable-media-stream/enable-webrtc off by default (unlike WebView2/WKWebView), leaving navigator.mediaDevices undefined and Element Call reporting "browser does not support WebRTC" on every Linux build. Enable both settings and auto-grant the resulting camera/mic permission request, mirroring the existing WebView2 handling. Also add a build-arch CI job that repackages the existing .deb into a real .pkg.tar.zst and uploads it to the Gitea release alongside the Windows/Linux artifacts, for Arch/CachyOS users who'd rather use pacman than an AppImage. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Generated
+158
-910
File diff suppressed because it is too large
Load Diff
@@ -43,6 +43,9 @@ tauri-plugin-autostart = "2" # P6-1 launch-on-login
|
||||
# default `blocking-api` feature and the default `async-io` runtime, so plain
|
||||
# default features suffice (no tokio integration needed here).
|
||||
zbus = "5"
|
||||
# Same version wry/tauri already pull in transitively (see Cargo.lock) — pinning
|
||||
# it directly lets us reach WebKitSettings/permission APIs wry doesn't expose.
|
||||
webkit2gtk = "2.0"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
webview2-com = "0.38"
|
||||
|
||||
@@ -782,6 +782,27 @@ pub fn run() {
|
||||
}
|
||||
})?;
|
||||
|
||||
// WebKitGTK ships `enable-media-stream`/`enable-webrtc` OFF by
|
||||
// default (unlike WebView2/WKWebView), which leaves
|
||||
// `navigator.mediaDevices` undefined and makes Element Call
|
||||
// report "browser does not support WebRTC". Turn them on and
|
||||
// auto-grant the resulting camera/mic permission prompt, mirroring
|
||||
// the WebView2 handling above.
|
||||
#[cfg(target_os = "linux")]
|
||||
window.with_webview(|webview| {
|
||||
use webkit2gtk::{PermissionRequestExt, SettingsExt, WebViewExt};
|
||||
|
||||
let wv = webview.inner();
|
||||
if let Some(settings) = WebViewExt::settings(&wv) {
|
||||
settings.set_enable_media_stream(true);
|
||||
settings.set_enable_webrtc(true);
|
||||
}
|
||||
wv.connect_permission_request(|_webview, request| {
|
||||
request.allow();
|
||||
true
|
||||
});
|
||||
})?;
|
||||
|
||||
// Native desktop feature modules (power/call-continuity, etc.).
|
||||
native::setup(app.handle())?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user