fix(call): ringtone loudness, caller decline notice, All-Muted badge
Three issues from live testing:
- A1: the 'classic' ringtone (call.ogg, mastered near full scale) was much
louder than the synthesized styles. Attenuate it (CLASSIC_GAIN 0.45) so all
ringtones sit at a comparable level.
- A3/A4: the caller had no indication when a DM/group callee declined — their
UI kept "ringing" until the notification lifetime expired. IncomingCallListener
now listens for RTCDecline events for a call we're hosting in the room and
toasts the caller ("<name> declined your call").
- G1: the PiP "All muted" badge fired when any single remote participant muted.
useRemoteAllMuted now returns true only when there is >=1 remote and every
remote participant is muted.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -102,12 +102,17 @@ const playPhrase = (style: SynthStyle, volume: number, destination: AudioNode):
|
||||
});
|
||||
};
|
||||
|
||||
// The bundled call.ogg is mastered near full scale, so at equal `volume` it is
|
||||
// perceptibly much louder than the synthesized styles (which peak at ~0.12–0.3).
|
||||
// Attenuate it so all ringtones sit at a comparable loudness.
|
||||
const CLASSIC_GAIN = 0.45;
|
||||
|
||||
const startClassic = (volume: number, loop: boolean): (() => void) => {
|
||||
let audio: HTMLAudioElement | undefined;
|
||||
try {
|
||||
audio = new Audio(CallSound);
|
||||
audio.loop = loop;
|
||||
audio.volume = clamp01(volume);
|
||||
audio.volume = clamp01(volume) * CLASSIC_GAIN;
|
||||
audio.play().catch(() => undefined);
|
||||
} catch {
|
||||
audio = undefined;
|
||||
|
||||
Reference in New Issue
Block a user