Skip to content

Commit

Permalink
Retry create control buttons when updating preview bar
Browse files Browse the repository at this point in the history
  • Loading branch information
hanydd committed May 18, 2024
1 parent 16aad39 commit 484bd31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1235,9 +1235,12 @@ function updatePreviewBar(): void {
});
});

previewBar.set(previewBarSegments.filter((segment) => segment.actionType !== ActionType.Full), getVideo()?.duration)
previewBar.set(previewBarSegments.filter((segment) => segment.actionType !== ActionType.Full), getVideo()?.duration);
if (getVideo()) updateActiveSegment(getVideo().currentTime);

// retry create buttons in case the video is not ready
updateVisibilityOfPlayerControlsButton();

if (Config.config.showTimeWithSkips) {
const skippedDuration = utils.getTimestampsDuration(previewBarSegments
.filter(({actionType}) => actionType !== ActionType.Mute)
Expand Down

0 comments on commit 484bd31

Please sign in to comment.