Two side-by-side video previews often stay aligned during active viewing, only to fall out of sync after you switch browser tabs and come back. A comparison loop driven by standard timers can slip or stall once the browser throttles or pauses background execution.
Make Visibility a Test Condition
Start playback on both clips, switch to another tab, and return to the preview view. Log the actual currentTime values from each media element instead of assuming every scheduled tick executed on time. The MDN Page Visibility API guide covers the underlying visibility state signals and background-tab scheduling behavior.
Even a white background video works well as a clean visual baseline when testing frame alignment.…