WebKitGTK Mikrofon-Permission: connect_permission_request Handler erlaubt getUserMedia [appimage]
All checks were successful
Build AppImage / build (push) Successful in 6m53s
All checks were successful
Build AppImage / build (push) Successful in 6m53s
WebKitGTK verweigert standardmäßig alle Permission-Requests (Mikrofon, Kamera). Jetzt wird in setup() ein permission-request Handler registriert der alles erlaubt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
600c7943ed
commit
05c4913833
2 changed files with 24 additions and 0 deletions
|
|
@ -28,6 +28,9 @@ tokio-tungstenite = "0.23"
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
sha2 = "0.10"
|
sha2 = "0.10"
|
||||||
|
|
||||||
|
[target.'cfg(target_os = "linux")'.dependencies]
|
||||||
|
webkit2gtk = "2.0"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
panic = "abort"
|
panic = "abort"
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@ use tauri::{
|
||||||
tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
|
tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
use webkit2gtk::WebViewExt;
|
||||||
|
|
||||||
mod audit;
|
mod audit;
|
||||||
mod claude;
|
mod claude;
|
||||||
mod commands;
|
mod commands;
|
||||||
|
|
@ -250,6 +253,24 @@ pub fn run() {
|
||||||
// Lock-Datei erstellen (Instanz-Schutz + Update-Safety)
|
// Lock-Datei erstellen (Instanz-Schutz + Update-Safety)
|
||||||
update::create_lock_file();
|
update::create_lock_file();
|
||||||
|
|
||||||
|
// WebKitGTK: Mikrofon-/Kamera-Permissions automatisch erlauben
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
{
|
||||||
|
if let Some(window) = app.get_webview_window("main") {
|
||||||
|
window.with_webview(|webview| {
|
||||||
|
use webkit2gtk::PermissionRequestExt;
|
||||||
|
|
||||||
|
let wv: webkit2gtk::WebView = webview.inner().clone();
|
||||||
|
wv.connect_permission_request(|_wv, request: &webkit2gtk::PermissionRequest| {
|
||||||
|
println!("🎤 WebKit Permission-Request → erlaubt");
|
||||||
|
request.allow();
|
||||||
|
true // Signal handled
|
||||||
|
});
|
||||||
|
println!("🎤 WebKit Permission-Handler registriert");
|
||||||
|
}).ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Phase 3: Bridge sofort beim App-Start starten (kein Cold-Start bei erster Nachricht)
|
// Phase 3: Bridge sofort beim App-Start starten (kein Cold-Start bei erster Nachricht)
|
||||||
let bridge_handle = app.handle().clone();
|
let bridge_handle = app.handle().clone();
|
||||||
tauri::async_runtime::spawn(async move {
|
tauri::async_runtime::spawn(async move {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue