From 9bd14d286ebb9a35747d1030140dbb629b3521ba Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Sun, 4 Aug 2024 13:21:11 +0900 Subject: [PATCH] fix(YouTube - Spoof client): Fix background playback issue with livestream on iOS clients --- .../youtube/patches/misc/SpoofClientPatch.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/misc/SpoofClientPatch.java b/app/src/main/java/app/revanced/integrations/youtube/patches/misc/SpoofClientPatch.java index dec5074cdf..461e31c9e7 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/misc/SpoofClientPatch.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/misc/SpoofClientPatch.java @@ -227,6 +227,18 @@ public static boolean forceCreatePlaybackSpeedMenu(boolean original) { return original; } + /** + * Injection point. + * This fix only works if {@link BackgroundPlaybackPatch} is included. + */ + public static boolean forceEnableBackgroundPlayback() { + if (SPOOF_CLIENT_ENABLED && getSpoofClientType() == ClientType.IOS) { + return BackgroundPlaybackPatch.playbackIsNotShort(); + } + + return false; + } + /** * Injection point. * When spoofing the client to Android TV the playback speed menu is missing from the player response.