fix(engine): strip query strings from video src when resolving on disk

resolveProjectRelativeSrc now strips query parameters (e.g. ?v=4)
before joining with the project directory. Browsers ignore query
strings when loading local files, but the filesystem resolver was
looking for the literal path including the query — causing video
extraction to silently skip the file and render frozen first frames.
This commit is contained in:
Miguel Ángel
2026-05-18 00:52:03 -04:00
parent b8715ce168
commit 8525bfdec9
@@ -512,8 +512,10 @@ export function resolveProjectRelativeSrc(
baseDir: string,
compiledDir?: string,
): string {
const fromCompiled = compiledDir ? join(compiledDir, src) : null;
const fromBase = join(baseDir, src);
const qIdx = src.indexOf("?");
const cleanSrc = qIdx >= 0 ? src.slice(0, qIdx) : src;
const fromCompiled = compiledDir ? join(compiledDir, cleanSrc) : null;
const fromBase = join(baseDir, cleanSrc);
const candidates: string[] = [];
if (fromCompiled) candidates.push(fromCompiled);
candidates.push(fromBase);