mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-04-30 06:34:28 +02:00
fix(YouTube - Spoof video streams): Resolve playback issues after changing from cellular to wifi (#4277)
This commit is contained in:
parent
fae45f46c4
commit
e93e1c8ec3
@ -36,6 +36,20 @@ public enum ClientType {
|
||||
true,
|
||||
"Android TV"
|
||||
),
|
||||
// Cannot play livestreams and lacks HDR, but can play videos with music and labeled "for children".
|
||||
ANDROID_CREATOR(
|
||||
14,
|
||||
"ANDROID_CREATOR",
|
||||
Build.MANUFACTURER,
|
||||
Build.MODEL,
|
||||
"Android",
|
||||
"11",
|
||||
"com.google.android.apps.youtube.creator/24.45.100 (Linux; U; Android 11) gzip",
|
||||
"30",
|
||||
"24.45.100",
|
||||
true,
|
||||
"Android Creator"
|
||||
),
|
||||
ANDROID_VR(
|
||||
ANDROID_VR_NO_AUTH.id,
|
||||
ANDROID_VR_NO_AUTH.clientName,
|
||||
@ -76,19 +90,6 @@ public enum ClientType {
|
||||
forceAVC()
|
||||
? "iOS TV Force AVC"
|
||||
: "iOS TV"
|
||||
),
|
||||
ANDROID_CREATOR(
|
||||
14,
|
||||
"ANDROID_CREATOR",
|
||||
Build.MANUFACTURER,
|
||||
Build.MODEL,
|
||||
"Android",
|
||||
"11",
|
||||
"com.google.android.apps.youtube.creator/24.45.100 (Linux; U; Android 11) gzip",
|
||||
"30",
|
||||
"24.45.100",
|
||||
true,
|
||||
"Android Creator"
|
||||
);
|
||||
|
||||
private static boolean forceAVC() {
|
||||
|
@ -77,9 +77,9 @@ public class SpoofVideoStreamsPatch {
|
||||
String path = originalUri.getPath();
|
||||
|
||||
if (path != null && path.contains("initplayback")) {
|
||||
Logger.printDebug(() -> "Blocking 'initplayback' by returning unreachable url");
|
||||
Logger.printDebug(() -> "Blocking 'initplayback' by clearing query");
|
||||
|
||||
return UNREACHABLE_HOST_URI_STRING;
|
||||
return originalUri.buildUpon().clearQuery().build().toString();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Logger.printException(() -> "blockInitPlaybackRequest failure", ex);
|
||||
|
@ -87,11 +87,6 @@ public class SpoofStreamingDataSideEffectsPreference extends Preference {
|
||||
// Android VR supports AV1 but all other clients do not.
|
||||
if (clientType != ClientType.ANDROID_VR && clientType != ClientType.ANDROID_VR_NO_AUTH) {
|
||||
summary += '\n' + str("revanced_spoof_video_streams_about_no_av1");
|
||||
|
||||
// Android Creator does not support HDR.
|
||||
if (clientType == ClientType.ANDROID_CREATOR) {
|
||||
summary += '\n' + str("revanced_spoof_video_streams_about_no_hdr");
|
||||
}
|
||||
}
|
||||
|
||||
setTitle(title);
|
||||
|
@ -116,7 +116,6 @@
|
||||
<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 Creator</item>
|
||||
<item>Android TV</item>
|
||||
<item>iOS TV</item>
|
||||
</string-array>
|
||||
@ -124,7 +123,6 @@
|
||||
<!-- Extension enum names. -->
|
||||
<item>ANDROID_VR</item>
|
||||
<item>ANDROID_VR_NO_AUTH</item>
|
||||
<item>ANDROID_CREATOR</item>
|
||||
<item>ANDROID_UNPLUGGED</item>
|
||||
<item>IOS_UNPLUGGED</item>
|
||||
</string-array>
|
||||
|
@ -1396,7 +1396,6 @@ AVC has a maximum resolution of 1080p, Opus audio codec is not available, and vi
|
||||
• Stable volume is not available
|
||||
• Force original audio is not available"</string>
|
||||
<string name="revanced_spoof_video_streams_about_no_av1">• No AV1 video codec</string>
|
||||
<string name="revanced_spoof_video_streams_about_no_hdr">• No HDR video</string>
|
||||
<string name="revanced_spoof_streaming_data_stats_for_nerds_title">Show in Stats for nerds</string>
|
||||
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_on">Client type is shown in Stats for nerds</string>
|
||||
<string name="revanced_spoof_streaming_data_stats_for_nerds_summary_off">Client is hidden in Stats for nerds</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user