title: IP Camera Streaming on iPad stuck
body: <p>I am getting stream on iPad from an IP camera named Foscam. If I open IP in iPad browser then it is working good but when I fetch stream in my application then it gets on frist screen shot and stuck on it. App is not getting continuous streaming from cam. I am using this way</p>
  
  <pre><code>- (IBAction)powerChanged:(id)sender {
      UISwitch * s = (UISwitch *)sender;
      if( s.on == TRUE){
          [self initializeData];
          if(![deviceClient connect]){
              UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Can not connect to T-Rex device!"
                                                                message:[[NSString alloc] initWithFormat:@"Could not connec to %@ and %d port",deviceClient.host,deviceClient.port] 
                                                               delegate:nil
                                                      cancelButtonTitle:@"OK"
                                                      otherButtonTitles:nil];
                                      [message show];
                                      [s setOn:FALSE animated:TRUE];
          } else {
             [self adjustLayout:TRUE]; 
              [self startFrequencyTimer];
          }
      }else {
          [self stopFrequencyTimer];
          [self adjustLayout:FALSE];
      }
  }
  
  -(void)initializeData {
      [cameraViewFront loadRequest:[NSURLRequest requestWithURL:[frontCameraClient getVideoStreamURL]]];
  }
  -(BOOL)connect {
      if (udpSocket == nil){
          udpSocket = [[GCDAsyncUdpSocket alloc] initWithDelegate:self delegateQueue:dispatch_get_main_queue()];
      }
      NSLog(@"host %@ and port %i", self.host, self.port);
      return [udpSocket connectToHost:self.host onPort:self.port error:nil];
  }
  - (NSURL *) getURL:(NSString *)forPage {
      NSLog(@"front cam IP %@" ,self.host);
      return [[NSURL alloc] initWithString:[[NSString alloc] initWithFormat:@"http://%@/%@user=%@&amp;pwd=%@",self.host,forPage,self.username, self.password]];
  }
  
  -(NSURL *)getVideoStreamURL{
      return [self getURL:@"videostream.cgi?"];
  }
  </code></pre>