mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
fix(YouTube/Default video quality): Skipped preloaded buffer
is also applied to live stream video
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.utils.videocpn.fingerprint
|
||||
package app.revanced.patches.youtube.utils.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.youtube.utils.videocpn.fingerprint.OrganicPlaybackContextModelFingerprint
|
||||
import app.revanced.patches.youtube.utils.fingerprints.OrganicPlaybackContextModelFingerprint
|
||||
|
||||
object VideoCpnPatch : BytecodePatch(
|
||||
setOf(OrganicPlaybackContextModelFingerprint)
|
||||
|
@ -12,6 +12,7 @@ import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.utils.fingerprints.OrganicPlaybackContextModelFingerprint
|
||||
import app.revanced.patches.youtube.utils.playertype.PlayerTypeHookPatch
|
||||
import app.revanced.patches.youtube.utils.videoid.general.fingerprint.PlayerControllerSetTimeReferenceFingerprint
|
||||
import app.revanced.patches.youtube.utils.videoid.general.fingerprint.VideoEndFingerprint
|
||||
@ -98,6 +99,18 @@ object VideoIdPatch : BytecodePatch(
|
||||
*/
|
||||
videoTimeHook(INTEGRATIONS_CLASS_DESCRIPTOR, "setVideoTime")
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
OrganicPlaybackContextModelFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
addInstruction(
|
||||
2,
|
||||
"sput-boolean p2, $INTEGRATIONS_CLASS_DESCRIPTOR->isLiveStream:Z"
|
||||
)
|
||||
}
|
||||
} ?: throw OrganicPlaybackContextModelFingerprint.exception
|
||||
|
||||
/**
|
||||
* Set current video length
|
||||
*/
|
||||
|
Reference in New Issue
Block a user