Skip to content

Commit

Permalink
[mirotalksfu] - improve config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Jan 16, 2025
1 parent 5598bf9 commit b508de6
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions app/src/config.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@ const os = require('os');

const platform = os.platform();

let ffmpegPath;

switch (platform) {
case 'darwin':
ffmpegPath = '/usr/local/bin/ffmpeg'; // macOS
break;
case 'linux':
ffmpegPath = '/usr/bin/ffmpeg'; // Linux
break;
case 'win32':
ffmpegPath = 'C:\\ffmpeg\\bin\\ffmpeg.exe'; // Windows
break;
default:
ffmpegPath = '/usr/bin/ffmpeg'; // Centos or others...
function getFFmpegPath(platform) {
switch (platform) {
case 'darwin':
return '/usr/local/bin/ffmpeg'; // macOS
case 'linux':
return '/usr/bin/ffmpeg'; // Linux
case 'win32':
return 'C:\\ffmpeg\\bin\\ffmpeg.exe'; // Windows
default:
return '/usr/bin/ffmpeg'; // Centos or others...
}
}

// https://api.ipify.org
Expand Down Expand Up @@ -65,6 +62,8 @@ const rtcMaxPort = 40100;

const numWorkers = require('os').cpus().length;

const ffmpegPath = getFFmpegPath(platform);

module.exports = {
console: {
/*
Expand Down

0 comments on commit b508de6

Please sign in to comment.