mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
* test(player): play the WebKit audio edits in real Safari on a macOS runner * fix(core): Safari keeps playing edits' audio without seeks or rate changes * fix(core): keep the 0.1 s audio sync bound outside WebKit * fix(core): restore main's audio steering outside WebKit * fix(core): tell WebKit from the test DOM's user agent * fix(core): name WebKit's audio start lag instead of commenting it * fix(core): count embedded WKWebViews as WebKit for audio sync
42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
import { defineConfig } from "vitest/config";
|
|
import { resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
// fileURLToPath (not URL.pathname): on Windows .pathname yields "/D:/..." with a
|
|
// leading slash, which breaks resolve() and the alias below.
|
|
const coreRoot = resolve(fileURLToPath(new URL("../core/src", import.meta.url)));
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
"@hyperframes/core/runtime/composition-length": resolve(
|
|
coreRoot,
|
|
"runtime/compositionLength.ts",
|
|
),
|
|
"@hyperframes/core/studio-preview-mark": resolve(coreRoot, "studioPreviewMark.ts"),
|
|
"@hyperframes/core/composition-contract": resolve(coreRoot, "compositionContract.ts"),
|
|
"@hyperframes/parsers/composition-contract": resolve(
|
|
coreRoot,
|
|
"../../parsers/src/compositionContract.ts",
|
|
),
|
|
"@hyperframes/core/slideshow": resolve(coreRoot, "slideshow/index.ts"),
|
|
"@hyperframes/core/runtime/protocol": resolve(coreRoot, "runtime/protocol.ts"),
|
|
},
|
|
},
|
|
test: {
|
|
environment: "happy-dom",
|
|
environmentOptions: {
|
|
happyDOM: {
|
|
settings: {
|
|
handleDisabledFileLoadingAsSuccess: true,
|
|
navigator: {
|
|
userAgent:
|
|
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
setupFiles: ["./src/slideshow/test-setup.ts"],
|
|
},
|
|
});
|