您好,我在我的网站上流式传输 ip 摄像机,并将我的网站嵌入到 UIWebview 上,在 IOS 5 上工作正常,但当我在 IOS 6 上打开我的应用程序时,仅显示图像而不是视频。
在我的网站上我使用<iframe width="640" height="480" src="http://112.214.96.41:87/videostream.cgi?user=user&pwd=" frameborder="0"></iframe>
请有人帮助我,还有其他方法吗?
如果你想在 UIWebView 中显示 IP 摄像头,你可以这样做:
(假设 webView 是 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];
其中stream是正确的url,具体取决于您相机的型号。
它适用于 iOs 5 和 iOs 6。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)