Browse Source

clean up now playing info center and unsubscribe from remote commands in stopPlayback the internal payers are being cleaned up and remote commands would therefore be executed on nil, thats why we don't want to receive them any longer

Tobias Conradi 10 years ago
parent
commit
4cca7d6422
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Sources/VLCPlaybackController.m

+ 3 - 0
Sources/VLCPlaybackController.m

@@ -384,6 +384,9 @@
 
     if ([self.delegate respondsToSelector:@selector(presentingViewControllerShouldBeClosed:)])
         [self.delegate presentingViewControllerShouldBeClosed:self];
+
+	[MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo = nil;
+	[self unsubscribeFromRemoteCommand];
 }
 
 - (void)_savePlaybackState