title: Having problems while showing videos inside the app via url in ios
body: <p>I am having an app in which I want to show videos from <code>urls</code> inside the app.</p>
  
  <p>I am using <code>MPMoviePlayerViewController</code> for this.</p>
  
  <p>Below is the code I am using but somehow the video is not playing from <code>urls</code>.</p>
  
  <pre><code>NSURL *URL = [NSURL URLWithString:@"http://vimeo.com/81889151"];
  
  
  
  
    playercontroller = [[MPMoviePlayerViewController alloc] init];
  
      [[NSNotificationCenter defaultCenter] addObserver:self
                                               selector:@selector(finishvideo:)
                                                   name:MPMoviePlayerPlaybackDidFinishNotification
                                                 object:nil];
  [playercontroller.moviePlayer setContentURL:URL];
         [self.view addSubview:playercontroller.view];
  </code></pre>
  
  <p>I searched a lot but couldn't find the correct solution for me.</p>
  
  <p>What is wrong with the code above?</p>
  
  <p>Please help me with this.</p>
  
  <p>Any help will be appreciated.</p>
  
  <p>Thanks in advance.</p>