Commit 8c9168b5 authored by Michael Crumm's avatar Michael Crumm Committed by Matt Apperson
Browse files

Fixes bug when pausing in fullscreen (iOS) (#325)

Similar to #153, attempts to pause in fullscreen mode will be negated by the `playbackLikelyToKeepUp` event.

This PR adds a check for `_fullscreenPlayerPresented`, in additional to `_controls` before calling `setPaused` for `playbackLikelytoKeepUp`.

This update is likely preferrable to #258, as it doesn't lose the empty buffer check.
parent 7075e30a
Loading
Loading
Loading
Loading
+1 −1
Changes for RCTVideo.m: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -363,7 +363,7 @@ static NSString *const playbackRate = @"rate";
      _playerBufferEmpty = YES;
    } else if ([keyPath isEqualToString:playbackLikelyToKeepUpKeyPath]) {
      // Continue playing (or not if paused) after being paused due to hitting an unbuffered zone.
      if ((!_controls || _playerBufferEmpty) && _playerItem.playbackLikelyToKeepUp) {
      if ((!(_controls || _fullscreenPlayerPresented) || _playerBufferEmpty) && _playerItem.playbackLikelyToKeepUp) {
        [self setPaused:_paused];
      }
      _playerBufferEmpty = NO;