Skip to content

fix(tauri): prompt before preview origins capture media #12566

Closed

Description

@tuxpepe1893

The native Tauri preview WKWebView silently grants camera and microphone capture requests from remote pages once the host app has the corresponding macOS TCC permission.

Observed behavior

  1. Grant Zencode microphone or camera access at the app level (for example, microphone access used by dictation).
  2. Open a remote origin in a native preview tab.
  3. Let the page call navigator.mediaDevices.getUserMedia(...).
  4. Wry 0.55.1's WryWebViewUIDelegate::request_media_capture_permission returns WKPermissionDecision::Grant unconditionally, so WebKit does not show an origin-level prompt.

Source evidence: wry-0.55.1/src/wkwebview/class/wry_web_view_ui_delegate.rs, in webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:.

Expected behavior

Each preview origin should receive WebKit's normal origin permission prompt. The preview-specific delegate must preserve Wry's other UI delegate behavior, including file upload panels and new-window handling.

Affected scope

Native macOS Tauri preview tabs using WKWebView. The Electron preview path is not affected by this Wry delegate implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions