@hyperframes/engine 0.8.194 → 0.8.196
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -464,6 +464,25 @@ function envWithoutWaylandDisplay() {
|
|
|
464
464
|
const { WAYLAND_DISPLAY: _wslg, ...env } = process.env;
|
|
465
465
|
return env;
|
|
466
466
|
}
|
|
467
|
+
// ANGLE and Dawn load SwiftShader via VK_ICD_FILENAMES, which these override or filter:
|
|
468
|
+
// https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderDriverInterface.md
|
|
469
|
+
const VULKAN_VARS_THAT_OVERRIDE_SWIFTSHADER = [
|
|
470
|
+
"VK_DRIVER_FILES",
|
|
471
|
+
"VK_LOADER_DRIVERS_SELECT",
|
|
472
|
+
"VK_LOADER_DRIVERS_DISABLE",
|
|
473
|
+
];
|
|
474
|
+
function launchEnv(fingerprint) {
|
|
475
|
+
if (fingerprint.withoutWaylandDisplay)
|
|
476
|
+
return envWithoutWaylandDisplay();
|
|
477
|
+
const swiftShader = fingerprint.args.some((arg) => arg === "--use-angle=swiftshader" || arg === "--use-vulkan=swiftshader");
|
|
478
|
+
const overriding = VULKAN_VARS_THAT_OVERRIDE_SWIFTSHADER.filter((name) => name in process.env);
|
|
479
|
+
if (!swiftShader || overriding.length === 0)
|
|
480
|
+
return undefined;
|
|
481
|
+
const env = { ...process.env };
|
|
482
|
+
for (const name of overriding)
|
|
483
|
+
delete env[name];
|
|
484
|
+
return env;
|
|
485
|
+
}
|
|
467
486
|
/** True when a `resolvedMode` render must launch without WAYLAND_DISPLAY to reach the GPU. */
|
|
468
487
|
export async function captureWithoutWaylandDisplay(resolvedMode) {
|
|
469
488
|
if (resolvedMode !== "hardware")
|
|
@@ -631,7 +650,7 @@ export async function acquireBrowser(chromeArgs, config) {
|
|
|
631
650
|
// fallow-ignore-next-line complexity
|
|
632
651
|
async function launchBrowser(fingerprint) {
|
|
633
652
|
const ppt = await getPuppeteer();
|
|
634
|
-
const env = fingerprint
|
|
653
|
+
const env = launchEnv(fingerprint);
|
|
635
654
|
let captureMode = fingerprint.requestedCaptureMode;
|
|
636
655
|
let browser;
|
|
637
656
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/engine",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.196",
|
|
4
4
|
"description": "Seekable web page to video rendering engine (Puppeteer + FFmpeg)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"linkedom": "^0.18.12",
|
|
51
51
|
"puppeteer": "^25.8.0",
|
|
52
52
|
"puppeteer-core": "^25.8.0",
|
|
53
|
-
"@hyperframes/
|
|
54
|
-
"@hyperframes/
|
|
53
|
+
"@hyperframes/parsers": "^0.8.196",
|
|
54
|
+
"@hyperframes/core": "^0.8.196"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/node": "^25.0.10",
|