wkwebview

Can WKWebView play fairplay/drm protected videos?

半世苍凉 提交于 2021-02-11 08:26:19
问题 I want to play fairplay videos / DRM protected videos in WKWebView but couldn't find any solution except for playing them in AVPlayer or in SFSafariViewControler . Is there any way to do so or if not, is there any confirmation from Apple that WKWebView can't play those videos? 回答1: There was a bug fix to enable EME on WKWebView so it should be working now - https://bugs.webkit.org/show_bug.cgi?id=197964 来源: https://stackoverflow.com/questions/55896995/can-wkwebview-play-fairplay-drm-protected

Can WKWebView play fairplay/drm protected videos?

你说的曾经没有我的故事 提交于 2021-02-11 08:20:57
问题 I want to play fairplay videos / DRM protected videos in WKWebView but couldn't find any solution except for playing them in AVPlayer or in SFSafariViewControler . Is there any way to do so or if not, is there any confirmation from Apple that WKWebView can't play those videos? 回答1: There was a bug fix to enable EME on WKWebView so it should be working now - https://bugs.webkit.org/show_bug.cgi?id=197964 来源: https://stackoverflow.com/questions/55896995/can-wkwebview-play-fairplay-drm-protected

Can WKWebView play fairplay/drm protected videos?

老子叫甜甜 提交于 2021-02-11 08:20:47
问题 I want to play fairplay videos / DRM protected videos in WKWebView but couldn't find any solution except for playing them in AVPlayer or in SFSafariViewControler . Is there any way to do so or if not, is there any confirmation from Apple that WKWebView can't play those videos? 回答1: There was a bug fix to enable EME on WKWebView so it should be working now - https://bugs.webkit.org/show_bug.cgi?id=197964 来源: https://stackoverflow.com/questions/55896995/can-wkwebview-play-fairplay-drm-protected

How to use WkWebView additem to backforwardList

◇◆丶佛笑我妖孽 提交于 2021-02-10 05:33:09
问题 Im trying to add a url to the back forward list of my WkWebView but I can't seem to find how it can be done. Apple doc shows this link WebBackForwardList and I've tried importing WebKit.h but I can't find the method to add the item: - (void)addItem:(WebHistoryItem *)item Can anyone point me in the right direction? Thanks! 回答1: BackForwardList of a WKWebView class is a readonly property and you shouldn't alter it by yourself. Items will be added to (and removed from) this list as the user will

How to Create Two WkWebView

旧城冷巷雨未停 提交于 2021-02-08 12:14:25
问题 I am trying to create an iPhone app with two WKWebView, one for a header and one for a container. How can I create them? I can't find any utility in Xcode/Interface Builder to create WKWebview instances. I can create a WebView which is of type UIWebView, but I can't call WkWebView methods on it and I can't conversion it to a WKWebview. 回答1: var item = WKWebView() item.frame = CGRectMake(0, 0, self.view.bounds.width, 200.) self.view.addSubview(item) item = WKWebView() item.frame = CGRectMake(0

Call a swift function from java script that returns a value using wk webview

五迷三道 提交于 2021-02-08 07:42:35
问题 I want to call a swift function from java script code which returns the device id back to the script, I had added the code that use currently. Please advise how to return the value back to the java script from the swift function, Thanks in advance Code Snippet : super.viewDidLoad() { self.webView = WKWebView() let preferences = WKPreferences() preferences.javaScriptEnabled = true let configuration = WKWebViewConfiguration() configuration.preferences = preferences configuration

iOS9 WKWebview didReceiveAuthenticationChallenge called with host null

风格不统一 提交于 2021-02-08 06:33:14
问题 I am using WKWebview (iOS 9) to load https://self-signed.badssl.com/ While as a delegate didReceiveAuthenticationChallenge is getting called, I'm receiving incomplete protectionSpace details e.g. host is null & authenticationMethod is NSURLAuthenticationMethodDefault (it should be NSURLAuthenticationMethodServerTrust ) po challenge.protectionSpace <NSURLProtectionSpace: 0x7ff30c40fb90>: Host:(null), Server:http, Auth-Scheme:NSURLAuthenticationMethodDefault, Realm:(null), Port:0, Proxy:NO,

iOS9 WKWebview didReceiveAuthenticationChallenge called with host null

不打扰是莪最后的温柔 提交于 2021-02-08 06:33:10
问题 I am using WKWebview (iOS 9) to load https://self-signed.badssl.com/ While as a delegate didReceiveAuthenticationChallenge is getting called, I'm receiving incomplete protectionSpace details e.g. host is null & authenticationMethod is NSURLAuthenticationMethodDefault (it should be NSURLAuthenticationMethodServerTrust ) po challenge.protectionSpace <NSURLProtectionSpace: 0x7ff30c40fb90>: Host:(null), Server:http, Auth-Scheme:NSURLAuthenticationMethodDefault, Realm:(null), Port:0, Proxy:NO,

How do I get WKWebView.evaluateJavaScript to return data in a function call

拜拜、爱过 提交于 2021-02-07 19:51:02
问题 I'm working on some WKWebView parsing routines. I'm trying to validate that I've navigated to a page properly by checking it's document.title. I wrote a function to do this work, but I can't seem to figure out how to return the HTML data from the function or do the evaluation in the function and return a BOOL. I know I'm doing an async call here, but not sure how to wait for that call to end and feed the response back from my function call. Here is my function: func checkTitle (forWebView

How do I get WKWebView.evaluateJavaScript to return data in a function call

前提是你 提交于 2021-02-07 19:50:05
问题 I'm working on some WKWebView parsing routines. I'm trying to validate that I've navigated to a page properly by checking it's document.title. I wrote a function to do this work, but I can't seem to figure out how to return the HTML data from the function or do the evaluation in the function and return a BOOL. I know I'm doing an async call here, but not sure how to wait for that call to end and feed the response back from my function call. Here is my function: func checkTitle (forWebView