Don't unpause for inspect

This commit is contained in:
Ajay Ramachandran
2020-09-15 10:26:46 -04:00
parent 4d6456e406
commit 70a86e5a11
3 changed files with 4 additions and 4 deletions

View File

@@ -365,7 +365,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
this.saveEditTimes(); this.saveEditTimes();
} }
this.props.contentContainer().previewTime(skipTime + 0.000001); this.props.contentContainer().previewTime(skipTime + 0.000001, false);
} }
deleteTime(): void { deleteTime(): void {

View File

@@ -962,11 +962,11 @@ function getStartTimes(sponsorTimes: SponsorTime[], includeIntersectingSegments:
* *
* @param time * @param time
*/ */
function previewTime(time: number) { function previewTime(time: number, unpause = true) {
video.currentTime = time; video.currentTime = time;
// Unpause the video if needed // Unpause the video if needed
if (video.paused){ if (unpause && video.paused){
video.play(); video.play();
} }
} }

View File

@@ -16,7 +16,7 @@ interface ContentContainer {
sponsorSubmissionNotice: SubmissionNotice, sponsorSubmissionNotice: SubmissionNotice,
resetSponsorSubmissionNotice: () => void, resetSponsorSubmissionNotice: () => void,
changeStartSponsorButton: (showStartSponsor: any, uploadButtonVisible: any) => Promise<boolean>, changeStartSponsorButton: (showStartSponsor: any, uploadButtonVisible: any) => Promise<boolean>,
previewTime: (time: number) => void, previewTime: (time: number, unpause?: boolean) => void,
videoInfo: any, videoInfo: any,
getRealCurrentTime: () => number getRealCurrentTime: () => number
} }