# How to Enable Auto-Skip for Shorts in YTLite: A Complete Guide

> Learn how to enable auto-skip for Shorts in YTLite. Follow our guide to toggle the setting or use ytlSetBool for programmatic control. Enhance your viewing experience now.

- Repository: [Dan/YTLite](https://github.com/dayanch96/YTLite)
- Tags: how-to-guide
- Published: 2026-04-22

---

**Enable auto-skip for Shorts in YTLite by toggling "Auto-skip Shorts" in Settings, or programmatically set the `autoSkipShorts` key to `YES` using `ytlSetBool`.**

The YTLite tweak for YouTube provides a built-in **auto-skip Shorts** feature that automatically advances to the next Short when the current video finishes playing. This functionality is implemented through a settings toggle and a runtime hook that monitors playback progress in the Shorts player.

## How the Auto-Skip Shorts Feature Works

YTLite's auto-skip mechanism consists of three interconnected components that work together to detect video completion and trigger navigation.

### Settings UI Component

The user-facing control lives in `Settings.x` at line 243, which adds a switch that reads and writes the `autoSkipShorts` preference key:

```objc
// Settings.x – line 243
[self switchWithTitle:@"AutoSkipShorts" key:@"autoSkipShorts"];

```

The visible label "Auto-skip Shorts" is defined in `en.lproj/Localizable.strings` at line 285.

### Playback Hook Component

The runtime monitoring is implemented in `YTLite.x` through method swizzling on `YTPlayerViewController`. The hook intercepts two time-update methods at lines 414-426:

```objc
// YTLite.x – YTPlayerViewController hook
- (void)singleVideo:(YTSingleVideoController *)video
  currentVideoTimeDidChange:(YTSingleVideoTime *)time {
    %orig;
    addEndTime(self, video, time);
    autoSkipShorts(self, video, time);   // ← auto-skip trigger
}

- (void)potentiallyMutatedSingleVideo:(YTSingleVideoController *)video
              currentVideoTimeDidChange:(YTSingleVideoTime *)time {
    %orig;
    addEndTime(self, video, time);
    autoSkipShorts(self, video, time);   // ← auto-skip trigger
}

```

### Skip Execution Logic

The `autoSkipShorts` helper function at lines 14-26 in `YTLite.x` contains the core decision logic:

```objc
// YTLite.x – autoSkipShorts implementation
void autoSkipShorts(YTPlayerViewController *self,
                    YTSingleVideoController *video,
                    YTSingleVideoTime *time) {
    // Check if feature is enabled
    if (!ytlBool(@"autoSkipShorts")) return;

    // Verify video has reached its end
    if (floor(time.time) >= floor(video.totalMediaTime)) {
        // Confirm we're in the Shorts player
        if ([self.parentViewController isKindOfClass:%c(YTShortsPlayerViewController)]) {
            YTShortsPlayerViewController *shortsVC = 
                (YTShortsPlayerViewController *)self.parentViewController;

            // Advance to next Short
            if ([shortsVC respondsToSelector:@selector(reelContentViewRequestsAdvanceToNextVideo:)]) {
                [shortsVC performSelector:@selector(reelContentViewRequestsAdvanceToNextVideo:)];
            }
        }
    }
}

```

## Methods to Enable Auto-Skip for Shorts in YTLite

### Method 1: Toggle in YTLite Settings (Recommended)

The straightforward approach for most users:

1. Open the YouTube app with YTLite installed
2. Navigate to **YTLite → Settings**
3. Locate the **"Auto-skip Shorts"** switch
4. Toggle it **ON**

The setting persists across app restarts via `NSUserDefaults` with the key `autoSkipShorts`.

### Method 2: Programmatic Control via ytlSetBool

For developers building companion tweaks or automation scripts, enable auto-skip for Shorts in YTLite programmatically:

```objc
#import "Utils/YTLUserDefaults.h"

// Enable auto-skip Shorts
ytlSetBool(YES, @"autoSkipShorts");

// Verify current state
BOOL isAutoSkipEnabled = ytlBool(@"autoSkipShorts");
NSLog(@"Auto-skip Shorts: %@", isAutoSkipEnabled ? @"ENABLED" : @"DISABLED");

```

The `ytlSetBool` and `ytlBool` helper functions are defined in [`Utils/YTLUserDefaults.h`](https://github.com/dayanch96/YTLite/blob/main/Utils/YTLUserDefaults.h) and `Utils/YTLUserDefaults.m`, providing a consistent wrapper around `NSUserDefaults` for all YTLite preferences.

### Method 3: Disable Auto-Skip When Needed

To turn off the feature, reverse either method:

**Via Settings UI:**
- Toggle **"Auto-skip Shorts"** to **OFF**

**Programmatically:**

```objc
ytlSetBool(NO, @"autoSkipShorts");

```

## Key Source Files for Auto-Skip Shorts in YTLite

| File | Purpose | Direct Link |
|------|---------|-------------|
| `YTLite.x` | Core implementation: `autoSkipShorts` function and `YTPlayerViewController` hooks | [Lines 14-26, 414-426](https://github.com/dayanch96/YTLite/blob/main/YTLite.x#L414-L426) |
| `Settings.x` | UI switch definition for the feature toggle | [Line 243](https://github.com/dayanch96/YTLite/blob/main/Settings.x#L243) |
| [`Utils/YTLUserDefaults.h`](https://github.com/dayanch96/YTLite/blob/main/Utils/YTLUserDefaults.h) / `.m` | Preference helper functions `ytlBool` and `ytlSetBool` | [YTLUserDefaults.h](https://github.com/dayanch96/YTLite/blob/main/Utils/YTLUserDefaults.h) • [YTLUserDefaults.m](https://github.com/dayanch96/YTLite/blob/main/Utils/YTLUserDefaults.m) |
| `en.lproj/Localizable.strings` | Localized display string "Auto-skip Shorts" | [Line 285](https://github.com/dayanch96/YTLite/blob/main/layout/Library/Application%20Support/YTLite.bundle/en.lproj/Localizable.strings#L285) |

## Summary

- **Enable auto-skip for Shorts in YTLite** through the Settings toggle or by setting `autoSkipShorts` to `YES` via `ytlSetBool`
- The feature monitors `YTPlayerViewController` time updates and triggers `reelContentViewRequestsAdvanceToNextVideo:` on `YTShortsPlayerViewController` when videos end
- Implementation spans `YTLite.x` (core logic), `Settings.x` (UI), and `YTLUserDefaults` (preferences)
- Disable at any time by toggling off or calling `ytlSetBool(NO, @"autoSkipShorts")`

## Frequently Asked Questions

### How do I know if auto-skip for Shorts is enabled in YTLite?

Check the **YTLite → Settings** screen for the "Auto-skip Shorts" toggle position. Programmatically, call `ytlBool(@"autoSkipShorts")` which returns `YES` when enabled. The setting persists in `NSUserDefaults` and survives app restarts.

### Does auto-skip work for regular YouTube videos or only Shorts?

Auto-skip for Shorts in YTLite only activates for **Shorts content**. The `autoSkipShorts` function explicitly checks that the parent view controller is a `YTShortsPlayerViewController` before calling `reelContentViewRequestsAdvanceToNextVideo:`. Regular videos in the standard player are unaffected.

### Can I enable auto-skip Shorts without opening the YTLite settings?

Yes. Use the `ytlSetBool` helper from [`Utils/YTLUserDefaults.h`](https://github.com/dayanch96/YTLite/blob/main/Utils/YTLUserDefaults.h) to toggle the feature programmatically. Import the header and call `ytlSetBool(YES, @"autoSkipShorts")` to enable. This approach works from another tweak, a script, or during development without manual UI interaction.

### What happens if I disable auto-skip while watching a Short?

Disabling auto-skip for Shorts in YTLite takes effect immediately. The `autoSkipShorts` function checks `ytlBool(@"autoSkipShorts")` at the start of every execution, so the next time the current Short reaches its end, the early return prevents the skip action. The current Short continues to completion without automatic advancement.