title: How to get MPMoviePlayerViewController current Playing time?
body: <p>I want to get current video playing time, not total duration.</p>
  
  <p>My code is </p>
  
  <pre><code>[[NSNotificationCenter defaultCenter] addObserver:self
                                               selector:@selector(MPMoviePlayerLoadStateDidChange:)
                                                   name:MPMoviePlayerLoadStateDidChangeNotification
                                                 object:nil];
  
  - (void)MPMoviePlayerLoadStateDidChange:(NSNotification *)notification {
      if ((self.moviePlayer.loadState &amp; MPMovieLoadStatePlaythroughOK) == MPMovieLoadStatePlaythroughOK) {
          NSLog(@"content play length is %g seconds", self.moviePlayer.duration);
  //        self.lblVideoDuration.text = [NSString stringWithFormat:@"%@", self.moviePlayer.duration];
      }
  }
  </code></pre>
  
  <p>but above will give me total duration, but i don't want total duration.</p>
  
  <p>if my Video duration is 1 minute and currently it play around 30 seconds, i want that live playback timing.</p>
  
  <p>how can i get that?</p>
  
  <p>I am able get Video Playback timing by start timer like this.</p>
  
  <pre><code>- (void)MPMoviePlayerLoadStateDidChange:(NSNotification *)notification {
      if (self.moviePlayer.playbackState == MPMoviePlaybackStatePlaying) {
          [self.activityIndicator stopAnimating];
          [self.activityIndicator removeFromSuperview];
          [self startDurationTimer];
      }
  }
  
  - (void)startDurationTimer {
      self.durationTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(monitorMoviePlayback) userInfo:nil repeats:YES];
  }
  
  - (void)stopDurationTimer {
      dispatch_async(dispatch_get_main_queue(), ^{
          [self.durationTimer invalidate];
          self.durationTimer = nil;
      });
  }
  
  - (void)monitorMoviePlayback {
      double currentTime = floor(self.moviePlayer.currentPlaybackTime);
      double totalTime = floor(self.moviePlayer.duration);
      double minutesElapsed = floor(currentTime / 60.0);
      double secondsElapsed = fmod(currentTime, 60.0);
  
      NSLog(@"Minute = %f &amp;&amp; Second = %f", minutesElapsed, secondsElapsed);
      }
  }
  </code></pre>
  
  <p>but when i call stoptimer method , Timer is not invalidating or not stopped.</p>
  
  <p>how can i invalidate Timer?</p>