File tree 3 files changed +18
-2
lines changed
extensions/shared/library/src/main/java/app/revanced/extension/shared/spoof
patches/src/main/kotlin/app/revanced/patches
3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,14 @@ public class SpoofVideoStreamsPatch {
22
22
private static final String UNREACHABLE_HOST_URI_STRING = "https://127.0.0.0" ;
23
23
private static final Uri UNREACHABLE_HOST_URI = Uri .parse (UNREACHABLE_HOST_URI_STRING );
24
24
25
+ /**
26
+ * Injection point. Used by YT Music to disable stable volume.
27
+ */
28
+ public static void setClientTypeToAndroidVrNoHl () {
29
+ Logger .printDebug (() -> "Setting stream spoofing to: " + ClientType .ANDROID_VR_NO_HL );
30
+ BaseSettings .SPOOF_VIDEO_STREAMS_CLIENT_TYPE .save (ClientType .ANDROID_VR_NO_HL );
31
+ }
32
+
25
33
/**
26
34
* Injection point.
27
35
* Blocks /get_watch requests by returning an unreachable URI.
Original file line number Diff line number Diff line change 1
1
package app.revanced.patches.music.misc.spoof
2
2
3
+ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
4
+ import app.revanced.patches.music.misc.gms.musicActivityOnCreateFingerprint
5
+ import app.revanced.patches.shared.misc.spoof.EXTENSION_CLASS_DESCRIPTOR
3
6
import app.revanced.patches.shared.misc.spoof.spoofVideoStreamsPatch
4
7
5
8
val spoofVideoStreamsPatch = spoofVideoStreamsPatch({
6
9
compatibleWith(" com.google.android.apps.youtube.music" )
7
- })
10
+ }, {
11
+ musicActivityOnCreateFingerprint.method.addInstruction(
12
+ 0 ,
13
+ " invoke-static { }, $EXTENSION_CLASS_DESCRIPTOR ->setClientTypeToAndroidVrNoHl()V"
14
+ )
15
+ })
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
23
23
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
24
24
import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter
25
25
26
- private const val EXTENSION_CLASS_DESCRIPTOR =
26
+ internal const val EXTENSION_CLASS_DESCRIPTOR =
27
27
" Lapp/revanced/extension/shared/spoof/SpoofVideoStreamsPatch;"
28
28
29
29
fun spoofVideoStreamsPatch (
You can’t perform that action at this time.
0 commit comments