mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-21 17:27:32 +01:00
fix(YouTube - SponsorBlock): Allow autoplay when skipping to the end of the video
This commit is contained in:
parent
dd045ad985
commit
3d660e1b5e
@ -135,10 +135,8 @@ public final class VideoInformation {
|
|||||||
public static boolean seekTo(final long millisecond) {
|
public static boolean seekTo(final long millisecond) {
|
||||||
final long videoLength = getVideoLength();
|
final long videoLength = getVideoLength();
|
||||||
|
|
||||||
// Don't seek more than the video length to prevent issues such as
|
// Prevent issues such as play/ pause button or autoplay not working.
|
||||||
// Play pause button or autoplay not working.
|
final long seekToMilliseconds = millisecond > videoLength ? Integer.MAX_VALUE : millisecond;
|
||||||
// TODO: These are arbitrarily chosen values and should be subject to be adjusted.
|
|
||||||
final long seekToMilliseconds = millisecond <= videoLength - 500 ? millisecond : millisecond - 100;
|
|
||||||
|
|
||||||
ReVancedUtils.verifyOnMainThread();
|
ReVancedUtils.verifyOnMainThread();
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user