Browse Source

correctly close playback view prior to re-starting it

Felix Paul Kühne 10 years ago
parent
commit
9501fbbffc
3 changed files with 9 additions and 0 deletions
  1. 2 0
      Sources/VLCAppDelegate.m
  2. 1 0
      Sources/VLCMovieViewController.h
  3. 6 0
      Sources/VLCMovieViewController.m

+ 2 - 0
Sources/VLCAppDelegate.m

@@ -502,6 +502,8 @@
 {
     if (!_movieViewController)
         _movieViewController = [[VLCMovieViewController alloc] initWithNibName:nil bundle:nil];
+    else
+        [_movieViewController unanimatedPlaybackStop];
 
     if ([mediaObject isKindOfClass:[MLFile class]])
         _movieViewController.fileFromMediaLibrary = (MLFile *)mediaObject;

+ 1 - 0
Sources/VLCMovieViewController.h

@@ -93,6 +93,7 @@
 @property (nonatomic, readwrite) int itemInMediaListToBePlayedFirst;
 
 - (IBAction)closePlayback:(id)sender;
+- (void)unanimatedPlaybackStop;
 
 - (IBAction)positionSliderAction:(id)sender;
 - (IBAction)positionSliderTouchDown:(id)sender;

+ 6 - 0
Sources/VLCMovieViewController.m

@@ -1270,6 +1270,12 @@ static inline NSArray * RemoteCommandCenterCommandsToHandle(MPRemoteCommandCente
     }];
 }
 
+- (void)unanimatedPlaybackStop
+{
+    [self _stopPlayback];
+    [self.navigationController dismissViewControllerAnimated:NO completion:nil];
+}
+
 - (IBAction)positionSliderAction:(UISlider *)sender
 {
     LOCKCHECK;