@livedesk/client 0.1.67 → 0.1.69
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.
- package/bin/livedesk-client.js +59 -21
- package/fast/linux-x64/livedesk-client-fast.dll +0 -0
- package/fast/linux-x64/livedesk-client-fast.pdb +0 -0
- package/fast/osx-arm64/livedesk-client-fast.dll +0 -0
- package/fast/osx-arm64/livedesk-client-fast.pdb +0 -0
- package/fast/osx-x64/livedesk-client-fast.dll +0 -0
- package/fast/osx-x64/livedesk-client-fast.pdb +0 -0
- package/fast/win-x64/livedesk-client-fast.dll +0 -0
- package/fast/win-x64/livedesk-client-fast.pdb +0 -0
- package/package.json +1 -1
package/bin/livedesk-client.js
CHANGED
|
@@ -2491,15 +2491,27 @@ function resolveBundledFfmpegPaths() {
|
|
|
2491
2491
|
}
|
|
2492
2492
|
};
|
|
2493
2493
|
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2494
|
+
const addFfmpegInstaller = () => {
|
|
2495
|
+
try {
|
|
2496
|
+
const ffmpeg = require('@ffmpeg-installer/ffmpeg');
|
|
2497
|
+
addPath(ffmpeg?.path);
|
|
2498
|
+
} catch {
|
|
2499
|
+
}
|
|
2500
|
+
};
|
|
2499
2501
|
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2502
|
+
const addFfmpegStatic = () => {
|
|
2503
|
+
try {
|
|
2504
|
+
addPath(require('ffmpeg-static'));
|
|
2505
|
+
} catch {
|
|
2506
|
+
}
|
|
2507
|
+
};
|
|
2508
|
+
|
|
2509
|
+
if (process.platform === 'darwin') {
|
|
2510
|
+
addFfmpegStatic();
|
|
2511
|
+
addFfmpegInstaller();
|
|
2512
|
+
} else {
|
|
2513
|
+
addFfmpegInstaller();
|
|
2514
|
+
addFfmpegStatic();
|
|
2503
2515
|
}
|
|
2504
2516
|
|
|
2505
2517
|
return paths;
|
|
@@ -2508,20 +2520,46 @@ function resolveBundledFfmpegPaths() {
|
|
|
2508
2520
|
function buildFastEnvironment() {
|
|
2509
2521
|
const env = { ...process.env };
|
|
2510
2522
|
const bundledFfmpegPaths = resolveBundledFfmpegPaths();
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2523
|
+
const separator = process.platform === 'win32' ? ';' : ':';
|
|
2524
|
+
const configuredPaths = env.LIVEDESK_FFMPEG_PATHS
|
|
2525
|
+
? env.LIVEDESK_FFMPEG_PATHS.split(separator).filter(Boolean)
|
|
2526
|
+
: [];
|
|
2527
|
+
const configuredSingle = env.LIVEDESK_FFMPEG ? [env.LIVEDESK_FFMPEG] : [];
|
|
2528
|
+
const merged = [];
|
|
2529
|
+
const addMerged = path => {
|
|
2530
|
+
const value = String(path || '').trim();
|
|
2531
|
+
if (value && !merged.includes(value)) {
|
|
2532
|
+
merged.push(value);
|
|
2533
|
+
}
|
|
2534
|
+
};
|
|
2535
|
+
|
|
2536
|
+
if (process.platform === 'darwin') {
|
|
2537
|
+
bundledFfmpegPaths.forEach(addMerged);
|
|
2538
|
+
configuredPaths.forEach(addMerged);
|
|
2539
|
+
configuredSingle.forEach(addMerged);
|
|
2540
|
+
if (bundledFfmpegPaths[0]) {
|
|
2541
|
+
env.LIVEDESK_FFMPEG = bundledFfmpegPaths[0];
|
|
2524
2542
|
}
|
|
2543
|
+
} else {
|
|
2544
|
+
configuredPaths.forEach(addMerged);
|
|
2545
|
+
configuredSingle.forEach(addMerged);
|
|
2546
|
+
bundledFfmpegPaths.forEach(addMerged);
|
|
2547
|
+
if (!env.LIVEDESK_FFMPEG && merged[0]) {
|
|
2548
|
+
env.LIVEDESK_FFMPEG = merged[0];
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
if (merged.length > 0) {
|
|
2553
|
+
env.LIVEDESK_FFMPEG_PATHS = merged.join(separator);
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2556
|
+
if (process.platform === 'darwin' || env.LIVEDESK_DEBUG_FFMPEG === '1') {
|
|
2557
|
+
const describe = path => path.includes('ffmpeg-static')
|
|
2558
|
+
? 'ffmpeg-static'
|
|
2559
|
+
: path.includes('@ffmpeg-installer')
|
|
2560
|
+
? '@ffmpeg-installer/ffmpeg'
|
|
2561
|
+
: path;
|
|
2562
|
+
console.error(`LiveDesk client ${readPackageVersion()} ffmpeg candidates: ${merged.map(describe).join(', ') || 'none'}`);
|
|
2525
2563
|
}
|
|
2526
2564
|
return env;
|
|
2527
2565
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|