Question

I have an app that displays the live feed from an ip camera using the following code

NSString * camera=@"http://admin:********@192.168.1.80/video.cgi/";

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

[webView loadHTMLString:html baseURL:nil];

After testing on my device I have realized that this code does not display the feed from the camera unless the device is connected to the same wireless network that the camera is, or in other words using the same ip address. How can I allow access to the camera feed to a device connected to any network?

Was it helpful?

Solution

I think your camera feed is coming from a locally hosted server. That's why you can only access it when you are in the same network. If you want to access it globally, then you must host it in a web server instead a local server, then access the feed using that address.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top