Back to feed
Dev.to
Dev.to
7/20/2026
The Timeline Was Split, but the Audio Wasn't: Fixing Source Offsets in a Browser Video Editor

The Timeline Was Split, but the Audio Wasn't: Fixing Source Offsets in a Browser Video Editor

Short summary

A detailed bug fix for a browser-based AI video editor where splitting voiceover clips produced correct timeline geometry but incorrect audio playback — the second segment played from the beginning of the source instead of the split point. The fix introduces a sourceStart offset property on split segments, ensuring playback, seeking, offline export, and waveform peaks all reference the correct source range. The fix is verified across playback, export, caption relinking, and waveform rendering.

  • Split clips played wrong audio because source offset wasn't tracked — only timeline position was calculated
  • Fix adds sourceStart property to track where segment content begins in original audio, separate from timeline position
  • All consumers (playback, seeking, offline export, waveform peaks, caption linking) now honor the source offset consistently

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more