From aabf1ecb97baf5c2020f311fbc9940f31ee54926 Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Thu, 30 May 2024 19:55:22 +0900 Subject: [PATCH] feat(YouTube/Spoof client): selectively spoof client for general video / livestreams / Shorts / fallback (unplayable video) --- .../utils/fix/client/SpoofClientPatch.kt | 1 - .../youtube/settings/host/values/arrays.xml | 40 ++++++++++ .../youtube/settings/host/values/strings.xml | 75 ++++++++++++++----- .../youtube/settings/xml/revanced_prefs.xml | 37 ++++++--- 4 files changed, 120 insertions(+), 33 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/fix/client/SpoofClientPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/fix/client/SpoofClientPatch.kt index 5a3ca9388..642e335db 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/utils/fix/client/SpoofClientPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/fix/client/SpoofClientPatch.kt @@ -256,7 +256,6 @@ object SpoofClientPatch : BaseBytecodePatch( */ SettingsPatch.addPreference( arrayOf( - "PREFERENCE_CATEGORY: MISC_EXPERIMENTAL_FLAGS", "SETTINGS: SPOOF_CLIENT" ) ) diff --git a/src/main/resources/youtube/settings/host/values/arrays.xml b/src/main/resources/youtube/settings/host/values/arrays.xml index 283a018b7..615d1498b 100644 --- a/src/main/resources/youtube/settings/host/values/arrays.xml +++ b/src/main/resources/youtube/settings/host/values/arrays.xml @@ -112,6 +112,46 @@ https://github.com/polymorphicshade/Tubular/releases/latest https://github.com/deniscerri/ytdlnis/releases/latest + + @string/revanced_spoof_client_options_entry_ios + @string/revanced_spoof_client_options_entry_android_testsuite + @string/revanced_spoof_client_options_entry_android_tv + @string/revanced_spoof_client_options_entry_android_vr + + + IOS + ANDROID_TESTSUITE + ANDROID_UNPLUGGED + ANDROID_VR + + + @string/revanced_spoof_client_options_entry_ios + @string/revanced_spoof_client_options_entry_android_tv + @string/revanced_spoof_client_options_entry_android_vr + + + IOS + ANDROID_UNPLUGGED + ANDROID_VR + + + @string/revanced_spoof_client_options_entry_ios + @string/revanced_spoof_client_options_entry_android_vr + + + IOS + ANDROID_VR + + + @string/revanced_spoof_client_options_entry_ios + @string/revanced_spoof_client_options_entry_android_testsuite + @string/revanced_spoof_client_options_entry_android_vr + + + IOS + ANDROID_TESTSUITE + ANDROID_VR + @string/revanced_spoof_app_version_target_entry_18_17_43 @string/revanced_spoof_app_version_target_entry_18_05_40 diff --git a/src/main/resources/youtube/settings/host/values/strings.xml b/src/main/resources/youtube/settings/host/values/strings.xml index f517bb4b9..bc7bb97a6 100644 --- a/src/main/resources/youtube/settings/host/values/strings.xml +++ b/src/main/resources/youtube/settings/host/values/strings.xml @@ -1411,26 +1411,6 @@ Tap on the continue button and disable battery optimizations." Disable QUIC protocol "Disable CronetEngine's QUIC protocol." - Spoof client - "Client is spoofed. - -Side effects include: -• No HDR video. -• Watch history may not work." - "Client is not spoofed. Video playback may not work." - Spoof client to iOS - "Client is currently spoofed to iOS. - -Side effects include: -• Playback speed menu is missing. -• Live streams cannot play as audio only. -• Live streams not available on Android 8.0. -• Higher video qualities may be missing." - "Client is currently spoofed to Android VR. (iOS client is used for Clips or Shorts) - -Side effects include: -• Kids videos do not playback. -• Paused videos can randomly resume." Spoof player parameter "Spoofs player parameters to prevent playback issues. @@ -1473,6 +1453,61 @@ Limitation: Feed videos will play for less than 1 minute before encountering pla Reset Settings copied to clipboard. + + Spoof client + Spoof the client to prevent playback issues. + Spoof client + Client is spoofed. + "Client is not spoofed. Video playback may not work." + + + Spoof client options + General + Live streams + Shorts, Clips + Fallback + iOS + Android Testsuite + Android TV + Android VR + + + About + + iOS + "Spoof client to iOS. + +Side effects include: +• No HDR video. +• Playback speed menu is missing. +• Higher video qualities may be missing. +• Watch history does not work with a brand account. +• Live streams cannot play as audio only. +• Live streams not available on Android 8.0." + Android Testsuite + "Spoof client to Android Testsuite. + +Side effects include: +• No HDR video. +• Audio track menu and playback speed menu are missing. +• Subtitles may not be available." + Android TV + "Spoof client to Android TV (YouTube TV). + +Side effects include: +• No HDR video. +• Audio track menu and playback speed menu are missing. +• Subtitles may not be available. +• Some live streams are not supported for playback." + Android VR + "Spoof client to Android VR. + +Side effects include: +• No HDR video. +• Paused videos can randomly resume. +• Low quality Shorts seekbar thumbnails. +• Kids videos do not playback." + Patch information diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index e0eff071d..e5e1ad6f2 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -529,6 +529,31 @@ + + + + + + + + + + @@ -542,14 +567,6 @@ - - - - - - - - - -