Is your feature request related to a problem? Please describe.
Currently, Tauri applications (especially on Windows/WebView2) show native permission prompts for capabilities like Microphone and Camera. For kiosk applications or embedded systems where user interaction is limited, we need a way to automatically grant these permissions without prompting the user.
Describe the solution you'd like
Since wry has recently added a with_permission_handler API (supported in wry#1656), I would like to see this exposed in Tauri.
Ideally, we could configure a handler in WebviewWindowBuilder similar to how navigation_handler is exposed:
tauri::Builder::default()
.setup(|app| {
let window = tauri::WebviewWindowBuilder::new(app, "main", tauri::WebviewUrl::default())
.permission_handler(|kind| {
match kind {
// Allow microphone access without prompt
tauri::PermissionKind::Microphone => tauri::PermissionResponse::Allow,
_ => tauri::PermissionResponse::Default,
}
})
.build()?;
Ok(())
})
Is your feature request related to a problem? Please describe.
Currently, Tauri applications (especially on Windows/WebView2) show native permission prompts for capabilities like Microphone and Camera. For kiosk applications or embedded systems where user interaction is limited, we need a way to automatically grant these permissions without prompting the user.
Describe the solution you'd like
Since
wryhas recently added awith_permission_handlerAPI (supported in wry#1656), I would like to see this exposed in Tauri.Ideally, we could configure a handler in
WebviewWindowBuildersimilar to hownavigation_handleris exposed: