mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 11:26:02 +00:00
* fix(producer): a clip whose file name has a space or accent is mixed into the export once * fix(producer): compare a clip's src decoded, keeping the authored spelling either way
15 lines
371 B
TypeScript
15 lines
371 B
TypeScript
/** The project-relative path a render file server URL path names: each segment decoded, as the browser encoded it. */
|
|
export function servedPath(urlPath: string): string {
|
|
return urlPath
|
|
.replace(/^\//, "")
|
|
.split("/")
|
|
.map((seg) => {
|
|
try {
|
|
return decodeURIComponent(seg);
|
|
} catch {
|
|
return seg;
|
|
}
|
|
})
|
|
.join("/");
|
|
}
|