ソースを参照

fix mini player not displaying, if it is use by default.

Pierre SAGASPE 7 年 前
コミット
4fc556a73b

+ 1 - 0
Sources/VLCPlaybackController.h

@@ -58,6 +58,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
 
 @property (nonatomic, readonly) NSInteger mediaDuration;
 @property (nonatomic, readonly) BOOL isPlaying;
+@property (nonatomic, readonly) BOOL willPlay;
 @property (nonatomic, readwrite) VLCRepeatMode repeatMode;
 @property (nonatomic, assign, getter=isShuffleMode) BOOL shuffleMode;
 @property (nonatomic, readwrite) float playbackRate; // default = 1.0

+ 5 - 0
Sources/VLCPlaybackController.m

@@ -435,6 +435,11 @@ VLCMediaDelegate, VLCRemoteControlServiceDelegate>
     return _mediaPlayer.isPlaying;
 }
 
+- (BOOL)willPlay
+{
+    return _mediaPlayer.willPlay;
+}
+
 - (VLCRepeatMode)repeatMode
 {
     return _listPlayer.repeatMode;

+ 1 - 1
Sources/VLCPlayerDisplayController.m

@@ -289,7 +289,7 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis
     VLCPlaybackController *playbackController = [VLCPlaybackController sharedInstance];
     UIView<VLCPlaybackControllerDelegate, VLCMiniPlaybackViewInterface> *miniPlaybackView = self.miniPlaybackView;
     const NSTimeInterval animationDuration = 0.25;
-    const BOOL activePlaybackSession = playbackController.isPlaying;
+    const BOOL activePlaybackSession = playbackController.isPlaying || playbackController.willPlay;
     const BOOL miniPlayerVisible = miniPlaybackView.visible;
 
     const CGRect viewRect = self.view.bounds;