SponsorBlock/src/types.ts

55 lines
1.3 KiB
TypeScript
Raw Normal View History

2020-03-12 00:35:20 +01:00
import SubmissionNotice from "./render/SubmissionNotice";
import SkipNoticeComponent from "./components/SkipNoticeComponent";
interface ContentContainer {
(): {
vote: (type: any, UUID: any, skipNotice?: SkipNoticeComponent) => void,
dontShowNoticeAgain: () => void,
unskipSponsorTime: (UUID: any) => void,
sponsorTimes: SponsorTime[],
sponsorTimesSubmitting: SponsorTime[],
hiddenSponsorTimes: number[],
2020-03-12 00:35:20 +01:00
v: HTMLVideoElement,
sponsorVideoID,
reskipSponsorTime: (UUID: any) => void,
updatePreviewBar: () => void,
onMobileYouTube: boolean,
sponsorSubmissionNotice: SubmissionNotice,
resetSponsorSubmissionNotice: () => void,
2020-03-12 00:56:16 +01:00
changeStartSponsorButton: (showStartSponsor: any, uploadButtonVisible: any) => Promise<boolean>,
previewTime: (time: number) => void
2020-03-12 00:35:20 +01:00
}
}
interface VideoDurationResponse {
2020-01-29 05:52:15 +01:00
duration: number;
}
enum CategorySkipOption {
ShowOverlay,
ManualSkip,
AutoSkip
}
2020-04-03 04:13:36 +02:00
interface CategorySelection {
name: string;
option: CategorySkipOption
2020-04-03 04:13:36 +02:00
}
2020-03-12 00:35:20 +01:00
interface SponsorTime {
segment: number[];
UUID: string;
category: string;
}
type VideoID = string;
2020-01-29 05:52:15 +01:00
export {
2020-03-12 00:35:20 +01:00
VideoDurationResponse,
2020-04-03 04:13:36 +02:00
ContentContainer,
CategorySelection,
CategorySkipOption,
SponsorTime,
VideoID
2020-01-29 05:52:15 +01:00
};