feat(YouTube): Add compatibility with YouTube 21.34.248

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NXRsEcWGqDhsCbfEdrfCdE
This commit is contained in:
whitehai11
2026-09-03 19:50:33 +02:00
co-authored by Claude Sonnet 5
parent 015fe10a23
commit 7427432759
18 changed files with 36 additions and 18 deletions
@@ -29,7 +29,8 @@ val videoAdsPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -31,7 +31,8 @@ val disableAutoCaptionsPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -31,7 +31,8 @@ val customBrandingPatch = baseCustomBrandingPatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
},
@@ -39,7 +39,8 @@ val hideAutoplayPreviewPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
)
)
@@ -36,7 +36,8 @@ val hideEndScreenSuggestedVideoPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -35,7 +35,8 @@ val disableFullscreenAmbientModePatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -31,7 +31,8 @@ val disablePlayerPopupPanelsPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -35,7 +35,8 @@ val hideRelatedVideoOverlayPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -35,7 +35,8 @@ val disableRollingNumberAnimationsPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -32,7 +32,8 @@ val disableSignInToTVPopupPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -30,7 +30,8 @@ val hideTimestampPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -36,7 +36,8 @@ val changeStartPagePatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -29,7 +29,8 @@ val announcementsPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -24,7 +24,8 @@ val enableDebuggingPatch = enableDebuggingPatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
)
)
},
@@ -35,7 +35,8 @@ val bypassURLRedirectsPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -47,7 +47,8 @@ val openLinksExternallyPatch = bytecodePatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
),
)
@@ -20,7 +20,8 @@ val sanitizeSharingLinksPatch = sanitizeSharingLinksPatch(
"20.26.46",
"20.31.42",
"20.37.48",
"20.40.45"
"20.40.45",
"21.34.248"
)
)
},
@@ -12,6 +12,7 @@ import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
import app.revanced.patches.youtube.misc.playservice.is_20_19_or_greater
import app.revanced.patches.youtube.misc.playservice.is_20_20_or_greater
import app.revanced.patches.youtube.misc.playservice.is_20_49_or_greater
import app.revanced.patches.youtube.misc.playservice.is_21_34_or_greater
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
import app.revanced.patches.youtube.shared.videoQualityChangedMethodMatch
import app.revanced.patches.youtube.video.playerresponse.Hook
@@ -283,7 +284,7 @@ val videoInformationPatch = bytecodePatch(
)
}
playbackSpeedClassMethod.apply {
(if (is_21_34_or_greater) playbackSpeedClassMethod21_34 else playbackSpeedClassMethod).apply {
val index = indexOfFirstInstructionOrThrow(Opcode.RETURN_OBJECT)
val register = getInstruction<OneRegisterInstruction>(index).registerA
val playbackSpeedClass = this.returnType