Commit 7140fb75 authored by Felix Paul Kühne's avatar Felix Paul Kühne

mini player: fix black vout when app becomes active again (close #14795)

(cherry picked from commit b2e32188)
parent d4d2b2c2
......@@ -14,6 +14,7 @@
#import "VLCPlaybackController.h"
#import "VLCAppDelegate.h"
#import "VLCPlaylistViewController.h"
#import "VLCPlayerDisplayController.h"
@interface VLCMiniPlaybackView () <VLCPlaybackControllerDelegate, UIGestureRecognizerDelegate>
{
......@@ -33,6 +34,11 @@
@implementation VLCMiniPlaybackView
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (instancetype)initWithFrame:(CGRect)viewFrame
{
self = [super initWithFrame:viewFrame];
......@@ -105,9 +111,23 @@
[_artworkView addGestureRecognizer:_artworkTapRecognizer];
_artworkView.userInteractionEnabled = YES;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(appBecameActive:)
name:UIApplicationDidBecomeActiveNotification
object:nil];
return self;
}
- (void)appBecameActive:(NSNotification *)aNotification
{
VLCPlayerDisplayController *pdc = [(VLCAppDelegate *)[UIApplication sharedApplication].delegate playerDisplayController];
if (pdc.displayMode == VLCPlayerDisplayControllerDisplayModeMiniplayer) {
VLCPlaybackController *vpc = self.playbackController;
[vpc recoverDisplayedMetadata];
}
}
- (void)tapRecognized
{
[self pushFullPlaybackView: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