Merge pull request #476 from ajayyy/expiremental

Improvements
This commit is contained in:
Ajay Ramachandran
2020-09-16 13:54:02 -04:00
committed by GitHub
4 changed files with 6 additions and 6 deletions

View File

@@ -401,7 +401,7 @@
"message": "Reset"
},
"customAddressError": {
"message": "This address is not in the right form. Make sure you have http:// or https:// at the begining and no trailing slashes."
"message": "This address is not in the right form. Make sure you have http:// or https:// at the beginning and no trailing slashes."
},
"areYouSureReset": {
"message": "Are you sure you would like to reset this?"
@@ -608,7 +608,7 @@
"message": "Wrong Category"
},
"nonMusicCategoryOnMusic": {
"message": "This video is categorized as music. Are you sure you this has a sponsor? If this is actually a \"Non-Music segment\", open up the extension options and enable this category. Then, you can submit this segment as \"Non-Music\" instead of sponsor. Please read the guidelines if you are confused."
"message": "This video is categorized as music. Are you sure this has a sponsor? If this is actually a \"Non-Music segment\", open up the extension options and enable this category. Then, you can submit this segment as \"Non-Music\" instead of sponsor. Please read the guidelines if you are confused."
},
"multipleSegments": {
"message": "Multiple Segments"

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

@@ -992,11 +992,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
}