In the session, regarding prompting user for camera or microphone permission, the delegate method shown in the code snippet is the following:
func webView(_ webView: WKWebView, decideMediaCapturePermissionFor origin: WKSecurityOrigin, initiatedByFrame frame: WKFrameInfo, type: WKMediaCaptureType) async -> WKPermissionDecision {
return type == .microphone ? .prompt : .deny
}
But, I couldn't find this method in the documentation. Instead, I found this:
func webView(_ webView: WKWebView,
requestMediaCapturePermissionFor origin: WKSecurityOrigin, initiatedByFrame frame: WKFrameInfo, type: WKMediaCaptureType, decisionHandler: @escaping (WKPermissionDecision) -> Void)
Which one is the latest? Thanks!