IP camera stream with UIWebview works on IOS 5 but not on IOS 6

爷,独闯天下 提交于 2019-11-30 09:51:07

If you want to display an IP Camera inside a UIWebView, you can do this for example : (supposing the webView is an outlet to your UIWebView)

NSString * stream = @"http://login:password@ip:port/stream/"


NSString * html = [NSString stringWithFormat:@"<img name=\"Cam\" src=\"%@\" width=\"100%%\" height=\"100%%\" alt=\"Live Feed\" style=\"background-color: #000000\" />", stream];

[webView loadHTMLString:html baseURL:nil];

Where stream is the correct url, depending on the model of your camera.

It works on iOs5 and iOs6.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!