From 5150a15ad4ca73a747f0a89f933db7f2d686ec2d Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Thu, 17 Oct 2024 17:16:45 +0200 Subject: [PATCH] fix(YouTube - Spoof video streams): Fix playback for Android VR by removing invalid body as well (#3769) --- .../youtube/misc/fix/playback/SpoofVideoStreamsPatch.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofVideoStreamsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofVideoStreamsPatch.kt index b37830762..ffb7aaf67 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofVideoStreamsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofVideoStreamsPatch.kt @@ -254,7 +254,9 @@ object SpoofVideoStreamsPatch : BytecodePatch( // endregion // region Remove /videoplayback request body to fix playback. - // This is needed when using iOS client as streaming data source. + // It is assumed, YouTube makes a request with a body tuned for Android. + // Requesting streams intended for other platforms with a body tuned for Android could be the cause of 400 errors. + // A proper fix may include modifying the request body to match the platforms expected body. BuildMediaDataSourceFingerprint.resultOrThrow().let { it.mutableMethod.apply {