refactor: remove instanceId from client (#20850)
This commit is contained in:
parent
b7f8b994c5
commit
d3406a2e93
@ -29,7 +29,6 @@ export interface Locales {
|
||||
name: string
|
||||
}
|
||||
export interface App {
|
||||
instanceId: string
|
||||
mobileFontSize: string
|
||||
desktopFontSize: string
|
||||
audioChatNotification: boolean
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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');
|
||||
};
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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`,
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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');
|
||||
|
||||
/**
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@ import { MeetingClientSettings } from '../../Types/meetingClientSettings';
|
||||
export const meetingClientSettingsInitialValues: MeetingClientSettings = {
|
||||
public: {
|
||||
app: {
|
||||
instanceId: '',
|
||||
mobileFontSize: '16px',
|
||||
desktopFontSize: '14px',
|
||||
audioChatNotification: false,
|
||||
|
@ -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'
|
||||
);
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user