Commit 1d69074f authored by Felix Paul Kühne's avatar Felix Paul Kühne

playback screen: make sure to show correct state on appearance

parent 9a7dd856
......@@ -35,4 +35,4 @@ SPEC CHECKSUMS:
SSKeychain: 88767e903ee8d274ed380e364d96b7a101235286
upnpx: e56e4f26d21c439b2383e03b5ca9082a3d5046a1
COCOAPODS: 0.36.4
COCOAPODS: 0.37.0
......@@ -414,6 +414,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
vpc.videoOutputView = self.movieView;
vpc.delegate = self;
[vpc recoverPlaybackState];
[self setControlsHidden:NO animated:YES];
}
......@@ -422,7 +423,9 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
{
[super viewDidAppear:animated];
_viewAppeared = YES;
[[VLCPlaybackController sharedInstance] recoverDisplayedMetadata];
VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
[vpc recoverDisplayedMetadata];
}
- (void)viewWillLayoutSubviews
......
......@@ -78,6 +78,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
- (void)switchAspectRatio;
- (void)recoverDisplayedMetadata;
- (void)recoverPlaybackState;
- (void)setNeedsMetadataUpdate;
......
......@@ -863,6 +863,16 @@ setstuff:
audioOnly:_mediaIsAudioOnly];
}
- (void)recoverPlaybackState
{
if ([self.delegate respondsToSelector:@selector(mediaPlayerStateChanged:isPlaying:currentMediaHasTrackToChooseFrom:currentMediaHasChapters:forPlaybackController:)])
[self.delegate mediaPlayerStateChanged:_mediaPlayer.state
isPlaying:self.isPlaying
currentMediaHasTrackToChooseFrom:self.currentMediaHasTrackToChooseFrom
currentMediaHasChapters:self.currentMediaHasChapters
forPlaybackController:self];
}
#pragma mark - remote events
static inline NSArray * RemoteCommandCenterCommandsToHandle(MPRemoteCommandCenter *cc)
......
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