File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -610,7 +610,11 @@ $(function() {
610
610
injectOperationForNetflix ( `player.seek(player.getCurrentTime() + ${ settings . skipTimeAmount } * 1000)` )
611
611
}
612
612
else {
613
- player . currentTime += settings . skipTimeAmount ;
613
+ // To prevent replaying the video from the beginning again if this function is called
614
+ // after the video has been played to the end on YouTube.
615
+ if ( ( player . currentTime + settings . skipTimeAmount ) <= player . seekable . end ( 0 ) ) {
616
+ player . currentTime += settings . skipTimeAmount
617
+ }
614
618
}
615
619
} ;
616
620
@@ -697,7 +701,9 @@ $(function() {
697
701
injectOperationForNetflix ( `player.seek(${ player . seekable . end ( 0 ) * 1000 } )` )
698
702
}
699
703
else {
700
- player . currentTime = player . seekable . end ( 0 ) ;
704
+ if ( player . currentTime < player . seekable . end ( 0 ) ) {
705
+ player . currentTime = player . seekable . end ( 0 )
706
+ }
701
707
}
702
708
} ;
703
709
You can’t perform that action at this time.
0 commit comments