fix(YouTube - Spoof video streams): Change default client to Android TV (#4465)

This commit is contained in:
LisoUseInAIKyrios 2025-02-16 18:34:12 +02:00 committed by GitHub
parent 128441e78b
commit 0412c7901d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 20 additions and 24 deletions

View File

@ -29,6 +29,6 @@ public class BaseSettings {
public static final BooleanSetting SPOOF_VIDEO_STREAMS_IOS_FORCE_AVC = new BooleanSetting("revanced_spoof_video_streams_ios_force_avc", FALSE, true,
"revanced_spoof_video_streams_ios_force_avc_user_dialog_message", new SpoofiOSAvailability());
// Client type must be last spoof setting due to cyclic references.
public static final EnumSetting<ClientType> SPOOF_VIDEO_STREAMS_CLIENT_TYPE = new EnumSetting<>("revanced_spoof_video_streams_client_type", ClientType.ANDROID_VR, true, parent(SPOOF_VIDEO_STREAMS));
public static final EnumSetting<ClientType> SPOOF_VIDEO_STREAMS_CLIENT_TYPE = new EnumSetting<>("revanced_spoof_video_streams_client_type", ClientType.ANDROID_UNPLUGGED, true, parent(SPOOF_VIDEO_STREAMS));
}

View File

@ -66,22 +66,6 @@ public enum ClientType {
true,
"Android Creator"
),
ANDROID_VR(
ANDROID_VR_NO_AUTH.id,
ANDROID_VR_NO_AUTH.clientName,
ANDROID_VR_NO_AUTH.packageName,
ANDROID_VR_NO_AUTH.deviceMake,
ANDROID_VR_NO_AUTH.deviceModel,
ANDROID_VR_NO_AUTH.osName,
ANDROID_VR_NO_AUTH.osVersion,
ANDROID_VR_NO_AUTH.androidSdkVersion,
ANDROID_VR_NO_AUTH.buildId,
ANDROID_VR_NO_AUTH.cronetVersion,
ANDROID_VR_NO_AUTH.clientVersion,
ANDROID_VR_NO_AUTH.requiresAuth,
true,
"Android VR"
),
IOS_UNPLUGGED(
33,
"IOS_UNPLUGGED",
@ -112,6 +96,22 @@ public enum ClientType {
forceAVC()
? "iOS TV Force AVC"
: "iOS TV"
),
ANDROID_VR_AUTH(
ANDROID_VR_NO_AUTH.id,
ANDROID_VR_NO_AUTH.clientName,
ANDROID_VR_NO_AUTH.packageName,
ANDROID_VR_NO_AUTH.deviceMake,
ANDROID_VR_NO_AUTH.deviceModel,
ANDROID_VR_NO_AUTH.osName,
ANDROID_VR_NO_AUTH.osVersion,
ANDROID_VR_NO_AUTH.androidSdkVersion,
ANDROID_VR_NO_AUTH.buildId,
ANDROID_VR_NO_AUTH.cronetVersion,
ANDROID_VR_NO_AUTH.clientVersion,
ANDROID_VR_NO_AUTH.requiresAuth,
true,
"Android VR"
);
private static boolean forceAVC() {

View File

@ -85,7 +85,7 @@ public class SpoofStreamingDataSideEffectsPreference extends Preference {
String summary = str(key + "_summary");
// Android VR supports AV1 but all other clients do not.
if (clientType != ClientType.ANDROID_VR && clientType != ClientType.ANDROID_VR_NO_AUTH) {
if (clientType != ClientType.ANDROID_VR_AUTH && clientType != ClientType.ANDROID_VR_NO_AUTH) {
summary += '\n' + str("revanced_spoof_video_streams_about_no_av1");
}

View File

@ -114,16 +114,14 @@
<app id="youtube">
<patch id="misc.fix.playback.spoofVideoStreamsPatch">
<string-array name="revanced_spoof_video_streams_client_type_entries">
<item>Android VR</item>
<item>@string/revanced_spoof_video_streams_client_type_android_vr_no_auth</item>
<item>Android TV</item>
<item>Android VR</item>
<item>iOS TV</item>
</string-array>
<string-array name="revanced_spoof_video_streams_client_type_entry_values">
<!-- Extension enum names. -->
<item>ANDROID_VR</item>
<item>ANDROID_VR_NO_AUTH</item>
<item>ANDROID_UNPLUGGED</item>
<item>ANDROID_VR_NO_AUTH</item>
<item>IOS_UNPLUGGED</item>
</string-array>
</patch>

View File

@ -1417,8 +1417,6 @@ Enabling this can unlock higher video qualities"</string>
Video playback may not work"</string>
<string name="revanced_spoof_video_streams_user_dialog_message">Turning off this setting may cause video playback issues.</string>
<string name="revanced_spoof_video_streams_client_type_title">Default client</string>
<!-- 'no auth' means no authentication -->
<string name="revanced_spoof_video_streams_client_type_android_vr_no_auth">Android VR (no auth)</string>
<string name="revanced_spoof_video_streams_ios_force_avc_title">Force iOS AVC (H.264)</string>
<string name="revanced_spoof_video_streams_ios_force_avc_summary_on">Video codec is forced to AVC (H.264)</string>
<string name="revanced_spoof_video_streams_ios_force_avc_summary_off">Video codec is determined automatically</string>