Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: pause and currentframe Events Emitting Constantly #67

Open
kdelac opened this issue Feb 12, 2025 · 1 comment
Open

Bug Report: pause and currentframe Events Emitting Constantly #67

kdelac opened this issue Feb 12, 2025 · 1 comment
Labels
question Further information is requested

Comments

@kdelac
Copy link

kdelac commented Feb 12, 2025

I am using version 2.0.2, and I noticed that:

  • The currentFrame event emits continuously even if the Composition is empty.
  • When registering event listeners for all events, both pause and currentFrame emit constantly, even when no playback is happening.
  • In version 1.6.0, currentFrame and pause events only emit when expected

Steps to Reproduce

  1. Install and use version 2.0.2.
  2. Register listeners all events.
  3. Ensure the Composition is empty.
  4. Observe that currentframe still emits.
  5. Observe that pause emits repeatedly when all events are registered.

Environment
Version: 2.0.2 (bug exists) / 1.6.0 (working correctly)
Framework/Platform: Angular
Browser/OS: Chrome 132/Windows 11

@k9p5
Copy link
Contributor

k9p5 commented Feb 14, 2025

This behavior is intentional. In V2, we replaced the event-based rendering system—which only updated the composition in response to changes—with a periodic update approach. During playback, the composition updates at the target frame rate (30 FPS), and when playback is stopped, it updates every 200ms.

The primary reason for this change is to better support automated video editing, which requires handling a large number of editing operations efficiently. In V1, the event-driven update system caused excessive GPU load due to frequent event propagations. By switching to periodic updates, we have decoupled GPU pressure from the number of editing operations, resulting in better performance and scalability.

@k9p5 k9p5 added the question Further information is requested label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants