chore: upgrade i18next 26, prettier 3, fontsource-variable, domhandler 6, lint-staged 17
- i18next 23->26 + react-i18next 15->17 - prettier 2->3, reformat all files - replace @fontsource/inter with @fontsource-variable/inter 5, update import path - domhandler 5->6 (aligns with transitive deps) - lint-staged 16->17
This commit is contained in:
@@ -46,14 +46,14 @@ export const createCallEmbed = (
|
||||
container: HTMLElement,
|
||||
pref?: CallPreferences,
|
||||
noiseSuppression = true,
|
||||
forceAudioOff = false
|
||||
forceAudioOff = false,
|
||||
): CallEmbed => {
|
||||
const rtcSession = mx.matrixRTC.getRoomSession(room);
|
||||
const ongoing =
|
||||
MatrixRTCSession.sessionMembershipsForRoom(room, rtcSession.sessionDescription).length > 0;
|
||||
|
||||
const intent = CallEmbed.getIntent(dm, ongoing, pref?.video);
|
||||
const initialAudio = forceAudioOff ? false : pref?.microphone ?? true;
|
||||
const initialAudio = forceAudioOff ? false : (pref?.microphone ?? true);
|
||||
const initialVideo = pref?.video ?? false;
|
||||
const widget = CallEmbed.getWidget(
|
||||
mx,
|
||||
@@ -62,7 +62,7 @@ export const createCallEmbed = (
|
||||
themeKind,
|
||||
noiseSuppression,
|
||||
initialAudio,
|
||||
initialVideo
|
||||
initialVideo,
|
||||
);
|
||||
const controlState =
|
||||
pref && new CallControlState(forceAudioOff ? false : pref.microphone, pref.video, pref.sound);
|
||||
@@ -94,12 +94,12 @@ export const useCallStart = (dm = false) => {
|
||||
container,
|
||||
pref,
|
||||
callNoiseSuppression ?? true,
|
||||
!!pttMode
|
||||
!!pttMode,
|
||||
);
|
||||
|
||||
setCallEmbed(callEmbed);
|
||||
},
|
||||
[mx, dm, theme, setCallEmbed, callEmbedRef, callNoiseSuppression, pttMode]
|
||||
[mx, dm, theme, setCallEmbed, callEmbedRef, callNoiseSuppression, pttMode],
|
||||
);
|
||||
|
||||
return startCall;
|
||||
@@ -113,7 +113,7 @@ export const useCallJoined = (embed?: CallEmbed): boolean => {
|
||||
ElementWidgetActions.JoinCall,
|
||||
useCallback(() => {
|
||||
setJoined(true);
|
||||
}, [])
|
||||
}, []),
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -134,7 +134,7 @@ export const useCallMemberSoundSync = (embed: CallEmbed) => {
|
||||
const callSession = useCallSession(embed.room);
|
||||
useCallMembersChange(
|
||||
callSession,
|
||||
useCallback(() => embed.control.applySound(), [embed])
|
||||
useCallback(() => embed.control.applySound(), [embed]),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -164,6 +164,6 @@ export const useCallEmbedPlacementSync = (containerViewRef: RefObject<HTMLDivEle
|
||||
|
||||
useResizeObserver(
|
||||
syncCallEmbedPlacement,
|
||||
useCallback(() => containerViewRef.current, [containerViewRef])
|
||||
useCallback(() => containerViewRef.current, [containerViewRef]),
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user