Skip to content

ISSUE: Conflict with SponsorBlock - Auto generated subtitles fail to load when SB auto-skips at the start #184

Description

@chonkey-donkey-bonkey

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

  1. Install SponsorBlock and YouTube-No-Translation.
  2. In SponsorBlock settings, set categories like hook, intro, or sponsor to "Skip automatically".
  3. In YNT, enable "Enable auto generated subtitles".
  4. Open a video that has a SponsorBlock segment exactly at the beginning (e.g., from 0:00).
  5. SponsorBlock skips the segment immediately on load.
  6. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions