scenejs-render
scenejs-render copied to clipboard
recordChild should emit a timeupdate event after evaluating the timefunction
Right now recordChild does not trigger a timeupdate event for the first frame of each multi render.
This means you might have single frames every x % of your video, which are just incorrect.
Currently, I have hackily fixed this by adding:
await new Promise((accept) => setTimeout(accept, 25));
await page.evaluate(`scene.emit("timeupdate", { currentTime: ${time} })`);
await new Promise((accept) => setTimeout(accept, 25));
after await page.evaluate(timeFunction as any);
in the recordChild
method in child.ts
.
but i am sure there is a better way to implement this fix
@mhaddon
Does the media exist in the scene?
@mhaddon
What version of Scene.js is it?
latest scenejs and latest scenejs render, it is only the first frame that each "multi" generates.
its when you try to make your own render logic using the timeupdate event, the normal css rendering is working as expected
@mhaddon
Are you using "timeupdate" in your scene?
If so, how about using "animate" instead of "timeupdate"?
The animate event will fire whenever setTime is called.