mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 20:47:11 +03:00
Don't unpause for inspect
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user