Skip to content

Conversation

@renandincer
Copy link
Collaborator

Implements proper frame timing to prevent frame burst at playback start.

Key changes:

  • Add frame timing system to render frames based on timestamps
  • Use requestAnimationFrame-based scheduling with late frame dropping
  • Wrap VideoFrames with timestamp metadata (proper wrapper objects)
  • Add memory leak protection (max 100 timestamp map entries)
  • Standardize worker messages to consistent object format
  • Add diagnostic test page to measure frame burst behavior

Testing:
Open /frame-burst-test/frame-burst-test.html to see frame timing metrics and verify smooth playback.

Implements proper frame timing to prevent frame burst at playback start. Frames are now rendered based on their timestamps relative to playback start time, with late frame dropping to maintain smooth playback.

Changes:
- Add frame timing system with playback start time tracking
- Wrap VideoFrames with timestamp metadata using proper wrapper objects
- Use requestAnimationFrame-based scheduling with frame dropping
- Add memory leak protection (max 100 timestamp entries)
- Standardize worker messages to use consistent object format
- Add diagnostic test page to measure frame burst behavior

The frame burst test page demonstrates the fix and provides metrics on frame rendering intervals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants