refactor: remove instanceId from client (#20850)

This commit is contained in:
Ramón Souza 2024-08-02 15:10:39 -03:00 committed by GitHub
parent b7f8b994c5
commit d3406a2e93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 12 additions and 22 deletions

View File

@ -29,7 +29,6 @@ export interface Locales {
name: string
}
export interface App {
instanceId: string
mobileFontSize: string
desktopFontSize: string
audioChatNotification: boolean

View File

@ -76,7 +76,7 @@ class ActivityCheck extends Component {
}
playAudioAlert() {
this.alert = new Audio(`${window.meetingClientSettings.public.app.cdn + window.meetingClientSettings.public.app.basename + window.meetingClientSettings.public.app.instanceId}/resources/sounds/notify.mp3`);
this.alert = new Audio(`${window.meetingClientSettings.public.app.cdn + window.meetingClientSettings.public.app.basename}/resources/sounds/notify.mp3`);
this.alert.addEventListener('ended', () => { this.alert.src = null; });
this.alert.play();
}

View File

@ -6,7 +6,7 @@ import AudioTest from './component';
const AudioTestContainer = (props) => {
const outputDeviceId = useReactiveVar(AudioManager._outputDeviceId.value);
const handlePlayAudioSample = useCallback((deviceId) => {
const sound = new Audio(`${window.meetingClientSettings.public.app.cdn + window.meetingClientSettings.public.app.basename + window.meetingClientSettings.public.app.instanceId}/resources/sounds/audioSample.mp3`);
const sound = new Audio(`${window.meetingClientSettings.public.app.cdn + window.meetingClientSettings.public.app.basename}/resources/sounds/audioSample.mp3`);
sound.addEventListener('ended', () => { sound.src = null; });
if (deviceId && sound.setSinkId) sound.setSinkId(deviceId);
sound.play();

View File

@ -2,8 +2,7 @@ import AudioService from '/imports/ui/components/audio/service';
const playAlertSound = () => {
AudioService.playAlertSound(`${window.meetingClientSettings.public.app.cdn
+ window.meetingClientSettings.public.app.basename
+ window.meetingClientSettings.public.app.instanceId}`
+ window.meetingClientSettings.public.app.basename}`
+ '/resources/sounds/notify.mp3');
};

View File

@ -67,8 +67,7 @@ export const userJoinPushAlert = (
if (userJoinAudioAlerts) {
new Audio(`${window.meetingClientSettings.public.app.cdn
+ window.meetingClientSettings.public.app.basename
+ window.meetingClientSettings.public.app.instanceId}`
+ window.meetingClientSettings.public.app.basename}`
+ '/resources/sounds/userJoin.mp3').play();
}
@ -92,8 +91,7 @@ export const userLeavePushAlert = (
if (userLeaveAudioAlerts) {
new Audio(`${window.meetingClientSettings.public.app.cdn
+ window.meetingClientSettings.public.app.basename
+ window.meetingClientSettings.public.app.instanceId}`
+ window.meetingClientSettings.public.app.basename}`
+ '/resources/sounds/userJoin.mp3').play();
}

View File

@ -9,7 +9,7 @@ const playAlert = () => {
const APP_CONFIG = window.meetingClientSettings.public.app;
return AudioService.playAlertSound(
`${APP_CONFIG.cdn + APP_CONFIG.basename + APP_CONFIG.instanceId}/resources/sounds/Poll.mp3`,
`${APP_CONFIG.cdn + APP_CONFIG.basename}/resources/sounds/Poll.mp3`,
);
};

View File

@ -42,7 +42,7 @@ class RaiseHandNotifier extends Component {
this.statusNotifierId = null;
this.audio = new Audio(`${window.meetingClientSettings.public.app.cdn + window.meetingClientSettings.public.app.basename + window.meetingClientSettings.public.app.instanceId}/resources/sounds/bbb-handRaise.mp3`);
this.audio = new Audio(`${window.meetingClientSettings.public.app.cdn + window.meetingClientSettings.public.app.basename}/resources/sounds/bbb-handRaise.mp3`);
this.renderRaisedHands = this.renderRaisedHands.bind(this);
this.getRaisedHandNames = this.getRaisedHandNames.bind(this);

View File

@ -298,8 +298,7 @@ const viewScreenshare = (options = {}, hasAudio) => {
const screenShareEndAlert = () => AudioService
.playAlertSound(`${window.meetingClientSettings.public.app.cdn
+ window.meetingClientSettings.public.app.basename
+ window.meetingClientSettings.public.app.instanceId}`
+ window.meetingClientSettings.public.app.basename}`
+ '/resources/sounds/ScreenshareOff.mp3');
/**

View File

@ -398,8 +398,7 @@ const UserJoinedMeetingAlert = (obj) => {
if (userJoinAudioAlerts) {
AudioService.playAlertSound(`${window.meetingClientSettings.public.app.cdn
+ window.meetingClientSettings.public.app.basename
+ window.meetingClientSettings.public.app.instanceId}`
+ window.meetingClientSettings.public.app.basename}`
+ '/resources/sounds/userJoin.mp3');
}
@ -428,8 +427,7 @@ const UserLeftMeetingAlert = (obj) => {
if (userLeaveAudioAlerts) {
AudioService.playAlertSound(`${window.meetingClientSettings.public.app.cdn
+ window.meetingClientSettings.public.app.basename
+ window.meetingClientSettings.public.app.instanceId}`
+ window.meetingClientSettings.public.app.basename}`
+ '/resources/sounds/notify.mp3');
}

View File

@ -3,7 +3,6 @@ import { MeetingClientSettings } from '../../Types/meetingClientSettings';
export const meetingClientSettingsInitialValues: MeetingClientSettings = {
public: {
app: {
instanceId: '',
mobileFontSize: '16px',
desktopFontSize: '14px',
audioChatNotification: false,

View File

@ -832,8 +832,7 @@ class AudioManager {
this.playAlertSound(
`${
window.meetingClientSettings.public.app.cdn +
window.meetingClientSettings.public.app.basename +
window.meetingClientSettings.public.app.instanceId
window.meetingClientSettings.public.app.basename
}` + '/resources/sounds/LeftCall.mp3'
);
}

View File

@ -29,8 +29,7 @@ const MODELS = {
const getBasePath = () => {
const BASE_PATH = window.meetingClientSettings.public.app.cdn
+ window.meetingClientSettings.public.app.basename
+ window.meetingClientSettings.public.app.instanceId;
+ window.meetingClientSettings.public.app.basename;
return BASE_PATH;
};