1
mirror of https://github.com/revanced/revanced-integrations synced 2024-11-24 20:07:14 +01:00

fix(YouTube - SponsorBlock): Allow autoplay when skipping to the end of the video

This commit is contained in:
oSumAtrIX 2023-12-02 17:56:08 +01:00
parent dd045ad985
commit 3d660e1b5e
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -135,10 +135,8 @@ public final class VideoInformation {
public static boolean seekTo(final long millisecond) {
final long videoLength = getVideoLength();
// Don't seek more than the video length to prevent issues such as
// Play pause button or autoplay not working.
// TODO: These are arbitrarily chosen values and should be subject to be adjusted.
final long seekToMilliseconds = millisecond <= videoLength - 500 ? millisecond : millisecond - 100;
// Prevent issues such as play/ pause button or autoplay not working.
final long seekToMilliseconds = millisecond > videoLength ? Integer.MAX_VALUE : millisecond;
ReVancedUtils.verifyOnMainThread();
try {