aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2021-12-10 23:53:56 -0500
committerAjay Ramachandran <[email protected]>2021-12-10 23:53:56 -0500
commit1c911581db2f617a4ae6f46c0eb53c840911a618 (patch)
treeb1016795678e05ab52decf83388ff3494167967c
parent071f8b1729ab76eac7045cc66c8ada60f2237d02 (diff)
downloadSponsorBlock-1c911581db2f617a4ae6f46c0eb53c840911a618.tar.gz
SponsorBlock-1c911581db2f617a4ae6f46c0eb53c840911a618.zip
Fix loop fix on Safari
-rw-r--r--src/content.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content.ts b/src/content.ts
index 8eff6a7c..c4bdafef 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -1225,9 +1225,9 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u
// for some reason you also can't skip to 1 second before the end
if (v.loop && v.duration > 1 && skipTime[1] >= v.duration - 1) {
v.currentTime = 0;
- } else if (navigator.vendor === "Apple Computer, Inc." && v.duration > 1 && skipTime[1] >= v.duration - 1) {
+ } else if (navigator.vendor === "Apple Computer, Inc." && v.duration > 1 && skipTime[1] >= v.duration) {
// MacOS will loop otherwise #1027
- v.currentTime = skipTime[1] - 0.01;
+ v.currentTime = v.duration - 0.001;
} else {
v.currentTime = skipTime[1];
}