Commit 9e1b1b7b authored by Felix Paul Kühne's avatar Felix Paul Kühne

ATV fullscreen playback: fix logic error preventing closing the VC once playback stops

(cherry picked from commit 38270e3c)
parent 1fd4f74b
......@@ -59,9 +59,13 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center addObserver:self
selector:@selector(playbackDidStop:)
selector:@selector(playbackDidStop)
name:VLCPlaybackControllerPlaybackDidStop
object:nil];
[center addObserver:self
selector:@selector(playbackDidStop)
name:VLCPlaybackControllerPlaybackDidFail
object:nil];
_movieView.userInteractionEnabled = NO;
......@@ -154,8 +158,6 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
[vpc recoverDisplayedMetadata];
vpc.videoOutputView = nil;
vpc.videoOutputView = self.movieView;
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)viewWillDisappear:(BOOL)animated
......@@ -177,6 +179,7 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
[fileManager removeItemAtPath:tempSubsDirPath error:nil];
[super viewWillDisappear:animated];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (BOOL)canBecomeFirstResponder
......@@ -666,7 +669,7 @@ static const NSInteger VLCJumpInterval = 10000; // 10 seconds
self.audioView.hidden = YES;
}
- (void)playbackDidStop:(NSNotification *)aNotification
- (void)playbackDidStop
{
[self dismissViewControllerAnimated:YES completion:nil];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment