mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 11:37:02 +03:00
Try to fix NaN showing in skip popup
This commit is contained in:
@@ -704,7 +704,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
|||||||
getFullDurationCountdown(index: number): () => number {
|
getFullDurationCountdown(index: number): () => number {
|
||||||
return () => {
|
return () => {
|
||||||
const sponsorTime = this.segments[index];
|
const sponsorTime = this.segments[index];
|
||||||
const duration = Math.round((sponsorTime.segment[1] - getCurrentTime()) * (1 / (getVideo()?.playbackRate ?? 1)));
|
const duration = Math.round((sponsorTime.segment[1] - (getCurrentTime() ?? 0)) * (1 / (getVideo()?.playbackRate ?? 1)));
|
||||||
|
|
||||||
return Math.max(duration, Config.config.skipNoticeDuration);
|
return Math.max(duration, Config.config.skipNoticeDuration);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user