Bug Report: pause and currentframe Events Emitting Constantly
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
- Install and use version 2.0.2.
- Register listeners all events.
- Ensure the Composition is empty.
- Observe that currentframe still emits.
- 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
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.