Describe the bug
v2.24.1, Edge/chromium
When using both YouTube-No-Translation and SponsorBlock, auto-generated subtitles fail to load entirely if SponsorBlock performs an automatic skip (e.g., skipping a "hook", "intro" or "sponsor") at the very beginning of the video.
If I manually toggle the "Enable auto generated subtitles" switch in the YNT popup after the video has started playing and the skip is done, the subtitles appear correctly.
I noticed it while watching video in one language and another one. I have to manually toggle switch in YNT "Enable auto generated subtitles" when I watch in another language EVERY TIME to trigger the subtitles.
Steps to reproduce
- Install SponsorBlock and YouTube-No-Translation.
- In SponsorBlock settings, set categories like
hook, intro, or sponsor to "Skip automatically".
- In YNT, enable "Enable auto generated subtitles".
- Open a video that has a SponsorBlock segment exactly at the beginning (e.g., from 0:00).
- SponsorBlock skips the segment immediately on load.
- Subtitles do not appear at all (sometimes the player shows "Original >> Translated" but fails to render anything).
Root Cause / Debugging info
This appears to be a race condition.
When YNT tries to read the tracklist or apply player.setOption('captions', 'track', ...) upon video initialization, SponsorBlock simultaneously triggers a seekTo() action to skip the initial segment.
This sudden seek interrupts the player's initialization state, causing the subtitle module to either crash or reset, effectively ignoring YNT's command.
Suggested fix
YNT should probably delay applying the subtitle logic if the player is currently seeking, or listen to the seeked event / playing state to ensure no other extensions (like SponsorBlock) are actively scrubbing the timeline during the first seconds of the video.
Workaround
Changing SponsorBlock's behavior for early segments from "Skip automatically" to "Show skip button" prevents the race condition and YNT loads subtitles perfectly. However, it would be great to have them work together with auto-skip enabled.
Describe the bug
v2.24.1, Edge/chromium
When using both YouTube-No-Translation and SponsorBlock, auto-generated subtitles fail to load entirely if SponsorBlock performs an automatic skip (e.g., skipping a "hook", "intro" or "sponsor") at the very beginning of the video.
If I manually toggle the "Enable auto generated subtitles" switch in the YNT popup after the video has started playing and the skip is done, the subtitles appear correctly.
I noticed it while watching video in one language and another one. I have to manually toggle switch in YNT "Enable auto generated subtitles" when I watch in another language EVERY TIME to trigger the subtitles.
Steps to reproduce
hook,intro, orsponsorto "Skip automatically".Root Cause / Debugging info
This appears to be a race condition.
When YNT tries to read the
tracklistor applyplayer.setOption('captions', 'track', ...)upon video initialization, SponsorBlock simultaneously triggers aseekTo()action to skip the initial segment.This sudden
seekinterrupts the player's initialization state, causing the subtitle module to either crash or reset, effectively ignoring YNT's command.Suggested fix
YNT should probably delay applying the subtitle logic if the player is currently
seeking, or listen to theseekedevent /playingstate to ensure no other extensions (like SponsorBlock) are actively scrubbing the timeline during the first seconds of the video.Workaround
Changing SponsorBlock's behavior for early segments from "Skip automatically" to "Show skip button" prevents the race condition and YNT loads subtitles perfectly. However, it would be great to have them work together with auto-skip enabled.