Explorar el Código

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 hace 9 años
padre
commit
846398a54e
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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];