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.props.contentContainer().previewTime(skipTime + 0.000001);
this.props.contentContainer().previewTime(skipTime + 0.000001, false);
}
deleteTime(): void {

View file

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

View file

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