mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-05 09:04:34 +02:00
fix(YouTube - Spoof streaming data): On iOS
clients, livestreams always start from the beginning
This commit is contained in:
parent
e8090243b1
commit
d1b2fe16db
@ -78,6 +78,16 @@ public class SpoofStreamingDataPatch {
|
||||
return SPOOF_STREAMING_DATA;
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static boolean fixHLSCurrentTime(boolean original) {
|
||||
if (!SPOOF_STREAMING_DATA) {
|
||||
return original;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
|
@ -64,13 +64,7 @@ public class SpoofStreamingDataSideEffectsPreference extends Preference {
|
||||
|
||||
private void updateUI() {
|
||||
final ClientType clientType = Settings.SPOOF_STREAMING_DATA_TYPE.get();
|
||||
|
||||
final String summaryTextKey;
|
||||
if (clientType == ClientType.IOS && Settings.SPOOF_STREAMING_DATA_IOS_SKIP_LIVESTREAM_PLAYBACK.get()) {
|
||||
summaryTextKey = "revanced_spoof_streaming_data_side_effects_ios_skip_livestream_playback";
|
||||
} else {
|
||||
summaryTextKey = "revanced_spoof_streaming_data_side_effects_" + clientType.name().toLowerCase();
|
||||
}
|
||||
final String summaryTextKey = "revanced_spoof_streaming_data_side_effects_" + clientType.name().toLowerCase();
|
||||
|
||||
setSummary(str(summaryTextKey));
|
||||
setEnabled(Settings.SPOOF_STREAMING_DATA.get());
|
||||
|
@ -12,6 +12,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.shared.extension.Constants.SPOOF_PATH
|
||||
import app.revanced.util.findInstructionIndicesReversedOrThrow
|
||||
import app.revanced.util.fingerprint.definingClassOrThrow
|
||||
import app.revanced.util.fingerprint.injectLiteralInstructionBooleanCall
|
||||
import app.revanced.util.fingerprint.matchOrThrow
|
||||
import app.revanced.util.fingerprint.methodOrThrow
|
||||
import app.revanced.util.getReference
|
||||
@ -209,6 +210,15 @@ fun baseSpoofStreamingDataPatch(
|
||||
|
||||
// endregion
|
||||
|
||||
// region Fix iOS livestream current time.
|
||||
|
||||
hlsCurrentTimeFingerprint.injectLiteralInstructionBooleanCall(
|
||||
HLS_CURRENT_TIME_FEATURE_FLAG,
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->fixHLSCurrentTime(Z)Z"
|
||||
)
|
||||
|
||||
// endregion
|
||||
|
||||
executeBlock()
|
||||
|
||||
}
|
||||
|
@ -134,3 +134,12 @@ internal val protobufClassParseByteBufferFingerprint = legacyFingerprint(
|
||||
),
|
||||
customFingerprint = { method, _ -> method.name == "parseFrom" },
|
||||
)
|
||||
|
||||
internal const val HLS_CURRENT_TIME_FEATURE_FLAG = 45355374L
|
||||
|
||||
internal val hlsCurrentTimeFingerprint = legacyFingerprint(
|
||||
name = "hlsCurrentTimeFingerprint",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
parameters = listOf("Z", "L"),
|
||||
literals = listOf(HLS_CURRENT_TIME_FEATURE_FLAG),
|
||||
)
|
||||
|
@ -1903,9 +1903,7 @@ Tap on the continue button and disable battery optimizations."</string>
|
||||
<string name="revanced_spoof_streaming_data_type_entry_android_unplugged">Android TV</string>
|
||||
<string name="revanced_spoof_streaming_data_type_entry_android_vr">Android VR</string>
|
||||
<string name="revanced_spoof_streaming_data_side_effects_title">Spoofing side effects</string>
|
||||
<string name="revanced_spoof_streaming_data_side_effects_ios">"• Livestreams start from the beginning.
|
||||
• Videos may end 1 second early."</string>
|
||||
<string name="revanced_spoof_streaming_data_side_effects_ios_skip_livestream_playback">• Videos may end 1 second early.</string>
|
||||
<string name="revanced_spoof_streaming_data_side_effects_ios">• Videos may end 1 second early.</string>
|
||||
<string name="revanced_spoof_streaming_data_side_effects_android_unplugged">"• Audio track menu is missing.
|
||||
• Stable volume is not available."</string>
|
||||
<string name="revanced_spoof_streaming_data_side_effects_android_vr">"• Audio track menu is missing.
|
||||
|
Loading…
x
Reference in New Issue
Block a user