fix(windows): grant microphone and camera permissions in WebView2
WebView2 silently denies getUserMedia() unless a PermissionRequested handler explicitly allows it. macOS was already covered by Info.plist; Windows had nothing. Adds a COM event handler via with_webview that auto-approves mic and camera requests so Element Call voice/video works in the desktop app. Also includes previously uncommitted changes: - tauri.conf.json: add media-src / mediastream: to CSP - Info.plist: macOS NSMicrophoneUsageDescription / NSCameraUsageDescription Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,10 @@ custom-protocol = [ "tauri/custom-protocol" ]
|
||||
tauri-plugin-global-shortcut = "2"
|
||||
tauri-plugin-updater = "2"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
webview2-com = "0.38"
|
||||
windows = { version = "0.61", features = [] }
|
||||
|
||||
[lib]
|
||||
name = "app_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
Reference in New Issue
Block a user