Selaa lähdekoodia

ATV fullscreen playback: prevent corner-case which was lead to a black screen instead of video

(cherry picked from commit a7af6cd13108d9ccf0e635f443d53724a3efe230)
Felix Paul Kühne 9 vuotta sitten
vanhempi
commit
846398a54e
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      Apple-TV/Playback/VLCFullscreenMovieTVViewController.m

+ 5 - 0
Apple-TV/Playback/VLCFullscreenMovieTVViewController.m

@@ -684,6 +684,11 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     [self updateActivityIndicatorForState:currentState];
 
     if (controller.isPlaying) {
+        // we sometimes don't set the vout correctly if playback stops and restarts without dismising and redisplaying the VC
+        // hence, manually reset the vout container here if it doesn't have sufficient children
+        if (self.movieView.subviews.count < 2) {
+            controller.videoOutputView = self.movieView;
+        }
         [self hidePlaybackControlsIfNeededAfterDelay];
     } else {
         [self showPlaybackControlsIfNeededForUserInteraction];