fix: pass audio/video URL params to EC for correct initial device state

- Camera no longer starts enabled when user disables it in prescreen
- When PTT mode is enabled, call starts muted so PTT works immediately
  without requiring a manual mute first
- CallControlState also updated to match the forced-off audio for PTT

EC 0.16.x ignores io.element.device_mute for initial state at startup,
so audio= and video= URL params are the only reliable way to set the
initial device state before the call begins.
This commit is contained in:
root
2026-05-14 18:54:09 -04:00
parent 9580f2a744
commit 487e884e51
2 changed files with 14 additions and 6 deletions
+5 -1
View File
@@ -60,7 +60,9 @@ export class CallEmbed {
room: Room,
intent: ElementCallIntent,
themeKind: ElementCallThemeKind,
noiseSuppression = true
noiseSuppression = true,
initialAudio = true,
initialVideo = false
): Widget {
const userId = mx.getSafeUserId();
const deviceId = mx.getDeviceId() ?? '';
@@ -83,6 +85,8 @@ export class CallEmbed {
lang: 'en-EN',
theme: themeKind,
noiseSuppression: noiseSuppression.toString(),
audio: initialAudio.toString(),
video: initialVideo.toString(),
});
const widgetUrl = new URL(