mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-05 10:14:30 +00:00
refactor(producer): unify render requests
This commit is contained in:
@@ -344,6 +344,22 @@ describe("buildDockerRunArgs", () => {
|
||||
expect(args).not.toContain("--browser-timeout");
|
||||
});
|
||||
|
||||
it("forwards protocol and player-ready timeouts without unit conversion", () => {
|
||||
const args = buildDockerRunArgs({
|
||||
...FIXED_INPUT,
|
||||
options: {
|
||||
...BASE,
|
||||
protocolTimeoutMs: 240_000,
|
||||
playerReadyTimeoutMs: 90_000,
|
||||
},
|
||||
});
|
||||
|
||||
expect(args).toContain("--protocol-timeout");
|
||||
expect(args[args.indexOf("--protocol-timeout") + 1]).toBe("240000");
|
||||
expect(args).toContain("--player-ready-timeout");
|
||||
expect(args[args.indexOf("--player-ready-timeout") + 1]).toBe("90000");
|
||||
});
|
||||
|
||||
it("forwards rational --fps verbatim (NTSC 30000/1001)", () => {
|
||||
// Regression for the fps fraction-syntax feature: the rational form must
|
||||
// survive the host → container hop as a single `30000/1001` argument so
|
||||
|
||||
@@ -66,6 +66,10 @@ export interface DockerRenderOptions {
|
||||
* `--browser-timeout` flag).
|
||||
*/
|
||||
pageNavigationTimeoutMs?: number;
|
||||
/** CDP protocol timeout in milliseconds. */
|
||||
protocolTimeoutMs?: number;
|
||||
/** Player readiness timeout in milliseconds. */
|
||||
playerReadyTimeoutMs?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,5 +158,11 @@ export function buildDockerRunArgs(input: DockerRunArgsInput): string[] {
|
||||
...(options.pageNavigationTimeoutMs != null
|
||||
? ["--browser-timeout", String(options.pageNavigationTimeoutMs / 1000)]
|
||||
: []),
|
||||
...(options.protocolTimeoutMs != null
|
||||
? ["--protocol-timeout", String(options.protocolTimeoutMs)]
|
||||
: []),
|
||||
...(options.playerReadyTimeoutMs != null
|
||||
? ["--player-ready-timeout", String(options.playerReadyTimeoutMs)]
|
||||
: []),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user