262 lines
6.7 KiB
JavaScript
262 lines
6.7 KiB
JavaScript
// Jitsi Meet configuration.
|
||
var config = {};
|
||
|
||
config.hosts = {};
|
||
|
||
config.hosts.domain = 'meet.jitsi';
|
||
config.focusUserJid = 'focus@auth.meet.jitsi';
|
||
|
||
var subdir = '<!--# echo var="subdir" default="" -->';
|
||
var subdomain = "<!--# echo var="subdomain" default="" -->";
|
||
if (subdir.startsWith('<!--')) {
|
||
subdir = '';
|
||
}
|
||
if (subdomain) {
|
||
subdomain = subdomain.substring(0,subdomain.length-1).split('.').join('_').toLowerCase() + '.';
|
||
}
|
||
config.hosts.muc = 'muc.' + subdomain + 'meet.jitsi';
|
||
config.bosh = 'https://127.0.0.1:8443/' + subdir + 'http-bind';
|
||
config.websocket = 'wss://127.0.0.1:8443/' + subdir + 'xmpp-websocket';
|
||
|
||
// Video configuration.
|
||
//
|
||
|
||
config.resolution = 1080;
|
||
config.constraints = {
|
||
video: {
|
||
height: { ideal: 1080, max: 1080, min: 180 },
|
||
width: { ideal: 1280, max: 1280, min: 320},
|
||
}
|
||
};
|
||
|
||
config.startVideoMuted = 10;
|
||
config.startWithVideoMuted = false;
|
||
|
||
config.flags = {
|
||
sourceNameSignaling: true,
|
||
sendMultipleVideoStreams: true,
|
||
receiveMultipleVideoStreams: true
|
||
};
|
||
|
||
// ScreenShare Configuration.
|
||
//
|
||
|
||
// Audio configuration.
|
||
//
|
||
|
||
config.enableNoAudioDetection = true;
|
||
config.enableTalkWhileMuted = false;
|
||
config.disableAP = false;
|
||
|
||
config.audioQuality = {
|
||
stereo: false
|
||
};
|
||
|
||
config.startAudioOnly = false;
|
||
config.startAudioMuted = 10;
|
||
config.startWithAudioMuted = false;
|
||
config.startSilent = false;
|
||
config.enableOpusRed = false;
|
||
config.disableAudioLevels = false;
|
||
config.enableNoisyMicDetection = true;
|
||
|
||
|
||
// Peer-to-Peer options.
|
||
//
|
||
|
||
config.p2p = {
|
||
enabled: true
|
||
};
|
||
|
||
|
||
// Breakout Rooms
|
||
//
|
||
|
||
config.hideAddRoomButton = false;
|
||
|
||
|
||
// Etherpad
|
||
//
|
||
|
||
// Recording.
|
||
//
|
||
|
||
// Local recording configuration.
|
||
config.localRecording = {
|
||
disable: false,
|
||
notifyAllParticipants: false,
|
||
disableSelfRecording: false
|
||
};
|
||
|
||
|
||
// Analytics.
|
||
//
|
||
|
||
config.analytics = {};
|
||
|
||
// Dial in/out services.
|
||
//
|
||
|
||
|
||
// Calendar service integration.
|
||
//
|
||
|
||
config.enableCalendarIntegration = false;
|
||
|
||
// Invitation service.
|
||
//
|
||
|
||
// Miscellaneous.
|
||
//
|
||
|
||
// Prejoin page.
|
||
config.prejoinConfig = {
|
||
enabled: true,
|
||
|
||
// Hides the participant name editing field in the prejoin screen.
|
||
hideDisplayName: false
|
||
};
|
||
|
||
// List of buttons to hide from the extra join options dropdown on prejoin screen.
|
||
// Welcome page.
|
||
config.welcomePage = {
|
||
disabled: true
|
||
};
|
||
|
||
// Close page.
|
||
config.enableClosePage = false;
|
||
|
||
// Default language.
|
||
config.defaultLanguage = 'ru';
|
||
// Require users to always specify a display name.
|
||
config.requireDisplayName = false;
|
||
|
||
// Chrome extension banner.
|
||
// Disables profile and the edit of all fields from the profile settings (display name and email)
|
||
config.disableProfile = false;
|
||
|
||
// Room password (false for anything, number for max digits)
|
||
config.roomPasswordNumberOfDigits = false;
|
||
// Advanced.
|
||
//
|
||
|
||
// Transcriptions (subtitles and buttons can be configured in interface_config)
|
||
config.transcription = {
|
||
enabled: false,
|
||
translationLanguages: [],
|
||
translationLanguagesHead: ['en'],
|
||
useAppLanguage: true,
|
||
preferredLanguage: 'en-US',
|
||
disableStartForAll: false,
|
||
autoCaptionOnRecord: false,
|
||
};
|
||
|
||
// Dynamic branding
|
||
// Deployment information.
|
||
//
|
||
|
||
config.deploymentInfo = {};
|
||
|
||
// Deep Linking
|
||
config.disableDeepLinking = false;
|
||
|
||
// P2P preferred codec
|
||
// Video quality settings.
|
||
//
|
||
|
||
config.videoQuality = {};
|
||
// Reactions
|
||
config.disableReactions = false;
|
||
|
||
// Polls
|
||
config.disablePolls = false;
|
||
|
||
// Configure toolbar buttons
|
||
// Hides the buttons at pre-join screen
|
||
// Configure remote participant video menu
|
||
config.remoteVideoMenu = {
|
||
disabled: false,
|
||
disableKick: false,
|
||
disableGrantModerator: false,
|
||
disablePrivateChat: false
|
||
};
|
||
|
||
// Configure e2eping
|
||
config.e2eping = {
|
||
enabled: false
|
||
};
|
||
|
||
|
||
|
||
// Settings for the Excalidraw whiteboard integration.
|
||
config.whiteboard = {
|
||
enabled: false,
|
||
collabServerBaseUrl: ''
|
||
};
|
||
|
||
// Testing
|
||
config.testing = {
|
||
enableAv1Support: false
|
||
};
|
||
// Кастомная конфигурация Jitsi Meet
|
||
// Этот файл добавляется в конец сгенерированного config.js скриптом /etc/cont-init.d/10-config
|
||
// ВАЖНО: Переопределяем bosh и websocket URL для использования HTTP и 127.0.0.1
|
||
|
||
// КРИТИЧНО: Переопределяем настройки подключения СРАЗУ после загрузки
|
||
// Используем немедленно выполняемую функцию, чтобы код выполнился как можно раньше
|
||
(function() {
|
||
'use strict';
|
||
// Переопределяем настройки подключения
|
||
config.bosh = 'http://127.0.0.1:8443/http-bind';
|
||
config.websocket = 'ws://127.0.0.1:8443/xmpp-websocket';
|
||
|
||
// Также переопределяем в window, если используется
|
||
if (typeof window !== 'undefined') {
|
||
window.config = window.config || {};
|
||
window.config.bosh = 'http://127.0.0.1:8443/http-bind';
|
||
window.config.websocket = 'ws://127.0.0.1:8443/xmpp-websocket';
|
||
}
|
||
})();
|
||
|
||
// Защищаем от перезаписи через Object.defineProperty
|
||
(function() {
|
||
var boshUrl = 'http://127.0.0.1:8443/http-bind';
|
||
var websocketUrl = 'ws://127.0.0.1:8443/xmpp-websocket';
|
||
|
||
try {
|
||
Object.defineProperty(config, 'bosh', {
|
||
get: function() { return boshUrl; },
|
||
set: function(value) {
|
||
console.warn('[Jitsi Custom Config] Попытка изменить config.bosh на', value, '- игнорируется');
|
||
},
|
||
configurable: false,
|
||
enumerable: true
|
||
});
|
||
|
||
Object.defineProperty(config, 'websocket', {
|
||
get: function() { return websocketUrl; },
|
||
set: function(value) {
|
||
console.warn('[Jitsi Custom Config] Попытка изменить config.websocket на', value, '- игнорируется');
|
||
},
|
||
configurable: false,
|
||
enumerable: true
|
||
});
|
||
|
||
console.log('[Jitsi Custom Config] Настройки bosh и websocket защищены от перезаписи');
|
||
} catch (e) {
|
||
console.warn('[Jitsi Custom Config] Не удалось установить защиту, используем периодическую проверку');
|
||
// Резервный механизм - периодическая проверка
|
||
setInterval(function() {
|
||
if (config.bosh !== boshUrl) {
|
||
config.bosh = boshUrl;
|
||
console.log('[Jitsi Custom Config] Восстановлен config.bosh');
|
||
}
|
||
if (config.websocket !== websocketUrl) {
|
||
config.websocket = websocketUrl;
|
||
console.log('[Jitsi Custom Config] Восстановлен config.websocket');
|
||
}
|
||
}, 100);
|
||
}
|
||
})();
|
||
|