mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user