fix(YouTube - SponsorBlock): Prevent autoplay from stopping to work

This commit is contained in:
oSumAtrIX 2023-12-03 19:30:56 +01:00
parent 9394c512ba
commit f4e2d56b18
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -136,7 +136,7 @@ public final class VideoInformation {
final long videoLength = getVideoLength(); final long videoLength = getVideoLength();
// Prevent issues such as play/ pause button or autoplay not working. // Prevent issues such as play/ pause button or autoplay not working.
final long seekToMilliseconds = millisecond > videoLength ? Integer.MAX_VALUE : millisecond; final long seekToMilliseconds = Math.min(millisecond, VideoInformation.getVideoLength() - 250);
ReVancedUtils.verifyOnMainThread(); ReVancedUtils.verifyOnMainThread();
try { try {