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