@livedesk/client 0.1.44 → 0.1.45
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 +28 -13
- 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
|
@@ -781,30 +781,45 @@ function hasFastDll(runtime) {
|
|
|
781
781
|
return !!runtime?.dll && existsSync(runtime.dll);
|
|
782
782
|
}
|
|
783
783
|
|
|
784
|
-
function
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
784
|
+
function resolveBundledFfmpegPaths() {
|
|
785
|
+
const paths = [];
|
|
786
|
+
const addPath = (candidate) => {
|
|
787
|
+
const ffmpegPath = String(candidate || '').trim();
|
|
788
|
+
if (ffmpegPath && existsSync(ffmpegPath) && !paths.includes(ffmpegPath)) {
|
|
789
|
+
paths.push(ffmpegPath);
|
|
789
790
|
}
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
try {
|
|
794
|
+
const ffmpeg = require('@ffmpeg-installer/ffmpeg');
|
|
795
|
+
addPath(ffmpeg?.path);
|
|
790
796
|
} catch {
|
|
791
797
|
}
|
|
792
798
|
|
|
793
799
|
try {
|
|
794
|
-
|
|
795
|
-
const ffmpegPath = String(ffmpeg?.path || '').trim();
|
|
796
|
-
return ffmpegPath && existsSync(ffmpegPath) ? ffmpegPath : '';
|
|
800
|
+
addPath(require('ffmpeg-static'));
|
|
797
801
|
} catch {
|
|
798
|
-
return '';
|
|
799
802
|
}
|
|
803
|
+
|
|
804
|
+
return paths;
|
|
800
805
|
}
|
|
801
806
|
|
|
802
807
|
function buildFastEnvironment() {
|
|
803
808
|
const env = { ...process.env };
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
809
|
+
const bundledFfmpegPaths = resolveBundledFfmpegPaths();
|
|
810
|
+
if (!env.LIVEDESK_FFMPEG && bundledFfmpegPaths[0]) {
|
|
811
|
+
env.LIVEDESK_FFMPEG = bundledFfmpegPaths[0];
|
|
812
|
+
}
|
|
813
|
+
if (!env.LIVEDESK_FFMPEG_PATHS && bundledFfmpegPaths.length > 0) {
|
|
814
|
+
env.LIVEDESK_FFMPEG_PATHS = bundledFfmpegPaths.join(process.platform === 'win32' ? ';' : ':');
|
|
815
|
+
} else if (env.LIVEDESK_FFMPEG && !env.LIVEDESK_FFMPEG_PATHS) {
|
|
816
|
+
env.LIVEDESK_FFMPEG_PATHS = env.LIVEDESK_FFMPEG;
|
|
817
|
+
} else if (env.LIVEDESK_FFMPEG_PATHS && env.LIVEDESK_FFMPEG) {
|
|
818
|
+
const separator = process.platform === 'win32' ? ';' : ':';
|
|
819
|
+
const paths = env.LIVEDESK_FFMPEG_PATHS.split(separator).filter(Boolean);
|
|
820
|
+
if (!paths.includes(env.LIVEDESK_FFMPEG)) {
|
|
821
|
+
paths.unshift(env.LIVEDESK_FFMPEG);
|
|
822
|
+
env.LIVEDESK_FFMPEG_PATHS = paths.join(separator);
|
|
808
823
|
}
|
|
809
824
|
}
|
|
810
825
|
return env;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|