Skip to content

[FEATURE]: Improve dual video synchronization using frame-based updates #1672

Description

@Priyanshu1-62

Target File: src/components/ComparisonPreview.tsx

Feature description

  • Replace timeupdate-based synchronization with requestVideoFrameCallback() (falling back to requestAnimationFrame() where unavailable) to achieve smoother frame-level synchronization between the comparison videos.

Problem this solves

  • The comparison view synchronizes the right video with the left using the timeupdate event.
  • Since this event is throttled by browsers and does not fire for every rendered frame, the right video can temporarily lag behind the left during playback, especially on high refresh rate displays or while seeking.

Proposed solution

  • Replace the timeupdate-based synchronization with requestVideoFrameCallback() to synchronize videos on every rendered frame,
  • Add a fallback to requestAnimationFrame() for browsers that do not support the API.

Benefits

  • Provides smoother, frame-accurate synchronization between the comparison videos.
  • Reduces visible playback drift on high refresh rate displays and during rapid seeking.
  • Avoids relying on the browser's throttled timeupdate event for synchronization.

Additional context

  • Labels: GSSoC'2026, type: feature, type: performance
  • I want to work on this issue.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions