|
4 | 4 |
|
5 | 5 | import androidx.annotation.Nullable;
|
6 | 6 |
|
7 |
| -import app.revanced.extension.shared.settings.BaseSettings; |
8 |
| - |
9 | 7 | public enum ClientType {
|
10 |
| - // Specific purpose for age restricted, or private videos, because the iOS client is not logged in. |
11 | 8 | // https://dumps.tadiphone.dev/dumps/oculus/eureka
|
12 |
| - ANDROID_VR(28, |
13 |
| - "ANDROID_VR", |
| 9 | + ANDROID_VR( |
| 10 | + 28, |
14 | 11 | "Quest 3",
|
15 | 12 | "12",
|
16 | 13 | "com.google.android.apps.youtube.vr.oculus/1.56.21 (Linux; U; Android 12; GB) gzip",
|
17 | 14 | "32", // Android 12.1
|
18 | 15 | "1.56.21",
|
19 | 16 | true
|
20 | 17 | ),
|
21 |
| - // Specific for kids videos. |
22 |
| - IOS(5, |
23 |
| - "IOS", |
24 |
| - forceAVC() |
25 |
| - ? "iPhone12,5" // 11 Pro Max (last device with iOS 13) |
26 |
| - : "iPhone17,2", // 16 Pro Max |
27 |
| - // iOS 13 and earlier uses only AVC. 14+ adds VP9 and AV1. |
28 |
| - forceAVC() |
29 |
| - ? "13.7.17H35" // Last release of iOS 13. |
30 |
| - : "18.1.1.22B91", |
31 |
| - forceAVC() |
32 |
| - ? "com.google.ios.youtube/17.40.5 (iPhone; U; CPU iOS 13_7 like Mac OS X)" |
33 |
| - : "com.google.ios.youtube/19.49.5 (iPhone; U; CPU iOS 18_1_1 like Mac OS X)", |
34 |
| - null, |
35 |
| - // Version number should be a valid iOS release. |
36 |
| - // https://www.ipa4fun.com/history/185230 |
37 |
| - forceAVC() |
38 |
| - // Some newer versions can also force AVC, |
39 |
| - // but 17.40 is the last version that supports iOS 13. |
40 |
| - ? "17.40.5" |
41 |
| - : "19.49.5", |
42 |
| - false |
43 |
| - ); |
44 |
| - |
45 |
| - private static boolean forceAVC() { |
46 |
| - return BaseSettings.SPOOF_VIDEO_STREAMS_IOS_FORCE_AVC.get(); |
47 |
| - } |
| 18 | + ANDROID_UNPLUGGED( |
| 19 | + 29, |
| 20 | + "Google TV Streamer", |
| 21 | + "14", |
| 22 | + "com.google.android.apps.youtube.unplugged/8.49.0 (Linux; U; Android 14; GB) gzip", |
| 23 | + "34", |
| 24 | + "8.49.0", |
| 25 | + true |
| 26 | + ), |
| 27 | + ANDROID_CREATOR( |
| 28 | + 14, |
| 29 | + "Android", |
| 30 | + "11", |
| 31 | + "com.google.android.apps.youtube.creator/24.45.100 (Linux; U; Android 11) gzip", |
| 32 | + "30", |
| 33 | + "24.45.100", |
| 34 | + true |
| 35 | +); |
48 | 36 |
|
49 | 37 | /**
|
50 | 38 | * YouTube
|
@@ -87,15 +75,14 @@ private static boolean forceAVC() {
|
87 | 75 | public final boolean canLogin;
|
88 | 76 |
|
89 | 77 | ClientType(int id,
|
90 |
| - String clientName, |
91 | 78 | String deviceModel,
|
92 | 79 | String osVersion,
|
93 | 80 | String userAgent,
|
94 | 81 | @Nullable String androidSdkVersion,
|
95 | 82 | String clientVersion,
|
96 | 83 | boolean canLogin) {
|
97 | 84 | this.id = id;
|
98 |
| - this.clientName = clientName; |
| 85 | + this.clientName = name(); |
99 | 86 | this.deviceModel = deviceModel;
|
100 | 87 | this.osVersion = osVersion;
|
101 | 88 | this.userAgent = userAgent;
|
|
0 commit comments