fix(YouTube - Spoof video streams): Remove iOS, add clients Android TV and Android Creator (#4180)
This commit is contained in:

committed by
GitHub

parent
33d6b8e173
commit
86abfb2b0d
@ -1,7 +1,6 @@
|
||||
package app.revanced.patches.shared.misc.spoof
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.literal
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
@ -112,16 +111,6 @@ internal val buildMediaDataSourceFingerprint = fingerprint {
|
||||
)
|
||||
}
|
||||
|
||||
internal const val HLS_CURRENT_TIME_FEATURE_FLAG = 45355374L
|
||||
|
||||
internal val hlsCurrentTimeFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameters("Z", "L")
|
||||
literal {
|
||||
HLS_CURRENT_TIME_FEATURE_FLAG
|
||||
}
|
||||
}
|
||||
|
||||
internal val patchIncludedExtensionMethodFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
|
||||
returns("Z")
|
||||
|
@ -12,7 +12,6 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMu
|
||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||
import app.revanced.util.insertFeatureFlagBooleanOverride
|
||||
import app.revanced.util.returnEarly
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
@ -209,15 +208,6 @@ fun spoofVideoStreamsPatch(
|
||||
}
|
||||
// endregion
|
||||
|
||||
// region Fix iOS livestream current time.
|
||||
|
||||
hlsCurrentTimeFingerprint.method.insertFeatureFlagBooleanOverride(
|
||||
HLS_CURRENT_TIME_FEATURE_FLAG,
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->fixHLSCurrentTime(Z)Z"
|
||||
)
|
||||
|
||||
// endregion
|
||||
|
||||
executeBlock()
|
||||
}
|
||||
}
|
||||
|
@ -44,12 +44,7 @@ val spoofVideoStreamsPatch = spoofVideoStreamsPatch({
|
||||
"revanced_spoof_video_streams_language",
|
||||
summaryKey = null
|
||||
),
|
||||
SwitchPreference("revanced_spoof_video_streams_ios_force_avc"),
|
||||
NonInteractivePreference(
|
||||
// Requires a key and title but the actual text is chosen at runtime.
|
||||
key = "revanced_spoof_video_streams_about_android_vr",
|
||||
tag = "app.revanced.extension.youtube.settings.preference.SpoofStreamingDataSideEffectsPreference"
|
||||
),
|
||||
NonInteractivePreference("revanced_spoof_video_streams_about_android")
|
||||
),
|
||||
),
|
||||
)
|
||||
|
@ -31,7 +31,8 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||
@Suppress("unused")
|
||||
val forceOriginalAudioPatch = bytecodePatch(
|
||||
name = "Force original audio",
|
||||
description = "Adds an option to always use the original audio track.",
|
||||
description = "Adds an option to always use the original audio track. " +
|
||||
"This patch does nothing if 'Spoof video streams' is enabled.",
|
||||
) {
|
||||
dependsOn(
|
||||
sharedExtensionPatch,
|
||||
|
@ -4,12 +4,14 @@
|
||||
<string-array name="revanced_spoof_video_streams_client_type_entries">
|
||||
<!-- Operating system names are not translatable, so no need to use strings.xml -->
|
||||
<item>Android VR</item>
|
||||
<item>iOS</item>
|
||||
<item>Android TV</item>
|
||||
<item>Android Creator</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_spoof_video_streams_client_type_entry_values">
|
||||
<!-- Enum names from extension -->
|
||||
<item>ANDROID_VR</item>
|
||||
<item>IOS</item>
|
||||
<item>ANDROID_UNPLUGGED</item>
|
||||
<item>ANDROID_CREATOR</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_spoof_video_streams_language_entries">
|
||||
<item>@string/revanced_spoof_video_streams_language_DEFAULT</item>
|
||||
|
@ -1297,17 +1297,8 @@ 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>
|
||||
<string name="revanced_spoof_video_streams_ios_force_avc_title">Force 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>
|
||||
<string name="revanced_spoof_video_streams_ios_force_avc_user_dialog_message">"Enabling this might improve battery life and fix playback stuttering.
|
||||
|
||||
AVC has a maximum resolution of 1080p, Opus audio codec is not available, and video playback will use more internet data than VP9 or AV1."</string>
|
||||
<string name="revanced_spoof_video_streams_about_ios_title">iOS spoofing side effects</string>
|
||||
<string name="revanced_spoof_video_streams_about_ios_summary">"• Private kids videos may not play
|
||||
• Videos end 1 second early"</string>
|
||||
<string name="revanced_spoof_video_streams_about_android_vr_title">Android VR spoofing side effects</string>
|
||||
<string name="revanced_spoof_video_streams_about_android_vr_summary">"• Kids videos may not play
|
||||
<string name="revanced_spoof_video_streams_about_android_title">Android spoofing side effects</string>
|
||||
<string name="revanced_spoof_video_streams_about_android_summary">"• Kids videos may not play
|
||||
• Audio track menu is missing
|
||||
• Stable volume is not available
|
||||
• Force original audio is not available"</string>
|
||||
|
Reference in New Issue
Block a user