mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
fix(YouTube - Spoof streaming data): On iOS
clients, livestreams always start from the beginning
This commit is contained in:
@ -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),
|
||||
)
|
||||
|
Reference in New Issue
Block a user