fix(YouTube - Hide Shorts components): Hide Shorts shelf hides autoplaying videos in the feed
Co-Authored-By: inotia00 <108592928+inotia00@users.noreply.github.com>
This commit is contained in:
parent
23676746a6
commit
15096257ca
1 changed files with 9 additions and 4 deletions
|
|
@ -26,10 +26,6 @@ import app.revanced.extension.youtube.shared.PlayerType;
|
|||
public final class ShortsFilter extends Filter {
|
||||
private static final boolean HIDE_SHORTS_NAVIGATION_BAR = Settings.HIDE_SHORTS_NAVIGATION_BAR.get();
|
||||
private static final String COMPONENT_TYPE = "ComponentType";
|
||||
private static final String[] REEL_ACTION_BAR_PATHS = {
|
||||
"reel_action_bar.", // Regular Shorts.
|
||||
"reels_player_overlay_layout." // Shorts ads.
|
||||
};
|
||||
private final String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.e";
|
||||
|
||||
/**
|
||||
|
|
@ -498,6 +494,15 @@ public final class ShortsFilter extends Filter {
|
|||
if (!hideHome && !hideSubscriptions && !hideSearch && !hideVideoDescription && !hideHistory) {
|
||||
return false;
|
||||
}
|
||||
// The Litho path of the feed video is 'video_lockup_with_attachment.e'.
|
||||
// It appears shortsCompactFeedVideoBuffer is used after 20 seconds during autoplay in the feed in YouTube 20.44.38.
|
||||
// If the Shorts shelf is hidden on the Home feed, the video in the feed will be hidden after 20 seconds have passed since autoplay began in the feed.
|
||||
//
|
||||
// When a video is autoplaying in the feed, no new components are drawn on the screen.
|
||||
// Therefore, filtering is skipped when the current PlayerType is INLINE_MINIMAL.
|
||||
if (PlayerType.getCurrent() == PlayerType.INLINE_MINIMAL) {
|
||||
return false;
|
||||
}
|
||||
if (hideHome && hideSubscriptions && hideSearch && hideVideoDescription && hideHistory) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue