From a25919b48d119433dbe6b048d6430b17de5caa34 Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Wed, 6 Nov 2024 11:04:36 +0900 Subject: [PATCH] fix(YouTube/Overlay buttons): support A/B player layout --- .../patches/youtube/utils/fix/bottomui/CfBottomUIPatch.kt | 3 +++ .../bottomui/fingerprints/ExploderControlsFingerprint.kt | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 src/main/kotlin/app/revanced/patches/youtube/utils/fix/bottomui/fingerprints/ExploderControlsFingerprint.kt diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/fix/bottomui/CfBottomUIPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/fix/bottomui/CfBottomUIPatch.kt index 66374cddfb..67bbc0f4f1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/utils/fix/bottomui/CfBottomUIPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/fix/bottomui/CfBottomUIPatch.kt @@ -3,6 +3,7 @@ package app.revanced.patches.youtube.utils.fix.bottomui import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.annotation.Patch +import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.ExploderControlsFingerprint import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.FullscreenButtonPositionFingerprint import app.revanced.patches.youtube.utils.fix.bottomui.fingerprints.FullscreenButtonViewStubFingerprint import app.revanced.util.injectLiteralInstructionBooleanCall @@ -12,6 +13,7 @@ import app.revanced.util.injectLiteralInstructionBooleanCall ) object CfBottomUIPatch : BytecodePatch( setOf( + ExploderControlsFingerprint, FullscreenButtonPositionFingerprint, FullscreenButtonViewStubFingerprint ) @@ -23,6 +25,7 @@ object CfBottomUIPatch : BytecodePatch( * Therefore, this patch only applies to versions that can resolve this fingerprint. */ mapOf( + ExploderControlsFingerprint to 45643739, FullscreenButtonViewStubFingerprint to 45617294, FullscreenButtonPositionFingerprint to 45627640 ).forEach { (fingerprint, literalValue) -> diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/fix/bottomui/fingerprints/ExploderControlsFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/fix/bottomui/fingerprints/ExploderControlsFingerprint.kt new file mode 100644 index 0000000000..5201134437 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/fix/bottomui/fingerprints/ExploderControlsFingerprint.kt @@ -0,0 +1,8 @@ +package app.revanced.patches.youtube.utils.fix.bottomui.fingerprints + +import app.revanced.util.fingerprint.LiteralValueFingerprint + +internal object ExploderControlsFingerprint : LiteralValueFingerprint( + returnType = "Z", + literalSupplier = { 45643739 }, +) \ No newline at end of file