{
  "id": 7105143,
  "title": "Keeping a browser video and a locally processed audio track in sync — and the 0.2s leak that broke it",
  "url": "https://urgent.news/2026/09/13/keeping-a-browser-video-and-a-locally-processed-audio-track-in-sync",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-13T12:23:10.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/smsmy/keeping-a-browser-video-and-a-locally-processed-audio-track-in-sync-and-the-02s-leak-that-broke-26fe"
  },
  "original_language": "en",
  "account": "The HaramLite desktop app removes music and instrumentals from video and audio on the user's own machine without any uploads or accounts. Its browser extension mutes the video and plays a separate audio file that keeps the two in sync. The audio is shorter than the video due to the removal of the instrumental sections. Whenever the video stretches without audio, the extension jumps the picture forward to match the audio timeline.\n\nThe issue occurred when the audio was repositioned only upon a seek landing inside a cut-out stretch. On regular jumps, the audio stayed in place while the picture moved for about 0.2 seconds. This caused listeners to hear the first word of the next sentence twice: once from the trailing end of the skipped section and again when the audio finally aligned correctly. The app contains a periodic drift corrector that runs every second and fixes the audio if it drifts more than 0.35 seconds. However, the 0.2-second leak was within the allowed range, so it remained unnoticed and never corrected itself.\n\nTwo key aspects to address in the fix are: 1) computing the new audio position based on the seeked value rather than the element's current time, and 2) tightening the tolerance for the periodic corrector only during the jump, while maintaining a wider threshold for general use. These adjustments ensure the audio aligns correctly with the video, even after jumps or seeks.\n\nThe fix can be tested arithmetically, without relying on the browser. By extracting the pure mapping functions, one can demonstrate the correction without encountering browser-specific quirks or autoplay policies. In the given scenario, the audio drifted 0.20 seconds during the gap, which was not corrected due to the 0.35-second tolerance threshold. However, the new re-anchor threshold of 0.05 seconds successfully corrected the audio position to the expected 10.00 seconds, demonstrating the effectiveness of the revised approach.",
  "summary": "We build [ HaramLite ]( https://haramlite.com ) , a desktop app that removes music and instrumentals from video and audio on the user's own machine — no uploads, no accounts, no cloud. This is the story of a sync bug in its browser side, because the fix is a nice illustration of a class of bug that is easy to ship and hard to see. ## The setup The browser extension never re-encodes anything. When…",
  "key_points": [
    "Audio track shorter due to instrumental removal",
    "Browser extension syncs audio with video",
    "0.2s audio leak unnoticed by periodic corrector"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}