From 2b2a70e6ea02ab3d140d500860d1c70c359fe8ef Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 2 Jun 2024 17:43:40 +0200 Subject: [PATCH] fix(YouTube - Spoof client): Restore playback speed menu when spoofing to an iOS client --- .../youtube/patches/spoof/SpoofClientPatch.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/spoof/SpoofClientPatch.java b/app/src/main/java/app/revanced/integrations/youtube/patches/spoof/SpoofClientPatch.java index 6c265e6b..9dc021f5 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/spoof/SpoofClientPatch.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/spoof/SpoofClientPatch.java @@ -4,7 +4,6 @@ import android.media.MediaCodecInfo; import android.media.MediaCodecList; import android.net.Uri; import android.os.Build; - import app.revanced.integrations.shared.Logger; import app.revanced.integrations.youtube.settings.Settings; @@ -115,6 +114,19 @@ public class SpoofClientPatch { return SPOOF_CLIENT_ENABLED; } + /** + * Injection point. + * When spoofing the client to iOS, the playback speed menu is missing from the player response. + * Return true to force create the playback speed menu. + */ + public static boolean forceCreatePlaybackSpeedMenu(boolean original) { + if (SPOOF_CLIENT_ENABLED && SPOOF_CLIENT_TYPE == ClientType.IOS) { + return true; + } + + return original; + } + private enum ClientType { // https://dumps.tadiphone.dev/dumps/oculus/monterey/-/blob/vr_monterey-user-7.1.1-NGI77B-256550.6810.0-release-keys/system/system/build.prop // version 1.37 is not the latest, but it works with livestream audio only playback.