Commit bee8fcfc authored by Felix Paul Kühne's avatar Felix Paul Kühne

mini playback view: fix VPC lookup

parent 9665512b
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
UITapGestureRecognizer *_labelTapRecognizer; UITapGestureRecognizer *_labelTapRecognizer;
UITapGestureRecognizer *_artworkTapRecognizer; UITapGestureRecognizer *_artworkTapRecognizer;
} }
@property (nonatomic, weak) VLCPlaybackController *playbackController;
@end @end
...@@ -139,8 +138,7 @@ ...@@ -139,8 +138,7 @@
{ {
VLCPlayerDisplayController *pdc = [VLCPlayerDisplayController sharedInstance]; VLCPlayerDisplayController *pdc = [VLCPlayerDisplayController sharedInstance];
if (pdc.displayMode == VLCPlayerDisplayControllerDisplayModeMiniplayer) { if (pdc.displayMode == VLCPlayerDisplayControllerDisplayModeMiniplayer) {
VLCPlaybackController *vpc = self.playbackController; [[VLCPlaybackController sharedInstance] recoverDisplayedMetadata];
[vpc recoverDisplayedMetadata];
} }
} }
...@@ -151,12 +149,12 @@ ...@@ -151,12 +149,12 @@
- (void)previousAction:(id)sender - (void)previousAction:(id)sender
{ {
[self.playbackController backward]; [[VLCPlaybackController sharedInstance] backward];
} }
- (void)playPauseAction:(id)sender - (void)playPauseAction:(id)sender
{ {
[self.playbackController playPause]; [[VLCPlaybackController sharedInstance] playPause];
} }
- (void)playPauseLongPress:(UILongPressGestureRecognizer *)recognizer - (void)playPauseLongPress:(UILongPressGestureRecognizer *)recognizer
...@@ -166,7 +164,7 @@ ...@@ -166,7 +164,7 @@
[_playPauseButton setImage:[UIImage imageNamed:@"stopIcon"] forState:UIControlStateNormal]; [_playPauseButton setImage:[UIImage imageNamed:@"stopIcon"] forState:UIControlStateNormal];
break; break;
case UIGestureRecognizerStateEnded: case UIGestureRecognizerStateEnded:
[self.playbackController stopPlayback]; [[VLCPlaybackController sharedInstance] stopPlayback];
break; break;
case UIGestureRecognizerStateCancelled: case UIGestureRecognizerStateCancelled:
case UIGestureRecognizerStateFailed: case UIGestureRecognizerStateFailed:
...@@ -179,7 +177,7 @@ ...@@ -179,7 +177,7 @@
- (void)nextAction:(id)sender - (void)nextAction:(id)sender
{ {
[self.playbackController forward]; [[VLCPlaybackController sharedInstance] forward];
} }
- (void)pushFullPlaybackView:(id)sender - (void)pushFullPlaybackView:(id)sender
...@@ -190,7 +188,7 @@ ...@@ -190,7 +188,7 @@
- (void)updatePlayPauseButton - (void)updatePlayPauseButton
{ {
const BOOL isPlaying = self.playbackController.isPlaying; const BOOL isPlaying = [VLCPlaybackController sharedInstance].isPlaying;
UIImage *playPauseImage = isPlaying ? [UIImage imageNamed:@"pauseIcon"] : [UIImage imageNamed:@"playIcon"]; UIImage *playPauseImage = isPlaying ? [UIImage imageNamed:@"pauseIcon"] : [UIImage imageNamed:@"playIcon"];
[_playPauseButton setImage:playPauseImage forState:UIControlStateNormal]; [_playPauseButton setImage:playPauseImage forState:UIControlStateNormal];
} }
......
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