mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Don't unpause for inspect
This commit is contained in:
parent
4d6456e406
commit
70a86e5a11
3 changed files with 4 additions and 4 deletions
|
@ -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 {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue