Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
fix(YouTube - Spoof client): Restore playback speed menu when spoofin…
Browse files Browse the repository at this point in the history
…g to an iOS client
  • Loading branch information
oSumAtrIX committed Jun 2, 2024
1 parent caa94fa commit 2b2a70e
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
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;

Expand Down Expand Up @@ -115,6 +114,19 @@ public static boolean isClientSpoofingEnabled() {
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.
Expand Down

0 comments on commit 2b2a70e

Please sign in to comment.