From 6c4885a1d5dfff50100b01840b5552d92e83ee4a Mon Sep 17 00:00:00 2001 From: ILoveOpenSourceApplications <117499019+ILoveOpenSourceApplications@users.noreply.github.com> Date: Tue, 25 Feb 2025 21:08:16 +0530 Subject: [PATCH] fix(YouTube - Hide player components): Show correct end video thumbnail if `Hide end screen suggested video` is enabled (#4502) Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> --- .../DisableSuggestedVideoEndScreenPatch.java | 24 ----- .../HideEndScreenSuggestedVideoPatch.java | 13 +++ .../extension/youtube/settings/Settings.java | 11 ++- patches/api/patches.api | 4 + .../endscreencards/HideEndscreenCardsPatch.kt | 7 +- .../hide/endscreensuggestion/Fingerprints.kt | 38 ++++++++ .../HideEndScreenSuggestedVideoPatch.kt | 92 +++++++++++++++++++ .../DisableSuggestedVideoEndScreenPatch.kt | 80 +--------------- .../suggestedvideoendscreen/Fingerprints.kt | 18 ---- .../resources/addresources/values/strings.xml | 11 ++- 10 files changed, 170 insertions(+), 128 deletions(-) delete mode 100644 extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/DisableSuggestedVideoEndScreenPatch.java create mode 100644 extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/HideEndScreenSuggestedVideoPatch.java create mode 100644 patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/Fingerprints.kt create mode 100644 patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt delete mode 100644 patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/Fingerprints.kt diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/DisableSuggestedVideoEndScreenPatch.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/DisableSuggestedVideoEndScreenPatch.java deleted file mode 100644 index 7cd91d9c2..000000000 --- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/DisableSuggestedVideoEndScreenPatch.java +++ /dev/null @@ -1,24 +0,0 @@ -package app.revanced.extension.youtube.patches; - -import android.annotation.SuppressLint; -import android.widget.ImageView; - -import app.revanced.extension.youtube.settings.Settings; - -/** @noinspection unused*/ -public final class DisableSuggestedVideoEndScreenPatch { - @SuppressLint("StaticFieldLeak") - private static ImageView lastView; - - public static void closeEndScreen(final ImageView imageView) { - if (!Settings.DISABLE_SUGGESTED_VIDEO_END_SCREEN.get()) return; - - // Prevent adding the listener multiple times. - if (lastView == imageView) return; - lastView = imageView; - - imageView.getViewTreeObserver().addOnGlobalLayoutListener(() -> { - if (imageView.isShown()) imageView.callOnClick(); - }); - } -} diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/HideEndScreenSuggestedVideoPatch.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/HideEndScreenSuggestedVideoPatch.java new file mode 100644 index 000000000..32d6f1c5a --- /dev/null +++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/HideEndScreenSuggestedVideoPatch.java @@ -0,0 +1,13 @@ +package app.revanced.extension.youtube.patches; + +import app.revanced.extension.youtube.settings.Settings; + +@SuppressWarnings("unused") +public final class HideEndScreenSuggestedVideoPatch { + /** + * Injection point. + */ + public static boolean hideEndScreenSuggestedVideo() { + return Settings.HIDE_END_SCREEN_SUGGESTED_VIDEO.get(); + } +} diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java index 5ba20c758..afa15706f 100644 --- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java +++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java @@ -125,7 +125,6 @@ public class Settings extends BaseSettings { public static final BooleanSetting COPY_VIDEO_URL_TIMESTAMP = new BooleanSetting("revanced_copy_video_url_timestamp", TRUE); public static final BooleanSetting DISABLE_FULLSCREEN_AMBIENT_MODE = new BooleanSetting("revanced_disable_fullscreen_ambient_mode", TRUE, true); public static final BooleanSetting DISABLE_ROLLING_NUMBER_ANIMATIONS = new BooleanSetting("revanced_disable_rolling_number_animations", FALSE); - public static final BooleanSetting DISABLE_SUGGESTED_VIDEO_END_SCREEN = new BooleanSetting("revanced_disable_suggested_video_end_screen", FALSE, true); public static final EnumSetting EXIT_FULLSCREEN = new EnumSetting<>("revanced_exit_fullscreen", FullscreenMode.DISABLED); public static final BooleanSetting HIDE_AUTOPLAY_BUTTON = new BooleanSetting("revanced_hide_autoplay_button", TRUE, true); public static final BooleanSetting HIDE_CAPTIONS_BUTTON = new BooleanSetting("revanced_hide_captions_button", FALSE); @@ -135,6 +134,7 @@ public class Settings extends BaseSettings { public static final BooleanSetting HIDE_COMMUNITY_GUIDELINES = new BooleanSetting("revanced_hide_community_guidelines", TRUE); public static final BooleanSetting HIDE_EMERGENCY_BOX = new BooleanSetting("revanced_hide_emergency_box", TRUE); public static final BooleanSetting HIDE_ENDSCREEN_CARDS = new BooleanSetting("revanced_hide_endscreen_cards", FALSE); + public static final BooleanSetting HIDE_END_SCREEN_SUGGESTED_VIDEO = new BooleanSetting("revanced_end_screen_suggested_video", FALSE, true); public static final BooleanSetting HIDE_HIDE_CHANNEL_GUIDELINES = new BooleanSetting("revanced_hide_channel_guidelines", TRUE); public static final BooleanSetting HIDE_INFO_PANELS = new BooleanSetting("revanced_hide_info_panels", TRUE); public static final BooleanSetting HIDE_INFO_CARDS = new BooleanSetting("revanced_hide_info_cards", FALSE); @@ -284,7 +284,6 @@ public class Settings extends BaseSettings { "revanced_seekbar_thumbnails_high_quality_dialog_message", new SeekbarThumbnailsHighQualityAvailability()); public static final BooleanSetting SLIDE_TO_SEEK = new BooleanSetting("revanced_slide_to_seek", FALSE, true); public static final BooleanSetting SEEKBAR_CUSTOM_COLOR = new BooleanSetting("revanced_seekbar_custom_color", FALSE, true); - private static final StringSetting DEPRECATED_SEEKBAR_CUSTOM_COLOR_PRIMARY = new StringSetting("revanced_seekbar_custom_color_value", "#FF0033"); public static final StringSetting SEEKBAR_CUSTOM_COLOR_PRIMARY = new StringSetting("revanced_seekbar_custom_color_primary", "#FF0033", true, parent(SEEKBAR_CUSTOM_COLOR)); public static final StringSetting SEEKBAR_CUSTOM_COLOR_ACCENT = new StringSetting("revanced_seekbar_custom_color_accent", "#FF2791", true, parent(SEEKBAR_CUSTOM_COLOR)); @@ -322,7 +321,6 @@ public class Settings extends BaseSettings { parentsAny(SWIPE_BRIGHTNESS, SWIPE_VOLUME)); public static final IntegerSetting SWIPE_OVERLAY_OPACITY = new IntegerSetting("revanced_swipe_overlay_background_opacity", 60, true, parentsAny(SWIPE_BRIGHTNESS, SWIPE_VOLUME)); - private static final IntegerSetting DEPRECATED_SWIPE_OVERLAY_BACKGROUND_ALPHA = new IntegerSetting("revanced_swipe_overlay_background_alpha", 127); public static final LongSetting SWIPE_OVERLAY_TIMEOUT = new LongSetting("revanced_swipe_overlay_timeout", 500L, true, parentsAny(SWIPE_BRIGHTNESS, SWIPE_VOLUME)); public static final BooleanSetting SWIPE_SAVE_AND_RESTORE_BRIGHTNESS = new BooleanSetting("revanced_swipe_save_and_restore_brightness", TRUE, true, parent(SWIPE_BRIGHTNESS)); @@ -384,9 +382,12 @@ public class Settings extends BaseSettings { public static final StringSetting SB_CATEGORY_UNSUBMITTED_COLOR = new StringSetting("sb_unsubmitted_color", "#FFFFFF"); // Deprecated migrations - public static final StringSetting DEPRECATED_SB_UUID_OLD_MIGRATION_SETTING = new StringSetting("uuid", ""); // Delete sometime in 2024 + private static final StringSetting DEPRECATED_SB_UUID_OLD_MIGRATION_SETTING = new StringSetting("uuid", ""); // Delete sometime in 2024 private static final BooleanSetting DEPRECATED_HIDE_PLAYER_BUTTONS = new BooleanSetting("revanced_hide_player_buttons", FALSE, true); private static final BooleanSetting DEPRECATED_HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER = new BooleanSetting("revanced_hide_video_quality_menu_footer", FALSE); + private static final IntegerSetting DEPRECATED_SWIPE_OVERLAY_BACKGROUND_ALPHA = new IntegerSetting("revanced_swipe_overlay_background_alpha", 127); + private static final StringSetting DEPRECATED_SEEKBAR_CUSTOM_COLOR_PRIMARY = new StringSetting("revanced_seekbar_custom_color_value", "#FF0033"); + private static final BooleanSetting DEPRECATED_DISABLE_SUGGESTED_VIDEO_END_SCREEN = new BooleanSetting("revanced_disable_suggested_video_end_screen", FALSE); static { // region Migration @@ -405,6 +406,8 @@ public class Settings extends BaseSettings { migrateOldSettingToNew(DEPRECATED_HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER, HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER); + migrateOldSettingToNew(DEPRECATED_DISABLE_SUGGESTED_VIDEO_END_SCREEN, HIDE_END_SCREEN_SUGGESTED_VIDEO); + // Migrate renamed enum. //noinspection deprecation if (MINIPLAYER_TYPE.get() == MiniplayerType.PHONE) { diff --git a/patches/api/patches.api b/patches/api/patches.api index ce8c2f0a9..2ac53b545 100644 --- a/patches/api/patches.api +++ b/patches/api/patches.api @@ -1116,6 +1116,10 @@ public final class app/revanced/patches/youtube/layout/hide/endscreencards/HideE public static final fun getHideEndscreenCardsPatch ()Lapp/revanced/patcher/patch/BytecodePatch; } +public final class app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatchKt { + public static final fun getHideEndScreenSuggestedVideoPatch ()Lapp/revanced/patcher/patch/BytecodePatch; +} + public final class app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatchKt { public static final fun getDisableFullscreenAmbientModePatch ()Lapp/revanced/patcher/patch/BytecodePatch; } diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt index e33732c1d..effb9caee 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt @@ -44,6 +44,9 @@ private val hideEndscreenCardsResourcePatch = resourcePatch { } } +private const val EXTENSION_CLASS_DESCRIPTOR = + "Lapp/revanced/extension/youtube/patches/HideEndscreenCardsPatch;" + @Suppress("unused") val hideEndscreenCardsPatch = bytecodePatch( name = "Hide endscreen cards", @@ -78,9 +81,7 @@ val hideEndscreenCardsPatch = bytecodePatch( addInstruction( insertIndex, - "invoke-static { v$viewRegister }, " + - "Lapp/revanced/extension/youtube/patches/HideEndscreenCardsPatch;->" + - "hideEndscreen(Landroid/view/View;)V", + "invoke-static { v$viewRegister }, $EXTENSION_CLASS_DESCRIPTOR->hideEndscreen(Landroid/view/View;)V", ) } } diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/Fingerprints.kt new file mode 100644 index 000000000..887963e56 --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/Fingerprints.kt @@ -0,0 +1,38 @@ +package app.revanced.patches.youtube.layout.hide.endscreensuggestion + +import app.revanced.patcher.fingerprint +import app.revanced.util.getReference +import app.revanced.util.indexOfFirstInstruction +import com.android.tools.smali.dexlib2.AccessFlags +import com.android.tools.smali.dexlib2.Opcode +import com.android.tools.smali.dexlib2.iface.reference.MethodReference + +internal val autoNavConstructorFingerprint = fingerprint { + returns("V") + accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR) + strings("main_app_autonav") +} + +internal val autoNavStatusFingerprint = fingerprint { + accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL) + returns("Z") + parameters() +} + +internal val removeOnLayoutChangeListenerFingerprint = fingerprint { + accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL) + returns("V") + parameters() + opcodes( + Opcode.IPUT, + Opcode.INVOKE_VIRTUAL + ) + // This is the only reference present in the entire smali. + custom { method, _ -> + method.indexOfFirstInstruction { + val reference = getReference() + reference?.name == "removeOnLayoutChangeListener" && + reference.definingClass.endsWith("/YouTubePlayerOverlaysLayout;") + } >= 0 + } +} \ No newline at end of file diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt new file mode 100644 index 000000000..76811b175 --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt @@ -0,0 +1,92 @@ +package app.revanced.patches.youtube.layout.hide.endscreensuggestion + +import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels +import app.revanced.patcher.extensions.InstructionExtensions.getInstruction +import app.revanced.patcher.patch.bytecodePatch +import app.revanced.patcher.util.smali.ExternalLabel +import app.revanced.patches.all.misc.resources.addResources +import app.revanced.patches.all.misc.resources.addResourcesPatch +import app.revanced.patches.shared.misc.settings.preference.SwitchPreference +import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch +import app.revanced.patches.youtube.misc.settings.PreferenceScreen +import app.revanced.util.getReference +import app.revanced.util.indexOfFirstInstructionOrThrow +import app.revanced.util.indexOfFirstInstructionReversedOrThrow +import com.android.tools.smali.dexlib2.Opcode +import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction +import com.android.tools.smali.dexlib2.iface.reference.MethodReference + +private const val EXTENSION_CLASS_DESCRIPTOR = + "Lapp/revanced/extension/youtube/patches/HideEndScreenSuggestedVideoPatch;" + +@Suppress("unused") +val hideEndScreenSuggestedVideoPatch = bytecodePatch( + name = "Hide end screen suggested video", + description = "Adds an option to hide the recommended video at the end of each video.", +) { + dependsOn( + sharedExtensionPatch, + addResourcesPatch, + ) + + compatibleWith( + "com.google.android.youtube"( + "19.16.39", + "19.25.37", + "19.34.42", + "19.43.41", + "19.45.38", + "19.46.42", + "19.47.53", + ), + ) + + execute { + addResources("youtube", "layout.hide.endscreensuggestion.hideEndScreenSuggestedVideoPatch") + + PreferenceScreen.PLAYER.addPreferences( + SwitchPreference("revanced_end_screen_suggested_video"), + ) + + removeOnLayoutChangeListenerFingerprint.let { + val endScreenMethod = navigate(it.originalMethod).to(it.patternMatch!!.endIndex).stop() + + endScreenMethod.apply { + val autoNavStatusMethodName = autoNavStatusFingerprint.match( + autoNavConstructorFingerprint.classDef + ).originalMethod.name + + val invokeIndex = indexOfFirstInstructionOrThrow { + val reference = getReference() + reference?.name == autoNavStatusMethodName && + reference.returnType == "Z" && + reference.parameterTypes.isEmpty() + } + val iGetObjectIndex = indexOfFirstInstructionReversedOrThrow(invokeIndex, Opcode.IGET_OBJECT) + val invokeReference = getInstruction(invokeIndex).reference + val iGetObjectReference = getInstruction(iGetObjectIndex).reference + val opcodeName = getInstruction(invokeIndex).opcode.name + + addInstructionsWithLabels( + 0, + """ + invoke-static {}, $EXTENSION_CLASS_DESCRIPTOR->hideEndScreenSuggestedVideo()Z + move-result v0 + if-eqz v0, :show_end_screen_recommendation + + iget-object v0, p0, $iGetObjectReference + + # This reference checks whether autoplay is turned on. + $opcodeName { v0 }, $invokeReference + move-result v0 + + # Hide suggested video end screen only when autoplay is turned off. + if-nez v0, :show_end_screen_recommendation + return-void + """, + ExternalLabel("show_end_screen_recommendation", getInstruction(0)) + ) + } + } + } +} diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt index 822de8994..388aee7ad 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt @@ -1,79 +1,9 @@ package app.revanced.patches.youtube.layout.hide.suggestedvideoendscreen -import app.revanced.patcher.extensions.InstructionExtensions.addInstruction -import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.bytecodePatch -import app.revanced.patcher.patch.resourcePatch -import app.revanced.patches.all.misc.resources.addResources -import app.revanced.patches.all.misc.resources.addResourcesPatch -import app.revanced.patches.shared.misc.mapping.get -import app.revanced.patches.shared.misc.mapping.resourceMappingPatch -import app.revanced.patches.shared.misc.mapping.resourceMappings -import app.revanced.patches.shared.misc.settings.preference.SwitchPreference -import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch -import app.revanced.patches.youtube.misc.settings.PreferenceScreen -import app.revanced.patches.youtube.misc.settings.settingsPatch -import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction +import app.revanced.patches.youtube.layout.hide.endscreensuggestion.hideEndScreenSuggestedVideoPatch -internal var sizeAdjustableLiteAutoNavOverlay = -1L - private set - -internal val disableSuggestedVideoEndScreenResourcePatch = resourcePatch { - dependsOn( - settingsPatch, - resourceMappingPatch, - addResourcesPatch, - ) - - execute { - addResources("youtube", "layout.hide.suggestedvideoendscreen.disableSuggestedVideoEndScreenResourcePatch") - - PreferenceScreen.PLAYER.addPreferences( - SwitchPreference("revanced_disable_suggested_video_end_screen"), - ) - - sizeAdjustableLiteAutoNavOverlay = resourceMappings[ - "layout", - "size_adjustable_lite_autonav_overlay", - ] - } -} - -private const val EXTENSION_CLASS_DESCRIPTOR = - "Lapp/revanced/extension/youtube/patches/DisableSuggestedVideoEndScreenPatch;" - -@Suppress("unused") -val disableSuggestedVideoEndScreenPatch = bytecodePatch( - name = "Disable suggested video end screen", - description = "Adds an option to disable the suggested video end screen at the end of videos.", -) { - dependsOn( - sharedExtensionPatch, - disableSuggestedVideoEndScreenResourcePatch, - ) - - compatibleWith( - "com.google.android.youtube"( - "19.16.39", - "19.25.37", - "19.34.42", - "19.43.41", - "19.45.38", - "19.46.42", - "19.47.53", - ), - ) - - execute { - createEndScreenViewFingerprint.method.apply { - val addOnClickEventListenerIndex = createEndScreenViewFingerprint.patternMatch!!.endIndex - 1 - val viewRegister = getInstruction(addOnClickEventListenerIndex).registerC - - addInstruction( - addOnClickEventListenerIndex + 1, - "invoke-static {v$viewRegister}, " + - "$EXTENSION_CLASS_DESCRIPTOR->closeEndScreen(Landroid/widget/ImageView;)V", - ) - } - } -} +@Deprecated("Use 'Hide suggested video end screen' instead.") +val disableSuggestedVideoEndScreenPatch = bytecodePatch { + dependsOn(hideEndScreenSuggestedVideoPatch) +} \ No newline at end of file diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/Fingerprints.kt deleted file mode 100644 index 78efc0680..000000000 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/Fingerprints.kt +++ /dev/null @@ -1,18 +0,0 @@ -package app.revanced.patches.youtube.layout.hide.suggestedvideoendscreen - -import app.revanced.patcher.fingerprint -import app.revanced.util.literal -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode - -internal val createEndScreenViewFingerprint = fingerprint { - accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL) - returns("Landroid/view/View;") - parameters("Landroid/content/Context;") - opcodes( - Opcode.INVOKE_DIRECT, - Opcode.INVOKE_VIRTUAL, - Opcode.CONST, - ) - literal { sizeAdjustableLiteAutoNavOverlay } -} diff --git a/patches/src/main/resources/addresources/values/strings.xml b/patches/src/main/resources/addresources/values/strings.xml index 737608cde..23b0168b6 100644 --- a/patches/src/main/resources/addresources/values/strings.xml +++ b/patches/src/main/resources/addresources/values/strings.xml @@ -813,10 +813,13 @@ If changing this setting does not take effect, try switching to Incognito mode." Navigation bar is hidden Navigation bar is shown - - Disable suggested video end screen - Suggested videos will be disabled - Suggested videos will be shown + + Hide end screen suggested video + "End screen suggested video is hidden when autoplay is turned off + +Autoplay can be changed in YouTube settings: +Settings → Playback → Autoplay next video" + End screen suggested video is shown Hide video timestamp