Skip to content

Commit 8525bfd

Browse files
committed
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.
1 parent b8715ce commit 8525bfd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/engine/src/services/videoFrameExtractor.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,10 @@ export function resolveProjectRelativeSrc(
512512
baseDir: string,
513513
compiledDir?: string,
514514
): string {
515-
const fromCompiled = compiledDir ? join(compiledDir, src) : null;
516-
const fromBase = join(baseDir, src);
515+
const qIdx = src.indexOf("?");
516+
const cleanSrc = qIdx >= 0 ? src.slice(0, qIdx) : src;
517+
const fromCompiled = compiledDir ? join(compiledDir, cleanSrc) : null;
518+
const fromBase = join(baseDir, cleanSrc);
517519
const candidates: string[] = [];
518520
if (fromCompiled) candidates.push(fromCompiled);
519521
candidates.push(fromBase);

0 commit comments

Comments
 (0)