YTLitePlus/YTLitePlus.h
Balackburn 61a90d0712 Squashed commit of the following:
commit 2ece340746
Merge: f652976 ca84635
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Tue Aug 20 00:52:28 2024 -0700

    Merge pull request #358 from bhackel/gestures

    Gestures and Loop

commit ca84635cf4
Merge: 5066716 87d7b57
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Tue Aug 20 00:31:16 2024 -0700

    Merge branch 'main' into gestures

commit 5066716f7f
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Mon Aug 19 23:53:21 2024 -0700

    Localizations for Gestures

commit bed87298f6
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Sun Aug 18 22:25:52 2024 -0700

    Update Submodule

commit 87d7b576dd
Author: GitHub Actions <actions@github.com>
Date:   Tue Aug 20 00:53:21 2024 +0000

    updated submodules

commit f652976a53
Author: GitHub Actions <actions@github.com>
Date:   Tue Aug 20 00:44:56 2024 +0000

    updated submodules

commit 44d6ffe781
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Mon Aug 19 14:08:08 2024 -0700

    Create LICENSE

commit 023fafae15
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Sun Aug 18 18:17:32 2024 -0700

    Added YouLoop submodule to Tweaks/ folder

commit 4c5e2ee0e8
Author: GitHub Actions <actions@github.com>
Date:   Sun Aug 18 00:49:27 2024 +0000

    updated submodules

commit de89f7aca8
Author: GitHub Actions <actions@github.com>
Date:   Sat Aug 17 00:43:19 2024 +0000

    updated submodules

commit 36f9da844b
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 16 09:27:09 2024 -0700

    Add disable option

commit e63bc374cf
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 16 01:13:22 2024 -0700

    Fix defaults and text descriptions

commit 067ad5a373
Merge: b081d5b 6e8bbcb
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 16 01:40:45 2024 -0700

    Merge pull request #345 from bhackel/video-player

    Basic Video player

commit 6e8bbcb49e
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 16 01:01:33 2024 -0700

    Add localization

commit e21e026c30
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 16 00:32:22 2024 -0700

    Fix compile

commit 1647358a9e
Merge: feaaa07 2d82e0b
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 16 00:35:06 2024 -0700

    Merge branch 'main' into video-player

commit feaaa07e9e
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 16 00:33:37 2024 -0700

    Revert "Prototype 2"

    This reverts commit 8f578bb741.

commit f434239419
Merge: e626997 2d82e0b
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 16 00:26:24 2024 -0700

    Merge branch 'main' into gestures

commit e62699749d
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 16 00:25:24 2024 -0700

    Sensitivity and Deadzone settings

commit 4602b74e6f
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Thu Aug 15 23:15:18 2024 -0700

    Add deadzone

commit 6854f91c1e
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Thu Aug 15 10:45:27 2024 -0700

    Implement gesture selection

commit b081d5b52e
Author: GitHub Actions <actions@github.com>
Date:   Fri Aug 16 00:44:28 2024 +0000

    updated submodules

commit 8ed3d97d2d
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Wed Aug 14 23:56:27 2024 -0700

    Gesture refactor for settings

commit e92ada8427
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Wed Aug 14 22:20:36 2024 -0700

    Gesture settings

commit 8f578bb741
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Wed Aug 14 18:28:42 2024 -0700

    Prototype 2

commit 2d82e0b532
Author: GitHub Actions <actions@github.com>
Date:   Thu Aug 15 00:43:33 2024 +0000

    updated submodules

commit b963c807bb
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Wed Aug 14 09:15:43 2024 -0700

    Video player prototype

commit 10882e5d61
Merge: 4ed8e94 76f48a2
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Wed Aug 14 09:00:51 2024 -0700

    Merge branch 'main' into gestures

commit 4ed8e94880
Merge: b588b7f 9aa33a6
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Tue Aug 13 23:41:37 2024 -0700

    Merge branch 'main' into gestures

commit b588b7f6d0
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Tue Aug 13 22:02:23 2024 -0700

    Attempt seek gesture

commit 9aa33a676d
Author: GitHub Actions <actions@github.com>
Date:   Wed Aug 14 00:53:53 2024 +0000

    updated submodules

commit 76f48a2700
Author: GitHub Actions <actions@github.com>
Date:   Wed Aug 14 00:45:08 2024 +0000

    updated submodules

commit 45b7cd948e
Author: schweppes <schweppes0x@gmail.com>
Date:   Wed Aug 14 01:33:23 2024 +0200

    Bulgarian translations (#332)

    Co-authored-by: tonydalov <t.dalov@dictu.nl>

commit 4c24c0c336
Author: gototheskinny <51786709+gototheskinny@users.noreply.github.com>
Date:   Wed Aug 14 02:33:12 2024 +0300

    Turkish loc updated (#336)

commit dd88efc631
Merge: 6e609d5 e067e8d
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Mon Aug 12 23:05:35 2024 -0700

    Merge pull request #331 from bhackel/fix-oled-live-chat

    Fix OLED live chat

commit e067e8dec5
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Mon Aug 12 21:50:33 2024 -0700

    Fix OLED live chat

commit 6e609d56e7
Merge: 916bcf3 11faee3
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Mon Aug 12 22:43:28 2024 -0700

    Merge pull request #330 from bhackel/remove-speed-popup

    Remove speed popup

commit 11faee3f1e
Merge: 82e4f21 916bcf3
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Mon Aug 12 22:42:56 2024 -0700

    Merge branch 'main' into remove-speed-popup

    I used a translator, hopefully it is fine

commit 82e4f21d24
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Mon Aug 12 21:33:53 2024 -0700

    Add Hide Speed Toast

commit 916bcf33ff
Author: GitHub Actions <actions@github.com>
Date:   Tue Aug 13 00:46:14 2024 +0000

    updated submodules

commit 9d0fb16075
Author: Victor Alves <victoralves05@gmail.com>
Date:   Mon Aug 12 17:12:18 2024 -0300

    Update Portuguese localization (#326)

    * Update Portuguese Localization

commit 21df218f2f
Author: Balackburn <93828569+Balackburn@users.noreply.github.com>
Date:   Mon Aug 12 10:42:23 2024 +0200

    Updated Credits

commit f384a00e04
Author: GitHub Actions <actions@github.com>
Date:   Mon Aug 12 00:46:59 2024 +0000

    updated submodules

commit 10a536880b
Merge: 818005d 08c263f
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Sat Aug 10 05:28:47 2024 -0700

    Merge pull request #320 from bhackel/hud-and-collapse

    Copy Hide HUD and Hide Collapse Button

commit 08c263fdf0
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Sat Aug 10 04:07:47 2024 -0700

    Copy Hide HUD and Hide Collapse Button

commit 818005d73c
Merge: 37582ec 1a97587
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Sat Aug 10 03:48:54 2024 -0700

    Merge pull request #319 from bhackel/misc-features

    Misc features

commit 1a9758770d
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Sat Aug 10 02:34:42 2024 -0700

    Fix bugs

commit f64aab1b58
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Sat Aug 10 02:19:23 2024 -0700

    Fix build error

commit 762cd8f618
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Sat Aug 10 00:47:05 2024 -0700

    Remove YTLitePlus OLED Theme

commit ba13d1b987
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 9 22:44:51 2024 -0700

    Live Chat OLED dark mode

commit 753d690b78
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 9 22:38:19 2024 -0700

    Hide autoplay mini preview

commit c9875ec8b7
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 9 17:26:19 2024 -0700

    Fix localization, fix copy/paste switch

commit 11a3e75b0d
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 9 16:44:59 2024 -0700

    Default disable big mini player

commit 794fb561c9
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 9 16:29:34 2024 -0700

    Fix import export settings localization

commit 4f2b55a897
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 9 16:34:57 2024 -0700

    Hide comment previews by @arichornlover

commit 948ea5ff29
Author: GitHub Actions <actions@github.com>
Date:   Sat Aug 10 00:53:31 2024 +0000

    updated submodules

commit 37582ecbf8
Author: GitHub Actions <actions@github.com>
Date:   Sat Aug 10 00:44:53 2024 +0000

    updated submodules

commit 64c712d630
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Fri Aug 9 16:51:12 2024 -0700

    Attempt brightness and volume gestures

commit 91290efdfe
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Wed Aug 7 13:24:51 2024 -0700

    Allow other gestures

commit f2e7c234eb
Author: GitHub Actions <actions@github.com>
Date:   Fri Aug 9 00:45:23 2024 +0000

    updated submodules

commit e7523dc08d
Author: GitHub Actions <actions@github.com>
Date:   Thu Aug 8 00:44:57 2024 +0000

    updated submodules

commit 09ddc42e32
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Wed Aug 7 12:11:03 2024 -0700

    Add reporting option

commit d4679b8414
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Tue Aug 6 23:49:31 2024 -0700

    Attempt Volume Sliding

commit df3d09e81d
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Tue Aug 6 22:36:59 2024 -0700

    Gesture test using YTHFS code

commit d731dbddec
Author: arichornlover <78001398+arichornlover@users.noreply.github.com>
Date:   Tue Aug 6 21:06:02 2024 -0500

    Fix LowContrastMode description

    also added Version compatibility, LowContrastMode will not work once v17.38.10 is gone in the future.

commit 00bb15a868
Author: GitHub Actions <actions@github.com>
Date:   Wed Aug 7 00:45:08 2024 +0000

    updated submodules

commit 8a717e763a
Author: GitHub Actions <actions@github.com>
Date:   Tue Aug 6 00:44:29 2024 +0000

    updated submodules

commit 47562c543b
Author: ChuDucManh <89825108+manhchuduc@users.noreply.github.com>
Date:   Tue Aug 6 01:52:29 2024 +0700

    Update Localizable.strings (#305)

commit d27150b11d
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Mon Aug 5 03:16:34 2024 -0700

    Fix delete workflows

commit 46d6b163b9
Author: Bryce Hackel <34104885+bhackel@users.noreply.github.com>
Date:   Mon Aug 5 03:09:41 2024 -0700

    Fix YouTube Extensions bug
2024-08-20 10:58:28 +02:00

293 lines
8.2 KiB
Objective-C

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <CaptainHook/CaptainHook.h>
#import <objc/runtime.h>
#import <dlfcn.h>
#import <sys/utsname.h>
#import <substrate.h>
#import <rootless.h>
#import <MediaPlayer/MediaPlayer.h>
#import <AVFoundation/AVFoundation.h>
#import <AVKit/AVKit.h> // For AVPlayer and AVPlayerViewController
#import <MobileCoreServices/MobileCoreServices.h> // For kUTTypeMovie and kUTTypeVideo
#import "Tweaks/FLEX/FLEX.h"
#import "Tweaks/YouTubeHeader/YTAppDelegate.h"
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
#import "Tweaks/YouTubeHeader/YTQTMButton.h"
#import "Tweaks/YouTubeHeader/YTVideoQualitySwitchOriginalController.h"
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
#import "Tweaks/YouTubeHeader/YTWatchController.h"
#import "Tweaks/YouTubeHeader/YTIGuideResponse.h"
#import "Tweaks/YouTubeHeader/YTIGuideResponseSupportedRenderers.h"
#import "Tweaks/YouTubeHeader/YTIPivotBarSupportedRenderers.h"
#import "Tweaks/YouTubeHeader/YTIPivotBarRenderer.h"
#import "Tweaks/YouTubeHeader/YTIBrowseRequest.h"
#import "Tweaks/YouTubeHeader/YTCommonColorPalette.h"
#import "Tweaks/YouTubeHeader/YTSettingsSectionItemManager.h"
#import "Tweaks/YouTubeHeader/ASCollectionView.h"
#import "Tweaks/YouTubeHeader/YTPlayerOverlay.h"
#import "Tweaks/YouTubeHeader/YTPlayerOverlayProvider.h"
#import "Tweaks/YouTubeHeader/YTReelWatchPlaybackOverlayView.h"
#import "Tweaks/YouTubeHeader/YTReelPlayerBottomButton.h"
#import "Tweaks/YouTubeHeader/YTReelPlayerViewController.h"
#import "Tweaks/YouTubeHeader/YTAlertView.h"
#import "Tweaks/YouTubeHeader/YTISectionListRenderer.h"
#import "Tweaks/YouTubeHeader/YTPivotBarItemView.h"
#import "Tweaks/YouTubeHeader/YTVideoWithContextNode.h"
#import "Tweaks/YouTubeHeader/ELMCellNode.h"
#import "Tweaks/YouTubeHeader/ELMNodeController.h"
#import "Tweaks/YouTubeHeader/YTMainAppVideoPlayerOverlayViewController.h"
#import "Tweaks/YouTubeHeader/YTInlinePlayerBarContainerView.h"
#import "Tweaks/YouTubeHeader/YTWatchViewController.h"
#import "Tweaks/YouTubeHeader/YTWatchPullToFullController.h"
#import "Tweaks/YouTubeHeader/YTPlayerBarController.h"
#import "Tweaks/YouTubeHeader/YTResponder.h"
#import "Tweaks/YouTubeHeader/YTMainAppControlsOverlayView.h"
#import "Tweaks/YouTubeHeader/YTMultiSizeViewController.h"
#import "Tweaks/YouTubeHeader/YTWatchLayerViewController.h"
#define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil]
#define YT_BUNDLE_ID @"com.google.ios.youtube"
#define YT_NAME @"YouTube"
#define LOWCONTRASTMODE_CUTOFF_VERSION @"17.38.10"
#define IS_ENABLED(k) [[NSUserDefaults standardUserDefaults] boolForKey:k]
#define APP_THEME_IDX [[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"]
// Avoid issues with multiple includes of this file
#pragma once
// Helper methods for key retrieval
#define IsEnabled(key) [[NSUserDefaults standardUserDefaults] boolForKey:key]
#define GetSelection(key) [[NSUserDefaults standardUserDefaults] integerForKey:key]
#define GetFloat(key) [[NSUserDefaults standardUserDefaults] floatForKey:key]
// Player Gesture selected mode enum
typedef NS_ENUM(NSUInteger, GestureMode) {
GestureModeVolume,
GestureModeBrightness,
GestureModeSeek,
GestureModeDisabled
};
// Gesture Section Enum
typedef NS_ENUM(NSUInteger, GestureSection) {
GestureSectionTop,
GestureSectionMiddle,
GestureSectionBottom,
GestureSectionInvalid
};
// YTSpeed
@interface YTVarispeedSwitchControllerOption : NSObject
- (id)initWithTitle:(id)title rate:(float)rate;
@end
@interface MLHAMQueuePlayer : NSObject
@property id playerEventCenter;
@property id delegate;
- (void)setRate:(float)rate;
- (void)internalSetRate;
@end
@interface MLPlayerEventCenter : NSObject
- (void)broadcastRateChange:(float)rate;
@end
@interface HAMPlayerInternal : NSObject
- (void)setRate:(float)rate;
@end
@interface SSOConfiguration : NSObject
@end
// YTLitePlus
@interface YTChipCloudCell : UIView
@end
@interface YTPlayabilityResolutionUserActionUIController : NSObject // Skips content warning before playing *some videos - @PoomSmart
- (void)confirmAlertDidPressConfirm;
@end
@interface YTTransportControlsButtonView : UIView
@end
@interface _ASCollectionViewCell : UICollectionViewCell
- (id)node;
@end
@interface YTAsyncCollectionView : UICollectionView
- (void)removeShortsAndFeaturesAdsAtIndexPath:(NSIndexPath *)indexPath;
@end
@interface YTPlaybackButton : UIControl
@end
@interface YTSegmentableInlinePlayerBarView
@property (nonatomic, assign, readwrite) BOOL enableSnapToChapter;
@end
// Hide Autoplay Mini Preview - @bhackel
@interface YTAutonavPreviewView : UIView
@end
// OLED Live Chat - @bhackel
@interface YTLUserDefaults : NSUserDefaults
@end
// Hide Home Tab - @bhackel
@interface YTPivotBarViewController : UIViewController
@property NSString *selectedPivotIdentifier;
@property YTIPivotBarRenderer *renderer;
- (void)selectItemWithPivotIdentifier:(NSString *)pivotIdentifier;
- (void)resetViewControllersCache;
@end
// Disable ambient mode & Fullscreen to the Right - @bhackel
@interface YTWatchViewController (YTLitePlus) <YTResponder>
@property (nonatomic, assign, readwrite, getter=isFullscreen) BOOL fullscreen;
@end
@interface YTWatchCinematicContainerController : NSObject
@property id <YTResponder> parentResponder;
@end
// Player Gestures - @bhackel
@interface YTPlayerViewController (YTLitePlus) <UIGestureRecognizerDelegate>
@property (nonatomic, retain) UIPanGestureRecognizer *YTLitePlusPanGesture;
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer;
@end
@interface YTWatchFullscreenViewController : YTMultiSizeViewController
@end
@interface MPVolumeController : NSObject
@property (nonatomic, assign, readwrite) float volumeValue;
@end
// Hide Collapse Button - @arichornlover
@interface YTMainAppControlsOverlayView (YTLitePlus)
@property (nonatomic, assign, readwrite) YTQTMButton *watchCollapseButton;
@end
// SponsorBlock button in Nav bar
@interface MDCButton : UIButton
@end
@interface YTRightNavigationButtons : UIView
@property YTQTMButton *notificationButton;
@property YTQTMButton *sponsorBlockButton;
@end
// BigYTMiniPlayer
@interface YTMainAppVideoPlayerOverlayView (YTLitePlus)
- (UIViewController *)_viewControllerForAncestor;
@end
@interface YTWatchMiniBarView : UIView
@end
// YTAutoFullscreen
@interface YTPlayerViewController (YTAFS)
- (void)autoFullscreen;
@end
// App Theme
@interface YTColor : NSObject
+ (UIColor *)white1;
+ (UIColor *)white2;
+ (UIColor *)white3;
+ (UIColor *)white4;
+ (UIColor *)white5;
+ (UIColor *)black0;
+ (UIColor *)black1;
+ (UIColor *)black2;
+ (UIColor *)black3;
+ (UIColor *)black4;
+ (UIColor *)blackPure;
+ (UIColor *)grey1;
+ (UIColor *)grey2;
+ (UIColor *)white1Alpha98;
+ (UIColor *)white1Alpha95;
@end
@interface YCHLiveChatView : UIView
@end
@interface YTFullscreenEngagementOverlayView : UIView
@end
@interface YTRelatedVideosView : UIView
@end
@interface YTTopAlignedView : UIView
@end
@interface ELMView : UIView
@end
@interface ASWAppSwitcherCollectionViewCell : UIView
@end
@interface ASScrollView : UIView
@end
@interface UIKeyboardLayoutStar : UIView
@end
@interface UIKeyboardDockView : UIView
@end
@interface _ASDisplayView : UIView
@end
@interface ELMContainerNode : NSObject
@end
@interface YTAutonavEndscreenView : UIView
@end
@interface YTPivotBarIndicatorView : UIView
@end
@interface YTCommentDetailHeaderCell : UIView
@end
@interface SponsorBlockSettingsController : UITableViewController
@end
@interface SponsorBlockViewController : UIViewController
@end
@interface UICandidateViewController : UIViewController
@end
@interface UIPredictionViewController : UIViewController
@end
@interface TUIEmojiSearchView : UIView
@end
@interface FRPreferences : UITableViewController
@end
@interface FRPSelectListTable : UITableViewController
@end
@interface settingsReorderTable : UIViewController
@property(nonatomic, strong) UITableView *tableView;
@end
// Snack bar
@interface YTHUDMessage : NSObject
+ (id)messageWithText:(id)text;
- (void)setAction:(id)action;
@end
@interface GOOHUDMessageAction : NSObject
- (void)setTitle:(NSString *)title;
- (void)setHandler:(void (^)(id))handler;
@end
@interface GOOHUDManagerInternal : NSObject
- (void)showMessageMainThread:(id)message;
+ (id)sharedInstance;
@end