Skip to content

Commit

Permalink
Always allow media capture in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
zacwest committed Sep 21, 2021
1 parent 7fa095f commit 1025435
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Sources/App/WebView/WebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,19 @@ class WebViewController: UIViewController, WKNavigationDelegate, WKUIDelegate, U
}
}

#if compiler(>=5.5) && !targetEnvironment(macCatalyst)
@available(iOS 15, *)
func webView(
_ webView: WKWebView,
requestMediaCapturePermissionFor origin: WKSecurityOrigin,
initiatedByFrame frame: WKFrameInfo,
type: WKMediaCaptureType,
decisionHandler: @escaping (WKPermissionDecision) -> Void
) {
decisionHandler(.grant)
}
#endif

@objc private func connectionInfoDidChange() {
DispatchQueue.main.async { [self] in
loadActiveURLIfNeeded()
Expand Down

0 comments on commit 1025435

Please sign in to comment.