Show ios webview open LarkSR Web client.
Links:
// create config
WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
// request, makesure play video inline mode.
config.allowsInlineMediaPlayback = YES;
// requst, auto play video
config.requiresUserActionForMediaPlayback = NO;
config.mediaTypesRequiringUserActionForPlayback = NO;
LarkSR support HTTPS, but if a self-signed certificate load failed, can igonre certificate verification
Setup WKNavigationDelegate
// Ignore certificate verification
-(void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler{
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
NSURLCredential *card = [[NSURLCredential alloc]initWithTrust:challenge.protectionSpace.serverTrust];
completionHandler(NSURLSessionAuthChallengeUseCredential,card);
}
}