Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ios/RNSScreen.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,15 @@ - (void)traverseForScrollView:(UIView *)view
// we don't want to send `scrollViewDidEndDecelerating` event to JS before the JS thread is ready
return;
}

if ([NSStringFromClass([view class]) isEqualToString:@"AVPlayerView"]) {
// Traversing through AVPlayerView is an uncommon edge case that causes the disappearing screen
// to an excessive traversal through all video player elements
// (e.g., for react-native-video, this includes all controls and additional video views).
// Thus, we want to avoid unnecessary traversals through these views.
return;
}

if ([view isKindOfClass:[UIScrollView class]] &&
([[(UIScrollView *)view delegate] respondsToSelector:@selector(scrollViewDidEndDecelerating:)])) {
[[(UIScrollView *)view delegate] scrollViewDidEndDecelerating:(id)view];
Expand Down