wry
wry copied to clipboard
Fix `getDispayMedia()` `getUserMedia()` permission prompt on macOS
Current Status on macOS 14
-
getUserMedia()
: Show permission prompt for camera and microphone twice (application level and webview level) -
getDispayMedia()
: Normal
but with requestMediaCapturePermissionForOrigin
delegated in wry
-
getUserMedia()
: Normal -
getDispayMedia()
: Permission denied due to not showing picker for a display device (SCContentSharingPicker
)
A possible fix for now is delegating both requestMediaCapturePermissionForOrigin
and requestDisplayCapturePermissionForOrigin
. But when we are calling getDispayMedia()
, it can choose a screen only.
Upstream tracking: https://bugs.webkit.org/show_bug.cgi?id=271688
Workaround PR: https://github.com/tauri-apps/wry/pull/1196
--- outdated ---
The media permission prompt was suppressed when macOS 14.0 introduced
Issue: https://github.com/tauri-apps/wry/issues/1101, https://github.com/tauri-apps/tauri/issues/2600 PR: https://github.com/tauri-apps/wry/pull/1111
note: #1111 brings a regression issue: https://github.com/tauri-apps/tauri/issues/9178
After an OS update, which could be 14.2 (not sure), the original issue was solved by Apple, so we revert the fix:
Issue: https://github.com/tauri-apps/tauri/issues/8979 PR: https://github.com/tauri-apps/wry/pull/1186
We need to find the affected OS version (14.0 ~ 14.x.x) and apply the version check like https://github.com/tauri-apps/wry/pull/1111
TODO
- [ ] Do version check for macOS 14.0 (#1196)
- [ ] Find the affected macOS version range