mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-07 20:59:51 +00:00
Get all sponsorblock segment types (testing) (#1021)
* Pull all sponsorblock segment types * Respect segment skip on `segment.actionType` * Lint with `prettier` * Lint with `black`
This commit is contained in:
@@ -70,9 +70,11 @@ const handleTimeUpdate =
|
||||
|
||||
if (sponsorBlock && sponsorBlock.segments) {
|
||||
sponsorBlock.segments.forEach((segment: SponsorBlockSegmentType) => {
|
||||
const actionType = segment.actionType;
|
||||
const doSkip = actionType == 'skip';
|
||||
const [from, to] = segment.segment;
|
||||
|
||||
if (currentTime >= from && currentTime <= from + 0.3) {
|
||||
if (doSkip && currentTime >= from && currentTime <= from + 0.3) {
|
||||
videoTag.currentTarget.currentTime = to;
|
||||
|
||||
setSponsorSegmentSkipped?.((segments: SponsorSegmentsSkippedType) => {
|
||||
|
||||
Reference in New Issue
Block a user