redotvideo / revideo

Create Videos with Code
https://re.video
MIT License
2.58k stars 88 forks source link

fix: fix video frame caching #217

Closed justusmattern27 closed 4 months ago

justusmattern27 commented 4 months ago

in certain cases, e.g. when a shadow was applied to a video or when its opacity was not 1, video frames were cached. The method that returns the cached canvas uses the @computed() decorator, and therefore only recalculates the frame value when any of its dependencies change.

Previously, this was not done correctly because of how we handled the asynchronous detectFileType() in seekFunction(). This PR fixes it by managing the promise correctly using the DependencyContext