mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-13 15:07:02 +03:00
Use short skip notice for highlight category
This commit is contained in:
@@ -461,12 +461,14 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
|||||||
}
|
}
|
||||||
|
|
||||||
getUnskippedModeInfo(index: number, buttonText: string): SkipNoticeState {
|
getUnskippedModeInfo(index: number, buttonText: string): SkipNoticeState {
|
||||||
const maxCountdownTime = () => {
|
const changeCountdown = utils.getCategoryActionType(this.segments[index].category) === CategoryActionType.Skippable;
|
||||||
|
|
||||||
|
const maxCountdownTime = changeCountdown ? () => {
|
||||||
const sponsorTime = this.segments[index];
|
const sponsorTime = this.segments[index];
|
||||||
const duration = Math.round((sponsorTime.segment[1] - this.contentContainer().v.currentTime) * (1 / this.contentContainer().v.playbackRate));
|
const duration = Math.round((sponsorTime.segment[1] - this.contentContainer().v.currentTime) * (1 / this.contentContainer().v.playbackRate));
|
||||||
|
|
||||||
return Math.max(duration, Config.config.skipNoticeDuration);
|
return Math.max(duration, Config.config.skipNoticeDuration);
|
||||||
};
|
} : this.state.maxCountdownTime;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
unskipText: buttonText,
|
unskipText: buttonText,
|
||||||
|
|||||||
Reference in New Issue
Block a user