Fix slides export for cluster setup

In cluster proxy setup as described in
https://docs.bigbluebutton.org/admin/clusterproxy.html you cannot assume that
the BBB Web API URL is at the same domain as the html5 client. Therefore
operators need to adjust the URL where presentation download is available.

This patch adds the ability to override the config provided by the package. This
is related to #14484
This commit is contained in:
Daniel Schreiber 2022-10-22 11:19:39 +02:00
parent 175d90c015
commit b706069e20
4 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,13 @@
let _ = require('lodash');
let fs = require('fs');
const settings = require('./settings');
const LOCAL_SETTINGS_FILE_PATH = '/etc/bigbluebutton/bbb-export-annotations.json';
const config = settings;
if (fs.existsSync(LOCAL_SETTINGS_FILE_PATH)) {
const local_config = JSON.parse(fs.readFileSync(LOCAL_SETTINGS_FILE_PATH));
_.mergeWith(config, local_config, (a, b) => (_.isArray(b) ? b : undefined));
}
module.exports = config;

View File

@ -28,6 +28,7 @@
"msgName": "NewPresAnnFileAvailableMsg"
},
"bbbWebAPI": "http://127.0.0.1:8090",
"bbbWebPublicAPI": "/bigbluebutton/",
"bbbPadsAPI": "http://127.0.0.1:9002",
"redis": {
"host": "127.0.0.1",

View File

@ -9,6 +9,7 @@
"dependencies": {
"axios": "^0.26.0",
"form-data": "^4.0.0",
"lodash": "^4.17.21",
"perfect-freehand": "^1.0.16",
"probe-image-size": "^7.2.3",
"redis": "^4.0.3",

View File

@ -28,7 +28,7 @@ async function notifyMeetingActor() {
await client.connect();
client.on('error', (err) => logger.info('Redis Client Error', err));
const link = path.join(`${path.sep}bigbluebutton`, 'presentation',
const link = config.bbbWebPublicAPI + path.join('presentation',
exportJob.parentMeetingId, exportJob.parentMeetingId,
exportJob.presId, 'pdf', jobId, filename);