mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
fix: model editor time as wasm MediaTime ticks end-to-end
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { mediaTimeToSeconds } from "opencut-wasm";
|
||||
import { mediaTimeToSeconds, roundMediaTime } from "@/wasm";
|
||||
import {
|
||||
getElementLocalTime,
|
||||
resolveColorAtTime,
|
||||
@@ -204,7 +204,7 @@ async function resolveVideoNode({
|
||||
const frame = await videoCache.getFrameAt({
|
||||
mediaId: node.params.mediaId,
|
||||
file: node.params.file,
|
||||
time: mediaTimeToSeconds({ time: sourceTimeTicks }),
|
||||
time: mediaTimeToSeconds({ time: roundMediaTime({ time: sourceTimeTicks }) }),
|
||||
});
|
||||
if (!frame) {
|
||||
return null;
|
||||
@@ -421,7 +421,7 @@ async function resolveBackdropSource({
|
||||
const frame = await videoCache.getFrameAt({
|
||||
mediaId: node.params.mediaId,
|
||||
file: node.params.file,
|
||||
time: mediaTimeToSeconds({ time: sourceTimeTicks }),
|
||||
time: mediaTimeToSeconds({ time: roundMediaTime({ time: sourceTimeTicks }) }),
|
||||
});
|
||||
if (!frame) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user