提问人:user1114881 提问时间:1/27/2021 最后编辑:koenuser1114881 更新时间:1/27/2021 访问量:1597
为什么我得到webPageProxy无法加载
why do i get webPageProxy failed to load
问:
我有一个应用程序,它加载了一个 webView,该视图显示来自我家中摄像头的视频流。我打开了端口转发,一切正常。但是,在查看我的日志时,我得到以下内容:
2021-01-25 13:41:08.712156-0700 iphoneMQTT[45891:2000494] [Loading] 0x14281ce18 - [pageProxyID=6, webPageID=7, PID=45892] WebPageProxy::didFailLoadForFrame: frameID = 3, domain = NSURLErrorDomain, code = -1005
这是我拥有的代码:
-(void)viewDidLoad {
if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
self.webView = [[WKWebView alloc] initWithFrame:CGRectMake(self.view.center.x-(self.view.frame.size.width/2),self.view.center.y-((self.view.frame.size.width*.5)/2), self.view.frame.size.width, self.view.frame.size.width*.7) configuration:theConfiguration];
}
else if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad){
self.webView = [[WKWebView alloc] initWithFrame:CGRectMake(self.view.center.x-(600/2),self.view.center.y-(420/2), 600, 420) configuration:theConfiguration];
}
_webView.contentMode = UIViewContentModeScaleToFill;
_webView.backgroundColor = [UIColor blackColor];
nsurl=[NSURL URLWithString:http];//@"http://70.176.81.136:81/CFC878/1"];
nsrequest=[NSURLRequest requestWithURL:nsurl];
[_webView loadRequest:nsrequest];
}
然后,我显示流并将其删除。
-(IBAction)showVideo:(id)sender;{
[self.view insertSubview:self.webView atIndex:12];
self.novideo.hidden = NO;
self.novideo.enabled = YES;
}
-(IBAction)stopVideo:(id)sender;{
[self.webView removeFromSuperview];
self.novideo.hidden = YES;
self.novideo.enabled = NO;
}
这是一个问题吗?
答: 暂无答案
评论