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:
@@ -59,7 +59,7 @@
|
||||
},
|
||||
"app": {
|
||||
"security": {
|
||||
"csp": "default-src 'self' blob: data: filesystem: ws: wss: http: https: tauri:; script-src 'self' 'unsafe-eval' 'unsafe-inline' blob: data: filesystem: ws: wss: http: https: tauri:; style-src 'self' 'unsafe-inline' blob: data: filesystem: http: https:; img-src 'self' data: blob: filesystem: http: https:; connect-src 'self' blob: ipc: ws: wss: http: https: http://ipc.localhost"
|
||||
"csp": "default-src 'self' blob: data: filesystem: ws: wss: http: https: tauri:; script-src 'self' 'unsafe-eval' 'unsafe-inline' blob: data: filesystem: ws: wss: http: https: tauri:; style-src 'self' 'unsafe-inline' blob: data: filesystem: http: https:; img-src 'self' data: blob: filesystem: http: https:; media-src 'self' blob: data: mediastream:; connect-src 'self' blob: ipc: ws: wss: http: https: http://ipc.localhost"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user