We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好,我在设置 webView1.dsuiDelegate = self 之后
H5页面请求录音时 并没有触发 WKUIDelegate 的 func webView(_ webView: WKWebView, requestMediaCapturePermissionFor 方法
于是我将 webView1.uiDelegate = self 之后,requestMediaCapturePermissionFor可以触发,但是所有的桥接功能都失效了
谢谢
The text was updated successfully, but these errors were encountered:
因为DWKWebView已经持有UIDelegate,但是作者暂时没有实现该代理方法,需要在DWKWebView.m中增加该代理的实现,如: - (void)webView:(WKWebView *)webView requestMediaCapturePermissionForOrigin:(WKSecurityOrigin *)origin initiatedByFrame:(WKFrameInfo *)frame type:(WKMediaCaptureType)type decisionHandler:(void (^)(WKPermissionDecision))decisionHandler API_AVAILABLE(ios(15.0)){ if (self.DSUIDelegate && [self.DSUIDelegate respondsToSelector:@selector(webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:)]) { return [self.DSUIDelegate webView:webView requestMediaCapturePermissionForOrigin:origin initiatedByFrame:frame type:type decisionHandler:decisionHandler]; } decisionHandler(WKPermissionDecisionGrant); }
- (void)webView:(WKWebView *)webView requestMediaCapturePermissionForOrigin:(WKSecurityOrigin *)origin initiatedByFrame:(WKFrameInfo *)frame type:(WKMediaCaptureType)type decisionHandler:(void (^)(WKPermissionDecision))decisionHandler API_AVAILABLE(ios(15.0)){ if (self.DSUIDelegate && [self.DSUIDelegate respondsToSelector:@selector(webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:)]) { return [self.DSUIDelegate webView:webView requestMediaCapturePermissionForOrigin:origin initiatedByFrame:frame type:type decisionHandler:decisionHandler]; } decisionHandler(WKPermissionDecisionGrant); }
Sorry, something went wrong.
iOS17 点允许后,前端提示 notAllowed。而直接实现WebView自己的uiDelegate却不会有该问题
No branches or pull requests
你好,我在设置 webView1.dsuiDelegate = self 之后
H5页面请求录音时 并没有触发 WKUIDelegate 的 func webView(_ webView: WKWebView, requestMediaCapturePermissionFor 方法
于是我将 webView1.uiDelegate = self 之后,requestMediaCapturePermissionFor可以触发,但是所有的桥接功能都失效了
谢谢
The text was updated successfully, but these errors were encountered: