title: AVPlayerViewController will not dismiss when Notification called
body: <h1>My Code:</h1>
  
  <pre><code>    NSURL *videoURL = [NSURL URLWithString:strVideo];
  
      playerController = [[AVPlayerViewController alloc]init];
  
      playerController.player = [AVPlayer playerWithURL:videoURL];
  
  
      playerController.view.frame = self.view.frame;
  
      playerController.player.currentItem.forwardPlaybackEndTime = CMTimeMake(timeDuration, 1);
  
      [playerController.player play];
  
  
      playerController.player.actionAtItemEnd = AVPlayerActionAtItemEndNone;
  
  
      [self presentViewController:playerController animated:YES completion:nil];
  
      [[NSNotificationCenter defaultCenter] addObserver:self
                                               selector:@selector(playerItemDidReachEnd:)
                                                   name:AVPlayerItemDidPlayToEndTimeNotification
                                                 object:[playerController.player currentItem]];
  
  
   - (void)playerItemDidReachEnd:(NSNotification *)notification
   {
  
      [playerController dismissViewControllerAnimated:YES completion:nil];
  
  
      NSLog(@"IT REACHED THE END");
  
    }
  </code></pre>
  
  <p>here the <code>playerItemDidReachEnd</code> is called but <code>avplayercontroller</code> not dismiss.</p>