mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-20 16:27:17 +02:00
fix(YouTube/Default video quality): Skipped preloaded buffer
is also applied to live stream video
This commit is contained in:
parent
fcc74d7d18
commit
620f15d331
@ -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
|
||||
*/
|
||||
|
@ -686,7 +686,7 @@ Tap and hold to set playback speed to 1.0x."</string>
|
||||
<string name="revanced_skip_preloaded_buffer_summary">"Skip preloaded buffer at video start to bypass default video quality enforcement delay.
|
||||
|
||||
• When the video starts, there is a delay of approximately 0.7 seconds, but the default video quality is applied immediately.
|
||||
• Does not apply to HDR videos or videos shorter than 10 seconds."</string>
|
||||
• Does not apply to HDR videos, live stream videos, videos shorter than 10 seconds."</string>
|
||||
<string name="revanced_skip_preloaded_buffer_title">Skip preloaded buffer</string>
|
||||
<string name="revanced_skip_preloaded_buffer_toast_summary_off">Toast is hidden.</string>
|
||||
<string name="revanced_skip_preloaded_buffer_toast_summary_on">Toast is shown.</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user