mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-31 07:00:26 +00:00
tidy
This commit is contained in:
@@ -25,7 +25,7 @@ import { useLatest } from "../useLatest";
|
||||
export const MAX_PARTICIPANT_COUNT_FOR_SOUND = 8;
|
||||
export const THROTTLE_SOUND_EFFECT_MS = 500;
|
||||
|
||||
const sounds = prefetchSounds({
|
||||
export const callEventAudioSounds = prefetchSounds({
|
||||
join: {
|
||||
mp3: joinCallSoundMp3,
|
||||
ogg: joinCallSoundOgg,
|
||||
@@ -46,7 +46,7 @@ export function CallEventAudioRenderer({
|
||||
vm: CallViewModel;
|
||||
}): ReactNode {
|
||||
const audioEngineCtx = useAudioContext({
|
||||
sounds,
|
||||
sounds: callEventAudioSounds,
|
||||
latencyHint: "interactive",
|
||||
});
|
||||
const audioEngineRef = useLatest(audioEngineCtx);
|
||||
|
||||
@@ -42,7 +42,7 @@ import { useUrlParams } from "../UrlParams";
|
||||
import { E2eeType } from "../e2ee/e2eeType";
|
||||
import { Link } from "../button/Link";
|
||||
import { useAudioContext } from "../useAudioContext";
|
||||
import { CallEventAudioSounds } from "./CallEventAudioRenderer";
|
||||
import { callEventAudioSounds } from "./CallEventAudioRenderer";
|
||||
import { useLatest } from "../useLatest";
|
||||
|
||||
declare global {
|
||||
@@ -76,7 +76,7 @@ export const GroupCallView: FC<Props> = ({
|
||||
const isJoined = useMatrixRTCSessionJoinState(rtcSession);
|
||||
const leaveSoundContext = useLatest(
|
||||
useAudioContext({
|
||||
sounds: CallEventAudioSounds,
|
||||
sounds: callEventAudioSounds,
|
||||
latencyHint: "interactive",
|
||||
}),
|
||||
);
|
||||
@@ -227,6 +227,7 @@ export const GroupCallView: FC<Props> = ({
|
||||
// therefore we want the event to be sent instantly without getting queued/batched.
|
||||
const sendInstantly = !!widget;
|
||||
setLeaveError(leaveError);
|
||||
setLeft(true);
|
||||
PosthogAnalytics.instance.eventCallEnded.track(
|
||||
rtcSession.room.roomId,
|
||||
rtcSession.memberships.length,
|
||||
@@ -241,7 +242,6 @@ export const GroupCallView: FC<Props> = ({
|
||||
)
|
||||
// Only sends matrix leave event. The Livekit session will disconnect once the ActiveCall-view unmounts.
|
||||
.then(() => {
|
||||
setLeft(true);
|
||||
if (
|
||||
!isPasswordlessUser &&
|
||||
!confineToRoom &&
|
||||
|
||||
Reference in New Issue
Block a user