mirror of
https://github.com/YTLitePlus/YTLitePlus.git
synced 2026-01-11 22:40:20 +00:00
Switch gesture placement location
This commit is contained in:
parent
b9edf2bccd
commit
0d3dfbe2c7
2 changed files with 15 additions and 5 deletions
13
YTLitePlus.h
13
YTLitePlus.h
|
|
@ -49,6 +49,7 @@
|
|||
#import "Tweaks/YouTubeHeader/YTPageStyleController.h"
|
||||
#import "Tweaks/YouTubeHeader/YTRightNavigationButtons.h"
|
||||
#import "Tweaks/YouTubeHeader/YTInlinePlayerBarView.h"
|
||||
#import "Tweaks/YouTubeHeader/YTMainAppVideoPlayerOverlayView.h"
|
||||
|
||||
#define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil]
|
||||
#define YT_BUNDLE_ID @"com.google.ios.youtube"
|
||||
|
|
@ -165,7 +166,7 @@ typedef NS_ENUM(NSUInteger, GestureSection) {
|
|||
@end
|
||||
@interface YTFineScrubberFilmstripCollectionView : UICollectionView
|
||||
@end
|
||||
@interface YTPlayerViewController (YTLitePlus) <UIGestureRecognizerDelegate>
|
||||
@interface YTPlayerViewController (YTLitePlusGestures) <UIGestureRecognizerDelegate>
|
||||
@property (nonatomic, retain) UIPanGestureRecognizer *YTLitePlusPanGesture;
|
||||
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer;
|
||||
@end
|
||||
|
|
@ -174,16 +175,20 @@ typedef NS_ENUM(NSUInteger, GestureSection) {
|
|||
@interface MPVolumeController : NSObject
|
||||
@property (nonatomic, assign, readwrite) float volumeValue;
|
||||
@end
|
||||
@interface YTPlayerBarController (YTLitePlus)
|
||||
@interface YTPlayerBarController (YTLitePlusGestures)
|
||||
- (void)didScrub:(UIPanGestureRecognizer *)gestureRecognizer;
|
||||
- (void)startScrubbing;
|
||||
- (void)didScrubToPoint:(CGPoint)point;
|
||||
- (void)endScrubbingForSeekSource:(int)seekSource;
|
||||
@end
|
||||
@interface YTMainAppVideoPlayerOverlayViewController (YTLitePlus)
|
||||
@interface YTMainAppVideoPlayerOverlayViewController (YTLitePlusGestures)
|
||||
@property (nonatomic, strong, readwrite) YTPlayerBarController *playerBarController;
|
||||
@property YTMainAppVideoPlayerOverlayView *videoPlayerOverlayView;
|
||||
@end
|
||||
@interface YTInlinePlayerBarContainerView (YTLitePlus)
|
||||
@interface YTMainAppVideoPlayerOverlayView (YTLitePlusGestures)
|
||||
@property YTMainAppControlsOverlayView *controlsOverlayView;
|
||||
@end
|
||||
@interface YTInlinePlayerBarContainerView (YTLitePlusGestures)
|
||||
@property UIPanGestureRecognizer *scrubGestureRecognizer;
|
||||
@property (nonatomic, strong, readwrite) YTFineScrubberFilmstripView *fineScrubberFilmstrip;
|
||||
- (CGFloat)scrubXForScrubRange:(CGFloat)scrubRange;
|
||||
|
|
|
|||
|
|
@ -712,7 +712,12 @@ BOOL isTabSelected = NO;
|
|||
playerViewController.YTLitePlusPanGesture = [[UIPanGestureRecognizer alloc] initWithTarget:playerViewController
|
||||
action:@selector(YTLitePlusHandlePanGesture:)];
|
||||
playerViewController.YTLitePlusPanGesture.delegate = playerViewController;
|
||||
[playerViewController.playerView addGestureRecognizer:playerViewController.YTLitePlusPanGesture];
|
||||
// Place the gesture on the Main App Controls Overlay View, which scales with the video player
|
||||
// when, for instance, opening the Live Chat side panel in fullscreen
|
||||
YTMainAppVideoPlayerOverlayViewController *mainVideoPlayerController = (YTMainAppVideoPlayerOverlayViewController *)playerViewController.childViewControllers.firstObject;
|
||||
YTMainAppVideoPlayerOverlayView *mainVideoPlayerView = mainVideoPlayerController.videoPlayerOverlayView;
|
||||
YTMainAppControlsOverlayView *controlsOverlayView = mainVideoPlayerView.controlsOverlayView;
|
||||
[controlsOverlayView addGestureRecognizer:playerViewController.YTLitePlusPanGesture];
|
||||
}
|
||||
}
|
||||
%orig;
|
||||
|
|
|
|||
Loading…
Reference in a new issue