title: Play 2 videos from url one after another
body: <p>In my application i want to play 2 url videos one after another.</p>
  
  <p>This is my code:</p>
  
  <p>`- (void)viewDidLoad {</p>
  
  <pre><code>NSLog(@"viewDidLoad");
  player = [[MPMoviePlayerController alloc] initWithContentURL:[self movieURL]];
  
  [NSNotificationCenter defaultCenter]addObserver:self 
                                          selector:@selector(movieFinishedCallback:)
                                              name:MPMoviePlayerPlaybackDidFinishNotification
                                            object:player];
  [player play];
  </code></pre>
  
  <p>[super vieDidLoad];
  }</p>
  
  <pre><code>- (NSURL *)movieURL {
  
  return [NSURL URLWithString: @"https://s3.amazonaws.com/adplayer/colgate.mp4"];//First video url after this video complete.I want to play the next url video.
  </code></pre>
  
  <p>}</p>
  
  <pre><code>- (void) movieFinishedCallback:(NSNotification*) aNotification {
  
  NSLog(@"movieFinishedCallback");
  player = [aNotification object];
  [[NSNotificationCenter defaultCenter] 
   removeObserver:self
   name:MPMoviePlayerPlaybackDidFinishNotification
   object:player];    
  [player autorelease];   
  </code></pre>
  
  <p>}</p>
  
  <p>`</p>
  
  <p>After one url video completed i want to play the next url video.</p>
  
  <p>please anyone help me.</p>
  
  <p>I have store the url's in array like this,</p>
  
  <pre><code>array=[[NSArray alloc] initWithObjects:@"https://s3.amazonaws.com/adplayer/colgate.mp4",@"https://s3.amazonaws.com/ventuno-platform-flv-sep2010/happy_family.mp4",nil];
  </code></pre>
  
  <p>Then how can i retrive the url in - (void) movieFinishedCallback:(NSNotification*) aNotification {</p>
  
  <p>}method.please give me guidance in this.</p>