diff --git a/YTLitePlus.h b/YTLitePlus.h index 41c1562..cc7bb43 100644 --- a/YTLitePlus.h +++ b/YTLitePlus.h @@ -154,6 +154,10 @@ typedef NS_ENUM(NSUInteger, GestureSection) { @end // Player Gestures - @bhackel +@interface YTFineScrubberFilmstripView : UIView +@end +@interface YTFineScrubberFilmstripCollectionView : UICollectionView +@end @interface YTPlayerViewController (YTLitePlus) @property (nonatomic, retain) UIPanGestureRecognizer *YTLitePlusPanGesture; - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer; @@ -174,10 +178,10 @@ typedef NS_ENUM(NSUInteger, GestureSection) { @end @interface YTInlinePlayerBarContainerView (YTLitePlus) @property UIPanGestureRecognizer *scrubGestureRecognizer; +@property (nonatomic, strong, readwrite) YTFineScrubberFilmstripView *fineScrubberFilmstrip; - (CGFloat)scrubXForScrubRange:(CGFloat)scrubRange; @end - // Hide Collapse Button - @arichornlover @interface YTMainAppControlsOverlayView (YTLitePlus) @property (nonatomic, assign, readwrite) YTQTMButton *watchCollapseButton; diff --git a/YTLitePlus.xm b/YTLitePlus.xm index bb6c372..57ff99b 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -977,6 +977,16 @@ BOOL isTabSelected = NO; if (otherGestureRecognizer == playerBar.scrubGestureRecognizer) { return NO; } + // Do not allow this gesture to activate with the fine scrubber gesture + YTFineScrubberFilmstripView *fineScrubberFilmstrip = playerBar.fineScrubberFilmstrip; + if (!fineScrubberFilmstrip) { + return YES; + } + YTFineScrubberFilmstripCollectionView *filmstripCollectionView = [fineScrubberFilmstrip valueForKey:@"_filmstripCollectionView"]; + if (filmstripCollectionView && otherGestureRecognizer == filmstripCollectionView.panGestureRecognizer) { + return NO; + } + } return YES; }