fix(YouTube - Spoof client): Restore playback speed menu when spoofing to an iOS client

This commit is contained in:
oSumAtrIX 2024-06-02 17:43:40 +02:00
parent caa94fa6a4
commit 2b2a70e6ea
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -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.